Add recipes to build initramfs image
v2 cover Add recipes to build initramfs image
The series aims to add a new recipe which will package boot essential and some other modules in image which can later be used in the boot process of all K3 platforms.
The motivation behind the work is to probe modules(in boot time) which could not be built in the upstream Linux kernel image, as using it as inbuilt drivers will increase the kernel image size, which is undesirable by the upstream folks.
Hence, build those drivers as modules and package it inside initramfs and later get it probed through initramfs-udev(device manager).
The series will introduce an additional 20MB image in the bootflow. If in case GRUB is not able to find this initrd image, it won't result in a hard failure unless the modules packaged inside the initrd were boot essential to begin with, in which case the boot process will halt[0] or might run into kernel panic.
Furthermore, this series adds the initrd image for all K3 platforms regardless of whether any platform chooses to add modules to it or not, so as to keep the bootflow for all K3 devices uniform. Hence, the build/packaging of initrd image is being triggered in k3.inc.
Boot tests:
[0]Without initrd am62axx: http://serenity.dal.design.ti.com:7777/dejagozune.yaml
[1]With initrd including TPS6594_I2C module: http://serenity.dal.design.ti.com:7777/rarupuwalo.yaml
[2]J721e: http://serenity.dal.design.ti.com:7777/ovicodemud.yaml
Changes since V1:
- Switch to a platform defined module variable instead of having a central one.
- Package initrd.cpio.xz(20 MB) instead of initrd.cpio (90 MB).
- Build the inird image and package it in boot partition only if mainline or mainline next of the Linux kernel is being built.
Moteen Shah (4):
meta-ti-bsp: conf: machine: include: Add common module variable for
initrd
recipes-ti: initrd: Make minimal initrd image
meta-ti-bsp: wic: Add a new GRUB config for TI platforms
meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
meta-ti-bsp/conf/machine/include/am62axx.inc | 3 ++ meta-ti-bsp/conf/machine/include/j721e.inc | 3 ++ meta-ti-bsp/conf/machine/include/j784s4.inc | 3 ++ meta-ti-bsp/conf/machine/include/k3.inc | 8 ++- meta-ti-bsp/conf/machine/include/ti-soc.inc | 2 + .../initrd/packagegroup-ti-initrd.bb | 5 ++ .../recipes-ti/initrd/ti-initrd-image.bb | 50 +++++++++++++++++++ meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 ++++ 9 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb create mode 100644 meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Signature · 1 line
2.34.1
PATCH v2 1/4 meta-ti-bsp: conf: machine: include: Add common module variable for initrd
Add a new variable in ti-soc.inc which would be populated by individual platforms with the required modules which would later be packaged inside the initramfs image.
--- meta-ti-bsp/conf/machine/include/am62axx.inc | 3 +++ meta-ti-bsp/conf/machine/include/j721e.inc | 3 +++ meta-ti-bsp/conf/machine/include/j784s4.inc | 3 +++ meta-ti-bsp/conf/machine/include/ti-soc.inc | 2 ++ 4 files changed, 11 insertions(+)
meta-ti-bsp/conf/machine/include/am62axx.inc +3 -0
@@ -11,3 +11,6 @@ TFA_BOARD = "lite" OPTEEMACHINE = "k3-am62x" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cnm-wave-fw" + +TI_INITRAMFS_KERNEL_MODULES:append:bsp-mainline = "kernel-module-tps6594-i2c" +TI_INITRAMFS_KERNEL_MODULES:append:bsp-next = "kernel-module-tps6594-i2c"
meta-ti-bsp/conf/machine/include/j721e.inc +3 -0
@@ -19,3 +19,6 @@ TI_VXE_VXD_DRIVER = "ti-vxe-vxd-driver" TI_VXE_VXD_DRIVER:bsp-ti-6_6 = "" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw vxd-dec-fw ti-eth-fw-j721e ${TI_VXE_VXD_DRIVER}" + +TI_INITRAMFS_KERNEL_MODULES:append:bsp-mainline = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" +TI_INITRAMFS_KERNEL_MODULES:append:bsp-next = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs"
meta-ti-bsp/conf/machine/include/j784s4.inc +3 -0
@@ -13,3 +13,6 @@ TFA_BOARD = "j784s4" OPTEEMACHINE = "k3-j784s4" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw-j784s4" + +TI_INITRAMFS_KERNEL_MODULES:append:bsp-mainline = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" +TI_INITRAMFS_KERNEL_MODULES:append:bsp-next = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs"
meta-ti-bsp/conf/machine/include/ti-soc.inc +2 -0
@@ -27,3 +27,5 @@ CLASS_DEVICETREE_PREFIX = "${@ 'ti-devicetree-prefix' if d.getVar('KERNEL_DEVICE KERNEL_CLASSES += "${CLASS_DEVICETREE_PREFIX}" IMAGE_CLASSES += "${CLASS_DEVICETREE_PREFIX}" + +TI_INITRAMFS_KERNEL_MODULES ?= ""
Signature · 1 line
2.34.1
PATCH v2 2/4 recipes-ti: initrd: Make minimal initrd image
In reply to Moteen ShahIntroduce a new minimal initramfs image which will be used for all K3 devices in the boot flow. The image will package boot essential and other modules which will be modprobed by initramfs-udev once the inbuilt drivers gets probed.
--- .../initrd/packagegroup-ti-initrd.bb | 5 ++ .../recipes-ti/initrd/ti-initrd-image.bb | 50 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb create mode 100644 meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb new file +5 -0
@@ -0,0 +1,5 @@ +SUMMARY = "Minimal initrd for boot requirements" + +require recipes-core/packagegroups/packagegroup-core-boot.bb + +RDEPENDS:${PN}:remove = "grub-efi kernel"
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [master][PATCH 2/4 v2] recipes-ti: initrd: Make minimal initrd image
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb
Quoted 18 lines · Moteen Shah
Introduce a new minimal initramfs image which will be used for all K3 devices in the boot flow. The image will package boot essential and other modules which will be modprobed by initramfs-udev once the inbuilt drivers gets probed.
Signed-off-by Moteen Shah <[email protected]>--- .../initrd/packagegroup-ti-initrd.bb | 5 ++ .../recipes-ti/initrd/ti-initrd-image.bb | 50 +++++++++++++++++++ 2 files changed, 55 insertions(+)create mode 100644 meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb create mode 100644 meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb new file +0
-0
We are using initrd and initramfs in different places. Yocto seems to use initramfs everywhere. Let's unify to initramfs instead of initrd.
Change the recipe name to packagegroup-ti-core-initramfs.bb
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb
Quoted 11 lines
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb new file +5
-0@@ -0,0 +1,5 @@ +SUMMARY = "Minimal initrd for boot requirements" + +require recipes-core/packagegroups/packagegroup-core-boot.bb + +RDEPENDS:${PN}:remove = "grub-efi kernel"meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +0
-0
Change the recipe name to ti-core-initramfs.bb
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 1
Quoted 2 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +1
-0@@ -0,0 +1,50 @@ +SUMMARY = "TI SDK minimal initrd image"
s/initrd/initramfs/
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 12
Quoted 11 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +11
-0+ +DESCRIPTION = "Image meant to probe boot essential modules\ + and other modules to reach the userspace, which cannot be\ + built inside the upstream linux kernel image.\ +" + +LICENSE = "MIT" + +inherit core-image + +IMAGE_NAME = "initrd"
Change the image name to ti-core-initramfs. There is no good reason to not use more characters and be more descriptive.
Quoted 9 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +9
-0+IMAGE_NAME_SUFFIX = "" + +IMAGE_FEATURES:remove = "package-management" + +INITRAMFS_FSTYPES = "cpio cpio.xz" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" + +INITRAMFS_SCRIPTS ?= "\
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 32
Quoted 10 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +10
-0+ initramfs-framework-base \ + initramfs-module-udev \ + initramfs-module-nfsrootfs \ +" + +UTILS = "\ + cifs-utils \ + nfs-utils \ + nfs-utils-client \ +"
I think the two variables above all need to move into the packagegroup and not directly in the image recipe. Otherwise what is the point of the packagegroup at all?
Use RDEPENDS to make the packagegroup depend on the variables, and then remove them from the list below. And move the TI_INITRAMFS_KERNEL_MODULES entry as well.
That way if someone else wants to create another initramfs to do something like secure boot (or whatever) they have a single point to include and pull in all of the files required for boot.
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 38
Quoted 5 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +5
-0+PACKAGE_INSTALL = "\ + ${INITRAMFS_SCRIPTS} \ + ${UTILS} \ + ${TI_INITRAMFS_KERNEL_MODULES} \ + packagegroup-ti-initrd \
s/packagegroup-ti-initrd/packagegroup-ti-core-initramfs/
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 41
Quoted 3 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +3
-0+" + +export IMAGE_BASENAME = "ti-initrd-image"
s/ti-initrd-image/ti-core-initramfs/
Quoted 9 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +9
-0+ +# To further reduce the size of the rootfs, remove the /boot directory from +# the final image this is usually done by adding RDEPENDS_kernel-base = "" +# in the configuration file. In our case we can't use this method. Instead we +# just wipe out the content of "/boot" before creating the image. +ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; " +empty_boot_dir () { + rm -rf ${IMAGE_ROOTFS}/boot/* +}
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Re: [master][PATCH 2/4 v2] recipes-ti: initrd: Make minimal initrd image
Quoted 41 lines · Ryan Eatmon
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb
Quoted 18 lines · Moteen Shah
Introduce a new minimal initramfs image which will be used for all K3 devices in the boot flow. The image will package boot essential and other modules which will be modprobed by initramfs-udev once the inbuilt drivers gets probed.
Signed-off-by Moteen Shah <[email protected]>---
.../initrd/packagegroup-ti-initrd.bb | 5 ++ .../recipes-ti/initrd/ti-initrd-image.bb | 50 +++++++++++++++++++2 files changed, 55 insertions(+)create mode 100644 meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb create mode 100644 meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb new file +0
-0We are using initrd and initramfs in different places. Yocto seems to use initramfs everywhere. Let's unify to initramfs instead of initrd.
Change the recipe name to packagegroup-ti-core-initramfs.bb
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb
Quoted 11 lines
meta-ti-bsp/recipes-ti/initrd/packagegroup-ti-initrd.bb new file +5
-0@@ -0,0 +1,5 @@ +SUMMARY = "Minimal initrd for boot requirements" + +require recipes-core/packagegroups/packagegroup-core-boot.bb + +RDEPENDS:${PN}:remove = "grub-efi kernel"meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +0
-0Change the recipe name to ti-core-initramfs.bb
Quoted 4 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 1
Quoted 2 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +1
-0@@ -0,0 +1,50 @@ +SUMMARY = "TI SDK minimal initrd image"s/initrd/initramfs/
Noted.
Quoted 37 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 12
Quoted 12 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +11
-0+ +DESCRIPTION = "Image meant to probe boot essential modules\ + and other modules to reach the userspace, which cannot be\ + built inside the upstream linux kernel image.\ +" + +LICENSE = "MIT" + +inherit core-image + +IMAGE_NAME = "initrd"Change the image name to ti-core-initramfs. There is no good reason to not use more characters and be more descriptive.
Quoted 9 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +9
-0+IMAGE_NAME_SUFFIX = "" + +IMAGE_FEATURES:remove = "package-management" + +INITRAMFS_FSTYPES = "cpio cpio.xz" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" + +INITRAMFS_SCRIPTS ?= "\meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 32
Quoted 10 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +10
-0+ initramfs-framework-base \ + initramfs-module-udev \ + initramfs-module-nfsrootfs \ +" + +UTILS = "\ + cifs-utils \ + nfs-utils \ + nfs-utils-client \ +"I think the two variables above all need to move into the packagegroup and not directly in the image recipe. Otherwise what is the point of the packagegroup at all?
Quoted 3 lines
Use RDEPENDS to make the packagegroup depend on the variables, and then remove them from the list below. And move the
TI_INITRAMFS_KERNEL_MODULESentry as well.That way if someone else wants to create another initramfs to do something like secure boot (or whatever) they have a single point to include and pull in all of the files required for boot.
Makes sense, I will fix in v3.
Quoted 7 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 38
Quoted 6 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +5
-0+PACKAGE_INSTALL = "\ + ${INITRAMFS_SCRIPTS} \ + ${UTILS} \ + ${TI_INITRAMFS_KERNEL_MODULES} \ + packagegroup-ti-initrd \
Quoted 7 lines
s/packagegroup-ti-initrd/packagegroup-ti-core-initramfs/
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb line 41
Quoted 3 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +3
-0+" + +export IMAGE_BASENAME = "ti-initrd-image"s/ti-initrd-image/ti-core-initramfs/
Noted.
Regards,
Moteen
Quoted 14 lines
Quoted 13 lines
meta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +2
-0+ +# To further reduce the size of the rootfs, remove the /bootdirectory from
+# the final image this is usually done by adding RDEPENDS_kernel-base = ""
+# in the configuration file. In our case we can't use this method. Instead wemeta-ti-bsp/recipes-ti/initrd/ti-initrd-image.bb new file +5
-0+# just wipe out the content of "/boot" before creating the image. +ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; " +empty_boot_dir () { + rm -rf ${IMAGE_ROOTFS}/boot/* +}
PATCH v2 3/4 meta-ti-bsp: wic: Add a new GRUB config for TI platforms
In reply to Moteen ShahAdd a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
--- meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +1 -1
@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partition with extra # reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg" part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
meta-ti-bsp/wic/ti-grub.cfg new file +9 -0
@@ -0,0 +1,9 @@ +# Set timeout and default options +set timeout=3 +set default=0 + +# Main boot entry +menuentry "Boot Linux" { + linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4 + initrd /initrd.cpio.xz +}
Signature · 1 line
2.34.1
Re: [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Quoted 18 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>--- meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0
meta-ti-bsp/wic/sdimage-2part-efi.wks.in line 6
Quoted 5 lines
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +1
-1@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partition with extra # reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"
Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Quoted 8 lines
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuidmeta-ti-bsp/wic/ti-grub.cfg new file +0
-0
meta-ti-bsp/wic/ti-grub.cfg line 8
Quoted 8 lines
meta-ti-bsp/wic/ti-grub.cfg new file +8
-0@@ -0,0 +1,9 @@ +# Set timeout and default options +set timeout=3 +set default=0 + +# Main boot entry +menuentry "Boot Linux" { + linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4 + initrd /initrd.cpio.xz
Change the name to ti-core-initramfs.cpio.xz to match the other changes from patch #2.
Quoted 1 line
meta-ti-bsp/wic/ti-grub.cfg new file +1
-0+}
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Re: [meta-ti] [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Quoted 16 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 12 lines
meta-ti-bsp/wic/sdimage-2part-efi.wks.in line 5
Quoted 9 lines
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +1
-1@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partition with extra # reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel command line or you will not get kernel output. This is something we can pass to all K3 boards (although not strictly needed for other boards, it is safe/correct to do for them all). Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So having this selectable per-SoC/family is still useful.
Andrew
Quoted 32 lines
Quoted 9 lines
part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
meta-ti-bsp/wic/ti-grub.cfg new file +0
-0meta-ti-bsp/wic/ti-grub.cfg line 8
Quoted 8 lines
meta-ti-bsp/wic/ti-grub.cfg new file +8
-0@@ -0,0 +1,9 @@ +# Set timeout and default options +set timeout=3 +set default=0 + +# Main boot entry +menuentry "Boot Linux" { + linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4 + initrd /initrd.cpio.xzChange the name to ti-core-initramfs.cpio.xz to match the other changes from patch #2.
meta-ti-bsp/wic/ti-grub.cfg line 9
Quoted 1 line
meta-ti-bsp/wic/ti-grub.cfg new file +1
-0+}-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19057): https://lists.yoctoproject.org/g/meta-ti/message/19057
Mute This Topic: https://lists.yoctoproject.org/mt/115325157/3619733
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [meta-ti] [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Quoted 43 lines · Andrew Davis
Quoted 16 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 17 lines
Quoted 8 lines
meta-ti-bsp/ renamed from meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 100644meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partitionwith extra
Quoted 4 lines
# reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel
command line or you will not get kernel output. This is something we can pass to all
K3 boards (although not strictly needed for other boards, it is safe/ correct to do
for them all).
Quoted 3 lines
Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So
having this selectable per-SoC/family is still useful.
AM62L would use "console=ttyS0,115200n8" as well.
Quoted 2 lines
Andrew
[...]
Signature · 3 lines
Regards Vignesh https://ti.com/opensource
Re: [meta-ti] [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Hey Vignesh and Andrew,
Quoted 44 lines · Vignesh Raghavendra
Quoted 32 lines · Andrew Davis
Quoted 15 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>--- meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 16 lines
Quoted 8 lines
meta-ti-bsp/ renamed from meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 100644meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partitionwith extra
Quoted 4 lines
# reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Quoted 10 lines
Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel
command line or you will not get kernel output. This is something we can pass to all
K3 boards (although not strictly needed for other boards, it is safe/ correct to do
for them all).
Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So
having this selectable per-SoC/family is still useful.
Quoted 1 line
AM62L would use "console=ttyS0,115200n8" as well.
Don't we set console= property from the platform.env files in uboot?
Regards,
Moteen
Quoted 5 lines
Quoted 3 lines
Andrew
[...]
Re: [meta-ti] [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Quoted 47 lines · Moteen Shah
Hey Vignesh and Andrew,
Quoted 44 lines · Vignesh Raghavendra
Quoted 42 lines · Andrew Davis
Quoted 15 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 16 lines
Quoted 8 lines
meta-ti-bsp/ renamed from meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 100644meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partitionwith extra
Quoted 4 lines
# reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel
command line or you will not get kernel output. This is something we can pass to all
K3 boards (although not strictly needed for other boards, it is safe/ correct to do
for them all).
Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So
having this selectable per-SoC/family is still useful.
Quoted 4 lines
Quoted 1 line
AM62L would use "console=ttyS0,115200n8" as well.
Don't we set console= property from the platform.env files in uboot?
Yes, but that is passed to the kernel when using the normal boot flow, for EFI boot the kernel command line is set here in the EFI config.
Andrew
Quoted 8 lines
Regards,
MoteenQuoted 5 lines
Quoted 3 lines
Andrew
[...]
Re: [meta-ti] [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Hey Andrew,
Quoted 50 lines · Andrew Davis
Quoted 49 lines · Moteen Shah
Hey Vignesh and Andrew,
Quoted 45 lines · Vignesh Raghavendra
Quoted 32 lines · Andrew Davis
Quoted 15 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 16 lines
Quoted 8 lines
meta-ti-bsp/ renamed from meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 100644meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partitionwith extra
Quoted 4 lines
# reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Quoted 10 lines
Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel
command line or you will not get kernel output. This is something we can pass to all
K3 boards (although not strictly needed for other boards, it is safe/ correct to do
for them all).
Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So
having this selectable per-SoC/family is still useful.AM62L would use "console=ttyS0,115200n8" as well.
Quoted 7 lines
Quoted 2 lines
Don't we set console= property from the platform.env files in uboot?
Yes, but that is passed to the kernel when using the normal boot flow, for EFI boot the kernel command line is set here in the EFI config.
Andrew
Currently, in my testing I am not passing any console= property in grub.cfg, but the prints still go to the right UART. I think here, we are directly picking up from the stdout-path defined in the u-boot's device-tree. I will test on AM62l as well for the v3.
Regards,
Moteen
Quoted 10 lines
Quoted 9 lines
Regards,
MoteenQuoted 5 lines
Quoted 3 lines
Andrew
[...]
Re: [meta-ti] [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Quoted 56 lines · Moteen Shah
Hey Andrew,
Quoted 53 lines · Andrew Davis
Quoted 51 lines · Moteen Shah
Hey Vignesh and Andrew,
Quoted 44 lines · Vignesh Raghavendra
Quoted 32 lines · Andrew Davis
Quoted 15 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 16 lines
Quoted 8 lines
meta-ti-bsp/ renamed from meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 100644meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partitionwith extra
Quoted 4 lines
# reserved space. We cannot use a GPT here. -bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Quoted 10 lines
Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel
command line or you will not get kernel output. This is something we can pass to all
K3 boards (although not strictly needed for other boards, it is safe/ correct to do
for them all).
Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So
having this selectable per-SoC/family is still useful.Quoted 1 line
AM62L would use "console=ttyS0,115200n8" as well.
Don't we set console= property from the platform.env files in uboot?
Quoted 7 lines
Quoted 4 lines
Yes, but that is passed to the kernel when using the normal boot flow, for EFI boot the kernel command line is set here in the EFI config.
Andrew
Currently, in my testing I am not passing any console= property in grub.cfg, but the prints still go to the right UART. I think here, we are directly picking up from the stdout-path defined in the u-boot's device-tree. I will test on AM62l as well for the v3.
Try AM64x
Andrew
Quoted 14 lines
Regards,
MoteenQuoted 10 lines
Quoted 9 lines
Regards,
MoteenQuoted 5 lines
Quoted 3 lines
Andrew
[...]
Re: [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
In reply to Ryan EatmonHey Ryan,
Thanks for the review.
Quoted 16 lines · Ryan Eatmon
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 11 lines
Quoted 9 lines
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partition with extra # reserved space. We cannot use a GPT here.-bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"
Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
I will include all that was originally there viz. ${TI_WKS_BOOTLOADER_APPEND} in the grub.cfg, will that suffice?
Quoted 15 lines
Quoted 15 lines
part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuidmeta-ti-bsp/wic/ti-grub.cfg new file +2
-0@@ -0,0 +1,9 @@ +# Set timeout and default options +set timeout=3
Quoted 8 lines
meta-ti-bsp/wic/ti-grub.cfg line 8
Quoted 6 lines
meta-ti-bsp/wic/ti-grub.cfg new file +6
-0+set default=0 + +# Main boot entry +menuentry "Boot Linux" { + linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4 + initrd /initrd.cpio.xzChange the name to ti-core-initramfs.cpio.xz to match the other changes from patch #2.
Noted.
Regards,
Moteen
Quoted 4 lines
Quoted 3 lines
meta-ti-bsp/wic/ti-grub.cfg new file +1
-0+}
Re: [master][PATCH 3/4 v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms
Quoted 33 lines · Moteen Shah
Hey Ryan,
Thanks for the review.
Quoted 16 lines · Ryan Eatmon
Quoted 13 lines · Moteen Shah
Add a new grub config for TI specific platforms. While, only supporting to boot linux from filesystem on MMCSD, it will support booting linux and initrd image from eMMC, OSPI, UFS later down the line. Hence, make a new config altogether for easier development.
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +- meta-ti-bsp/wic/ti-grub.cfg | 9 +++++++++2 files changed, 10 insertions(+), 1 deletion(-)create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
Quoted 11 lines
Quoted 9 lines
meta-ti-bsp/wic/sdimage-2part-efi.wks.in +0
-0@@ -3,6 +3,6 @@ # supports EFI. Boot files are located in the first vfat partition with extra # reserved space. We cannot use a GPT here.-bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}" +bootloader --configfile="ti-grub.cfg"
Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console. This likely needs to be better tested before we just make blanket changes like that.
Quoted 1 line
I will include all that was originally there viz. ${TI_WKS_BOOTLOADER_APPEND} in the grub.cfg, will that suffice?
I doubt it. Because the grub.cfg file will be installed and that variable will not be set anywhere. But I could be wrong. You would need to test it to be sure.
Quoted 32 lines
Quoted 14 lines
Quoted 14 lines
part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed- size 128M
part / --source rootfs --fstype=ext4 --label root --align 1024 -- use-uuidmeta-ti-bsp/wic/ti-grub.cfg new file +2
-0@@ -0,0 +1,9 @@ +# Set timeout and default options +set timeout=3Quoted 8 lines
meta-ti-bsp/wic/ti-grub.cfg line 8
Quoted 6 lines
meta-ti-bsp/wic/ti-grub.cfg new file +6
-0+set default=0 + +# Main boot entry +menuentry "Boot Linux" { + linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4 + initrd /initrd.cpio.xzChange the name to ti-core-initramfs.cpio.xz to match the other changes from patch #2.
Noted.
Regards,
MoteenQuoted 4 lines
Quoted 3 lines
meta-ti-bsp/wic/ti-grub.cfg new file +1
-0+}
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
PATCH v2 4/4 meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
In reply to Moteen ShahTrigger 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).
--- meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta-ti-bsp/conf/machine/include/k3.inc +7 -1
@@ -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"
Signature · 1 line
2.34.1
Re: [master][PATCH 4/4 v2] meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
meta-ti-bsp/conf/machine/include/k3.inc
Quoted 10 lines · Moteen Shah
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 <[email protected]>--- meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)meta-ti-bsp/conf/machine/include/k3.inc +0
-0
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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-image ti-kernel-fitimage" · line 37
Quoted 9 lines
index
50411a8e..c0c49e0d100644meta-ti-bsp/conf/machine/include/k3.inc +2
-0@@ -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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 50
Quoted 11 lines
meta-ti-bsp/conf/machine/include/k3.inc +3
-1# 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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 52
Quoted 2 lines
meta-ti-bsp/conf/machine/include/k3.inc +2
-0+ +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/
Quoted 3 lines
meta-ti-bsp/conf/machine/include/k3.inc +0
-0IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" EFI_PROVIDER ?= "grub-efi"
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Re: [meta-ti] [master][PATCH 4/4 v2] meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
Quoted 30 lines · Ryan Eatmon via lists.yoctoproject.org
meta-ti-bsp/conf/machine/include/k3.inc
Quoted 10 lines · Moteen Shah
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 <[email protected]>--- meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)meta-ti-bsp/conf/machine/include/k3.inc +0
-0If 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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image-image ti-kernel-fitimage" · line 35
Quoted 7 lines
index
50411a8e..c0c49e0d100644meta-ti-bsp/conf/machine/include/k3.inc +2
-0@@ -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.
Quoted 13 lines
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 48
Quoted 9 lines
meta-ti-bsp/conf/machine/include/k3.inc +3
-1# 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_IMAGEDEPENDSinstead of thedo_image_completeto 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...
Quoted 14 lines
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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 52
Quoted 2 lines
meta-ti-bsp/conf/machine/include/k3.inc +2
-0+ +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/
Quoted 2 lines
meta-ti-bsp/conf/machine/include/k3.inc +0
-0IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}" EFI_PROVIDER ?= "grub-efi"
Re: [master][PATCH 4/4 v2] meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
In reply to Ryan EatmonHey Ryan,
Quoted 7 lines · Ryan Eatmon
Quoted 4 lines · Moteen Shah
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).
Quoted 8 lines
meta-ti-bsp/conf/machine/include/k3.inc
Quoted 6 lines
Signed-off-by Moteen Shah <[email protected]>---
meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++-1 file changed, 7 insertions(+), 1 deletion(-)meta-ti-bsp/conf/machine/include/k3.inc +0
-0If 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.
Quoted 25 lines
Quoted 10 lines
index
50411a8e..c0c49e0d100644meta-ti-bsp/conf/machine/include/k3.inc +0
-0@@ -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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 50
Quoted 9 lines
# Use the expected value of the ubifs filesystem's volume name in the kernel
# and u-boot. UBI_VOLNAME = "rootfs"meta-ti-bsp/conf/machine/include/k3.inc +0
-0@@ -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"meta-ti-bsp/conf/machine/include/k3.inc +3
-0+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_IMAGEDEPENDSinstead of thedo_image_completeto make it be built.
Quoted 6 lines
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
Quoted 10 lines
Quoted 4 lines
meta-ti-bsp/conf/machine/include/k3.inc +2
-0+ +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/
Quoted 2 lines
IMAGE_EFI_BOOT_FILES?= "${IMAGE_BOOT_FILES}"
EFI_PROVIDER?= "grub-efi"
Re: [master][PATCH 4/4 v2] meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
Quoted 15 lines · Moteen Shah
Hey Ryan,
Quoted 12 lines · Ryan Eatmon
Quoted 9 lines · Moteen Shah
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 <[email protected]>---
meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++-1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 3 lines
meta-ti-bsp/ conf/machine/include/k3.inc
Quoted 1 line
meta-ti-bsp/ conf/machine/include/k3.inc renamed from meta-ti-bsp/conf/machine/include/k3.inc +0
-0If 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?
Quoted 47 lines
Quoted 25 lines
Quoted 10 lines
index
50411a8e..c0c49e0d100644meta-ti-bsp/conf/machine/include/k3.inc +0
-0@@ -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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 50
Quoted 9 lines
# Use the expected value of the ubifs filesystem's volume name in the kernel
# and u-boot. UBI_VOLNAME = "rootfs"meta-ti-bsp/conf/machine/include/k3.inc +0
-0@@ -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"meta-ti-bsp/conf/machine/include/k3.inc +3
-0+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_IMAGEDEPENDSinstead of thedo_image_completeto make it be built.Quoted 6 lines
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,
MoteenQuoted 10 lines
Quoted 4 lines
meta-ti-bsp/conf/machine/include/k3.inc +2
-0+ +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/
Quoted 2 lines
IMAGE_EFI_BOOT_FILES?= "${IMAGE_BOOT_FILES}"
EFI_PROVIDER?= "grub-efi"
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Re: [master][PATCH 4/4 v2] meta-ti-bsp: conf: machine: include: Build initrd for all K3 platforms
Hey Ryan,
Quoted 18 lines · Ryan Eatmon
Quoted 15 lines · Moteen Shah
Hey Ryan,
Quoted 12 lines · Ryan Eatmon
Quoted 9 lines · Moteen Shah
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 <[email protected]>---
meta-ti-bsp/conf/machine/include/k3.inc | 8 +++++++-1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
meta-ti-bsp/ conf/machine/include/k3.inc
Quoted 1 line
meta-ti-bsp/ conf/machine/include/k3.inc renamed from meta-ti-bsp/conf/machine/include/k3.inc +0
-0If 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
Quoted 50 lines
Quoted 49 lines
Quoted 27 lines
Quoted 8 lines
index
50411a8e..c0c49e0d100644meta-ti-bsp/conf/machine/include/k3.inc +0
-0@@ -33,6 +33,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS +=Quoted 4 lines
"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.
meta-ti-bsp/conf/machine/include/k3.inc MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw" · line 50
Quoted 9 lines
# Use the expected value of the ubifs filesystem's volume name in the kernel
# and u-boot. UBI_VOLNAME = "rootfs"meta-ti-bsp/conf/machine/include/k3.inc +0
-0@@ -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"meta-ti-bsp/conf/machine/include/k3.inc +3
-0+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_IMAGEDEPENDSinstead of thedo_image_completeto make it be built.Quoted 6 lines
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,
MoteenQuoted 10 lines
Quoted 4 lines
meta-ti-bsp/conf/machine/include/k3.inc +2
-0+ +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/
Quoted 2 lines
IMAGE_EFI_BOOT_FILES?= "${IMAGE_BOOT_FILES}"
EFI_PROVIDER?= "grub-efi"