Hi Nathan, > -----Original Message----- > From: Nathan Rossi [mailto:[email protected]] > Sent: Thursday, January 18, 2018 12:43 AM > To: Manjukumar Harthikote Matha <[email protected]> > Cc: [email protected] > 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 > <[email protected]> wrote: > > > > > >> -----Original Message----- > >> From: [email protected] [mailto:meta-xilinx- > >> [email protected]] On Behalf Of Nathan Rossi > >> Sent: Thursday, January 11, 2018 10:15 PM > >> To: Manjukumar Harthikote Matha <[email protected]> > >> Cc: [email protected] > >> 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 > >> <[email protected]> wrote: > >> > Hi Franz/Nathan, > >> > > >> >> -----Original Message----- > >> >> From: [email protected] [mailto:meta-xilinx- > >> >> [email protected]] On Behalf Of Franz Forstmayr > >> >> Sent: Thursday, January 11, 2018 3:04 AM > >> >> To: [email protected] > >> >> 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 <[email protected]> > >> >> Reviewed-by: Nathan Rossi <[email protected]> > >> >> --- > >> >> 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. > Yeah I cannot think of any other solution to handle cases where we can build multiple dtb's
I am thinking this patch needs little bit more work to make it acceptable atleast with device-tree and cannot be merged till then Thanks, Manju -- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
