diff options
| author | Ahmad Khalifa <vexeduxr@FreeBSD.org> | 2026-05-30 02:40:39 +0000 |
|---|---|---|
| committer | Ahmad Khalifa <vexeduxr@FreeBSD.org> | 2026-05-30 02:40:39 +0000 |
| commit | d15cc7625dde9bcb6a63ee59cccf14f3b93b15bf (patch) | |
| tree | a6a6b800f61aa1d016b4e26e4efd51fafebf2b9f | |
| parent | f048a1a1decb9140ec779951e886ec41ae34cec4 (diff) | |
| -rw-r--r-- | stand/defs.mk | 2 | ||||
| -rw-r--r-- | stand/efi/Makefile | 8 | ||||
| -rw-r--r-- | stand/efi/Makefile.inc | 5 | ||||
| -rw-r--r-- | stand/efi/ficl32efi/Makefile | 3 | ||||
| -rw-r--r-- | stand/efi/liblua32efi/Makefile | 3 | ||||
| -rw-r--r-- | stand/efi/libsa32efi/Makefile | 1 | ||||
| -rw-r--r-- | stand/loader.mk | 4 |
7 files changed, 22 insertions, 4 deletions
diff --git a/stand/defs.mk b/stand/defs.mk index 7f3803c7ab42..ac4f38451111 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -78,7 +78,7 @@ LIBSA= ${BOOTOBJ}/libsa/libsa.a .if ${MACHINE} == "i386" LIBSA32= ${LIBSA} .else -LIBSA32= ${BOOTOBJ}/libsa32/libsa32.a +LIBSA32= ${BOOTOBJ}/${"${LOADER}" == "loader_ia32":?efi/libsa32efi:libsa32}/libsa32.a .endif # Standard options: diff --git a/stand/efi/Makefile b/stand/efi/Makefile index 1887b9536a5b..5ece7eff8ef2 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -3,12 +3,18 @@ NO_OBJ=t .include <bsd.init.mk> SUBDIR.yes+= libefi -SUBDIR.${MK_LOADER_IA32}+= libefi32 +SUBDIR.${MK_LOADER_IA32}+= libsa32efi libefi32 SUBDIR.${MK_FDT}+= fdt SUBDIR.yes+= .WAIT SUBDIR.yes+= boot1 gptboot +.if ${LOADER_DEFAULT_INTERP} == "lua" +SUBDIR.${MK_LOADER_IA32}+= liblua32efi +.elif ${LOADER_DEFAULT_INTERP} == "4th" +SUBDIR.${MK_LOADER_IA32}+= ficl32efi +.endif + SUBDIR.${MK_FORTH}+= loader_4th SUBDIR.${MK_LOADER_LUA}+= loader_lua SUBDIR.${MK_LOADER_IA32}+= loader_ia32 diff --git a/stand/efi/Makefile.inc b/stand/efi/Makefile.inc index 6bb0af1d84f3..452820aeeb32 100644 --- a/stand/efi/Makefile.inc +++ b/stand/efi/Makefile.inc @@ -8,6 +8,11 @@ LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -fshort-wchar CFLAGS+= -mno-red-zone +.if ${DO32:U0} == 1 +# This is needed so the EDK2 EFI structs have the correct layout for +# the ia32 loader. +CFLAGS+= -malign-double +.endif .endif .if ${MACHINE_CPUARCH} == "aarch64" diff --git a/stand/efi/ficl32efi/Makefile b/stand/efi/ficl32efi/Makefile new file mode 100644 index 000000000000..63800cb0f209 --- /dev/null +++ b/stand/efi/ficl32efi/Makefile @@ -0,0 +1,3 @@ +DO32=1 + +.include "${.CURDIR}/../../ficl/Makefile" diff --git a/stand/efi/liblua32efi/Makefile b/stand/efi/liblua32efi/Makefile new file mode 100644 index 000000000000..cf391967ecf0 --- /dev/null +++ b/stand/efi/liblua32efi/Makefile @@ -0,0 +1,3 @@ +DO32=1 + +.include "${.CURDIR}/../../liblua/Makefile" diff --git a/stand/efi/libsa32efi/Makefile b/stand/efi/libsa32efi/Makefile new file mode 100644 index 000000000000..109c420bf734 --- /dev/null +++ b/stand/efi/libsa32efi/Makefile @@ -0,0 +1 @@ +.include "${.CURDIR}/../../libsa32/Makefile" diff --git a/stand/loader.mk b/stand/loader.mk index 496252e7a534..0d94ed3e6263 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -162,14 +162,14 @@ LIBFICL= ${BOOTOBJ}/ficl/libficl.a .if ${MACHINE} == "i386" LIBFICL32= ${LIBFICL} .else -LIBFICL32= ${BOOTOBJ}/ficl32/libficl.a +LIBFICL32= ${BOOTOBJ}/${"${LOADER}" == "loader_ia32":?efi/ficl32efi:ficl32}/libficl.a .endif LIBLUA= ${BOOTOBJ}/liblua/liblua.a .if ${MACHINE} == "i386" LIBLUA32= ${LIBLUA} .else -LIBLUA32= ${BOOTOBJ}/liblua32/liblua.a +LIBLUA32= ${BOOTOBJ}/${"${LOADER}" == "loader_ia32":?efi/liblua32efi:liblua32}/liblua.a .endif CLEANFILES+= vers.c |
