Skip to content

Commit

Permalink
Upgrade limine to 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwang committed Dec 7, 2024
1 parent ef014f2 commit b04368f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
10 changes: 5 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ run-hdd-uefi: ovmf $(HDD_IMAGE)
qemu-system-x86_64 -enable-kvm -cpu host -serial stdio -M q35 -m 2G -smp 4 -no-reboot -rtc base=localtime -bios ovmf/OVMF.fd -drive id=handisk,if=ide,format=raw,bus=0,unit=0,file=$(HDD_IMAGE)

limine:
git clone https://github.com/limine-bootloader/limine.git --branch=v7.x-binary --depth=1
git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-binary --depth=1
make -C limine

ovmf:
Expand All @@ -44,7 +44,7 @@ $(ISO_IMAGE): limine initrd kernel
tar -cvpf initrd.tar -C $(TARGET_ROOT) bin assets etc usr root
mkdir -p iso_root
cp kernel/hanos.elf initrd.tar \
limine.cfg limine/limine-bios.sys limine/limine-bios-cd.bin limine/limine-uefi-cd.bin iso_root/
limine.conf limine/limine-bios.sys limine/limine-bios-cd.bin limine/limine-uefi-cd.bin iso_root/
xorriso -as mkisofs -b limine-bios-cd.bin \
-no-emul-boot -boot-load-size 4 -boot-info-table \
--efi-boot limine-uefi-cd.bin \
Expand All @@ -55,17 +55,17 @@ $(ISO_IMAGE): limine initrd kernel

$(HDD_IMAGE): limine initrd kernel
rm -rf initrd.tar
@if [ -e "xbstrap-build/system-root" ]; then cp -rf xbstrap-build/system-root/* initrd 2>/dev/null; fi
#@if [ -e "xbstrap-build/system-root" ]; then cp -rf xbstrap-build/system-root/* initrd 2>/dev/null; fi
mkdir -p initrd/etc initrd/usr initrd/root
cp -rf sysroot/* initrd
#cp -rf sysroot/* initrd
tar -cvpf initrd.tar -C $(TARGET_ROOT) bin assets etc usr root
rm -f $(HDD_IMAGE)
dd if=/dev/zero bs=1M count=0 seek=64 of=$(HDD_IMAGE)
sgdisk $(HDD_IMAGE) -n 1:2048 -t 1:ef00
./limine/limine bios-install $(HDD_IMAGE)
mformat -i $(HDD_IMAGE)@@1M
mmd -i $(HDD_IMAGE)@@1M ::/EFI ::/EFI/BOOT
mcopy -i $(HDD_IMAGE)@@1M kernel/hanos.elf initrd.tar limine.cfg limine/limine-bios.sys ::/
mcopy -i $(HDD_IMAGE)@@1M kernel/hanos.elf initrd.tar limine.conf limine/limine-bios.sys ::/
mcopy -i $(HDD_IMAGE)@@1M limine/BOOTX64.EFI limine/BOOTIA32.EFI ::/EFI/BOOT

clean:
Expand Down
15 changes: 0 additions & 15 deletions limine.cfg

This file was deleted.

12 changes: 12 additions & 0 deletions limine.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
timeout: 3
editor_enabled: yes
graphics: yes
interface_resolution: 800x600

/HanOS
protocol: limine
path: boot():/hanos.elf
module_path: boot():/initrd.tar
module_cmdline: INITRD
kaslr: no
resolution: 800x600

0 comments on commit b04368f

Please sign in to comment.