misc: limine-eltorito-efi.bin -> limine-cd-efi.bin

This commit is contained in:
mintsuki 2022-03-30 15:14:02 +02:00
parent 84394f0d68
commit 6f8474c249
4 changed files with 33 additions and 33 deletions

View File

@ -16,7 +16,7 @@ NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1))
override PATH := @PATH@ override PATH := @PATH@
export PATH export PATH
override BUILD_ELTORITO_EFI := @BUILD_ELTORITO_EFI@ override BUILD_CD_EFI := @BUILD_CD_EFI@
override BUILD_PXE := @BUILD_PXE@ override BUILD_PXE := @BUILD_PXE@
override BUILD_CD := @BUILD_CD@ override BUILD_CD := @BUILD_CD@
override BUILD_LIMINE_S2DEPLOY := @BUILD_LIMINE_S2DEPLOY@ override BUILD_LIMINE_S2DEPLOY := @BUILD_LIMINE_S2DEPLOY@
@ -101,7 +101,7 @@ install-data:
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine' $(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine'
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine.sys' '$(DESTDIR)$(PREFIX)/share/limine/' || true $(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine.sys' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true $(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true $(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-pxe.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true $(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/limine-pxe.bin' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTX64.EFI' '$(DESTDIR)$(PREFIX)/share/limine/' || true $(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTX64.EFI' '$(DESTDIR)$(PREFIX)/share/limine/' || true
$(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTIA32.EFI' '$(DESTDIR)$(PREFIX)/share/limine/' || true $(INSTALL) -m 644 '$(call SHESCAPE,$(BINDIR))/BOOTIA32.EFI' '$(DESTDIR)$(PREFIX)/share/limine/' || true
@ -140,24 +140,24 @@ ifneq ($(BUILD_LIMINE_S2DEPLOY), no)
$(MAKE) limine-s2deploy $(MAKE) limine-s2deploy
endif endif
.PHONY: limine-eltorito-efi .PHONY: limine-cd-efi
limine-eltorito-efi: limine-cd-efi:
ifneq ($(BUILD_ELTORITO_EFI), no) ifneq ($(BUILD_CD_EFI), no)
mkdir -p '$(call SHESCAPE,$(BINDIR))' mkdir -p '$(call SHESCAPE,$(BINDIR))'
dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' bs=512 count=2880 2>/dev/null dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' bs=512 count=2880 2>/dev/null
( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' -f 1440 :: && \ ( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' -f 1440 :: && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' ::/EFI && \ mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ::/EFI && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' ::/EFI/BOOT && \ mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ::/EFI/BOOT && \
( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' ] && \ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' ] && \
mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' ::/EFI/BOOT ) || true ) && \ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' ::/EFI/BOOT ) || true ) && \
( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ] && \ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ] && \
mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \
) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' ) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin'
endif endif
.PHONY: limine-uefi .PHONY: limine-uefi
limine-uefi: @BUILD_UEFI32@ @BUILD_UEFI64@ limine-uefi: @BUILD_UEFI32@ @BUILD_UEFI64@
$(MAKE) limine-eltorito-efi $(MAKE) limine-cd-efi
.PHONY: limine-uefi64 .PHONY: limine-uefi64
limine-uefi64: $(call MKESCAPE,$(SRCDIR))/reduced-gnu-efi limine-uefi64: $(call MKESCAPE,$(SRCDIR))/reduced-gnu-efi
@ -467,7 +467,7 @@ full-hybrid-test:
mkdir -p test_image/boot mkdir -p test_image/boot
sudo cp -rv $(BINDIR)/* test_image/boot/ sudo cp -rv $(BINDIR)/* test_image/boot/
sudo cp -rv test/* test_image/boot/ sudo cp -rv test/* test_image/boot/
xorriso -as mkisofs -b boot/limine-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table --efi-boot boot/limine-eltorito-efi.bin -efi-boot-part --efi-boot-image --protective-msdos-label test_image/ -o test.iso xorriso -as mkisofs -b boot/limine-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table --efi-boot boot/limine-cd-efi.bin -efi-boot-part --efi-boot-image --protective-msdos-label test_image/ -o test.iso
$(BINDIR)/limine-s2deploy test.iso $(BINDIR)/limine-s2deploy test.iso
qemu-system-x86_64 -m 512M -M q35 -bios ovmf-x64/OVMF.fd -net none -smp 4 -cdrom test.iso -debugcon stdio qemu-system-x86_64 -m 512M -M q35 -bios ovmf-x64/OVMF.fd -net none -smp 4 -cdrom test.iso -debugcon stdio
qemu-system-x86_64 -m 512M -M q35 -bios ovmf-x64/OVMF.fd -net none -smp 4 -hda test.iso -debugcon stdio qemu-system-x86_64 -m 512M -M q35 -bios ovmf-x64/OVMF.fd -net none -smp 4 -hda test.iso -debugcon stdio

View File

@ -91,7 +91,7 @@ Building the toolchain can be accomplished by running:
In order to build Limine, the following programs have to be installed: In order to build Limine, the following programs have to be installed:
`GNU make`, `grep`, `sed`, `find`, `awk`, `gzip`, `nasm`, `mtools` `GNU make`, `grep`, `sed`, `find`, `awk`, `gzip`, `nasm`, `mtools`
(optional, necessary to build `limine-eltorito-efi.bin`). (optional, necessary to build `limine-cd-efi.bin`).
Furthermore, either the toolchain must have been built in the previous Furthermore, either the toolchain must have been built in the previous
paragraph, or `gcc` or `llvm/clang` must also be installed, alongside paragraph, or `gcc` or `llvm/clang` must also be installed, alongside
`GNU binutils`. `nasm` is optional if the toolchain was built in the previous `GNU binutils`. `nasm` is optional if the toolchain was built in the previous
@ -180,10 +180,10 @@ with a supported file system.
### BIOS/UEFI hybrid ISO creation ### BIOS/UEFI hybrid ISO creation
In order to create a hybrid ISO with Limine, place the In order to create a hybrid ISO with Limine, place the
`limine-eltorito-efi.bin`, `limine-cd.bin`, `limine.sys`, and `limine.cfg` files `limine-cd-efi.bin`, `limine-cd.bin`, `limine.sys`, and `limine.cfg` files
into a directory which will serve as the root of the created ISO. into a directory which will serve as the root of the created ISO.
(`limine.sys` and `limine.cfg` must either be in the root or inside a `boot` (`limine.sys` and `limine.cfg` must either be in the root or inside a `boot`
subdirectory; `limine-eltorito-efi.bin` and `limine-cd.bin` can reside subdirectory; `limine-cd-efi.bin` and `limine-cd.bin` can reside
anywhere). anywhere).
Place any other file you want to be on the final ISO in said directory, then Place any other file you want to be on the final ISO in said directory, then
@ -191,7 +191,7 @@ run:
``` ```
xorriso -as mkisofs -b <relative path of limine-cd.bin> \ xorriso -as mkisofs -b <relative path of limine-cd.bin> \
-no-emul-boot -boot-load-size 4 -boot-info-table \ -no-emul-boot -boot-load-size 4 -boot-info-table \
--efi-boot <relative path of limine-eltorito-efi.bin> \ --efi-boot <relative path of limine-cd-efi.bin> \
-efi-boot-part --efi-boot-image --protective-msdos-label \ -efi-boot-part --efi-boot-image --protective-msdos-label \
<root directory> -o image.iso <root directory> -o image.iso
``` ```
@ -208,11 +208,11 @@ limine-s2deploy image.iso
For example, if it was copied in `<root directory>/boot/limine-cd.bin`, For example, if it was copied in `<root directory>/boot/limine-cd.bin`,
it would be `boot/limine-cd.bin`. it would be `boot/limine-cd.bin`.
`<relative path of limine-eltorito-efi.bin>` is the relative path of `<relative path of limine-cd-efi.bin>` is the relative path of
`limine-eltorito-efi.bin` inside the root directory. `limine-cd-efi.bin` inside the root directory.
For example, if it was copied in For example, if it was copied in
`<root directory>/boot/limine-eltorito-efi.bin`, it would be `<root directory>/boot/limine-cd-efi.bin`, it would be
`boot/limine-eltorito-efi.bin`. `boot/limine-cd-efi.bin`.
### BIOS/PXE boot ### BIOS/PXE boot
The `limine-pxe.bin` binary is a valid PXE boot image. The `limine-pxe.bin` binary is a valid PXE boot image.

View File

@ -126,24 +126,24 @@ fi
AC_SUBST(BUILD_UEFI64, [$BUILD_UEFI64]) AC_SUBST(BUILD_UEFI64, [$BUILD_UEFI64])
BUILD_ELTORITO_EFI="default" BUILD_CD_EFI="default"
AC_ARG_ENABLE([eltorito-efi], AC_ARG_ENABLE([cd-efi],
AS_HELP_STRING([--disable-eltorito-efi], [disable limine-eltorito-efi.bin build]), AS_HELP_STRING([--disable-cd-efi], [disable limine-cd-efi.bin build]),
BUILD_ELTORITO_EFI="$enableval") BUILD_CD_EFI="$enableval")
if ! test "x$BUILD_ELTORITO_EFI" = "xno"; then if ! test "x$BUILD_CD_EFI" = "xno"; then
AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes]) AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes])
if ! test "x$MTOOLS_FOUND" = "xyes"; then if ! test "x$MTOOLS_FOUND" = "xyes"; then
if test "x$BUILD_ELTORITO_EFI" = "xyes"; then if test "x$BUILD_CD_EFI" = "xyes"; then
AC_MSG_ERROR([mtools not found, install mtools to build limine-eltorito-efi.bin]) AC_MSG_ERROR([mtools not found, install mtools to build limine-cd-efi.bin])
fi fi
AC_MSG_WARN([mtools not found, install mtools to build limine-eltorito-efi.bin]) AC_MSG_WARN([mtools not found, install mtools to build limine-cd-efi.bin])
BUILD_ELTORITO_EFI="no" BUILD_CD_EFI="no"
fi fi
fi fi
AC_SUBST(BUILD_ELTORITO_EFI, [$BUILD_ELTORITO_EFI]) AC_SUBST(BUILD_CD_EFI, [$BUILD_CD_EFI])
AC_ARG_VAR(TOOLCHAIN, [Alternative toolchain prefix [default: limine]]) AC_ARG_VAR(TOOLCHAIN, [Alternative toolchain prefix [default: limine]])
test "x$TOOLCHAIN" = "x" && TOOLCHAIN='limine' test "x$TOOLCHAIN" = "x" && TOOLCHAIN='limine'

View File

@ -14,7 +14,7 @@ install-data: all
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine' $(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine'
$(INSTALL) -m 644 limine.sys '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 limine.sys '$(DESTDIR)$(PREFIX)/share/limine/'
$(INSTALL) -m 644 limine-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 limine-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
$(INSTALL) -m 644 limine-eltorito-efi.bin '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 limine-cd-efi.bin '$(DESTDIR)$(PREFIX)/share/limine/'
$(INSTALL) -m 644 limine-pxe.bin '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 limine-pxe.bin '$(DESTDIR)$(PREFIX)/share/limine/'
$(INSTALL) -m 644 BOOTX64.EFI '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 BOOTX64.EFI '$(DESTDIR)$(PREFIX)/share/limine/'
$(INSTALL) -m 644 BOOTIA32.EFI '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 BOOTIA32.EFI '$(DESTDIR)$(PREFIX)/share/limine/'