Skip to content

Commit

Permalink
Remove src/modules/linux (Wash away the sandcastle)
Browse files Browse the repository at this point in the history
Sandcastle never worked on pongoOS 2.6.x. Wash it away.
  • Loading branch information
asdfugil committed Oct 25, 2024
1 parent 6632a20 commit f046e46
Show file tree
Hide file tree
Showing 25 changed files with 4 additions and 6,237 deletions.
14 changes: 0 additions & 14 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,20 +435,6 @@ FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
Please see the License for the specific language governing rights and
limitations under the License."

**libfdt license**:

libfdt is dual-licensed under the GPLv2 license or BSD 2-clause (ISC license). Read README.license at src/modules/linux/libfdt for more information.

The text of the 2-clause BSD license:

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

**LZMA decompressor**:
src/lib/lzma/lzmadec.c

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ endif

# Pongo options
PONGO_LD_FLAGS ?= -static -L$(LIB)/fixup -lc -Wl,-preload -Wl,-no_uuid -Wl,-e,start -Wl,-order_file,$(SRC)/sym_order.txt -Wl,-image_base,0x100000000 -Wl,-sectalign,__DATA,__common,0x8 -Wl,-segalign,0x4000 $(PONGO_LDFLAGS)
PONGO_CC_FLAGS ?= -Os -moutline -DPONGO_VERSION='"$(PONGO_VERSION)"' -DPONGO_BUILD='"$(PONGO_BUILD)"' -DPONGO_PRIVATE=1 -I$(SRC)/lib -I$(INC) -Iapple-include -I$(INC)/modules/linux/ -I$(SRC)/kernel -I$(SRC)/drivers -I$(SRC)/modules/linux/libfdt $(PONGO_LD_FLAGS) $(PONGO_CFLAGS)
PONGO_CC_FLAGS ?= -Os -moutline -DPONGO_VERSION='"$(PONGO_VERSION)"' -DPONGO_BUILD='"$(PONGO_BUILD)"' -DPONGO_PRIVATE=1 -I$(SRC)/lib -I$(INC) -Iapple-include -I$(SRC)/kernel -I$(SRC)/drivers $(PONGO_LD_FLAGS) $(PONGO_CFLAGS)

# KPF options
KPF_LD_FLAGS ?= -Wl,-kext $(KPF_LDFLAGS)
Expand Down
81 changes: 0 additions & 81 deletions scripts/load_linux.py

This file was deleted.

14 changes: 1 addition & 13 deletions src/kernel/entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,6 @@ __attribute__((noinline)) void pongo_entry_cached()
case BOOT_FLAG_RAW: // 4
break;

case BOOT_FLAG_LINUX: // 3
linux_prep_boot();
boot_msg = "Booting Linux...";
break;

case BOOT_FLAG_HOOK: // 2
// Hook for kernel patching here
screen_puts("Invoking preboot hook");
Expand Down Expand Up @@ -327,14 +322,7 @@ _Noreturn void pongo_entry(uint64_t *kernel_args, void *entryp, void (*exit_to_e
}
else
{
if(gBootFlag == BOOT_FLAG_LINUX)
{
linux_boot();
}
else
{
xnu_boot();
}
xnu_boot();
exit_to_el1_image(gBootArgs, gEntryPoint, (void*)((gTopOfKernelData + 0x3fffULL) & ~0x3fffULL));
}
screen_puts("didn't boot?!");
Expand Down
8 changes: 1 addition & 7 deletions src/kernel/pongo.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,9 @@ extern volatile char gBootFlag;
#define BOOT_FLAG_DEFAULT 0
#define BOOT_FLAG_HARD 1
#define BOOT_FLAG_HOOK 2
#define BOOT_FLAG_LINUX 3
// 3: Reserved
#define BOOT_FLAG_RAW 4

#define LINUX_DTREE_SIZE 262144
#define LINUX_CMDLINE_SIZE 4096

typedef uint64_t lock;
extern void lock_take(lock* lock); // takes a lock spinning initially but after being pre-empted once it will start yielding until it acquires it
extern void lock_take_spin(lock* lock); // takes a lock spinning until it acquires it
Expand Down Expand Up @@ -409,9 +406,6 @@ extern void mask_interrupt(uint32_t reg);
extern _Noreturn void wdt_reset();
extern void wdt_enable();
extern void wdt_disable();
extern bool linux_can_boot();
extern void linux_prep_boot();
extern void linux_boot();
extern void command_register(const char* name, const char* desc, void (*cb)(const char* cmd, char* args));
extern char* command_tokenize(char* str, uint32_t strbufsz);
extern uint8_t get_el(void);
Expand Down
18 changes: 0 additions & 18 deletions src/modules/linux/libfdt/Makefile.libfdt

This file was deleted.

56 changes: 0 additions & 56 deletions src/modules/linux/libfdt/README.license

This file was deleted.

3 changes: 0 additions & 3 deletions src/modules/linux/libfdt/TODO

This file was deleted.

Loading

0 comments on commit f046e46

Please sign in to comment.