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

This commit is contained in:
mintsuki 2023-06-14 03:14:41 +02:00
parent d0b9bbdca6
commit 264decd0ef
5 changed files with 38 additions and 38 deletions

View File

@ -41,7 +41,7 @@ override BUILD_UEFI_X86_64 := @BUILD_UEFI_X86_64@
override BUILD_UEFI_IA32 := @BUILD_UEFI_IA32@ override BUILD_UEFI_IA32 := @BUILD_UEFI_IA32@
override BUILD_UEFI_AARCH64 := @BUILD_UEFI_AARCH64@ override BUILD_UEFI_AARCH64 := @BUILD_UEFI_AARCH64@
override BUILD_UEFI_RISCV64 := @BUILD_UEFI_RISCV64@ override BUILD_UEFI_RISCV64 := @BUILD_UEFI_RISCV64@
override BUILD_CD_EFI := @BUILD_CD_EFI@ override BUILD_UEFI_CD := @BUILD_UEFI_CD@
override BUILD_BIOS_PXE := @BUILD_BIOS_PXE@ override BUILD_BIOS_PXE := @BUILD_BIOS_PXE@
override BUILD_CD := @BUILD_CD@ override BUILD_CD := @BUILD_CD@
@ -107,7 +107,7 @@ all: $(call MKESCAPE,$(BINDIR))/Makefile
.PHONY: all1 .PHONY: all1
all1: $(BUILD_UEFI_X86_64) $(BUILD_UEFI_IA32) $(BUILD_UEFI_AARCH64) $(BUILD_UEFI_RISCV64) $(BUILD_BIOS) all1: $(BUILD_UEFI_X86_64) $(BUILD_UEFI_IA32) $(BUILD_UEFI_AARCH64) $(BUILD_UEFI_RISCV64) $(BUILD_BIOS)
$(MAKE) '$(call SHESCAPE,$(BINDIR))/limine' $(MAKE) '$(call SHESCAPE,$(BINDIR))/limine'
$(MAKE) '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' $(MAKE) '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin'
$(call MKESCAPE,$(BINDIR))/limine-hdd.h: $(call MKESCAPE,$(BINDIR))/limine-hdd.bin $(call MKESCAPE,$(BINDIR))/limine-hdd.h: $(call MKESCAPE,$(BINDIR))/limine-hdd.bin
$(MKDIR_P) '$(call SHESCAPE,$(BINDIR))' $(MKDIR_P) '$(call SHESCAPE,$(BINDIR))'
@ -153,8 +153,8 @@ endif
ifneq ($(BUILD_CD),no) ifneq ($(BUILD_CD),no)
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-cd.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/' $(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-cd.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
endif endif
ifneq ($(BUILD_CD_EFI),no) ifneq ($(BUILD_UEFI_CD),no)
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/' $(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
endif endif
ifneq ($(BUILD_BIOS_PXE),no) ifneq ($(BUILD_BIOS_PXE),no)
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-bios-pxe.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/' $(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-bios-pxe.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
@ -208,28 +208,28 @@ endif
limine-bios: common-bios decompressor limine-bios: common-bios decompressor
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp' $(MAKE) '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
$(call MKESCAPE,$(BINDIR))/limine-cd-efi.bin: $(if $(BUILD_UEFI_IA32),$(call MKESCAPE,$(BUILDDIR))/common-uefi-ia32/BOOTIA32.EFI) $(if $(BUILD_UEFI_X86_64),$(call MKESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI) $(if $(BUILD_UEFI_AARCH64),$(call MKESCAPE,$(BUILDDIR))/common-uefi-aarch64/BOOTAA64.EFI) $(if $(BUILD_UEFI_RISCV64),$(call MKESCAPE,$(BUILDDIR))/common-uefi-riscv64/BOOTRISCV64.EFI) $(call MKESCAPE,$(BINDIR))/limine-uefi-cd.bin: $(if $(BUILD_UEFI_IA32),$(call MKESCAPE,$(BUILDDIR))/common-uefi-ia32/BOOTIA32.EFI) $(if $(BUILD_UEFI_X86_64),$(call MKESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI) $(if $(BUILD_UEFI_AARCH64),$(call MKESCAPE,$(BUILDDIR))/common-uefi-aarch64/BOOTAA64.EFI) $(if $(BUILD_UEFI_RISCV64),$(call MKESCAPE,$(BUILDDIR))/common-uefi-riscv64/BOOTRISCV64.EFI)
ifneq ($(BUILD_CD_EFI),no) ifneq ($(BUILD_UEFI_CD),no)
$(MKDIR_P) '$(call SHESCAPE,$(BINDIR))' $(MKDIR_P) '$(call SHESCAPE,$(BINDIR))'
rm -f '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' rm -f '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin'
dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' bs=512 count=2880 2>/dev/null dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' bs=512 count=2880 2>/dev/null
( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' -f 1440 :: && \ ( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' -f 1440 :: && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ::/EFI && \ mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' ::/EFI && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ::/EFI/BOOT && \ mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' ::/EFI/BOOT && \
( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-aarch64/BOOTAA64.EFI' ] && \ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-aarch64/BOOTAA64.EFI' ] && \
mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-aarch64/BOOTAA64.EFI' ::/EFI/BOOT ) || true ) && \ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-aarch64/BOOTAA64.EFI' ::/EFI/BOOT ) || true ) && \
( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-riscv64/BOOTRISCV64.EFI' ] && \ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-riscv64/BOOTRISCV64.EFI' ] && \
mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-riscv64/BOOTRISCV64.EFI' ::/EFI/BOOT ) || true ) && \ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-riscv64/BOOTRISCV64.EFI' ::/EFI/BOOT ) || true ) && \
( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI' ] && \ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI' ] && \
mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI' ::/EFI/BOOT ) || true ) && \ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI' ::/EFI/BOOT ) || true ) && \
( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-ia32/BOOTIA32.EFI' ] && \ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi-ia32/BOOTIA32.EFI' ] && \
mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-ia32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi-ia32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \
) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' ) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin'
endif endif
.PHONY: limine-cd-efi .PHONY: limine-uefi-cd
limine-cd-efi: limine-uefi-cd:
$(MAKE) '$(call SHESCAPE,$(BINDIR))/limine-cd-efi.bin' $(MAKE) '$(call SHESCAPE,$(BINDIR))/limine-uefi-cd.bin'
$(call MKESCAPE,$(BINDIR))/BOOTX64.EFI: $(call MKESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI $(call MKESCAPE,$(BINDIR))/BOOTX64.EFI: $(call MKESCAPE,$(BUILDDIR))/common-uefi-x86-64/BOOTX64.EFI
$(MKDIR_P) '$(call SHESCAPE,$(BINDIR))' $(MKDIR_P) '$(call SHESCAPE,$(BINDIR))'

View File

@ -86,7 +86,7 @@ Host utility binaries are provided for Windows.
In order to build Limine, the following programs have to be installed: In order to build Limine, the following programs have to be installed:
common UNIX tools (also known as `coreutils`), common UNIX tools (also known as `coreutils`),
`GNU make`, `grep`, `sed`, `find`, `awk`, `gzip`, `nasm`, `mtools` `GNU make`, `grep`, `sed`, `find`, `awk`, `gzip`, `nasm`, `mtools`
(optional, necessary to build `limine-cd-efi.bin`). (optional, necessary to build `limine-uefi-cd.bin`).
Furthermore, `gcc` or `llvm/clang` must also be installed, alongside Furthermore, `gcc` or `llvm/clang` must also be installed, alongside
the respective binutils. the respective binutils.
@ -183,10 +183,10 @@ partitions, formatted 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-cd-efi.bin`, `limine-cd.bin`, `limine.sys`, and `limine.cfg` files `limine-uefi-cd.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, `limine`, `boot`, or (`limine.sys` and `limine.cfg` must either be in the root, `limine`, `boot`, or
`boot/limine` directory; `limine-cd-efi.bin` and `limine-cd.bin` can reside `boot/limine` directory; `limine-uefi-cd.bin` and `limine-cd.bin` can reside
anywhere). anywhere).
After that, create a `<ISO root directory>/EFI/BOOT` directory and copy the After that, create a `<ISO root directory>/EFI/BOOT` directory and copy the
@ -197,7 +197,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-cd-efi.bin> \ --efi-boot <relative path of limine-uefi-cd.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
``` ```
@ -214,11 +214,11 @@ limine bios-install 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-cd-efi.bin>` is the relative path of `<relative path of limine-uefi-cd.bin>` is the relative path of
`limine-cd-efi.bin` inside the root directory. `limine-uefi-cd.bin` inside the root directory.
For example, if it was copied in For example, if it was copied in
`<root directory>/boot/limine-cd-efi.bin`, it would be `<root directory>/boot/limine-uefi-cd.bin`, it would be
`boot/limine-cd-efi.bin`. `boot/limine-uefi-cd.bin`.
### BIOS/PXE boot ### BIOS/PXE boot
The `limine-bios-pxe.bin` binary is a valid PXE boot image. The `limine-bios-pxe.bin` binary is a valid PXE boot image.

View File

@ -240,24 +240,24 @@ fi
AC_SUBST([BUILD_UEFI_RISCV64]) AC_SUBST([BUILD_UEFI_RISCV64])
BUILD_CD_EFI="$BUILD_ALL" BUILD_UEFI_CD="$BUILD_ALL"
AC_ARG_ENABLE([uefi-cd], AC_ARG_ENABLE([uefi-cd],
[AS_HELP_STRING([--enable-uefi-cd], [enable building limine-cd-efi.bin])], [AS_HELP_STRING([--enable-uefi-cd], [enable building limine-uefi-cd.bin])],
[BUILD_CD_EFI="$enableval"]) [BUILD_UEFI_CD="$enableval"])
if ! test "x$BUILD_CD_EFI" = "xno"; then if ! test "x$BUILD_UEFI_CD" = "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_CD_EFI" = "xyes"; then if test "x$BUILD_UEFI_CD" = "xyes"; then
AC_MSG_ERROR([mtools not found, install mtools to build limine-cd-efi.bin]) AC_MSG_ERROR([mtools not found, install mtools to build limine-uefi-cd.bin])
fi fi
AC_MSG_WARN([mtools not found, install mtools to build limine-cd-efi.bin]) AC_MSG_WARN([mtools not found, install mtools to build limine-uefi-cd.bin])
BUILD_CD_EFI="no" BUILD_UEFI_CD="no"
fi fi
fi fi
AC_SUBST([BUILD_CD_EFI]) AC_SUBST([BUILD_UEFI_CD])
if test "x$NEED_NASM" = "xyes"; then if test "x$NEED_NASM" = "xyes"; then
AC_CHECK_PROG([NASM_FOUND], [nasm], [yes]) AC_CHECK_PROG([NASM_FOUND], [nasm], [yes])

View File

@ -15,7 +15,7 @@ install: 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-cd-efi.bin '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 limine-uefi-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
$(INSTALL) -m 644 limine-bios-pxe.bin '$(DESTDIR)$(PREFIX)/share/limine/' $(INSTALL) -m 644 limine-bios-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/'

View File

@ -172,7 +172,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-cd-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-uefi-cd.bin -efi-boot-part --efi-boot-image --protective-msdos-label test_image/ -o test.iso
$(BINDIR)/limine bios-install test.iso $(BINDIR)/limine bios-install 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