diff options
author | Jason Wu <jason.wu.misc@gmail.com> | 2016-04-11 23:13:58 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-04-12 23:27:05 +1000 |
commit | af63fc4926cc4685c338600d11ee01557bd8b249 (patch) | |
tree | b1bf413adf26d878668bd43687237a80fe4d1861 | |
parent | 74e04c5969a74f7a6c8e863f87448bc865159079 (diff) | |
download | meta-xilinx-af63fc4926cc4685c338600d11ee01557bd8b249.tar.gz |
recipes-bsp:device-tree: Allow to reuse the dtses from kernel tree
Use the -i set the include folder for dtc instead of copying file.
Signed-off-by: Jason Wu <jason.wu.misc@gmail.com>
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r-- | recipes-bsp/device-tree/device-tree.bb | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/recipes-bsp/device-tree/device-tree.bb b/recipes-bsp/device-tree/device-tree.bb index 2cd47ce0..c5dd2a6b 100644 --- a/recipes-bsp/device-tree/device-tree.bb +++ b/recipes-bsp/device-tree/device-tree.bb | |||
@@ -19,8 +19,8 @@ SRC_URI_append_zynq = " file://common/zynq7-base.dtsi" | |||
19 | S = "${WORKDIR}" | 19 | S = "${WORKDIR}" |
20 | 20 | ||
21 | KERNEL_DTS_INCLUDE ??= "" | 21 | KERNEL_DTS_INCLUDE ??= "" |
22 | KERNEL_DTS_INCLUDE_zynq = "arch/arm/boot/dts/skeleton.dtsi arch/arm/boot/dts/zynq-7000.dtsi" | 22 | KERNEL_DTS_INCLUDE_zynq = "${STAGING_KERNEL_DIR}/arch/arm/boot/dts" |
23 | KERNEL_DTS_INCLUDE_zynqmp = "arch/arm/boot/dts/skeleton.dtsi arch/arm64/boot/dts/xilinx/zynqmp.dtsi" | 23 | KERNEL_DTS_INCLUDE_zynqmp = "${STAGING_KERNEL_DIR}/arch/arm/boot/dts ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/xilinx" |
24 | 24 | ||
25 | python () { | 25 | python () { |
26 | # auto add dependency on kernel tree | 26 | # auto add dependency on kernel tree |
@@ -30,14 +30,6 @@ python () { | |||
30 | } | 30 | } |
31 | 31 | ||
32 | do_compile() { | 32 | do_compile() { |
33 | for i in ${KERNEL_DTS_INCLUDE}; do | ||
34 | DTSI_NAME=`basename $i` | ||
35 | if test -e ${STAGING_KERNEL_DIR}/$i; then | ||
36 | mkdir -p ${WORKDIR}/devicetree | ||
37 | cp ${STAGING_KERNEL_DIR}/$i ${WORKDIR}/devicetree/${DTSI_NAME} | ||
38 | fi | ||
39 | done | ||
40 | |||
41 | if test -n "${MACHINE_DEVICETREE}"; then | 33 | if test -n "${MACHINE_DEVICETREE}"; then |
42 | mkdir -p ${WORKDIR}/devicetree | 34 | mkdir -p ${WORKDIR}/devicetree |
43 | for i in ${MACHINE_DEVICETREE}; do | 35 | for i in ${MACHINE_DEVICETREE}; do |
@@ -50,7 +42,11 @@ do_compile() { | |||
50 | 42 | ||
51 | for DTS_FILE in ${DEVICETREE}; do | 43 | for DTS_FILE in ${DEVICETREE}; do |
52 | DTS_NAME=`basename -s .dts ${DTS_FILE}` | 44 | DTS_NAME=`basename -s .dts ${DTS_FILE}` |
53 | dtc -I dts -O dtb ${DEVICETREE_FLAGS} -o ${DTS_NAME}.dtb ${DTS_FILE} | 45 | for d in ${KERNEL_DTS_INCLUDE}; do |
46 | dtc_include="${dtc_include} -i $d" | ||
47 | done | ||
48 | dtc -I dts -O dtb ${DEVICETREE_FLAGS} -i ${WORKDIR}/devicetree \ | ||
49 | ${dtc_include} -o ${DTS_NAME}.dtb ${DTS_FILE} | ||
54 | done | 50 | done |
55 | } | 51 | } |
56 | 52 | ||