diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-xilinx/meta-xilinx-bsp/recipes-bsp/uboot-device-tree/uboot-device-tree.bb | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/recipes-bsp/uboot-device-tree/uboot-device-tree.bb')
-rw-r--r-- | meta-xilinx/meta-xilinx-bsp/recipes-bsp/uboot-device-tree/uboot-device-tree.bb | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/uboot-device-tree/uboot-device-tree.bb b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/uboot-device-tree/uboot-device-tree.bb new file mode 100644 index 000000000..885dce8c8 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/uboot-device-tree/uboot-device-tree.bb @@ -0,0 +1,78 @@ +SUMMARY = "Xilinx BSP u-boot device trees" +DESCRIPTION = "Xilinx BSP u-boot device trees from within layer." +SECTION = "bsp" + +LICENSE = "MIT & GPLv2" +LIC_FILES_CHKSUM = " \ + file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ + file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + " + +inherit devicetree xsctdt xsctyaml + + +REPO ??= "git://github.com/xilinx/device-tree-xlnx.git;protocol=https" +BRANCH ??= "master" +BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" +SRC_URI = "${REPO};${BRANCHARG}" + +PROVIDES = "virtual/uboot-dtb" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +SRCREV ??= "bc8445833318e9320bf485ea125921eecc3dc97a" +PV = "xilinx+git${SRCPV}" + +PACKAGE_ARCH ?= "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE ?= "^$" +COMPATIBLE_MACHINE_zynqmp = ".*" +COMPATIBLE_MACHINE_zynq = ".*" +COMPATIBLE_MACHINE_versal = ".*" + +XSCTH_BUILD_CONFIG ?= "" + +DT_FILES_PATH = "${XSCTH_WS}/${XSCTH_PROJ}" +DT_INCLUDE_append = " ${WORKDIR}" +DT_PADDING_SIZE = "0x1000" + +UBOOT_DTS ?= "" +XSCTH_MISC = " -hdf_type ${HDF_EXT}" +XSCTH_APP = "device-tree" +YAML_DT_BOARD_FLAGS_zynqmp-generic ?= "" +YAML_DT_BOARD_FLAGS_versal-generic ?= "" +YAML_DT_BOARD_FLAGS_zynq-generic ?= "" +UBOOT_DTS_NAME = "u-boot" +DTB_FILE = "u-boot.dtb" + +do_configure[dirs] += "${DT_FILES_PATH}" +SRC_URI_append = "${@" ".join(["file://%s" % f for f in (d.getVar('UBOOT_DTS') or "").split()])}" + +do_configure_prepend () { + if [ ! -z "${UBOOT_DTS}" ]; then + for f in ${UBOOT_DTS}; do + cp -rf ${WORKDIR}/${f} ${DT_FILES_PATH}/ + done + return + fi +} + + +#Both linux dtb and uboot dtb are installing +#system-top.dtb for uboot env recipe while do_prepare_recipe_sysroot +#moving system-top.dts to othername. +do_compile_prepend() { + import shutil + + listpath = d.getVar("DT_FILES_PATH") + try: + os.remove(os.path.join(listpath, "system.dts")) + shutil.move(os.path.join(listpath, "system-top.dts"), os.path.join(listpath, d.getVar("UBOOT_DTS_NAME") + ".dts")) + except OSError: + pass +} + +do_deploy() { + install -Dm 0644 ${B}/${UBOOT_DTS_NAME}.dtb ${DEPLOYDIR}/${UBOOT_DTS_NAME}.dtb +} |