From 7c37cf4f64a8b60173836f7982a52d237f80331d Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 28 Feb 2014 18:29:09 +0000 Subject: [PATCH] Integrate device-tree upstream files into the build process: (1) Invoke cpp to bring in files via #include (although the old /include/ stuff is supported still). (2) bring in files from either vendor tree or freebsd-custom files when building. (3) move all dts* files from sys/boot/fdt/dts to sys/boot/fdt/dts/${MACHINE} as appropriate. (4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh so that the different places in the tree use the exact same logic. (5) switch back to gpl dtc by default. the bsdl one in the tree has significant issues not easily addressed by those unfamiliar with the code. --- Makefile.inc1 | 10 +++++----- share/mk/bsd.own.mk | 2 +- sys/boot/fdt/dts/{ => arm}/am335x-evm.dts | 0 sys/boot/fdt/dts/{ => arm}/am335x.dtsi | 0 sys/boot/fdt/dts/{ => arm}/bcm2835.dtsi | 0 sys/boot/fdt/dts/{ => arm}/beaglebone-black.dts | 0 sys/boot/fdt/dts/{ => arm}/beaglebone.dts | 0 sys/boot/fdt/dts/{ => arm}/cubieboard.dts | 0 sys/boot/fdt/dts/{ => arm}/cubieboard2.dts | 0 sys/boot/fdt/dts/{ => arm}/db78100.dts | 0 sys/boot/fdt/dts/{ => arm}/db78460.dts | 0 sys/boot/fdt/dts/{ => arm}/db88f5182.dts | 0 sys/boot/fdt/dts/{ => arm}/db88f5281.dts | 0 sys/boot/fdt/dts/{ => arm}/db88f6281.dts | 0 sys/boot/fdt/dts/{ => arm}/digi-ccwmx53.dts | 0 sys/boot/fdt/dts/{ => arm}/dockstar.dts | 0 sys/boot/fdt/dts/{ => arm}/dreamplug-1001.dts | 0 sys/boot/fdt/dts/{ => arm}/dreamplug-1001N.dts | 0 sys/boot/fdt/dts/{ => arm}/ea3250.dts | 0 sys/boot/fdt/dts/{ => arm}/efikamx.dts | 0 sys/boot/fdt/dts/{ => arm}/exynos5250-arndale.dts | 0 sys/boot/fdt/dts/{ => arm}/exynos5250.dtsi | 0 sys/boot/fdt/dts/{ => arm}/imx51x.dtsi | 0 sys/boot/fdt/dts/{ => arm}/imx53-qsb.dts | 0 sys/boot/fdt/dts/{ => arm}/imx53x.dtsi | 0 sys/boot/fdt/dts/{ => arm}/imx6.dtsi | 0 sys/boot/fdt/dts/{ => arm}/p1020rdb.dts | 0 sys/boot/fdt/dts/{ => arm}/p2020ds.dts | 0 sys/boot/fdt/dts/{ => arm}/p2041rdb.dts | 0 sys/boot/fdt/dts/{ => arm}/p2041si.dtsi | 0 sys/boot/fdt/dts/{ => arm}/p3041ds.dts | 0 sys/boot/fdt/dts/{ => arm}/p3041si.dtsi | 0 sys/boot/fdt/dts/{ => arm}/p5020ds.dts | 0 sys/boot/fdt/dts/{ => arm}/p5020si.dtsi | 0 sys/boot/fdt/dts/{ => arm}/pandaboard.dts | 0 sys/boot/fdt/dts/{ => arm}/rk3188-radxa.dts | 0 sys/boot/fdt/dts/{ => arm}/rk3188.dtsi | 0 sys/boot/fdt/dts/{ => arm}/rpi.dts | 0 sys/boot/fdt/dts/{ => arm}/sheevaplug.dts | 0 sys/boot/fdt/dts/{ => arm}/tegra20-paz00.dts | 0 sys/boot/fdt/dts/{ => arm}/tegra20.dtsi | 0 sys/boot/fdt/dts/{ => arm}/trimslice.dts | 0 sys/boot/fdt/dts/{ => arm}/ts7800.dts | 0 sys/boot/fdt/dts/{ => arm}/versatilepb.dts | 0 sys/boot/fdt/dts/{ => arm}/vybrid-colibri-vf50.dts | 0 sys/boot/fdt/dts/{ => arm}/vybrid-cosmic.dts | 0 sys/boot/fdt/dts/{ => arm}/vybrid-quartz.dts | 0 sys/boot/fdt/dts/{ => arm}/vybrid.dtsi | 0 sys/boot/fdt/dts/{ => arm}/wandboard-dual.dts | 0 sys/boot/fdt/dts/{ => arm}/wandboard-quad.dts | 0 sys/boot/fdt/dts/{ => arm}/wandboard-solo.dts | 0 sys/boot/fdt/dts/{ => arm}/zedboard.dts | 0 sys/boot/fdt/dts/{ => mips}/beri-netfpga.dts | 0 sys/boot/fdt/dts/{ => mips}/beri-sim.dts | 0 sys/boot/fdt/dts/{ => mips}/beripad-de4.dts | 0 sys/boot/fdt/dts/{ => mips}/xlp-basic.dts | 0 sys/boot/fdt/dts/{ => powerpc}/mpc8555cds.dts | 0 sys/boot/fdt/dts/{ => powerpc}/mpc8572ds.dts | 0 sys/conf/files | 7 ++++--- sys/tools/fdt/make_dtb.sh | 11 +++++++++++ 60 files changed, 21 insertions(+), 9 deletions(-) rename sys/boot/fdt/dts/{ => arm}/am335x-evm.dts (100%) rename sys/boot/fdt/dts/{ => arm}/am335x.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/bcm2835.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/beaglebone-black.dts (100%) rename sys/boot/fdt/dts/{ => arm}/beaglebone.dts (100%) rename sys/boot/fdt/dts/{ => arm}/cubieboard.dts (100%) rename sys/boot/fdt/dts/{ => arm}/cubieboard2.dts (100%) rename sys/boot/fdt/dts/{ => arm}/db78100.dts (100%) rename sys/boot/fdt/dts/{ => arm}/db78460.dts (100%) rename sys/boot/fdt/dts/{ => arm}/db88f5182.dts (100%) rename sys/boot/fdt/dts/{ => arm}/db88f5281.dts (100%) rename sys/boot/fdt/dts/{ => arm}/db88f6281.dts (100%) rename sys/boot/fdt/dts/{ => arm}/digi-ccwmx53.dts (100%) rename sys/boot/fdt/dts/{ => arm}/dockstar.dts (100%) rename sys/boot/fdt/dts/{ => arm}/dreamplug-1001.dts (100%) rename sys/boot/fdt/dts/{ => arm}/dreamplug-1001N.dts (100%) rename sys/boot/fdt/dts/{ => arm}/ea3250.dts (100%) rename sys/boot/fdt/dts/{ => arm}/efikamx.dts (100%) rename sys/boot/fdt/dts/{ => arm}/exynos5250-arndale.dts (100%) rename sys/boot/fdt/dts/{ => arm}/exynos5250.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/imx51x.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/imx53-qsb.dts (100%) rename sys/boot/fdt/dts/{ => arm}/imx53x.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/imx6.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/p1020rdb.dts (100%) rename sys/boot/fdt/dts/{ => arm}/p2020ds.dts (100%) rename sys/boot/fdt/dts/{ => arm}/p2041rdb.dts (100%) rename sys/boot/fdt/dts/{ => arm}/p2041si.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/p3041ds.dts (100%) rename sys/boot/fdt/dts/{ => arm}/p3041si.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/p5020ds.dts (100%) rename sys/boot/fdt/dts/{ => arm}/p5020si.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/pandaboard.dts (100%) rename sys/boot/fdt/dts/{ => arm}/rk3188-radxa.dts (100%) rename sys/boot/fdt/dts/{ => arm}/rk3188.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/rpi.dts (100%) rename sys/boot/fdt/dts/{ => arm}/sheevaplug.dts (100%) rename sys/boot/fdt/dts/{ => arm}/tegra20-paz00.dts (100%) rename sys/boot/fdt/dts/{ => arm}/tegra20.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/trimslice.dts (100%) rename sys/boot/fdt/dts/{ => arm}/ts7800.dts (100%) rename sys/boot/fdt/dts/{ => arm}/versatilepb.dts (100%) rename sys/boot/fdt/dts/{ => arm}/vybrid-colibri-vf50.dts (100%) rename sys/boot/fdt/dts/{ => arm}/vybrid-cosmic.dts (100%) rename sys/boot/fdt/dts/{ => arm}/vybrid-quartz.dts (100%) rename sys/boot/fdt/dts/{ => arm}/vybrid.dtsi (100%) rename sys/boot/fdt/dts/{ => arm}/wandboard-dual.dts (100%) rename sys/boot/fdt/dts/{ => arm}/wandboard-quad.dts (100%) rename sys/boot/fdt/dts/{ => arm}/wandboard-solo.dts (100%) rename sys/boot/fdt/dts/{ => arm}/zedboard.dts (100%) rename sys/boot/fdt/dts/{ => mips}/beri-netfpga.dts (100%) rename sys/boot/fdt/dts/{ => mips}/beri-sim.dts (100%) rename sys/boot/fdt/dts/{ => mips}/beripad-de4.dts (100%) rename sys/boot/fdt/dts/{ => mips}/xlp-basic.dts (100%) rename sys/boot/fdt/dts/{ => powerpc}/mpc8555cds.dts (100%) rename sys/boot/fdt/dts/{ => powerpc}/mpc8572ds.dts (100%) create mode 100755 sys/tools/fdt/make_dtb.sh diff --git a/Makefile.inc1 b/Makefile.inc1 index 00d0a9fc695b..2f227595c4ad 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1262,7 +1262,7 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif -# Default to building the BSDL DTC, but build the GPL one if users explicitly +# Default to building the GPL DTC, but build the BSDL one if users explicitly # request it. _dtc= usr.bin/dtc .if ${MK_GPL_DTC} != "no" @@ -1853,7 +1853,7 @@ builddtb: echo "ERROR: FDT_DTS_FILE must be specified!"; \ exit 1; \ fi; \ - if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \ + if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE} ]; then \ echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ exist!"; \ exit 1; \ @@ -1863,9 +1863,9 @@ builddtb: directory"; \ fi @PATH=${TMPPATH} \ - dtc -O dtb -o \ - ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \ - -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} + ${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \ + ${FDT_DTS_FILE} \ + ${DTBOUTPUTPATH}/`basename ${FDT_DTS_FILE} .dts` ############### diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index f4fd64433aae..71f2e1efae03 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -287,6 +287,7 @@ __DEFAULT_YES_OPTIONS = \ GNU \ GPIB \ GPIO \ + GPL_DTC \ GROFF \ HTML \ ICONV \ @@ -368,7 +369,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CTF \ DEBUG_FILES \ - GPL_DTC \ HESIOD \ INSTALL_AS_USER \ LLDB \ diff --git a/sys/boot/fdt/dts/am335x-evm.dts b/sys/boot/fdt/dts/arm/am335x-evm.dts similarity index 100% rename from sys/boot/fdt/dts/am335x-evm.dts rename to sys/boot/fdt/dts/arm/am335x-evm.dts diff --git a/sys/boot/fdt/dts/am335x.dtsi b/sys/boot/fdt/dts/arm/am335x.dtsi similarity index 100% rename from sys/boot/fdt/dts/am335x.dtsi rename to sys/boot/fdt/dts/arm/am335x.dtsi diff --git a/sys/boot/fdt/dts/bcm2835.dtsi b/sys/boot/fdt/dts/arm/bcm2835.dtsi similarity index 100% rename from sys/boot/fdt/dts/bcm2835.dtsi rename to sys/boot/fdt/dts/arm/bcm2835.dtsi diff --git a/sys/boot/fdt/dts/beaglebone-black.dts b/sys/boot/fdt/dts/arm/beaglebone-black.dts similarity index 100% rename from sys/boot/fdt/dts/beaglebone-black.dts rename to sys/boot/fdt/dts/arm/beaglebone-black.dts diff --git a/sys/boot/fdt/dts/beaglebone.dts b/sys/boot/fdt/dts/arm/beaglebone.dts similarity index 100% rename from sys/boot/fdt/dts/beaglebone.dts rename to sys/boot/fdt/dts/arm/beaglebone.dts diff --git a/sys/boot/fdt/dts/cubieboard.dts b/sys/boot/fdt/dts/arm/cubieboard.dts similarity index 100% rename from sys/boot/fdt/dts/cubieboard.dts rename to sys/boot/fdt/dts/arm/cubieboard.dts diff --git a/sys/boot/fdt/dts/cubieboard2.dts b/sys/boot/fdt/dts/arm/cubieboard2.dts similarity index 100% rename from sys/boot/fdt/dts/cubieboard2.dts rename to sys/boot/fdt/dts/arm/cubieboard2.dts diff --git a/sys/boot/fdt/dts/db78100.dts b/sys/boot/fdt/dts/arm/db78100.dts similarity index 100% rename from sys/boot/fdt/dts/db78100.dts rename to sys/boot/fdt/dts/arm/db78100.dts diff --git a/sys/boot/fdt/dts/db78460.dts b/sys/boot/fdt/dts/arm/db78460.dts similarity index 100% rename from sys/boot/fdt/dts/db78460.dts rename to sys/boot/fdt/dts/arm/db78460.dts diff --git a/sys/boot/fdt/dts/db88f5182.dts b/sys/boot/fdt/dts/arm/db88f5182.dts similarity index 100% rename from sys/boot/fdt/dts/db88f5182.dts rename to sys/boot/fdt/dts/arm/db88f5182.dts diff --git a/sys/boot/fdt/dts/db88f5281.dts b/sys/boot/fdt/dts/arm/db88f5281.dts similarity index 100% rename from sys/boot/fdt/dts/db88f5281.dts rename to sys/boot/fdt/dts/arm/db88f5281.dts diff --git a/sys/boot/fdt/dts/db88f6281.dts b/sys/boot/fdt/dts/arm/db88f6281.dts similarity index 100% rename from sys/boot/fdt/dts/db88f6281.dts rename to sys/boot/fdt/dts/arm/db88f6281.dts diff --git a/sys/boot/fdt/dts/digi-ccwmx53.dts b/sys/boot/fdt/dts/arm/digi-ccwmx53.dts similarity index 100% rename from sys/boot/fdt/dts/digi-ccwmx53.dts rename to sys/boot/fdt/dts/arm/digi-ccwmx53.dts diff --git a/sys/boot/fdt/dts/dockstar.dts b/sys/boot/fdt/dts/arm/dockstar.dts similarity index 100% rename from sys/boot/fdt/dts/dockstar.dts rename to sys/boot/fdt/dts/arm/dockstar.dts diff --git a/sys/boot/fdt/dts/dreamplug-1001.dts b/sys/boot/fdt/dts/arm/dreamplug-1001.dts similarity index 100% rename from sys/boot/fdt/dts/dreamplug-1001.dts rename to sys/boot/fdt/dts/arm/dreamplug-1001.dts diff --git a/sys/boot/fdt/dts/dreamplug-1001N.dts b/sys/boot/fdt/dts/arm/dreamplug-1001N.dts similarity index 100% rename from sys/boot/fdt/dts/dreamplug-1001N.dts rename to sys/boot/fdt/dts/arm/dreamplug-1001N.dts diff --git a/sys/boot/fdt/dts/ea3250.dts b/sys/boot/fdt/dts/arm/ea3250.dts similarity index 100% rename from sys/boot/fdt/dts/ea3250.dts rename to sys/boot/fdt/dts/arm/ea3250.dts diff --git a/sys/boot/fdt/dts/efikamx.dts b/sys/boot/fdt/dts/arm/efikamx.dts similarity index 100% rename from sys/boot/fdt/dts/efikamx.dts rename to sys/boot/fdt/dts/arm/efikamx.dts diff --git a/sys/boot/fdt/dts/exynos5250-arndale.dts b/sys/boot/fdt/dts/arm/exynos5250-arndale.dts similarity index 100% rename from sys/boot/fdt/dts/exynos5250-arndale.dts rename to sys/boot/fdt/dts/arm/exynos5250-arndale.dts diff --git a/sys/boot/fdt/dts/exynos5250.dtsi b/sys/boot/fdt/dts/arm/exynos5250.dtsi similarity index 100% rename from sys/boot/fdt/dts/exynos5250.dtsi rename to sys/boot/fdt/dts/arm/exynos5250.dtsi diff --git a/sys/boot/fdt/dts/imx51x.dtsi b/sys/boot/fdt/dts/arm/imx51x.dtsi similarity index 100% rename from sys/boot/fdt/dts/imx51x.dtsi rename to sys/boot/fdt/dts/arm/imx51x.dtsi diff --git a/sys/boot/fdt/dts/imx53-qsb.dts b/sys/boot/fdt/dts/arm/imx53-qsb.dts similarity index 100% rename from sys/boot/fdt/dts/imx53-qsb.dts rename to sys/boot/fdt/dts/arm/imx53-qsb.dts diff --git a/sys/boot/fdt/dts/imx53x.dtsi b/sys/boot/fdt/dts/arm/imx53x.dtsi similarity index 100% rename from sys/boot/fdt/dts/imx53x.dtsi rename to sys/boot/fdt/dts/arm/imx53x.dtsi diff --git a/sys/boot/fdt/dts/imx6.dtsi b/sys/boot/fdt/dts/arm/imx6.dtsi similarity index 100% rename from sys/boot/fdt/dts/imx6.dtsi rename to sys/boot/fdt/dts/arm/imx6.dtsi diff --git a/sys/boot/fdt/dts/p1020rdb.dts b/sys/boot/fdt/dts/arm/p1020rdb.dts similarity index 100% rename from sys/boot/fdt/dts/p1020rdb.dts rename to sys/boot/fdt/dts/arm/p1020rdb.dts diff --git a/sys/boot/fdt/dts/p2020ds.dts b/sys/boot/fdt/dts/arm/p2020ds.dts similarity index 100% rename from sys/boot/fdt/dts/p2020ds.dts rename to sys/boot/fdt/dts/arm/p2020ds.dts diff --git a/sys/boot/fdt/dts/p2041rdb.dts b/sys/boot/fdt/dts/arm/p2041rdb.dts similarity index 100% rename from sys/boot/fdt/dts/p2041rdb.dts rename to sys/boot/fdt/dts/arm/p2041rdb.dts diff --git a/sys/boot/fdt/dts/p2041si.dtsi b/sys/boot/fdt/dts/arm/p2041si.dtsi similarity index 100% rename from sys/boot/fdt/dts/p2041si.dtsi rename to sys/boot/fdt/dts/arm/p2041si.dtsi diff --git a/sys/boot/fdt/dts/p3041ds.dts b/sys/boot/fdt/dts/arm/p3041ds.dts similarity index 100% rename from sys/boot/fdt/dts/p3041ds.dts rename to sys/boot/fdt/dts/arm/p3041ds.dts diff --git a/sys/boot/fdt/dts/p3041si.dtsi b/sys/boot/fdt/dts/arm/p3041si.dtsi similarity index 100% rename from sys/boot/fdt/dts/p3041si.dtsi rename to sys/boot/fdt/dts/arm/p3041si.dtsi diff --git a/sys/boot/fdt/dts/p5020ds.dts b/sys/boot/fdt/dts/arm/p5020ds.dts similarity index 100% rename from sys/boot/fdt/dts/p5020ds.dts rename to sys/boot/fdt/dts/arm/p5020ds.dts diff --git a/sys/boot/fdt/dts/p5020si.dtsi b/sys/boot/fdt/dts/arm/p5020si.dtsi similarity index 100% rename from sys/boot/fdt/dts/p5020si.dtsi rename to sys/boot/fdt/dts/arm/p5020si.dtsi diff --git a/sys/boot/fdt/dts/pandaboard.dts b/sys/boot/fdt/dts/arm/pandaboard.dts similarity index 100% rename from sys/boot/fdt/dts/pandaboard.dts rename to sys/boot/fdt/dts/arm/pandaboard.dts diff --git a/sys/boot/fdt/dts/rk3188-radxa.dts b/sys/boot/fdt/dts/arm/rk3188-radxa.dts similarity index 100% rename from sys/boot/fdt/dts/rk3188-radxa.dts rename to sys/boot/fdt/dts/arm/rk3188-radxa.dts diff --git a/sys/boot/fdt/dts/rk3188.dtsi b/sys/boot/fdt/dts/arm/rk3188.dtsi similarity index 100% rename from sys/boot/fdt/dts/rk3188.dtsi rename to sys/boot/fdt/dts/arm/rk3188.dtsi diff --git a/sys/boot/fdt/dts/rpi.dts b/sys/boot/fdt/dts/arm/rpi.dts similarity index 100% rename from sys/boot/fdt/dts/rpi.dts rename to sys/boot/fdt/dts/arm/rpi.dts diff --git a/sys/boot/fdt/dts/sheevaplug.dts b/sys/boot/fdt/dts/arm/sheevaplug.dts similarity index 100% rename from sys/boot/fdt/dts/sheevaplug.dts rename to sys/boot/fdt/dts/arm/sheevaplug.dts diff --git a/sys/boot/fdt/dts/tegra20-paz00.dts b/sys/boot/fdt/dts/arm/tegra20-paz00.dts similarity index 100% rename from sys/boot/fdt/dts/tegra20-paz00.dts rename to sys/boot/fdt/dts/arm/tegra20-paz00.dts diff --git a/sys/boot/fdt/dts/tegra20.dtsi b/sys/boot/fdt/dts/arm/tegra20.dtsi similarity index 100% rename from sys/boot/fdt/dts/tegra20.dtsi rename to sys/boot/fdt/dts/arm/tegra20.dtsi diff --git a/sys/boot/fdt/dts/trimslice.dts b/sys/boot/fdt/dts/arm/trimslice.dts similarity index 100% rename from sys/boot/fdt/dts/trimslice.dts rename to sys/boot/fdt/dts/arm/trimslice.dts diff --git a/sys/boot/fdt/dts/ts7800.dts b/sys/boot/fdt/dts/arm/ts7800.dts similarity index 100% rename from sys/boot/fdt/dts/ts7800.dts rename to sys/boot/fdt/dts/arm/ts7800.dts diff --git a/sys/boot/fdt/dts/versatilepb.dts b/sys/boot/fdt/dts/arm/versatilepb.dts similarity index 100% rename from sys/boot/fdt/dts/versatilepb.dts rename to sys/boot/fdt/dts/arm/versatilepb.dts diff --git a/sys/boot/fdt/dts/vybrid-colibri-vf50.dts b/sys/boot/fdt/dts/arm/vybrid-colibri-vf50.dts similarity index 100% rename from sys/boot/fdt/dts/vybrid-colibri-vf50.dts rename to sys/boot/fdt/dts/arm/vybrid-colibri-vf50.dts diff --git a/sys/boot/fdt/dts/vybrid-cosmic.dts b/sys/boot/fdt/dts/arm/vybrid-cosmic.dts similarity index 100% rename from sys/boot/fdt/dts/vybrid-cosmic.dts rename to sys/boot/fdt/dts/arm/vybrid-cosmic.dts diff --git a/sys/boot/fdt/dts/vybrid-quartz.dts b/sys/boot/fdt/dts/arm/vybrid-quartz.dts similarity index 100% rename from sys/boot/fdt/dts/vybrid-quartz.dts rename to sys/boot/fdt/dts/arm/vybrid-quartz.dts diff --git a/sys/boot/fdt/dts/vybrid.dtsi b/sys/boot/fdt/dts/arm/vybrid.dtsi similarity index 100% rename from sys/boot/fdt/dts/vybrid.dtsi rename to sys/boot/fdt/dts/arm/vybrid.dtsi diff --git a/sys/boot/fdt/dts/wandboard-dual.dts b/sys/boot/fdt/dts/arm/wandboard-dual.dts similarity index 100% rename from sys/boot/fdt/dts/wandboard-dual.dts rename to sys/boot/fdt/dts/arm/wandboard-dual.dts diff --git a/sys/boot/fdt/dts/wandboard-quad.dts b/sys/boot/fdt/dts/arm/wandboard-quad.dts similarity index 100% rename from sys/boot/fdt/dts/wandboard-quad.dts rename to sys/boot/fdt/dts/arm/wandboard-quad.dts diff --git a/sys/boot/fdt/dts/wandboard-solo.dts b/sys/boot/fdt/dts/arm/wandboard-solo.dts similarity index 100% rename from sys/boot/fdt/dts/wandboard-solo.dts rename to sys/boot/fdt/dts/arm/wandboard-solo.dts diff --git a/sys/boot/fdt/dts/zedboard.dts b/sys/boot/fdt/dts/arm/zedboard.dts similarity index 100% rename from sys/boot/fdt/dts/zedboard.dts rename to sys/boot/fdt/dts/arm/zedboard.dts diff --git a/sys/boot/fdt/dts/beri-netfpga.dts b/sys/boot/fdt/dts/mips/beri-netfpga.dts similarity index 100% rename from sys/boot/fdt/dts/beri-netfpga.dts rename to sys/boot/fdt/dts/mips/beri-netfpga.dts diff --git a/sys/boot/fdt/dts/beri-sim.dts b/sys/boot/fdt/dts/mips/beri-sim.dts similarity index 100% rename from sys/boot/fdt/dts/beri-sim.dts rename to sys/boot/fdt/dts/mips/beri-sim.dts diff --git a/sys/boot/fdt/dts/beripad-de4.dts b/sys/boot/fdt/dts/mips/beripad-de4.dts similarity index 100% rename from sys/boot/fdt/dts/beripad-de4.dts rename to sys/boot/fdt/dts/mips/beripad-de4.dts diff --git a/sys/boot/fdt/dts/xlp-basic.dts b/sys/boot/fdt/dts/mips/xlp-basic.dts similarity index 100% rename from sys/boot/fdt/dts/xlp-basic.dts rename to sys/boot/fdt/dts/mips/xlp-basic.dts diff --git a/sys/boot/fdt/dts/mpc8555cds.dts b/sys/boot/fdt/dts/powerpc/mpc8555cds.dts similarity index 100% rename from sys/boot/fdt/dts/mpc8555cds.dts rename to sys/boot/fdt/dts/powerpc/mpc8555cds.dts diff --git a/sys/boot/fdt/dts/mpc8572ds.dts b/sys/boot/fdt/dts/powerpc/mpc8572ds.dts similarity index 100% rename from sys/boot/fdt/dts/mpc8572ds.dts rename to sys/boot/fdt/dts/powerpc/mpc8572ds.dts diff --git a/sys/conf/files b/sys/conf/files index 3e3a0731f4ab..160f663b5488 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -14,11 +14,12 @@ acpi_quirks.h optional acpi \ # from the specified source (DTS) file: .dts -> .dtb # fdt_dtb_file optional fdt \ - compile-with "if [ -f $S/boot/fdt/dts/${FDT_DTS_FILE} ]; then dtc -O dtb -o ${FDT_DTS_FILE:R}.dtb -b 0 -p 1024 $S/boot/fdt/dts/${FDT_DTS_FILE}; fi" \ + compile-with "sh $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}/${FDT_DTS_FILE:R}.dtb" \ no-obj no-implicit-rule before-depend \ clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ - compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \ + compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}" \ + dependency "fdt_dtb_file" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" feeder_eq_gen.h optional sound \ @@ -1370,7 +1371,7 @@ dev/fb/splash.c optional sc splash dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ - dependency "$S/boot/fdt/dts/${FDT_DTS_FILE}" + dependency "$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}" dev/fdt/simplebus.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh new file mode 100755 index 000000000000..8e4892ee293f --- /dev/null +++ b/sys/tools/fdt/make_dtb.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $FreeBSD$ + +# Script generates dtb file ($3) from dts source ($2) in build tree S ($1) +S=$1 +dts=$2 +dtb=$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 | + dtc -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts -i $S/gnu/dts/${MACHINE}