From e74bafa7e487008c0e6015697e5e47b191d80029 Mon Sep 17 00:00:00 2001 From: Alexander Hill Date: Sun, 13 Apr 2025 09:50:58 -0400 Subject: Reached the bootloader --- build-bootstrap.sh | 6 ++++++ build-chroot.sh | 8 ++++++++ limine.conf | 6 ++++++ 3 files changed, 20 insertions(+) create mode 100644 limine.conf diff --git a/build-bootstrap.sh b/build-bootstrap.sh index c5feabe..a49e08c 100755 --- a/build-bootstrap.sh +++ b/build-bootstrap.sh @@ -10,6 +10,7 @@ export HOST=x86_64-unknown-linux-musl # TODO: Where does /usr/com fit into all of this (shared state directory)? ~ahill mkdir -p $MAPLE/bin mkdir -p $MAPLE/boot +mkdir -p $MAPLE/boot/EFI/BOOT/ mkdir -p $MAPLE/dev mkdir -p $MAPLE/etc mkdir -p $MAPLE/home/root @@ -370,3 +371,8 @@ ln -s clang $MAPLE/bin/cc ln -s clang++ $MAPLE/bin/c++ ln -s ld.lld $MAPLE/bin/ld cd .. + +cd .. + +# Copy the necessary configuration files to the bootstrap +cp limine.conf $MAPLE/boot/EFI/BOOT/ \ No newline at end of file diff --git a/build-chroot.sh b/build-chroot.sh index 7d76a08..02c8876 100755 --- a/build-chroot.sh +++ b/build-chroot.sh @@ -172,6 +172,11 @@ cd ncurses-*/ --without-normal make -j $THREADS make -j $THREADS install +# NOTE: These symbolic links are for backwards compatibility. Specifically, for +# fixing "make menuconfig" for the Linux kernel, since it looks for the +# non-wide version of the library. ~ahill +ln -s libncursesw.so /lib/libncurses.so +ln -s libncurses++w.so /lib/libncurses++.so cd .. # zsh Build @@ -413,4 +418,7 @@ LLVM=1 make -j $THREADS LLVM=1 make -j $THREADS install cd .. +# Finally, make the image bootable. +cp /usr/share/limine/BOOTX64.EFI /boot/EFI/BOOT/ + cd .. diff --git a/limine.conf b/limine.conf new file mode 100644 index 0000000..5ff8cd3 --- /dev/null +++ b/limine.conf @@ -0,0 +1,6 @@ +timeout: 3 + +/Maple Linux +protocol: linux +path: boot():/vmlinuz +module_string: root=/dev/vda2 \ No newline at end of file -- cgit v1.2.3