Date: Fri, 10 Nov 2017 23:54:24 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325689 - in head/sys/boot: . arm/uboot efi/loader efi/loader/arch/arm efi/loader/arch/arm64 mips/uboot powerpc powerpc/kboot powerpc/ofw powerpc/uboot uboot/lib Message-ID: <201711102354.vAANsOvC074955@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Nov 10 23:54:24 2017 New Revision: 325689 URL: https://svnweb.freebsd.org/changeset/base/325689 Log: 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 Added: head/sys/boot/fdt.mk (contents, props changed) Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/arch/arm/Makefile.inc head/sys/boot/efi/loader/arch/arm64/Makefile.inc head/sys/boot/mips/uboot/Makefile head/sys/boot/powerpc/Makefile head/sys/boot/powerpc/kboot/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/uboot/Makefile head/sys/boot/uboot.mk head/sys/boot/uboot/lib/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/arm/uboot/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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> Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/efi/loader/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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. Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/arm/Makefile.inc Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/efi/loader/arch/arm/Makefile.inc Fri Nov 10 23:54:24 2017 (r325689) @@ -3,4 +3,4 @@ SRCS+= exec.c \ start.S -LOADER_FDT_SUPPORT=yes +HAVE_FDT=yes Modified: head/sys/boot/efi/loader/arch/arm64/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/arm64/Makefile.inc Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/efi/loader/arch/arm64/Makefile.inc Fri Nov 10 23:54:24 2017 (r325689) @@ -1,6 +1,7 @@ # $FreeBSD$ -LOADER_FDT_SUPPORT=yes +HAVE_FDT=yes + SRCS+= exec.c \ start.S Added: head/sys/boot/fdt.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt.mk Fri Nov 10 23:54:24 2017 (r325689) @@ -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 Modified: head/sys/boot/mips/uboot/Makefile ============================================================================== --- head/sys/boot/mips/uboot/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/mips/uboot/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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> Modified: head/sys/boot/powerpc/Makefile ============================================================================== --- head/sys/boot/powerpc/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/powerpc/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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> Modified: head/sys/boot/powerpc/kboot/Makefile ============================================================================== --- head/sys/boot/powerpc/kboot/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/powerpc/kboot/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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_freeb 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 Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/powerpc/ofw/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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 Modified: head/sys/boot/powerpc/uboot/Makefile ============================================================================== --- head/sys/boot/powerpc/uboot/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/powerpc/uboot/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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> Modified: head/sys/boot/uboot.mk ============================================================================== --- head/sys/boot/uboot.mk Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/uboot.mk Fri Nov 10 23:54:24 2017 (r325689) @@ -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 Modified: head/sys/boot/uboot/lib/Makefile ============================================================================== --- head/sys/boot/uboot/lib/Makefile Fri Nov 10 23:54:18 2017 (r325688) +++ head/sys/boot/uboot/lib/Makefile Fri Nov 10 23:54:24 2017 (r325689) @@ -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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711102354.vAANsOvC074955>