| Message ID | 20250919093831.20609-5-m-shah@ti.com |
|---|---|
| State | Superseded |
| Delegated to: | Ryan Eatmon |
| Headers | show |
| Series | Add recipes to build initramfs image | expand |
On 9/19/2025 4:38 AM, Moteen Shah wrote: > Trigger build for initramfs image and package it in the boot partition > of all K3 platforms whenever an image recipe is built with upstream > kernel(mainline or mainline-next). > > Signed-off-by: Moteen Shah <m-shah@ti.com> > --- > meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc If this flow is meant to apply to ALL TI platforms, then these changes should be in ti-soc.inc and not k3.inc. You are missing am335, am43, and am57 with this change. > index 50411a8e..c0c49e0d 100644 > --- a/meta-ti-bsp/conf/machine/include/k3.inc > +++ b/meta-ti-bsp/conf/machine/include/k3.inc > @@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-image ti-kernel-fitimage" > > TFA_PLATFORM = "k3" > > +BUILD_INITRD_IMAGE = "" > + Don't split the default assignment of this variable from the overrides. Moved it down below. > # Use the expected value of the ubifs filesystem's volume name in the kernel > # and u-boot. > UBI_VOLNAME = "rootfs" > @@ -43,7 +45,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" > > IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" > > -IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin tiboot3-*-evm.bin" > +BUILD_INITRD_IMAGE:bsp-mainline = "ti-initrd-image:do_image_complete" > +BUILD_INITRD_IMAGE:bsp-next = "ti-initrd-image:do_image_complete" > +do_image_complete[depends] += "${BUILD_INITRD_IMAGE}" After speaking with Denys, he is suggesting to use EXTRA_IMAGEDEPENDS instead of the do_image_complete to make it be built. BUILD_CORE_INITRAMFS_IMAGE ?= "" BUILD_CORE_INITRAMFS_IMAGE:bsp-mainline = "ti-core-initramfs" BUILD_CORE_INITRAMFS_IMAGE:bsp-next = "ti-core-initramfs" EXTRA_IMAGEDEPENDS += "${BUILD_CORE_INITRAMFS_IMAGE}" Give that a try and see if it makes the initramfs be built correctly. > + > +IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin tiboot3-*-evm.bin initrd.cpio.xz" Fix filename here too. s/initrd/ti-core-initramfs/ > IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" > > EFI_PROVIDER ?= "grub-efi"
On Tue, Sep 23, 2025 at 04:15:26PM -0500, Ryan Eatmon via lists.yoctoproject.org wrote: > > > On 9/19/2025 4:38 AM, Moteen Shah wrote: > >Trigger build for initramfs image and package it in the boot partition > >of all K3 platforms whenever an image recipe is built with upstream > >kernel(mainline or mainline-next). > > > >Signed-off-by: Moteen Shah <m-shah@ti.com> > >--- > > meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > >diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc > > If this flow is meant to apply to ALL TI platforms, then these > changes should be in ti-soc.inc and not k3.inc. You are missing > am335, am43, and am57 with this change. > > > >index 50411a8e..c0c49e0d 100644 > >--- a/meta-ti-bsp/conf/machine/include/k3.inc > >+++ b/meta-ti-bsp/conf/machine/include/k3.inc > >@@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-image ti-kernel-fitimage" > > TFA_PLATFORM = "k3" > >+BUILD_INITRD_IMAGE = "" > >+ > > Don't split the default assignment of this variable from the > overrides. Moved it down below. > > > # Use the expected value of the ubifs filesystem's volume name in the kernel > > # and u-boot. > > UBI_VOLNAME = "rootfs" > >@@ -43,7 +45,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" > > IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" > >-IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin tiboot3-*-evm.bin" > >+BUILD_INITRD_IMAGE:bsp-mainline = "ti-initrd-image:do_image_complete" > >+BUILD_INITRD_IMAGE:bsp-next = "ti-initrd-image:do_image_complete" > >+do_image_complete[depends] += "${BUILD_INITRD_IMAGE}" > > After speaking with Denys, he is suggesting to use > EXTRA_IMAGEDEPENDS instead of the do_image_complete to make it be > built. I am now remembering that there was a caveat with such a use case - each entry in EXTRA_IMAGEDEPENDS gets its do_populate_sysroot() task called, which images don't have. Moreover, EXTRA_IMAGEDEPENDS adds those dependencies to all images and hence another image in that list will cause a circular dependency... > BUILD_CORE_INITRAMFS_IMAGE ?= "" > BUILD_CORE_INITRAMFS_IMAGE:bsp-mainline = "ti-core-initramfs" > BUILD_CORE_INITRAMFS_IMAGE:bsp-next = "ti-core-initramfs" > EXTRA_IMAGEDEPENDS += "${BUILD_CORE_INITRAMFS_IMAGE}" > > Give that a try and see if it makes the initramfs be built correctly. > > >+ > >+IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin tiboot3-*-evm.bin initrd.cpio.xz" > > Fix filename here too. s/initrd/ti-core-initramfs/ > > > IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" > > EFI_PROVIDER ?= "grub-efi"
Hey Ryan, On 24/09/25 02:45, Ryan Eatmon wrote: > > > On 9/19/2025 4:38 AM, Moteen Shah wrote: >> Trigger build for initramfs image and package it in the boot partition >> of all K3 platforms whenever an image recipe is built with upstream >> kernel(mainline or mainline-next). >> >> Signed-off-by: Moteen Shah <m-shah@ti.com> >> --- >> meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc >> b/meta-ti-bsp/conf/machine/include/k3.inc > > If this flow is meant to apply to ALL TI platforms, then these changes > should be in ti-soc.inc and not k3.inc. You are missing am335, am43, > and am57 with this change. For now, we are only targeting the K3 devices. > > >> index 50411a8e..c0c49e0d 100644 >> --- a/meta-ti-bsp/conf/machine/include/k3.inc >> +++ b/meta-ti-bsp/conf/machine/include/k3.inc >> @@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += >> "kernel-image-image ti-kernel-fitimage" >> TFA_PLATFORM = "k3" >> +BUILD_INITRD_IMAGE = "" >> + > > Don't split the default assignment of this variable from the > overrides. Moved it down below. > >> # Use the expected value of the ubifs filesystem's volume name in >> the kernel >> # and u-boot. >> UBI_VOLNAME = "rootfs" >> @@ -43,7 +45,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" >> IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" >> -IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} >> tiboot3.bin tiboot3-*-evm.bin" >> +BUILD_INITRD_IMAGE:bsp-mainline = "ti-initrd-image:do_image_complete" >> +BUILD_INITRD_IMAGE:bsp-next = "ti-initrd-image:do_image_complete" >> +do_image_complete[depends] += "${BUILD_INITRD_IMAGE}" > > After speaking with Denys, he is suggesting to use EXTRA_IMAGEDEPENDS > instead of the do_image_complete to make it be built. > > BUILD_CORE_INITRAMFS_IMAGE ?= "" > BUILD_CORE_INITRAMFS_IMAGE:bsp-mainline = "ti-core-initramfs" > BUILD_CORE_INITRAMFS_IMAGE:bsp-next = "ti-core-initramfs" > EXTRA_IMAGEDEPENDS += "${BUILD_CORE_INITRAMFS_IMAGE}" > > Give that a try and see if it makes the initramfs be built correctly. I tried this out, but it went into failure, similar to what mentioned by Denys. Regards, Moteen > >> + >> +IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} >> tiboot3.bin tiboot3-*-evm.bin initrd.cpio.xz" > > Fix filename here too. s/initrd/ti-core-initramfs/ > >> IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" >> EFI_PROVIDER ?= "grub-efi" >
On 9/30/2025 7:57 AM, Moteen Shah wrote: > Hey Ryan, > > On 24/09/25 02:45, Ryan Eatmon wrote: >> >> >> On 9/19/2025 4:38 AM, Moteen Shah wrote: >>> Trigger build for initramfs image and package it in the boot partition >>> of all K3 platforms whenever an image recipe is built with upstream >>> kernel(mainline or mainline-next). >>> >>> Signed-off-by: Moteen Shah <m-shah@ti.com> >>> --- >>> meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/ >>> conf/machine/include/k3.inc >> >> If this flow is meant to apply to ALL TI platforms, then these changes >> should be in ti-soc.inc and not k3.inc. You are missing am335, am43, >> and am57 with this change. > > For now, we are only targeting the K3 devices. Why limit it in this way? Why do we want to support multiple boot strategies for different parts? >> >> >>> index 50411a8e..c0c49e0d 100644 >>> --- a/meta-ti-bsp/conf/machine/include/k3.inc >>> +++ b/meta-ti-bsp/conf/machine/include/k3.inc >>> @@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image- >>> image ti-kernel-fitimage" >>> TFA_PLATFORM = "k3" >>> +BUILD_INITRD_IMAGE = "" >>> + >> >> Don't split the default assignment of this variable from the >> overrides. Moved it down below. >> >>> # Use the expected value of the ubifs filesystem's volume name in >>> the kernel >>> # and u-boot. >>> UBI_VOLNAME = "rootfs" >>> @@ -43,7 +45,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" >>> IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" >>> -IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} >>> tiboot3.bin tiboot3-*-evm.bin" >>> +BUILD_INITRD_IMAGE:bsp-mainline = "ti-initrd-image:do_image_complete" >>> +BUILD_INITRD_IMAGE:bsp-next = "ti-initrd-image:do_image_complete" >>> +do_image_complete[depends] += "${BUILD_INITRD_IMAGE}" >> >> After speaking with Denys, he is suggesting to use EXTRA_IMAGEDEPENDS >> instead of the do_image_complete to make it be built. >> >> BUILD_CORE_INITRAMFS_IMAGE ?= "" >> BUILD_CORE_INITRAMFS_IMAGE:bsp-mainline = "ti-core-initramfs" >> BUILD_CORE_INITRAMFS_IMAGE:bsp-next = "ti-core-initramfs" >> EXTRA_IMAGEDEPENDS += "${BUILD_CORE_INITRAMFS_IMAGE}" >> >> Give that a try and see if it makes the initramfs be built correctly. > > I tried this out, but it went into failure, similar to what mentioned by > Denys. > > Regards, > Moteen > >> >>> + >>> +IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} >>> tiboot3.bin tiboot3-*-evm.bin initrd.cpio.xz" >> >> Fix filename here too. s/initrd/ti-core-initramfs/ >> >>> IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" >>> EFI_PROVIDER ?= "grub-efi" >>
Hey Ryan, On 30/09/25 18:40, Ryan Eatmon wrote: > > > On 9/30/2025 7:57 AM, Moteen Shah wrote: >> Hey Ryan, >> >> On 24/09/25 02:45, Ryan Eatmon wrote: >>> >>> >>> On 9/19/2025 4:38 AM, Moteen Shah wrote: >>>> Trigger build for initramfs image and package it in the boot partition >>>> of all K3 platforms whenever an image recipe is built with upstream >>>> kernel(mainline or mainline-next). >>>> >>>> Signed-off-by: Moteen Shah <m-shah@ti.com> >>>> --- >>>> meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- >>>> 1 file changed, 7 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/ >>>> conf/machine/include/k3.inc >>> >>> If this flow is meant to apply to ALL TI platforms, then these >>> changes should be in ti-soc.inc and not k3.inc. You are missing >>> am335, am43, and am57 with this change. >> >> For now, we are only targeting the K3 devices. > > Why limit it in this way? Why do we want to support multiple boot > strategies for different parts? I have fixed this in V4. The mentioned platforms does not uses efi and grub. I will send a follow up patch to this series to include EFI and GRUB support to the following platforms once this series gets merged. Regards, Moteen > > >>> >>> >>>> index 50411a8e..c0c49e0d 100644 >>>> --- a/meta-ti-bsp/conf/machine/include/k3.inc >>>> +++ b/meta-ti-bsp/conf/machine/include/k3.inc >>>> @@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += >>>> "kernel-image- image ti-kernel-fitimage" >>>> TFA_PLATFORM = "k3" >>>> +BUILD_INITRD_IMAGE = "" >>>> + >>> >>> Don't split the default assignment of this variable from the >>> overrides. Moved it down below. >>> >>>> # Use the expected value of the ubifs filesystem's volume name in >>>> the kernel >>>> # and u-boot. >>>> UBI_VOLNAME = "rootfs" >>>> @@ -43,7 +45,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" >>>> IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" >>>> -IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} >>>> tiboot3.bin tiboot3-*-evm.bin" >>>> +BUILD_INITRD_IMAGE:bsp-mainline = "ti-initrd-image:do_image_complete" >>>> +BUILD_INITRD_IMAGE:bsp-next = "ti-initrd-image:do_image_complete" >>>> +do_image_complete[depends] += "${BUILD_INITRD_IMAGE}" >>> >>> After speaking with Denys, he is suggesting to use >>> EXTRA_IMAGEDEPENDS instead of the do_image_complete to make it be >>> built. >>> >>> BUILD_CORE_INITRAMFS_IMAGE ?= "" >>> BUILD_CORE_INITRAMFS_IMAGE:bsp-mainline = "ti-core-initramfs" >>> BUILD_CORE_INITRAMFS_IMAGE:bsp-next = "ti-core-initramfs" >>> EXTRA_IMAGEDEPENDS += "${BUILD_CORE_INITRAMFS_IMAGE}" >>> >>> Give that a try and see if it makes the initramfs be built correctly. >> >> I tried this out, but it went into failure, similar to what mentioned >> by Denys. >> >> Regards, >> Moteen >> >>> >>>> + >>>> +IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} >>>> tiboot3.bin tiboot3-*-evm.bin initrd.cpio.xz" >>> >>> Fix filename here too. s/initrd/ti-core-initramfs/ >>> >>>> IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" >>>> EFI_PROVIDER ?= "grub-efi" >>> >
diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc index 50411a8e..c0c49e0d 100644 --- a/meta-ti-bsp/conf/machine/include/k3.inc +++ b/meta-ti-bsp/conf/machine/include/k3.inc @@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-image ti-kernel-fitimage" TFA_PLATFORM = "k3" +BUILD_INITRD_IMAGE = "" + # Use the expected value of the ubifs filesystem's volume name in the kernel # and u-boot. UBI_VOLNAME = "rootfs" @@ -43,7 +45,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" -IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin tiboot3-*-evm.bin" +BUILD_INITRD_IMAGE:bsp-mainline = "ti-initrd-image:do_image_complete" +BUILD_INITRD_IMAGE:bsp-next = "ti-initrd-image:do_image_complete" +do_image_complete[depends] += "${BUILD_INITRD_IMAGE}" + +IMAGE_BOOT_FILES ?= "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin tiboot3-*-evm.bin initrd.cpio.xz" IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" EFI_PROVIDER ?= "grub-efi"
Trigger build for initramfs image and package it in the boot partition of all K3 platforms whenever an image recipe is built with upstream kernel(mainline or mainline-next). Signed-off-by: Moteen Shah <m-shah@ti.com> --- meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)