build: Handle broken or missing mtools

This commit is contained in:
mintsuki 2021-05-31 21:48:48 +02:00
parent 6ac24628e8
commit edf490b872
2 changed files with 6 additions and 5 deletions

View File

@ -66,10 +66,11 @@ limine-bios: stage23-bios decompressor
bin/limine-eltorito-efi.bin: build/stage23-uefi/BOOTX64.EFI
dd if=/dev/zero of=$@ bs=512 count=2880
mformat -i $@ -f 1440 ::
mmd -D s -i $@ ::/EFI
mmd -D s -i $@ ::/EFI/BOOT
mcopy -D o -i $@ build/stage23-uefi/BOOTX64.EFI ::/EFI/BOOT
( mformat -i $@ -f 1440 :: && \
mmd -D s -i $@ ::/EFI && \
mmd -D s -i $@ ::/EFI/BOOT && \
mcopy -D o -i $@ build/stage23-uefi/BOOTX64.EFI ::/EFI/BOOT ) \
|| rm -f $@
.PHONY: limine-uefi
limine-uefi:

View File

@ -79,7 +79,7 @@ make toolchain
### Building Limine
In order to build Limine, the following packages have to be installed: `bash`, `make`, `git`,
`which`, `nasm`, `mtools`. Furthermore, either the toolchain must have been built in
`which`, `nasm`, `mtools` (optional, necessary to build `limine-eltorito-efi.bin`). Furthermore, either the toolchain must have been built in
the previous paragraph, or `gcc` and `binutils` must also be installed.
The bootloader can then be built with: