diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | initramfs_init | 16 | ||||
| -rw-r--r-- | limine.conf | 2 |
3 files changed, 17 insertions, 3 deletions
@@ -131,12 +131,14 @@ iso: kernel initramfs busybox rootfs $(LIMINE_DIR) echo "[yerba] bootstrapping Limine and creating ISO..."; \ mkdir -p $(ISO_ROOT)/boot/limine; \ mkdir -p $(ISO_ROOT)/EFI/BOOT; \ + mkdir -p $(ISO_ROOT)/yerba; \ cp $(BUILD_DIR)/bzImage $(ISO_ROOT)/boot/; \ cp $(BUILD_DIR)/initramfs.cpio.gz $(ISO_ROOT)/boot/; \ cp $(WORKING_DIR)/limine.conf $(ISO_ROOT)/boot/limine; \ cp $(LIMINE_DIR)/limine-bios.sys $(LIMINE_DIR)/limine-bios-cd.bin $(LIMINE_DIR)/limine-uefi-cd.bin $(ISO_ROOT)/boot/limine; \ cp $(LIMINE_DIR)/BOOTX64.EFI $(ISO_ROOT)/EFI/BOOT/; \ cp $(LIMINE_DIR)/BOOTIA32.EFI $(ISO_ROOT)/EFI/BOOT/; \ + cp $(BUILD_DIR)/rootfs.squashfs $(ISO_ROOT)/yerba/; \ xorriso -as mkisofs -R -r -J -b boot/limine/limine-bios-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus -apm-block-size 2048 --efi-boot boot/limine/limine-uefi-cd.bin -efi-boot-part --efi-boot-image --protective-msdos-label $(ISO_ROOT) -o $(ISO_PATH); \ $(LIMINE_DIR)/limine bios-install $(ISO_PATH); \ fi diff --git a/initramfs_init b/initramfs_init index 04afb60..385ccb8 100644 --- a/initramfs_init +++ b/initramfs_init @@ -3,8 +3,20 @@ mount -t proc none /proc mount -t sysfs none /sys mount -t devtmpfs none /dev -mount -t tmpfs none /tmp -echo "Mounted /dev, /proc, /sys, and /tmp respectively" +echo "[yerba-initramfs/init] Mounted /dev, /proc, /sys respectively" +mkdir -p /mnt/iso + +mount /dev/sr0 /mnt/iso +echo "[yerba-initramfs/init] Mounted /dev/sr0 (ISO root)" + +mkdir -p /mnt/root +mount -t squashfs -o loop /mnt/iso/yerba/rootfs.squashfs /mnt/root + +echo "[yerba-initramfs/init] TODO: Make this actually mount OverlayFS and switch_root." +echo "[yerba-initramfs/init] You will see a message saying something bad has happened. Please ignore this." + +echo "[yerba-initramfs/init] Something very very bad has occurred (oh no.)" +echo "[yerba-initramfs/init] Dropping you to a BusyBox shell." exec /bin/sh diff --git a/limine.conf b/limine.conf index 65d96ce..384d9ba 100644 --- a/limine.conf +++ b/limine.conf @@ -4,4 +4,4 @@ timeout: 5 protocol: linux kernel_path: boot():/boot/bzImage module_path: boot():/boot/initramfs.cpio.gz - cmdline: console=ttyS0 console=tty0 + cmdline: console=tty0 console=ttyS0 earlyprintk=vga init=/init |
