On 10 January 2018 at 18:52, Franz Forstmayr <f.forstm...@gmail.com> wrote:
> Replaced the hard-coded devicetree files with ${KERNEL_DEVICETREE} variable. 
> So you can use machine
> overlays including the xilinx boards and specify a new devicetree without 
> touching the IMAGE_BOOT_FILES
> variables.

This looks like a good idea, however the only issue with this change
is that KERNEL_DEVICETREE is not a single file its actually used as a
space separated list. So while the meta-xilinx layer only has one
device tree for these machines a user might add additional device
trees in local.conf or a few other ways that would break directly
using KERNEL_DEVICETREE in IMAGE_BOOT_FILES.

There is a python function in machine-xilinx-qemu.inc that does the
splitting and reformatting in the exact way needed for
IMAGE_BOOT_FILES. Bringing the last part of this function into
machine-xilinx-default.inc as a new function for the machine.conf's to
use would work for this.

http://git.yoctoproject.org/cgit/cgit.cgi/meta-xilinx/tree/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc#n15

Regards,
Nathan

>
> Signed-off-by: Franz Forstmayr <f.forstm...@gmail.com>
> ---
>  meta-xilinx-bsp/conf/machine/zc702-zynq7.conf    | 2 +-
>  meta-xilinx-bsp/conf/machine/zc706-zynq7.conf    | 2 +-
>  meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf  | 2 +-
>  meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf | 2 +-
>  meta-xilinx-bsp/conf/machine/zybo-zynq7.conf     | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf 
> b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf
> index 57877bf..395166d 100644
> --- a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf
> +++ b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf
> @@ -29,7 +29,7 @@ SERIAL_CONSOLE = "115200 ttyPS0"
>
>  KERNEL_DEVICETREE = "zynq-zc702.dtb"
>
> -IMAGE_BOOT_FILES += "boot.bin uEnv.txt ${KERNEL_IMAGETYPE}-zynq-zc702.dtb"
> +IMAGE_BOOT_FILES += "boot.bin uEnv.txt 
> ${KERNEL_IMAGETYPE}-${KERNEL_DEVICETREE}"
>
>  # 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 d2fbf1b..d3d14a6 100644
> --- a/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf
> +++ b/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf
> @@ -31,7 +31,7 @@ KERNEL_DEVICETREE = "zynq-zc706.dtb"
>
>  IMAGE_BOOT_FILES += " \
>                 boot.bin \
> -               ${KERNEL_IMAGETYPE}-zynq-zc706.dtb \
> +               ${KERNEL_IMAGETYPE}-${KERNEL_DEVICETREE} \
>                 uEnv.txt \
>                 "
>
> diff --git a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf 
> b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf
> index fe41148..200cdf2 100644
> --- a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf
> +++ b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf
> @@ -35,7 +35,7 @@ EXTRA_IMAGEDEPENDS += " \
>                 virtual/boot-bin \
>                 "
>
> -IMAGE_BOOT_FILES += "uEnv.txt atf-uboot.ub 
> ${KERNEL_IMAGETYPE}-zynqmp-zcu102-rev1.0.dtb"
> +IMAGE_BOOT_FILES += "uEnv.txt atf-uboot.ub 
> ${KERNEL_IMAGETYPE}-${@os.path.basename(KERNEL_DEVICETREE)}"
>
>  # 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 114927d..5f1c389 100644
> --- a/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf
> +++ b/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf
> @@ -25,5 +25,5 @@ SERIAL_CONSOLE = "115200 ttyPS0"
>
>  KERNEL_DEVICETREE = "zynq-zed.dtb"
>
> -IMAGE_BOOT_FILES += "boot.bin uEnv.txt ${KERNEL_IMAGETYPE}-zynq-zed.dtb"
> +IMAGE_BOOT_FILES += "boot.bin uEnv.txt 
> ${KERNEL_IMAGETYPE}-${KERNEL_DEVICETREE}"
>
> diff --git a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf 
> b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf
> index e94ad6b..b579dee 100644
> --- a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf
> +++ b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf
> @@ -28,7 +28,7 @@ KERNEL_DEVICETREE = "zynq-zybo.dtb"
>
>  IMAGE_BOOT_FILES += " \
>                 boot.bin \
> -               ${KERNEL_IMAGETYPE}-zynq-zybo.dtb \
> +               ${KERNEL_IMAGETYPE}-${KERNEL_DEVICETREE} \
>                 uEnv.txt \
>                 "
>
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to