build: Make eltorito-efi build manually toggleable
This commit is contained in:
parent
319326a7f5
commit
23ee0bf491
|
@ -16,6 +16,8 @@ NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1))
|
||||||
override PATH := $(BUILDDIR)/toolchain/bin:/usr/local/bin:$(PATH)
|
override PATH := $(BUILDDIR)/toolchain/bin:/usr/local/bin:$(PATH)
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
override BUILD_ELTORITO_EFI := @build_eltorito_efi@
|
||||||
|
|
||||||
WERROR ?= @werror@
|
WERROR ?= @werror@
|
||||||
export WERROR
|
export WERROR
|
||||||
|
|
||||||
|
@ -140,6 +142,7 @@ limine-bios: common-bios decompressor
|
||||||
|
|
||||||
.PHONY: limine-eltorito-efi
|
.PHONY: limine-eltorito-efi
|
||||||
limine-eltorito-efi:
|
limine-eltorito-efi:
|
||||||
|
ifeq ($(BUILD_ELTORITO_EFI), yes)
|
||||||
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-eltorito-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-eltorito-efi.bin' -f 1440 :: && \
|
||||||
|
@ -150,6 +153,7 @@ limine-eltorito-efi:
|
||||||
( ( [ -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-eltorito-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-eltorito-efi.bin'
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: limine-uefi
|
.PHONY: limine-uefi
|
||||||
limine-uefi: limine-uefi32 limine-uefi64
|
limine-uefi: limine-uefi32 limine-uefi64
|
||||||
|
|
11
configure.ac
11
configure.ac
|
@ -41,9 +41,20 @@ if ! test "x$GZIP_FOUND" = "xyes"; then
|
||||||
AC_MSG_ERROR([gzip not found, please install gzip before configuring])
|
AC_MSG_ERROR([gzip not found, please install gzip before configuring])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BUILD_ELTORITO_EFI="yes"
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([eltorito-efi],
|
||||||
|
AS_HELP_STRING([--disable-eltorito-efi], [disable limine-eltorito-efi.bin build]),
|
||||||
|
BUILD_ELTORITO_EFI="$enableval")
|
||||||
|
|
||||||
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
|
||||||
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-eltorito-efi.bin])
|
||||||
|
BUILD_ELTORITO_EFI="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$BUILD_ELTORITO_EFI" = "yes"; then
|
||||||
|
AC_SUBST(build_eltorito_efi, [yes])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_VAR(HOST_CC, [C compiler for the build host [default: $CC]])
|
AC_ARG_VAR(HOST_CC, [C compiler for the build host [default: $CC]])
|
||||||
|
|
Loading…
Reference in New Issue