From 4dbde3c9b95a26e2577ac32058a85c7277d419f2 Mon Sep 17 00:00:00 2001 From: raj Date: Tue, 25 May 2010 15:21:39 +0000 Subject: Initial loader(8) support for Flattened Device Tree. o This is disabled by default for now, and can be enabled using WITH_FDT at build time. o Tested with ARM and PowerPC. Reviewed by: imp Sponsored by: The FreeBSD Foundation --- sys/boot/powerpc/uboot/Makefile | 15 +++++++++++++-- sys/boot/powerpc/uboot/version | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'sys/boot/powerpc') diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile index 62a2868..0a827e7 100644 --- a/sys/boot/powerpc/uboot/Makefile +++ b/sys/boot/powerpc/uboot/Makefile @@ -18,6 +18,11 @@ LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= no LOADER_BZIP2_SUPPORT?= no +.if defined(WITH_FDT) +LOADER_FDT_SUPPORT= yes +.else +LOADER_FDT_SUPPORT= no +.endif .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT @@ -46,6 +51,12 @@ CFLAGS+= -DLOADER_NFS_SUPPORT .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif +.if ${LOADER_FDT_SUPPORT} == "yes" +CFLAGS+= -I${.CURDIR}/../../fdt +CFLAGS+= -I${.OBJDIR}/../../fdt +CFLAGS+= -DLOADER_FDT_SUPPORT +LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a +.endif .if !defined(NO_FORTH) # Enable BootForth @@ -79,8 +90,8 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} -lstand +DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} diff --git a/sys/boot/powerpc/uboot/version b/sys/boot/powerpc/uboot/version index 906210d..21556cf 100644 --- a/sys/boot/powerpc/uboot/version +++ b/sys/boot/powerpc/uboot/version @@ -3,6 +3,7 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +1.1: Flattened Device Tree blob support. 1.0: Added storage support. 0.6: Integrated with the new U-Boot API 0.5: Full network functionality. -- cgit v1.1