* [PATCH] utilities.inc: Use only the basename for dtb files
@ 2018-07-20 20:45 Fabio Berton
2018-07-23 7:31 ` Gary Bisson
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Berton @ 2018-07-20 20:45 UTC (permalink / raw)
To: meta-freescale
Use make_dtb_boot_files function to use basename from
KERNEL_DEVICETREE files. This is useful for dtb with name:
whatever/my_dtb_file.dtb
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
---
conf/machine/include/imx-base.inc | 4 +++-
conf/machine/include/utilities.inc | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 conf/machine/include/utilities.inc
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index b130ef72..52700105 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -3,6 +3,8 @@
include conf/machine/include/fsl-default-settings.inc
include conf/machine/include/fsl-default-versions.inc
+require conf/machine/include/utilities.inc
+
# Set specific make target and binary suffix
PREFERRED_PROVIDER_u-boot ??= "u-boot-fslc"
PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc"
@@ -291,7 +293,7 @@ IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}"
IMAGE_BOOT_FILES ?= " \
${KERNEL_IMAGETYPE} \
- ${KERNEL_DEVICETREE} \
+ ${@make_dtb_boot_files(d)} \
"
### wic default support
diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc
new file mode 100644
index 00000000..e6cfda80
--- /dev/null
+++ b/conf/machine/include/utilities.inc
@@ -0,0 +1,16 @@
+### Machine definition file utilities
+
+def make_dtb_boot_files(d):
+ # Generate IMAGE_BOOT_FILES entries for device tree files listed in
+ # KERNEL_DEVICETREE.
+ # Use only the basename for dtb files:
+ alldtbs = d.getVar('KERNEL_DEVICETREE')
+
+ def transform(dtb):
+ if dtb.endswith('dtb') or dtb.endswith('dtbo'):
+ # eg: whatever/bcm2708-rpi-b.dtb has:
+ # DEPLOYDIR file: bcm2708-rpi-b.dtb
+ # destination: bcm2708-rpi-b.dtb
+ return os.path.basename(dtb)
+
+ return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] utilities.inc: Use only the basename for dtb files
2018-07-20 20:45 [PATCH] utilities.inc: Use only the basename for dtb files Fabio Berton
@ 2018-07-23 7:31 ` Gary Bisson
2018-07-23 12:11 ` Fabio Berton
0 siblings, 1 reply; 3+ messages in thread
From: Gary Bisson @ 2018-07-23 7:31 UTC (permalink / raw)
To: Fabio Berton; +Cc: meta-freescale Mailing List
Hi Fabio,
On Fri, Jul 20, 2018 at 10:45 PM, Fabio Berton
<fabio.berton@ossystems.com.br> wrote:
> Use make_dtb_boot_files function to use basename from
> KERNEL_DEVICETREE files. This is useful for dtb with name:
>
> whatever/my_dtb_file.dtb
>
> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>
Regards,
Gary
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] utilities.inc: Use only the basename for dtb files
2018-07-23 7:31 ` Gary Bisson
@ 2018-07-23 12:11 ` Fabio Berton
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Berton @ 2018-07-23 12:11 UTC (permalink / raw)
To: Gary Bisson; +Cc: meta-freescale Mailing List
Merged to master.
Thanks,
Fabio
On Mon, Jul 23, 2018 at 4:31 AM, Gary Bisson
<gary.bisson@boundarydevices.com> wrote:
> Hi Fabio,
>
> On Fri, Jul 20, 2018 at 10:45 PM, Fabio Berton
> <fabio.berton@ossystems.com.br> wrote:
>> Use make_dtb_boot_files function to use basename from
>> KERNEL_DEVICETREE files. This is useful for dtb with name:
>>
>> whatever/my_dtb_file.dtb
>>
>> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
>
> Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>
>
> Regards,
> Gary
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-23 12:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 20:45 [PATCH] utilities.inc: Use only the basename for dtb files Fabio Berton
2018-07-23 7:31 ` Gary Bisson
2018-07-23 12:11 ` Fabio Berton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.