With the introduction of devicetree.bbclass in oe-core/meta, remove the implementation of device tree compilation from device-tree.bb keeping the meta-xilinx specific information and licensing. Also consolidate the device-tree.bb and device-tree.bbappend.
The only differences between the existing device-tree.bb implementation and the devicetree.bbclass implementation is the device trees are deployed in a "drivetree/" subdirectory within the deployed images directory. Signed-off-by: Nathan Rossi <nat...@nathanrossi.com> --- devicetree.bbclass was added to oe-core/meta in the following commit: * http://git.openembedded.org/openembedded-core/commit/?id=3874c3859c3515fc8440fa9e776a02ad6ff3135c --- .../recipes-bsp/device-tree/device-tree.bb | 90 ++++++---------------- .../recipes-bsp/device-tree/device-tree.bbappend | 30 -------- 2 files changed, 23 insertions(+), 97 deletions(-) delete mode 100644 meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb index d1b67710a8..cf38c6ce6b 100644 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb +++ b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb @@ -1,86 +1,42 @@ -SUMMARY = "Device Trees for BSPs" -DESCRIPTION = "Device Tree generation and packaging for BSP Device Trees." +SUMMARY = "Xilinx BSP device trees" +DESCRIPTION = "Xilinx BSP device trees from within layer." SECTION = "bsp" +# the device trees from within the layer are licensed as MIT, kernel includes are GPL LICENSE = "MIT & GPLv2" LIC_FILES_CHKSUM = " \ file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ " -inherit deploy kernel-arch +inherit devicetree PROVIDES = "virtual/dtb" -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS += "dtc-native" +# common zynq include +SRC_URI_append_zynq = " file://zynq-7000-qspi-dummy.dtsi" -COMPATIBLE_MACHINE ?= "^$" +# device tree sources for the various machines +COMPATIBLE_MACHINE_picozed-zynq7 = ".*" +SRC_URI_append_picozed-zynq7 = " file://picozed-zynq7.dts" -PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE_microzed-zynq7 = ".*" +SRC_URI_append_microzed-zynq7 = " file://microzed-zynq7.dts" -FILES_${PN} = "/boot/devicetree/*.dtb /boot/devicetree/*.dtbo" +COMPATIBLE_MACHINE_qemu-zynq7 = ".*" +SRC_URI_append_qemu-zynq7 = " file://qemu-zynq7.dts" -S = "${WORKDIR}" -B = "${WORKDIR}/build" - -SYSROOT_DIRS += "/boot/devicetree" - -# By default provide the current kernel arch's boot/dts and boot/dts/include. -KERNEL_DTS_INCLUDE ??= " \ - ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts \ - ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/include \ - ${STAGING_KERNEL_DIR}/scripts/dtc/include-prefixes \ - " -# For arm64/zynqmp the xilinx specific includes are subdired under a vendor directory. -KERNEL_DTS_INCLUDE_append_zynqmp = " \ - ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/xilinx \ +COMPATIBLE_MACHINE_zybo-linux-bd-zynq7 = ".*" +SRC_URI_append_zybo-linux-bd-zynq7 = " \ + file://zybo-linux-bd-zynq7.dts \ + file://pcw.dtsi \ + file://pl.dtsi \ " -DTS_FILES_PATH ?= "${S}" -DTS_INCLUDE ?= "${DTS_FILES_PATH} ${KERNEL_DTS_INCLUDE}" - -DT_PADDING_SIZE ?= "0x3000" -DEVICETREE_FLAGS ?= " \ - -R 8 -p ${DT_PADDING_SIZE} -b 0 \ - ${@' '.join(['-i %s' % i for i in d.getVar('DTS_INCLUDE', True).split()])} \ - " -DEVICETREE_OFLAGS ?= "-@ -H epapr" -DEVICETREE_PP_FLAGS ?= " \ - -nostdinc -Ulinux -x assembler-with-cpp \ - ${@' '.join(['-I%s' % i for i in d.getVar('DTS_INCLUDE', True).split()])} \ +COMPATIBLE_MACHINE_kc705-microblazeel = ".*" +SRC_URI_append_kc705-microblazeel = " \ + file://kc705-microblazeel.dts \ + file://pl.dtsi \ + file://system-conf.dtsi \ " -python () { - # auto add dependency on kernel tree - if d.getVar("KERNEL_DTS_INCLUDE") != "": - d.appendVarFlag("do_compile", "depends", " virtual/kernel:do_configure") -} - -do_compile() { - for DTS_FILE in ${DTS_FILES_PATH}/*.dts; do - DTS_NAME=`basename -s .dts ${DTS_FILE}` - ${BUILD_CPP} ${DEVICETREE_PP_FLAGS} -o `basename ${DTS_FILE}`.pp ${DTS_FILE} - - # for now use the existance of the '/plugin/' tag to detect overlays - if grep -qse "/plugin/;" `basename ${DTS_FILE}`.pp; then - dtc ${DEVICETREE_OFLAGS} -I dts -O dtb ${DEVICETREE_FLAGS} -o ${DTS_NAME}.dtbo `basename ${DTS_FILE}`.pp - else - dtc -I dts -O dtb ${DEVICETREE_FLAGS} -o ${DTS_NAME}.dtb `basename ${DTS_FILE}`.pp - fi - done -} - -do_install() { - for DTB_FILE in `ls *.dtb *.dtbo`; do - install -Dm 0644 ${B}/${DTB_FILE} ${D}/boot/devicetree/${DTB_FILE} - done -} - -do_deploy() { - for DTB_FILE in `ls *.dtb *.dtbo`; do - install -Dm 0644 ${B}/${DTB_FILE} ${DEPLOYDIR}/${DTB_FILE} - done -} -addtask deploy before do_build after do_install - diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend deleted file mode 100644 index e128e0e84a..0000000000 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend +++ /dev/null @@ -1,30 +0,0 @@ - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -# common zynq include -SRC_URI_append_zynq = " file://zynq-7000-qspi-dummy.dtsi" - -# device tree sources for the various machines -COMPATIBLE_MACHINE_picozed-zynq7 = ".*" -SRC_URI_append_picozed-zynq7 = " file://picozed-zynq7.dts" - -COMPATIBLE_MACHINE_microzed-zynq7 = ".*" -SRC_URI_append_microzed-zynq7 = " file://microzed-zynq7.dts" - -COMPATIBLE_MACHINE_qemu-zynq7 = ".*" -SRC_URI_append_qemu-zynq7 = " file://qemu-zynq7.dts" - -COMPATIBLE_MACHINE_zybo-linux-bd-zynq7 = ".*" -SRC_URI_append_zybo-linux-bd-zynq7 = " \ - file://zybo-linux-bd-zynq7.dts \ - file://pcw.dtsi \ - file://pl.dtsi \ - " - -COMPATIBLE_MACHINE_kc705-microblazeel = ".*" -SRC_URI_append_kc705-microblazeel = " \ - file://kc705-microblazeel.dts \ - file://pl.dtsi \ - file://system-conf.dtsi \ - " - -- _______________________________________________ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx