diff mbox series

[meta-ti,master/scarthgap,1/2] meta-ti-bsp: Add KERNEL_DEVICETREE_PREFIX logic to Arago images

Message ID 20250721164531.7051-1-reatmon@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master/scarthgap,1/2] meta-ti-bsp: Add KERNEL_DEVICETREE_PREFIX logic to Arago images | expand

Commit Message

Ryan Eatmon July 21, 2025, 4:45 p.m. UTC
The boot partition for things like the wic image, use the
KERNEL_DEVICETREE to populate DTBs.  But for the meta-ti-bsp kernels we
tend to rely on the KERNEL_DEVICETREE_PREFIX to glob pull in DTBs
instead of a single list.  So using dynamic layers, we can inject the
proper code to properly resolve the KERNEL_DEVICETREE in each image
file.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 meta-ti-bsp/conf/layer.conf                                   | 1 +
 .../meta-arago-distro/recipes-core/images/image-arago.inc     | 3 +++
 .../recipes-core/images/tisdk-base-image.bbappend             | 4 ++++
 .../recipes-core/images/tisdk-bootstrap-base-image.bbappend   | 4 ++++
 .../recipes-core/images/tisdk-bootstrap-image.bbappend        | 4 ++++
 .../recipes-core/images/tisdk-default-image.bbappend          | 4 ++++
 .../recipes-core/images/tisdk-thinlinux-image.bbappend        | 4 ++++
 .../recipes-core/images/tisdk-tiny-image.bbappend             | 4 ++++
 8 files changed, 28 insertions(+)
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/image-arago.inc
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-base-image.bbappend
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bbappend
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bbappend
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-default-image.bbappend
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bbappend
 create mode 100644 meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bbappend

Comments

Ryan Eatmon July 21, 2025, 8:37 p.m. UTC | #1
On 7/21/2025 11:45 AM, Ryan Eatmon via lists.yoctoproject.org wrote:
> The boot partition for things like the wic image, use the
> KERNEL_DEVICETREE to populate DTBs.  But for the meta-ti-bsp kernels we
> tend to rely on the KERNEL_DEVICETREE_PREFIX to glob pull in DTBs
> instead of a single list.  So using dynamic layers, we can inject the
> proper code to properly resolve the KERNEL_DEVICETREE in each image
> file.
> 
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
>   meta-ti-bsp/conf/layer.conf                                   | 1 +
>   .../core/recipes-core/images/core-image-base.bbappend         | 4 ++++
>   .../core/recipes-core/images/core-image-minimal.bbappend      | 4 ++++
>   .../recipes-core/images/image-poky.inc}                       | 0
>   4 files changed, 9 insertions(+)
>   create mode 100644 meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-base.bbappend
>   create mode 100644 meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-minimal.bbappend
>   copy meta-ti-bsp/dynamic-layers/{meta-arago-distro/recipes-core/images/image-arago.inc => core/recipes-core/images/image-poky.inc} (100%)
> 
> diff --git a/meta-ti-bsp/conf/layer.conf b/meta-ti-bsp/conf/layer.conf
> index 02519f76..828814ce 100644
> --- a/meta-ti-bsp/conf/layer.conf
> +++ b/meta-ti-bsp/conf/layer.conf
> @@ -25,6 +25,7 @@ LAYERRECOMMENDS_meta-ti-bsp = " \
>   BBFILES_DYNAMIC += " \
>       meta-arago-distro:${LAYERDIR}/dynamic-layers/meta-arago-distro/recipes*/*/*.bbappend \
>       openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/recipes*/*/*.bbappend \
> +    core:${LAYERDIR}/dynamic-layers/core/recipes*/*/*.bbappend \
>   "
>   
>   SIGGEN_EXCLUDERECIPES_ABISAFE += " \
> diff --git a/meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-base.bbappend b/meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-base.bbappend
> new file mode 100644
> index 00000000..b6c70dc5
> --- /dev/null
> +++ b/meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-base.bbappend
> @@ -0,0 +1,4 @@
> +IMAGE_POKY = ""
> +IMAGE_POKY:poky = "image-poky.inc"

I just realized that I meant to use ti-soc as the guard and not "poky". 
So only apply this bbappend logic if you are actually building a ti-soc 
part.

This is not a critical change, but I'll send a v2 with this change for 
both patches.


> +
> +require ${IMAGE_POKY}
> diff --git a/meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-minimal.bbappend b/meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-minimal.bbappend
> new file mode 100644
> index 00000000..b6c70dc5
> --- /dev/null
> +++ b/meta-ti-bsp/dynamic-layers/core/recipes-core/images/core-image-minimal.bbappend
> @@ -0,0 +1,4 @@
> +IMAGE_POKY = ""
> +IMAGE_POKY:poky = "image-poky.inc"
> +
> +require ${IMAGE_POKY}
> diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/image-arago.inc b/meta-ti-bsp/dynamic-layers/core/recipes-core/images/image-poky.inc
> similarity index 100%
> copy from meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/image-arago.inc
> copy to meta-ti-bsp/dynamic-layers/core/recipes-core/images/image-poky.inc
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#18803): https://lists.yoctoproject.org/g/meta-ti/message/18803
> Mute This Topic: https://lists.yoctoproject.org/mt/114271595/6551054
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [reatmon@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/layer.conf b/meta-ti-bsp/conf/layer.conf
index e3a28628..02519f76 100644
--- a/meta-ti-bsp/conf/layer.conf
+++ b/meta-ti-bsp/conf/layer.conf
@@ -23,6 +23,7 @@  LAYERRECOMMENDS_meta-ti-bsp = " \
 "
 
 BBFILES_DYNAMIC += " \
+    meta-arago-distro:${LAYERDIR}/dynamic-layers/meta-arago-distro/recipes*/*/*.bbappend \
     openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/recipes*/*/*.bbappend \
 "
 
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/image-arago.inc b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/image-arago.inc
new file mode 100644
index 00000000..31c6b6f7
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/image-arago.inc
@@ -0,0 +1,3 @@ 
+include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''}
+
+do_image_wic[depends] += "virtual/kernel:do_shared_workdir"
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-base-image.bbappend b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-base-image.bbappend
new file mode 100644
index 00000000..36e6f793
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-base-image.bbappend
@@ -0,0 +1,4 @@ 
+IMAGE_ARAGO = ""
+IMAGE_ARAGO:arago = "image-arago.inc"
+
+require ${IMAGE_ARAGO}
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bbappend b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bbappend
new file mode 100644
index 00000000..36e6f793
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bbappend
@@ -0,0 +1,4 @@ 
+IMAGE_ARAGO = ""
+IMAGE_ARAGO:arago = "image-arago.inc"
+
+require ${IMAGE_ARAGO}
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bbappend b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bbappend
new file mode 100644
index 00000000..36e6f793
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bbappend
@@ -0,0 +1,4 @@ 
+IMAGE_ARAGO = ""
+IMAGE_ARAGO:arago = "image-arago.inc"
+
+require ${IMAGE_ARAGO}
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-default-image.bbappend b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-default-image.bbappend
new file mode 100644
index 00000000..36e6f793
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-default-image.bbappend
@@ -0,0 +1,4 @@ 
+IMAGE_ARAGO = ""
+IMAGE_ARAGO:arago = "image-arago.inc"
+
+require ${IMAGE_ARAGO}
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bbappend b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bbappend
new file mode 100644
index 00000000..36e6f793
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bbappend
@@ -0,0 +1,4 @@ 
+IMAGE_ARAGO = ""
+IMAGE_ARAGO:arago = "image-arago.inc"
+
+require ${IMAGE_ARAGO}
diff --git a/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bbappend b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bbappend
new file mode 100644
index 00000000..36e6f793
--- /dev/null
+++ b/meta-ti-bsp/dynamic-layers/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bbappend
@@ -0,0 +1,4 @@ 
+IMAGE_ARAGO = ""
+IMAGE_ARAGO:arago = "image-arago.inc"
+
+require ${IMAGE_ARAGO}