Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-28 Thread Nathan Rossi
On 26 January 2018 at 17:53, Franz Forstmayr <f.forstm...@gmail.com> wrote:
> Hi Manju / Nathan,
>
> I'm open to edit my patch, unfortunately i don't have any idea where to
> start in this case.

I have been meaning to sort out some of these issues as discussed in
this thread with Manju, so I was planning on sorting out a series for
that and will include this patch as part of the series.

> You are talking from the device-tree recipe in meta-xilinx-bsp layer, or
> from something else. Because i think this recipe isn't called for the
> zcu102.

We are referring to that device-tree recipe yes, but it is
intentionally not used by any machine that is using KERNEL_DEVICETREE.

Regards,
Nathan

> Or would you like the device-tree recipe compatible to the zcu102? However,
> i don't get where the devicetree of the zcu102 is built, when it's
> incompatible to device-tree.bb-
>
> Thanks
> Franz
>
> 2018-01-22 23:36 GMT+01:00 Manjukumar Harthikote Matha
> <manju...@xilinx.com>:
>>
>> Hi Nathan,
>>
>> > -Original Message-
>> > From: Nathan Rossi [mailto:nat...@nathanrossi.com]
>> > Sent: Thursday, January 18, 2018 12:43 AM
>> > To: Manjukumar Harthikote Matha <manju...@xilinx.com>
>> > Cc: meta-xil...@lists.yoctoproject.org
>> > Subject: Re: [meta-xilinx] [PATCH] get_dtb_list function which formats
>> > the dtb files
>> > properly before adding to IMAGE_BOOT_FILES
>> >
>> > On 17 January 2018 at 10:46, Manjukumar Harthikote Matha
>> > <manju...@xilinx.com> wrote:
>> > >
>> > >
>> > >> -Original Message-
>> > >> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
>> > >> boun...@yoctoproject.org] On Behalf Of Nathan Rossi
>> > >> Sent: Thursday, January 11, 2018 10:15 PM
>> > >> To: Manjukumar Harthikote Matha <manju...@xilinx.com>
>> > >> Cc: meta-xil...@lists.yoctoproject.org
>> > >> Subject: Re: [meta-xilinx] [PATCH] get_dtb_list function which
>> > >> formats the dtb files properly before adding to IMAGE_BOOT_FILES
>> > >>
>> > >> On 12 January 2018 at 09:42, Manjukumar Harthikote Matha
>> > >> <manju...@xilinx.com> wrote:
>> > >> > Hi Franz/Nathan,
>> > >> >
>> > >> >> -Original Message-
>> > >> >> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
>> > >> >> boun...@yoctoproject.org] On Behalf Of Franz Forstmayr
>> > >> >> Sent: Thursday, January 11, 2018 3:04 AM
>> > >> >> To: meta-xil...@lists.yoctoproject.org
>> > >> >> Subject: [meta-xilinx] [PATCH] get_dtb_list function which formats
>> > >> >> the dtb files properly before adding to IMAGE_BOOT_FILES
>> > >> >>
>> > >> >> Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with
>> > >> >> a function, which formats the KERNEL_DEVICETREE list properly.
>> > >> >>
>> > >> >> v2: Removed the additional "True" statement from d.getvar.
>> > >> >>
>> > >> >> Signed-off-by: Franz Forstmayr <f.forstm...@gmail.com>
>> > >> >> Reviewed-by: Nathan Rossi <nat...@nathanrossi.com>
>> > >> >> ---
>> > >> >>  meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc |
>> > >> >> 8
>> > 
>> > >> >>  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 +-
>> > >> >>  6 files changed, 13 insertions(+), 5 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 77fbec8..6a9d1b7 100644
>>

Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-25 Thread Franz Forstmayr
Hi Manju / Nathan,

I'm open to edit my patch, unfortunately i don't have any idea where to
start in this case.
You are talking from the device-tree recipe in meta-xilinx-bsp layer, or
from something else. Because i think this recipe isn't called for the
zcu102.
Or would you like the device-tree recipe compatible to the zcu102? However,
i don't get where the devicetree of the zcu102 is built, when it's
incompatible to device-tree.bb-

Thanks
Franz

2018-01-22 23:36 GMT+01:00 Manjukumar Harthikote Matha <manju...@xilinx.com>
:

> Hi Nathan,
>
> > -Original Message-
> > From: Nathan Rossi [mailto:nat...@nathanrossi.com]
> > Sent: Thursday, January 18, 2018 12:43 AM
> > To: Manjukumar Harthikote Matha <manju...@xilinx.com>
> > Cc: meta-xil...@lists.yoctoproject.org
> > Subject: Re: [meta-xilinx] [PATCH] get_dtb_list function which formats
> the dtb files
> > properly before adding to IMAGE_BOOT_FILES
> >
> > On 17 January 2018 at 10:46, Manjukumar Harthikote Matha
> > <manju...@xilinx.com> wrote:
> > >
> > >
> > >> -Original Message-
> > >> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> > >> boun...@yoctoproject.org] On Behalf Of Nathan Rossi
> > >> Sent: Thursday, January 11, 2018 10:15 PM
> > >> To: Manjukumar Harthikote Matha <manju...@xilinx.com>
> > >> Cc: meta-xil...@lists.yoctoproject.org
> > >> Subject: Re: [meta-xilinx] [PATCH] get_dtb_list function which
> > >> formats the dtb files properly before adding to IMAGE_BOOT_FILES
> > >>
> > >> On 12 January 2018 at 09:42, Manjukumar Harthikote Matha
> > >> <manju...@xilinx.com> wrote:
> > >> > Hi Franz/Nathan,
> > >> >
> > >> >> -----Original Message-----
> > >> >> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> > >> >> boun...@yoctoproject.org] On Behalf Of Franz Forstmayr
> > >> >> Sent: Thursday, January 11, 2018 3:04 AM
> > >> >> To: meta-xil...@lists.yoctoproject.org
> > >> >> Subject: [meta-xilinx] [PATCH] get_dtb_list function which formats
> > >> >> the dtb files properly before adding to IMAGE_BOOT_FILES
> > >> >>
> > >> >> Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with
> > >> >> a function, which formats the KERNEL_DEVICETREE list properly.
> > >> >>
> > >> >> v2: Removed the additional "True" statement from d.getvar.
> > >> >>
> > >> >> Signed-off-by: Franz Forstmayr <f.forstm...@gmail.com>
> > >> >> Reviewed-by: Nathan Rossi <nat...@nathanrossi.com>
> > >> >> ---
> > >> >>  meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
> | 8
> > 
> > >> >>  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 +-
> > >> >>  6 files changed, 13 insertions(+), 5 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 77fbec8..6a9d1b7 100644
> > >> >> ---
> > >> >> a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
> > >> >> +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.
> > >> >> +++ inc
> > >> >> @@ -34,6 +34,14 @@ XSERVER ?= " \
> > >> >>   ${XSERVER_EXT} \
> > >> >>   "
> > >> >>
> > >> >> +def get_dtb_list(d):
> > >> >> +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
> > >>

Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-18 Thread Nathan Rossi
On 17 January 2018 at 10:46, Manjukumar Harthikote Matha
<manju...@xilinx.com> wrote:
>
>
>> -Original Message-
>> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
>> boun...@yoctoproject.org] On Behalf Of Nathan Rossi
>> Sent: Thursday, January 11, 2018 10:15 PM
>> To: Manjukumar Harthikote Matha <manju...@xilinx.com>
>> Cc: meta-xil...@lists.yoctoproject.org
>> Subject: Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the 
>> dtb files
>> properly before adding to IMAGE_BOOT_FILES
>>
>> On 12 January 2018 at 09:42, Manjukumar Harthikote Matha
>> <manju...@xilinx.com> wrote:
>> > Hi Franz/Nathan,
>> >
>> >> -Original Message-
>> >> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
>> >> boun...@yoctoproject.org] On Behalf Of Franz Forstmayr
>> >> Sent: Thursday, January 11, 2018 3:04 AM
>> >> To: meta-xil...@lists.yoctoproject.org
>> >> Subject: [meta-xilinx] [PATCH] get_dtb_list function which formats
>> >> the dtb files properly before adding to IMAGE_BOOT_FILES
>> >>
>> >> Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with a
>> >> function, which formats the KERNEL_DEVICETREE list properly.
>> >>
>> >> v2: Removed the additional "True" statement from d.getvar.
>> >>
>> >> Signed-off-by: Franz Forstmayr <f.forstm...@gmail.com>
>> >> Reviewed-by: Nathan Rossi <nat...@nathanrossi.com>
>> >> ---
>> >>  meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 8 
>> >> 
>> >>  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 +-
>> >>  6 files changed, 13 insertions(+), 5 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 77fbec8..6a9d1b7 100644
>> >> --- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
>> >> +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
>> >> @@ -34,6 +34,14 @@ XSERVER ?= " \
>> >>   ${XSERVER_EXT} \
>> >>   "
>> >>
>> >> +def get_dtb_list(d):
>> >> +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 ""
>> >> +
>> >
>> > When using KERNEL_IMAGETYPES how will this work? There is a pending patch 
>> > on
>> meta-xilinx for example to build multiple kernel images using 
>> KERNEL_IMAGETYPES
>> variable.
>> >
>> > For ex:
>> > KERNEL_IMAGETYPES ="uImage zImage"
>>
>> Yes that would break this function and the one in qemu include. But it would 
>> also
>> break the use of KERNEL_IMAGETYPE in IMAGE_BOOT_FILES currently since they
>> are merged at the kernel recipe level
>> (http://git.openembedded.org/openembedded-
>> core/tree/meta/classes/kernel.bbclass#n70).
>>
>> However a good question is how it should handle multiple types? Since the 
>> device
>> trees are the same across imagetype, maybe this should rename them in
>> IMAGE_BOOT_FILES/wic (with the ; syntax) to just the devicetree part. And 
>> then
>> ship all the image types and a single set of dtbs.
>>
>> I think this is separate to this patch though. I can sort out an update to 
>> the qemu.inc
>> function and this function that would allow handling of 
>> imagetypes+imagetype, and
>> the rename of dtbs (and associated changes for renames).
>>
>
> One more question is how do we handle the cases where we use device-tree 
> recipe instead of in-kernel dts? Maybe we can expand on the python code 
> provided here.

That is a slightly different case. Since the .dtb names are not known
at the machine.conf level, they are only known by the device-tree
recipe. However we can generalize the pattern to *.dtb and the wic
bootimg-partition plugin will expand that. However this makes it a bit
harder to deal with only providing one set of {kimgtype}-*.dtb, but we
could populate the device-tree dtbs into device-tree/ of the deploy
directory and only match the subdirectory and then handle
kernel_devicetree separately.

Regards,
Nathan
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-11 Thread Nathan Rossi
On 12 January 2018 at 09:42, Manjukumar Harthikote Matha
<manju...@xilinx.com> wrote:
> Hi Franz/Nathan,
>
>> -Original Message-
>> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
>> boun...@yoctoproject.org] On Behalf Of Franz Forstmayr
>> Sent: Thursday, January 11, 2018 3:04 AM
>> To: meta-xil...@lists.yoctoproject.org
>> Subject: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb 
>> files
>> properly before adding to IMAGE_BOOT_FILES
>>
>> Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with a function,
>> which formats the KERNEL_DEVICETREE list properly.
>>
>> v2: Removed the additional "True" statement from d.getvar.
>>
>> Signed-off-by: Franz Forstmayr <f.forstm...@gmail.com>
>> Reviewed-by: Nathan Rossi <nat...@nathanrossi.com>
>> ---
>>  meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 8 
>>  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 +-
>>  6 files changed, 13 insertions(+), 5 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 77fbec8..6a9d1b7 100644
>> --- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
>> +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
>> @@ -34,6 +34,14 @@ XSERVER ?= " \
>>   ${XSERVER_EXT} \
>>   "
>>
>> +def get_dtb_list(d):
>> +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 ""
>> +
>
> When using KERNEL_IMAGETYPES how will this work? There is a pending patch on 
> meta-xilinx for example to build multiple kernel images using 
> KERNEL_IMAGETYPES variable.
>
> For ex:
> KERNEL_IMAGETYPES ="uImage zImage"

Yes that would break this function and the one in qemu include. But it
would also break the use of KERNEL_IMAGETYPE in IMAGE_BOOT_FILES
currently since they are merged at the kernel recipe level
(http://git.openembedded.org/openembedded-core/tree/meta/classes/kernel.bbclass#n70).

However a good question is how it should handle multiple types? Since
the device trees are the same across imagetype, maybe this should
rename them in IMAGE_BOOT_FILES/wic (with the ; syntax) to just the
devicetree part. And then ship all the image types and a single set of
dtbs.

I think this is separate to this patch though. I can sort out an
update to the qemu.inc function and this function that would allow
handling of imagetypes+imagetype, and the rename of dtbs (and
associated changes for renames).

Regards,
Nathan

>
> Thanks,
> Manju
>
> <>
> --
> ___
> 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


Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-11 Thread Manjukumar Harthikote Matha
Hi Franz/Nathan,

> -Original Message-
> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> boun...@yoctoproject.org] On Behalf Of Franz Forstmayr
> Sent: Thursday, January 11, 2018 3:04 AM
> To: meta-xil...@lists.yoctoproject.org
> Subject: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb 
> files
> properly before adding to IMAGE_BOOT_FILES
> 
> Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with a function,
> which formats the KERNEL_DEVICETREE list properly.
> 
> v2: Removed the additional "True" statement from d.getvar.
> 
> Signed-off-by: Franz Forstmayr <f.forstm...@gmail.com>
> Reviewed-by: Nathan Rossi <nat...@nathanrossi.com>
> ---
>  meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 8 
>  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 +-
>  6 files changed, 13 insertions(+), 5 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 77fbec8..6a9d1b7 100644
> --- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
> +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
> @@ -34,6 +34,14 @@ XSERVER ?= " \
>   ${XSERVER_EXT} \
>   "
> 
> +def get_dtb_list(d):
> +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 ""
> +

When using KERNEL_IMAGETYPES how will this work? There is a pending patch on 
meta-xilinx for example to build multiple kernel images using KERNEL_IMAGETYPES 
variable.

For ex:
KERNEL_IMAGETYPES ="uImage zImage"

Thanks,
Manju

<>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-11 Thread Franz Forstmayr
Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with a function, 
which formats the KERNEL_DEVICETREE list properly.

v2: Removed the additional "True" statement from d.getvar.

Signed-off-by: Franz Forstmayr 
Reviewed-by: Nathan Rossi 
---
 meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 8 
 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 +-
 6 files changed, 13 insertions(+), 5 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 77fbec8..6a9d1b7 100644
--- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
@@ -34,6 +34,14 @@ XSERVER ?= " \
${XSERVER_EXT} \
"
 
+def get_dtb_list(d):
+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 ""
+
 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 57877bf..07eb3d3 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 ${@get_dtb_list(d)}"
 
 # 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..d106a9d 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 \
+   ${@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 fe41148..d08348d 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 ${@get_dtb_list(d)}"
 
 # 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..fb09063 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 ${@get_dtb_list(d)}"
 
diff --git a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf 
b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf
index e94ad6b..796c98f 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 \
+   ${@get_dtb_list(d)} \
uEnv.txt \
"
 
-- 
2.7.4

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-11 Thread Nathan Rossi
On 11 January 2018 at 20:24, Franz Forstmayr  wrote:
> Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with a function,
> which formats the KERNEL_DEVICETREE list properly.
>
> Signed-off-by: Franz Forstmayr 
> ---
>  meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 8 
>  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 +-
>  6 files changed, 13 insertions(+), 5 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 77fbec8..6db6504 100644
> --- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
> +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
> @@ -34,6 +34,14 @@ XSERVER ?= " \
> ${XSERVER_EXT} \
> "
>
> +def get_dtb_list(d):
> +if d.getVar("KERNEL_DEVICETREE", True):
> +dtbs = d.getVar("KERNEL_DEVICETREE", True).split(" ")
> +dtbs = [os.path.basename(d) for d in dtbs]
> +if len(dtbs) != 0:
> +return " ".join([d.getVar("KERNEL_IMAGETYPE", True) + "-" + dtb 
> for dtb in dtbs])

Could you change the use of "d.getVar(..., True)" to just
"d.getVar(...)". I know the code I pointed you at has the ", True"
however newer versions (2.3+?) of bitbake and oe-core have this as
default (aka expand = True). At some point the existing code will need
to be cleaned up in the same way.

With the above changed you can add my reviewed by.

Reviewed-by: Nathan Rossi 

And if Manju has no issues with it, should be good to apply.

Regards,
Nathan

> +return ""
> +
>  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 57877bf..07eb3d3 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 ${@get_dtb_list(d)}"
>
>  # 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..d106a9d 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 \
> +   ${@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 fe41148..d08348d 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 ${@get_dtb_list(d)}"
>
>  # 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..fb09063 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 ${@get_dtb_list(d)}"
>
> diff --git a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf 
> b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf
> index e94ad6b..796c98f 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 \
> +   ${@get_dtb_list(d)} \
> uEnv.txt \
> "
>
> --
> 2.7.4
>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> 

[meta-xilinx] [PATCH] get_dtb_list function which formats the dtb files properly before adding to IMAGE_BOOT_FILES

2018-01-11 Thread Franz Forstmayr
Replaced the hard-coded devicetree files in IMAGE_BOOT_FILES with a function, 
which formats the KERNEL_DEVICETREE list properly.

Signed-off-by: Franz Forstmayr 
---
 meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc | 8 
 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 +-
 6 files changed, 13 insertions(+), 5 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 77fbec8..6db6504 100644
--- a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
@@ -34,6 +34,14 @@ XSERVER ?= " \
${XSERVER_EXT} \
"
 
+def get_dtb_list(d):
+if d.getVar("KERNEL_DEVICETREE", True):
+dtbs = d.getVar("KERNEL_DEVICETREE", True).split(" ")
+dtbs = [os.path.basename(d) for d in dtbs]
+if len(dtbs) != 0:
+return " ".join([d.getVar("KERNEL_IMAGETYPE", True) + "-" + dtb 
for dtb in dtbs])
+return ""
+
 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 57877bf..07eb3d3 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 ${@get_dtb_list(d)}"
 
 # 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..d106a9d 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 \
+   ${@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 fe41148..d08348d 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 ${@get_dtb_list(d)}"
 
 # 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..fb09063 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 ${@get_dtb_list(d)}"
 
diff --git a/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf 
b/meta-xilinx-bsp/conf/machine/zybo-zynq7.conf
index e94ad6b..796c98f 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 \
+   ${@get_dtb_list(d)} \
uEnv.txt \
"
 
-- 
2.7.4

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx