summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2022-12-01 09:36:04 -0800
committerMark Hatle <mark.hatle@amd.com>2022-12-02 08:44:13 -0600
commit3958d592d64f6a2c87460f7f8a0683838cb84076 (patch)
tree185c674e3ec64fa4eb3bfc44689d9215a27273dd
parent43691092c359fe423ee4cb7bb74b6e5876b1d9a7 (diff)
downloadmeta-xilinx-3958d592d64f6a2c87460f7f8a0683838cb84076.tar.gz
device-tree: Ensure the system.dtb is written to the /boot directory
The system.dtb should be a symlink to the system-top.dtb in the devicetree subdirectory. This matches the expected behavior for u-boot-zynq-scr and possibly other users. Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
index 30cc362d..91a13fa1 100644
--- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
+++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
@@ -34,12 +34,19 @@ DTB_FILE_NAME = "${@os.path.basename(d.getVar('CONFIG_DTFILE')).replace('.dts',
34 34
35DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" 35DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}"
36 36
37do_install:prepend() { 37FILES:${PN} += "/boot/system.dtb"
38devicetree_do_install:append() {
38 if [ -n "${DTB_FILE_NAME}" ]; then 39 if [ -n "${DTB_FILE_NAME}" ]; then
39 # If it's already a dtb, we have to copy from the original location 40 # If it's already a dtb, we have to copy from the original location
40 if [ -e "${DT_FILES_PATH}/${DTB_FILE_NAME}" ]; then 41 if [ -e "${DT_FILES_PATH}/${DTB_FILE_NAME}" ]; then
41 install -Dm 0644 ${DT_FILES_PATH}/${DTB_FILE_NAME} ${D}/boot/devicetree/${DTB_FILE_NAME} 42 install -Dm 0644 ${DT_FILES_PATH}/${DTB_FILE_NAME} ${D}/boot/devicetree/${DTB_FILE_NAME}
42 fi 43 fi
44 if [ -e "${D}/boot/devicetree/${DTB_FILE_NAME}" ]; then
45 # We need the output to be system.dtb for WIC setup to match XSCT flow
46 ln -sf devicetree/${DTB_FILE_NAME} ${D}/boot/system.dtb
47 else
48 bberror "Expected filename ${DTB_FILE_NAME} doesn't exist in ${DEPLOYDIR}/devicetree"
49 fi
43 fi 50 fi
44} 51}
45 52