[meta-xilinx] [PATCH 4/7] machine-xilinx-default.inc: Add dtb files for IMAGE_BOOT_FILES
Nathan Rossi
nathan at nathanrossi.com
Wed Jan 31 08:20:19 PST 2018
Add all available dtb sources to the IMAGE_BOOT_FILES variable. For
device-tree recipe generated dtbs the files available are only known
after they files are deployed, so a wildcard pattern is used for these
files. Note that this pattern appears before the kernel device trees due
to the preference to use custom non-kernel device trees where available.
This ordering is needed so that recipes like u-boot-zynq-uenv can pick
the first device tree to select as the default.
The kernel device trees are specifically selected based on the value of
KERNEL_DEVICETREE, this avoid the duplication of kernel image type
prefixed files along side having the actual files that the kernel
builds.
Additionally remove all instances of "${MACHINE}.dtb" as they no longer
need to be specified and are incorrect due to the nesting of the files
in the `devicetree` directory.
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
---
meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 9 +++++++--
meta-xilinx-bsp/conf/machine/microzed-zynq7.conf | 1 -
meta-xilinx-bsp/conf/machine/picozed-zynq7.conf | 1 -
meta-xilinx-bsp/conf/machine/qemu-zynq7.conf | 1 -
meta-xilinx-bsp/conf/machine/zybo-linux-bd-zynq7.conf | 1 -
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
index 0b4a1a2fad..ac412efedf 100644
--- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
@@ -49,12 +49,17 @@ def get_default_image_boot_files(d):
if d.getVar("UBOOT_BINARY"):
files.append(d.getVar("UBOOT_BINARY"))
+ # device trees (device-tree only), these are first as they are likely desired over the kernel ones
+ if "device-tree" in (d.getVar("MACHINE_ESSENTIAL_EXTRA_RDEPENDS") or ""):
+ files.append("devicetree/*.dtb")
+
# device trees (kernel only)
if d.getVar("KERNEL_DEVICETREE"):
dtbs = d.getVar("KERNEL_DEVICETREE").split(" ")
dtbs = [os.path.basename(d) for d in dtbs]
- if len(dtbs) != 0:
- files += [d.getVar("KERNEL_IMAGETYPE") + "-" + dtb for dtb in dtbs]
+ for dtb in dtbs:
+ files.append(dtb)
+
return " ".join(files)
XSERVER_EXT ?= ""
diff --git a/meta-xilinx-bsp/conf/machine/microzed-zynq7.conf b/meta-xilinx-bsp/conf/machine/microzed-zynq7.conf
index 815bf4745f..b4dff0e97e 100644
--- a/meta-xilinx-bsp/conf/machine/microzed-zynq7.conf
+++ b/meta-xilinx-bsp/conf/machine/microzed-zynq7.conf
@@ -24,7 +24,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree"
IMAGE_BOOT_FILES += " \
boot.bin \
- ${MACHINE}.dtb \
uEnv.txt \
"
diff --git a/meta-xilinx-bsp/conf/machine/picozed-zynq7.conf b/meta-xilinx-bsp/conf/machine/picozed-zynq7.conf
index 59b4a6cb80..e8ffe2a239 100644
--- a/meta-xilinx-bsp/conf/machine/picozed-zynq7.conf
+++ b/meta-xilinx-bsp/conf/machine/picozed-zynq7.conf
@@ -28,7 +28,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree"
IMAGE_BOOT_FILES += " \
boot.bin \
- ${MACHINE}.dtb \
uEnv.txt \
"
diff --git a/meta-xilinx-bsp/conf/machine/qemu-zynq7.conf b/meta-xilinx-bsp/conf/machine/qemu-zynq7.conf
index 0fe99e2742..d697ea1fb0 100644
--- a/meta-xilinx-bsp/conf/machine/qemu-zynq7.conf
+++ b/meta-xilinx-bsp/conf/machine/qemu-zynq7.conf
@@ -11,7 +11,6 @@ MACHINE_FEATURES = "ext2 vfat"
SERIAL_CONSOLE = "115200 ttyPS0"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree"
-IMAGE_BOOT_FILES += "${MACHINE}.dtb"
# Use the networking setup from qemuarm
FILESOVERRIDES_append_pn-init-ifupdown = ":qemuarm"
diff --git a/meta-xilinx-bsp/conf/machine/zybo-linux-bd-zynq7.conf b/meta-xilinx-bsp/conf/machine/zybo-linux-bd-zynq7.conf
index b916a209f8..7d87f156dd 100644
--- a/meta-xilinx-bsp/conf/machine/zybo-linux-bd-zynq7.conf
+++ b/meta-xilinx-bsp/conf/machine/zybo-linux-bd-zynq7.conf
@@ -29,7 +29,6 @@ EXTRA_IMAGEDEPENDS += " \
IMAGE_BOOT_FILES += " \
boot.bin \
- ${MACHINE}.dtb \
bitstream \
uEnv.txt \
"
--
2.15.1
More information about the meta-xilinx
mailing list