summaryrefslogtreecommitdiffstats
path: root/sys/boot/uboot/lib
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-12-14 15:33:45 +0000
committerandrew <andrew@FreeBSD.org>2014-12-14 15:33:45 +0000
commit35401942c2fcf22c7aa91c63263fae53a281f8a9 (patch)
tree6f87507a62957b0ebebea391d52ab8402440dc9f /sys/boot/uboot/lib
parent26961b254735317779a3c1c40e0f41700015ff77 (diff)
downloadFreeBSD-src-35401942c2fcf22c7aa91c63263fae53a281f8a9.zip
FreeBSD-src-35401942c2fcf22c7aa91c63263fae53a281f8a9.tar.gz
MFC 273927:
Move the definitions of the fdt functions from a uboot header to a new fdt header. There is nothing in the fdt spec that ties it to U-Boot. While here sort and fix the signature of fdt_setup_fdtp. MFC 273934: Start to allow platforms other than U-Boot to use the FDT code in loader by moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This needs to be a new library for linking to work correctly. Differential Revision: https://reviews.freebsd.org/D1054 Reviewed by: ian, rpaulo (earlier version)
Diffstat (limited to 'sys/boot/uboot/lib')
-rw-r--r--sys/boot/uboot/lib/Makefile2
-rw-r--r--sys/boot/uboot/lib/libuboot.h5
-rw-r--r--sys/boot/uboot/lib/module.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/sys/boot/uboot/lib/Makefile b/sys/boot/uboot/lib/Makefile
index e5ed3ce..4ab7d0d 100644
--- a/sys/boot/uboot/lib/Makefile
+++ b/sys/boot/uboot/lib/Makefile
@@ -27,7 +27,7 @@ LOADER_FDT_SUPPORT= no
.endif
.if ${LOADER_FDT_SUPPORT} == "yes"
-CFLAGS+= -DLOADER_FDT_SUPPORT
+CFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt
.endif
# Pick up FDT includes
diff --git a/sys/boot/uboot/lib/libuboot.h b/sys/boot/uboot/lib/libuboot.h
index 82410a0..79005f2 100644
--- a/sys/boot/uboot/lib/libuboot.h
+++ b/sys/boot/uboot/lib/libuboot.h
@@ -72,8 +72,3 @@ void reboot(void);
int uboot_diskgetunit(int type, int type_unit);
-#if defined(LOADER_FDT_SUPPORT)
-extern int fdt_setup_fdtp();
-extern int fdt_copy(vm_offset_t);
-#endif
-
diff --git a/sys/boot/uboot/lib/module.c b/sys/boot/uboot/lib/module.c
index d9b3dc0..ed887b7 100644
--- a/sys/boot/uboot/lib/module.c
+++ b/sys/boot/uboot/lib/module.c
@@ -34,6 +34,10 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <string.h>
+#if defined(LOADER_FDT_SUPPORT)
+#include <fdt_platform.h>
+#endif
+
#include "bootstrap.h"
#include "libuboot.h"
OpenPOWER on IntegriCloud