Update
This commit is contained in:
parent
b5d7dbb650
commit
d68a24f849
1 changed files with 7 additions and 7 deletions
14
GNUmakefile
14
GNUmakefile
|
@ -30,7 +30,7 @@ ovmf:
|
||||||
cd ovmf && curl -Lo OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip && unzip OVMF-X64.zip
|
cd ovmf && curl -Lo OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip && unzip OVMF-X64.zip
|
||||||
|
|
||||||
limine:
|
limine:
|
||||||
git clone https://github.com/limine-bootloader/limine.git --branch=v4.x-branch-binary --depth=1
|
git clone https://github.com/limine-bootloader/limine.git --branch=v5.x-branch-binary --depth=1
|
||||||
$(MAKE) -C limine
|
$(MAKE) -C limine
|
||||||
|
|
||||||
.PHONY: kernel
|
.PHONY: kernel
|
||||||
|
@ -41,15 +41,15 @@ $(IMAGE_NAME).iso: limine kernel
|
||||||
rm -rf iso_root
|
rm -rf iso_root
|
||||||
mkdir -p iso_root
|
mkdir -p iso_root
|
||||||
cp kernel/kernel.elf \
|
cp kernel/kernel.elf \
|
||||||
limine.cfg limine/limine.sys limine/limine-cd.bin limine/limine-cd-efi.bin iso_root/
|
limine.cfg limine/limine-bios.sys limine/limine-bios-cd.bin limine/limine-uefi-cd.bin iso_root/
|
||||||
mkdir -p iso_root/EFI/BOOT
|
mkdir -p iso_root/EFI/BOOT
|
||||||
cp limine/BOOT*.EFI iso_root/EFI/BOOT/
|
cp limine/BOOT*.EFI iso_root/EFI/BOOT/
|
||||||
xorriso -as mkisofs -b limine-cd.bin \
|
xorriso -as mkisofs -b limine-bios-cd.bin \
|
||||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
--efi-boot limine-cd-efi.bin \
|
--efi-boot limine-uefi-cd.bin \
|
||||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||||
iso_root -o $(IMAGE_NAME).iso
|
iso_root -o $(IMAGE_NAME).iso
|
||||||
limine/limine-deploy $(IMAGE_NAME).iso
|
./limine/limine bios-install $(IMAGE_NAME).iso
|
||||||
rm -rf iso_root
|
rm -rf iso_root
|
||||||
|
|
||||||
$(IMAGE_NAME).hdd: limine kernel
|
$(IMAGE_NAME).hdd: limine kernel
|
||||||
|
@ -58,13 +58,13 @@ $(IMAGE_NAME).hdd: limine kernel
|
||||||
parted -s $(IMAGE_NAME).hdd mklabel gpt
|
parted -s $(IMAGE_NAME).hdd mklabel gpt
|
||||||
parted -s $(IMAGE_NAME).hdd mkpart ESP fat32 2048s 100%
|
parted -s $(IMAGE_NAME).hdd mkpart ESP fat32 2048s 100%
|
||||||
parted -s $(IMAGE_NAME).hdd set 1 esp on
|
parted -s $(IMAGE_NAME).hdd set 1 esp on
|
||||||
limine/limine-deploy $(IMAGE_NAME).hdd
|
./limine/limine bios-install $(IMAGE_NAME).hdd
|
||||||
sudo losetup -Pf --show $(IMAGE_NAME).hdd >loopback_dev
|
sudo losetup -Pf --show $(IMAGE_NAME).hdd >loopback_dev
|
||||||
sudo mkfs.fat -F 32 `cat loopback_dev`p1
|
sudo mkfs.fat -F 32 `cat loopback_dev`p1
|
||||||
mkdir -p img_mount
|
mkdir -p img_mount
|
||||||
sudo mount `cat loopback_dev`p1 img_mount
|
sudo mount `cat loopback_dev`p1 img_mount
|
||||||
sudo mkdir -p img_mount/EFI/BOOT
|
sudo mkdir -p img_mount/EFI/BOOT
|
||||||
sudo cp -v kernel/kernel.elf limine.cfg limine/limine.sys img_mount/
|
sudo cp -v kernel/kernel.elf limine.cfg limine/limine-bios.sys img_mount/
|
||||||
sudo cp -v limine/BOOT*.EFI img_mount/EFI/BOOT/
|
sudo cp -v limine/BOOT*.EFI img_mount/EFI/BOOT/
|
||||||
sync
|
sync
|
||||||
sudo umount img_mount
|
sudo umount img_mount
|
||||||
|
|
Loading…
Reference in a new issue