Use MACHINE in the efi loader when it is what we mean, it may not be the

same as MACHINE_CPUARCH, it just happened to be the case the architectures
this code currently supports.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Andrew Turner 2015-04-14 10:40:37 +00:00
parent da713b9ed2
commit c93a8403be
4 changed files with 15 additions and 15 deletions

View File

@ -17,12 +17,12 @@ SRCS= boot1.c reloc.c start.S
CFLAGS+= -I.
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include
CFLAGS+= -I${.CURDIR}/../../..
# Always add MI sources and REGULAR efi loader bits
.PATH: ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}
.PATH: ${.CURDIR}/../loader/arch/${MACHINE}
.PATH: ${.CURDIR}/../loader
.PATH: ${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../common
@ -30,7 +30,7 @@ CFLAGS+= -I${.CURDIR}/../../common
FILES= boot1.efi boot1.efifat
FILESMODE_boot1.efi= ${BINMODE}
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH}
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
@ -79,8 +79,8 @@ boot1.o: ${.CURDIR}/../../common/ufsread.c
boot1.efifat: boot1.efi
echo ${.OBJDIR}
uudecode ${.CURDIR}/fat-${MACHINE_CPUARCH}.tmpl.bz2.uu
mv fat-${MACHINE_CPUARCH}.tmpl.bz2 ${.TARGET}.bz2
uudecode ${.CURDIR}/fat-${MACHINE}.tmpl.bz2.uu
mv fat-${MACHINE}.tmpl.bz2 ${.TARGET}.bz2
bzip2 -f -d ${.TARGET}.bz2
dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc

View File

@ -18,7 +18,7 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
# EFI library headers
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
# libfdt headers
CFLAGS+= -I${.CURDIR}/../../fdt
@ -27,7 +27,7 @@ CFLAGS+= -I${.CURDIR}/../../fdt
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
machine:
ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
ln -sf ${.CURDIR}/../../../${MACHINE}/include machine
CLEANFILES+= machine

View File

@ -10,7 +10,7 @@ SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \
CFLAGS+= -fPIC -mno-red-zone
.endif
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
# Pick up the bootstrap header for some interface items

View File

@ -24,15 +24,15 @@ SRCS= autoload.c \
smbios.c \
vers.c
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}
.PATH: ${.CURDIR}/arch/${MACHINE}
# For smbios.c
.PATH: ${.CURDIR}/../../i386/libi386
.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
.include "${.CURDIR}/arch/${MACHINE}/Makefile.inc"
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/arch/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/arch/${MACHINE}
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -I${.CURDIR}/../../i386/libi386
@ -42,7 +42,7 @@ CFLAGS+= -DNO_PCI -DEFI
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH
CFLAGS+= -I${.CURDIR}/../../ficl
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE}
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
@ -70,12 +70,12 @@ CFLAGS+= -I${.CURDIR}/../../common
FILES= loader.efi
FILESMODE_loader.efi= ${BINMODE}
LDSCRIPT= ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH}
LDSCRIPT= ${.CURDIR}/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
CLEANFILES= vers.c loader.efi
NEWVERSWHAT= "EFI loader" ${MACHINE_CPUARCH}
NEWVERSWHAT= "EFI loader" ${MACHINE}
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../efi/loader/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}