Replace the definition of IMAGE_BOOT_FILES in machine-xilinx-board.inc with the use of a function which automatically selects available images that should be included. This includes the existing implementation of `get_dtb_list` and replaces it with a function that covers all image files including the existing default for KERNEL_IMAGETYPE(S) and UBOOT_BINARY.
Also remove the use of `get_dtb_list` from individual machines which is replaced by the default value. Signed-off-by: Nathan Rossi <[email protected]> --- .../conf/machine/include/machine-xilinx-board.inc | 2 -- .../conf/machine/include/machine-xilinx-default.inc | 21 ++++++++++++++++++--- meta-xilinx-bsp/conf/machine/zc702-zynq7.conf | 5 ++++- meta-xilinx-bsp/conf/machine/zc706-zynq7.conf | 1 - meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf | 5 ++++- meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf | 5 ++++- meta-xilinx-bsp/conf/machine/zybo-zynq7.conf | 1 - 7 files changed, 30 insertions(+), 10 deletions(-) diff --git a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc index ba9a36be88..17041e41af 100644 --- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc @@ -2,5 +2,3 @@ EXTRA_IMAGEDEPENDS += "virtual/bootloader" -IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} ${UBOOT_BINARY}" - 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 6a9d1b71f1..0b4a1a2fad 100644 --- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc @@ -34,13 +34,28 @@ XSERVER ?= " \ ${XSERVER_EXT} \ " -def get_dtb_list(d): +IMAGE_BOOT_FILES ?= "${@get_default_image_boot_files(d)}" + +def get_default_image_boot_files(d): + files = [] + + # kernel images + kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) + kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) + for i in kerneltypes: + files.append(i) + + # u-boot image + if d.getVar("UBOOT_BINARY"): + files.append(d.getVar("UBOOT_BINARY")) + + # 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: - return " ".join([d.getVar("KERNEL_IMAGETYPE") + "-" + dtb for dtb in dtbs]) - return "" + files += [d.getVar("KERNEL_IMAGETYPE") + "-" + dtb for dtb in dtbs] + return " ".join(files) XSERVER_EXT ?= "" XSERVER_EXT_zynqmp ?= "xf86-video-armsoc" diff --git a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf index 07eb3d3ab7..6081487c6e 100644 --- a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf +++ b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf @@ -29,7 +29,10 @@ SERIAL_CONSOLE = "115200 ttyPS0" KERNEL_DEVICETREE = "zynq-zc702.dtb" -IMAGE_BOOT_FILES += "boot.bin uEnv.txt ${@get_dtb_list(d)}" +IMAGE_BOOT_FILES += " \ + boot.bin \ + uEnv.txt \ + " # Although not fully supported you can run this machine on the mainline QEMU 'xilinx-zynq-a9' machine IMAGE_CLASSES += "qemuboot" diff --git a/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf b/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf index d106a9dc5f..0f562c83bd 100644 --- a/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf +++ b/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf @@ -31,7 +31,6 @@ KERNEL_DEVICETREE = "zynq-zc706.dtb" IMAGE_BOOT_FILES += " \ boot.bin \ - ${@get_dtb_list(d)} \ uEnv.txt \ " diff --git a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf index d08348dc5b..c933923c56 100644 --- a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf @@ -35,7 +35,10 @@ EXTRA_IMAGEDEPENDS += " \ virtual/boot-bin \ " -IMAGE_BOOT_FILES += "uEnv.txt atf-uboot.ub ${@get_dtb_list(d)}" +IMAGE_BOOT_FILES += " \ + uEnv.txt \ + atf-uboot.ub \ + " # This machine has a QEMU model, runqemu setup: IMAGE_CLASSES += "qemuboot-xilinx" diff --git a/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf b/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf index fb09063ee7..119e0e823d 100644 --- a/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf +++ b/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf @@ -25,5 +25,8 @@ SERIAL_CONSOLE = "115200 ttyPS0" KERNEL_DEVICETREE = "zynq-zed.dtb" -IMAGE_BOOT_FILES += "boot.bin uEnv.txt ${@get_dtb_list(d)}" +IMAGE_BOOT_FILES += " \ + boot.bin \ + uEnv.txt \ + " diff --git a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf index 796c98f750..bc18ecb3a4 100644 --- a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf +++ b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf @@ -28,7 +28,6 @@ KERNEL_DEVICETREE = "zynq-zybo.dtb" IMAGE_BOOT_FILES += " \ boot.bin \ - ${@get_dtb_list(d)} \ uEnv.txt \ " -- 2.15.1 -- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
