diff options
author | Ian Lepore <ian@FreeBSD.org> | 2014-03-01 19:02:00 +0000 |
---|---|---|
committer | Ian Lepore <ian@FreeBSD.org> | 2014-03-01 19:02:00 +0000 |
commit | bc837fc0c0344d3b8782b3dd0bad0381478ca9df (patch) | |
tree | 9c4d28d096e50543af30416154bce899de088f2b /sys/boot/uboot/lib/Makefile | |
parent | 119aeb72412195a55593aa18adf71db55b198751 (diff) | |
download | src-bc837fc0c0344d3b8782b3dd0bad0381478ca9df.tar.gz src-bc837fc0c0344d3b8782b3dd0bad0381478ca9df.zip |
Prevent fdt data loaded from a file from overwriting the kernel environment,
by having uboot_autoload() do the fdt setup (which may load a file) rather
than waiting until we're actually in the process of launching the kernel.
As part of making this happen...
- Define LOADER_FDT_SUPPORT on the uboot/lib compile command line when
MK_FDT is set.
- Make fdt_setup_fdtb() public.
- Declare public fdt_whatever() functions in a header instead of using
scattered extern decls in .c files.
Notes
Notes:
svn path=/head/; revision=262664
Diffstat (limited to 'sys/boot/uboot/lib/Makefile')
-rw-r--r-- | sys/boot/uboot/lib/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/boot/uboot/lib/Makefile b/sys/boot/uboot/lib/Makefile index 7908f24bfbd9..e5ed3ceea56d 100644 --- a/sys/boot/uboot/lib/Makefile +++ b/sys/boot/uboot/lib/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + .PATH: ${.CURDIR}/../../common LIB= uboot @@ -18,6 +20,16 @@ SRCS+= disk.c CFLAGS+= -DLOADER_DISK_SUPPORT .endif +.if ${MK_FDT} != "no" +LOADER_FDT_SUPPORT= yes +.else +LOADER_FDT_SUPPORT= no +.endif + +.if ${LOADER_FDT_SUPPORT} == "yes" +CFLAGS+= -DLOADER_FDT_SUPPORT +.endif + # Pick up FDT includes CFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/ |