aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/lib/libfdt
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/lib/libfdt')
-rw-r--r--roms/u-boot/lib/libfdt/Makefile19
-rw-r--r--roms/u-boot/lib/libfdt/README25
-rw-r--r--roms/u-boot/lib/libfdt/fdt.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_addresses.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_empty_tree.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_overlay.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_ro.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_rw.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_strerror.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_sw.c2
-rw-r--r--roms/u-boot/lib/libfdt/fdt_wip.c2
-rw-r--r--roms/u-boot/lib/libfdt/libfdt_internal.h1
-rw-r--r--roms/u-boot/lib/libfdt/test_libfdt.py14
13 files changed, 77 insertions, 0 deletions
diff --git a/roms/u-boot/lib/libfdt/Makefile b/roms/u-boot/lib/libfdt/Makefile
new file mode 100644
index 000000000..1fe50ecbe
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/Makefile
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2000-2007
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+
+obj-y += \
+ fdt.o \
+ fdt_ro.o \
+ fdt_wip.o \
+ fdt_strerror.o \
+ fdt_sw.o \
+ fdt_rw.o \
+ fdt_empty_tree.o \
+ fdt_addresses.o
+
+obj-$(CONFIG_OF_LIBFDT_OVERLAY) += fdt_overlay.o
+
+ccflags-y := -I$(srctree)/scripts/dtc/libfdt \
+ -DFDT_ASSUME_MASK=$(CONFIG_$(SPL_TPL_)OF_LIBFDT_ASSUME_MASK)
diff --git a/roms/u-boot/lib/libfdt/README b/roms/u-boot/lib/libfdt/README
new file mode 100644
index 000000000..db40ab25e
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/README
@@ -0,0 +1,25 @@
+The libfdt functionality was written by David Gibson. The original
+source came from the Git repository:
+
+URL: git://ozlabs.org/home/dgibson/git/libfdt.git
+
+author David Gibson <dgibson@sneetch.(none)>
+ Fri, 23 Mar 2007 04:16:54 +0000 (15:16 +1100)
+committer David Gibson <dgibson@sneetch.(none)>
+ Fri, 23 Mar 2007 04:16:54 +0000 (15:16 +1100)
+commit 857f54e79f74429af20c2b5ecc00ee98af6a3b8b
+tree 2f648f0f88225a51ded452968d28b4402df8ade0
+parent 07a12a08005f3b5cd9337900a6551e450c07b515
+
+To adapt for U-Boot usage, only the applicable files were copied and
+imported into the U-Boot Git repository.
+
+Omitted:
+
+ * GPL - U-Boot comes with a copy of the GPL license
+ * test subdirectory - not directly useful for U-Boot
+
+After importing, other customizations were performed. See the
+"git log" for details.
+
+Jerry Van Baren
diff --git a/roms/u-boot/lib/libfdt/fdt.c b/roms/u-boot/lib/libfdt/fdt.c
new file mode 100644
index 000000000..0958e6ba5
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_addresses.c b/roms/u-boot/lib/libfdt/fdt_addresses.c
new file mode 100644
index 000000000..b82a02936
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_addresses.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_addresses.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_empty_tree.c b/roms/u-boot/lib/libfdt/fdt_empty_tree.c
new file mode 100644
index 000000000..2b4ae1062
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_empty_tree.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_empty_tree.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_overlay.c b/roms/u-boot/lib/libfdt/fdt_overlay.c
new file mode 100644
index 000000000..575c82767
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_overlay.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_overlay.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_ro.c b/roms/u-boot/lib/libfdt/fdt_ro.c
new file mode 100644
index 000000000..7ede07453
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_ro.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_ro.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_rw.c b/roms/u-boot/lib/libfdt/fdt_rw.c
new file mode 100644
index 000000000..aafded07a
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_rw.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_rw.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_strerror.c b/roms/u-boot/lib/libfdt/fdt_strerror.c
new file mode 100644
index 000000000..408a88328
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_strerror.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_strerror.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_sw.c b/roms/u-boot/lib/libfdt/fdt_sw.c
new file mode 100644
index 000000000..0da3ed92f
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_sw.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_sw.c"
diff --git a/roms/u-boot/lib/libfdt/fdt_wip.c b/roms/u-boot/lib/libfdt/fdt_wip.c
new file mode 100644
index 000000000..6a771d066
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/fdt_wip.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../../scripts/dtc/libfdt/fdt_wip.c"
diff --git a/roms/u-boot/lib/libfdt/libfdt_internal.h b/roms/u-boot/lib/libfdt/libfdt_internal.h
new file mode 100644
index 000000000..5197c5d69
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/libfdt_internal.h
@@ -0,0 +1 @@
+#include "../../scripts/dtc/libfdt/libfdt_internal.h"
diff --git a/roms/u-boot/lib/libfdt/test_libfdt.py b/roms/u-boot/lib/libfdt/test_libfdt.py
new file mode 100644
index 000000000..14d0da4fb
--- /dev/null
+++ b/roms/u-boot/lib/libfdt/test_libfdt.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import os
+import sys
+
+our_path = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(our_path, '../../b/sandbox_spl/tools'))
+
+import libfdt
+
+with open('b/sandbox_spl/u-boot.dtb') as fd:
+ fdt = fd.read()
+
+print libfdt.fdt_path_offset(fdt, "/aliases")