Use sgdisk and mtools instead of parted and util-linux. Closes #6
This commit is contained in:
parent
3f031e7ffb
commit
587082ae56
1 changed files with 6 additions and 15 deletions
21
GNUmakefile
21
GNUmakefile
|
@ -70,22 +70,13 @@ $(IMAGE_NAME).iso: limine kernel
|
||||||
$(IMAGE_NAME).hdd: limine kernel
|
$(IMAGE_NAME).hdd: limine kernel
|
||||||
rm -f $(IMAGE_NAME).hdd
|
rm -f $(IMAGE_NAME).hdd
|
||||||
dd if=/dev/zero bs=1M count=0 seek=64 of=$(IMAGE_NAME).hdd
|
dd if=/dev/zero bs=1M count=0 seek=64 of=$(IMAGE_NAME).hdd
|
||||||
parted -s $(IMAGE_NAME).hdd mklabel gpt
|
sgdisk $(IMAGE_NAME).hdd -n 1:2048 -t 1:ef00
|
||||||
parted -s $(IMAGE_NAME).hdd mkpart ESP fat32 2048s 100%
|
|
||||||
parted -s $(IMAGE_NAME).hdd set 1 esp on
|
|
||||||
./limine/limine bios-install $(IMAGE_NAME).hdd
|
./limine/limine bios-install $(IMAGE_NAME).hdd
|
||||||
sudo losetup -Pf --show $(IMAGE_NAME).hdd >loopback_dev
|
mformat -i $(IMAGE_NAME).hdd@@1M
|
||||||
sudo mkfs.fat -F 32 `cat loopback_dev`p1
|
mmd -i $(IMAGE_NAME).hdd@@1M ::/EFI ::/EFI/BOOT
|
||||||
mkdir -p img_mount
|
mcopy -i $(IMAGE_NAME).hdd@@1M kernel/kernel.elf limine.cfg limine/limine-bios.sys ::/
|
||||||
sudo mount `cat loopback_dev`p1 img_mount
|
mcopy -i $(IMAGE_NAME).hdd@@1M limine/BOOTX64.EFI ::/EFI/BOOT
|
||||||
sudo mkdir -p img_mount/EFI/BOOT
|
mcopy -i $(IMAGE_NAME).hdd@@1M limine/BOOTIA32.EFI ::/EFI/BOOT
|
||||||
sudo cp -v kernel/kernel.elf limine.cfg limine/limine-bios.sys img_mount/
|
|
||||||
sudo cp -v limine/BOOTX64.EFI img_mount/EFI/BOOT/
|
|
||||||
sudo cp -v limine/BOOTIA32.EFI img_mount/EFI/BOOT/
|
|
||||||
sync
|
|
||||||
sudo umount img_mount
|
|
||||||
sudo losetup -d `cat loopback_dev`
|
|
||||||
rm -rf loopback_dev img_mount
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in a new issue