summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-core')
-rw-r--r--meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb26
1 files changed, 22 insertions, 4 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 718857e8..a35df4ac 100644
--- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
+++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
@@ -59,13 +59,31 @@ DTB_FILE_NAME = "${@os.path.basename(d.getVar('CONFIG_DTFILE')).replace('.dts',
59 59
60DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" 60DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}"
61 61
62do_configure:append () { 62# Copy the EXTRA_DT_FILES and EXTRA_OVERLAYS files in prepend operation so that
63 for f in ${EXTRA_DT_FILES}; do 63# it can be preprocessed.
64 cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ 64do_configure:prepend () {
65 # Create DT_FILES_PATH directory if doesn't exist during prepend operation.
66 if [ ! -d ${DT_FILES_PATH} ]; then
67 mkdir -p ${DT_FILES_PATH}
68 fi
69
70 for f in ${EXTRA_DT_FILES} ${EXTRA_OVERLAYS}; do
71 if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then
72 cp ${WORKDIR}/${f} ${DT_FILES_PATH}/
73 fi
65 done 74 done
75}
66 76
77do_configure:append () {
67 for f in ${EXTRA_OVERLAYS}; do 78 for f in ${EXTRA_OVERLAYS}; do
68 cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ 79 if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then
80 if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then
81 bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must use a 'dts' and not 'dtb' in CONFIG_DTFILE"
82 else
83 bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must set a valid CONFIG_DTFILE or use system-top.dts"
84 fi
85 exit 1
86 fi
69 echo "/include/ \"$f\"" >> ${DT_FILES_PATH}/${BASE_DTS}.dts 87 echo "/include/ \"$f\"" >> ${DT_FILES_PATH}/${BASE_DTS}.dts
70 done 88 done
71} 89}