Remove LOADER_FDT_SUPPORT as a Makefile variable.

LOADER_FDT_SUPPORT was used inconsistently in the tree. In some
places, it was used to control whether or not the user wanted FDT
included, and in other places it was a command to include
support. Remove it entirely. The former is now enabled -DWITH_FDT,
while the latter is controlled by Makefiles defining HAVE_FDT.

Supported by: Netflix
This commit is contained in:
imp 2017-11-10 23:54:24 +00:00
parent 94903ca364
commit a6d84cbad5
12 changed files with 27 additions and 38 deletions

View File

@ -9,7 +9,6 @@ LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
.include <bsd.init.mk>

View File

@ -71,13 +71,9 @@ CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID
.endif
.endif
LOADER_FDT_SUPPORT?= no
.if ${MK_FDT} != "no" && ${LOADER_FDT_SUPPORT} != "no"
CFLAGS+= -I${BOOTSRC}/fdt
CFLAGS+= -I${BOOTSRC}/fdt
CFLAGS+= -DLOADER_FDT_SUPPORT
.if defined(HAVE_FDT) && ${MK_FDT} != "no"
.include "${BOOTSRC}/fdt.mk"
LIBEFI_FDT= ${BOOTOBJ}/efi/fdt/libefi_fdt.a
LIBFDT= ${BOOTOBJ}/fdt/libfdt.a
.endif
# Include bcache code.

View File

@ -3,4 +3,4 @@
SRCS+= exec.c \
start.S
LOADER_FDT_SUPPORT=yes
HAVE_FDT=yes

View File

@ -1,6 +1,7 @@
# $FreeBSD$
LOADER_FDT_SUPPORT=yes
HAVE_FDT=yes
SRCS+= exec.c \
start.S

9
sys/boot/fdt.mk Normal file
View File

@ -0,0 +1,9 @@
# $FreeBSD$
.if ${MK_FDT} == "yes"
CFLAGS+= -I${FDTSRC}
CFLAGS+= -I${BOOTOBJ}/fdt
CFLAGS+= -I${SYSDIR}/contrib/libfdt
CFLAGS+= -DLOADER_FDT_SUPPORT
LIBFDT= ${BOOTOBJ}/fdt/libfdt.a
.endif

View File

@ -9,7 +9,6 @@ LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
.include <bsd.init.mk>

View File

@ -1,8 +1,13 @@
# $FreeBSD$
SUBDIR= boot1.chrp kboot ofw uboot
.include <bsd.init.mk>
SUBDIR= boot1.chrp ofw uboot
.if ${MACHINE_ARCH} != "powerpcspe"
SUBDIR+= ps3
.endif
.if ${MK_FDT} == "yes"
SUBDIR+= kboot
.endif
.include <bsd.subdir.mk>

View File

@ -8,7 +8,6 @@ LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_FDT_SUPPORT= yes
LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
@ -24,12 +23,7 @@ SRCS= conf.c metadata.c vers.c main.c ppc64_elf_freebsd.c
SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c
SRCS+= ucmpdi2.c
.if ${LOADER_FDT_SUPPORT} == "yes"
CFLAGS+= -I${FDTSRC}
CFLAGS+= -I${SYSDIR}/contrib/libfdt
CFLAGS+= -DLOADER_FDT_SUPPORT
LIBFDT= ${BOOTOBJ}/fdt/libfdt.a
.endif
.include "${BOOTSRC}/fdt.mk"
CFLAGS+= -mcpu=powerpc64

View File

@ -9,7 +9,6 @@ LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT?= yes
.include <bsd.init.mk>
MK_SSP= no
@ -23,12 +22,9 @@ INSTALLFLAGS= -b
SRCS= conf.c metadata.c vers.c start.c
SRCS+= ucmpdi2.c
.if ${LOADER_FDT_SUPPORT} == "yes"
.include "${BOOTSRC}/fdt.mk"
.if ${MK_FDT} == "yes"
SRCS+= ofwfdt.c
CFLAGS+= -I${FDTSRC}
CFLAGS+= -I${SYSDIR}/contrib/libfdt
CFLAGS+= -DLOADER_FDT_SUPPORT
LIBFDT= ${BOOTOBJ}/fdt/libfdt.a
.endif
# Always add MI sources

View File

@ -8,7 +8,6 @@ LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
.include <bsd.init.mk>

View File

@ -11,10 +11,8 @@ LIBUBOOT= ${BOOTOBJ}/uboot/lib/libuboot.a
CFLAGS+= -I${UBOOTSRC}/lib
CFLAGS+= -I${BOOTOBJ}/uboot/lib
.if ${LOADER_FDT_SUPPORT} == "yes"
CFLAGS+= -I${FDTSRC}
CFLAGS+= -I${BOOTOBJ}/fdt
CFLAGS+= -DLOADER_FDT_SUPPORT
.include "${BOOTSRC}/fdt.mk"
.if ${MK_FDT} == "yes"
LIBUBOOT_FDT= ${BOOTOBJ}/uboot/fdt/libuboot_fdt.a
LIBFDT= ${BOOTOBJ}/fdt/libfdt.a
.endif

View File

@ -17,14 +17,7 @@ CFLAGS+= -ffreestanding -msoft-float
SRCS+= disk.c
.endif
LOADER_FDT_SUPPORT= ${MK_FDT}
.if ${LOADER_FDT_SUPPORT} == "yes"
CFLAGS+= -DLOADER_FDT_SUPPORT -I${FDTSRC}
.endif
# Pick up FDT includes
CFLAGS+= -I${SYSDIR}/contrib/libfdt/
.include "${BOOTSRC}/fdt.mk"
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I.