aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2014-04-30 18:02:04 +0000
committerWarner Losh <imp@FreeBSD.org>2014-04-30 18:02:04 +0000
commit0edb7351698260475fa44fc68ff13777d142a806 (patch)
treeb99dcaa7476d82c5822f2afec6f978c6ce9e1987 /sys
parent82ce0085382942aad3a782dedb1e8dc210b4ded5 (diff)
downloadsrc-0edb7351698260475fa44fc68ff13777d142a806.tar.gz
src-0edb7351698260475fa44fc68ff13777d142a806.zip
Allow FDT_DTS_FILE to be a list, either in the makedtb target, or in a
kernel config file. If you also want to have a static DTB compiled into your kernel, however, it cannot be a list. We have no mechanism in the kernel for picking one, so that doesn't make sense and will result in a compile-time error.
Notes
Notes: svn path=/head/; revision=265154
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/files2
-rwxr-xr-xsys/tools/fdt/make_dtb.sh10
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/conf/files b/sys/conf/files
index 8c0c2fc61059..37a47703172b 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -14,7 +14,7 @@ acpi_quirks.h optional acpi \
# from the specified source (DTS) file: <platform>.dts -> <platform>.dtb
#
fdt_dtb_file optional fdt fdt_dtb_static \
- compile-with "sh $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}/${FDT_DTS_FILE:R}.dtb" \
+ compile-with "sh $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}" \
no-obj no-implicit-rule before-depend \
clean "${FDT_DTS_FILE:R}.dtb"
fdt_static_dtb.h optional fdt fdt_dtb_static \
diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh
index 900ad9bd399c..278b7bb6d15b 100755
--- a/sys/tools/fdt/make_dtb.sh
+++ b/sys/tools/fdt/make_dtb.sh
@@ -4,8 +4,12 @@
# Script generates dtb file ($3) from dts source ($2) in build tree S ($1)
S=$1
-dts=$2
-dtb=$3
+dts="$2"
+dtb_path=$3
-cpp -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $dts /dev/null |
+for d in ${dts}; do
+ dtb=${dtb_path}/`basename $d .dts`.dtb
+ echo "converting $d -> $dtb"
+ cpp -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null |
dtc -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE}
+done