ti-core-initramfs: Rework logic
PATCH 1/1 ti-core-initramfs: Rework logic
Clean up the logic of the new ti-core-initramfs to reduce the impact on downstream layers.
- Flip the logic in the machine .conf files to track the list of required kernel modules for that platform, but if the variable is set to "" then the ti-core-initramfs will not be created.
- Redo the logic of when we require creation/usage of the initramfs to just platforms that need it (ie that set TI_CORE_INITRAMFS_KERNEL_MODULES).
- Add a big switch to disable the initramfs entirely. In that case, the user is on their own to make sure that the kernel has everything it needs to boot either via config fragments to turn on the needed modules, or by using the TI_CORE_INITRAMFS_KERNEL_MODULES variable to populate their own initramfs.
--- meta-ti-bsp/conf/machine/include/am62axx.inc | 6 ++-- meta-ti-bsp/conf/machine/include/j721e.inc | 6 ++-- meta-ti-bsp/conf/machine/include/j784s4.inc | 6 ++-- .../machine/include/ti-core-initramfs.inc | 29 +++++++++++++++++++ meta-ti-bsp/conf/machine/include/ti-soc.inc | 20 +------------ .../packagegroup-ti-core-initramfs.bb | 4 +-- 6 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc
meta-ti-bsp/conf/machine/include/am62axx.inc +3 -3
@@ -12,6 +12,6 @@ OPTEEMACHINE = "k3-am62x" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cnm-wave-fw" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-ti-6_18 = " kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-mainline = " kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-next = " kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" +TI_CORE_INITRAMFS_KERNEL_MODULES = "kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_6 = "" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_12 = ""
meta-ti-bsp/conf/machine/include/j721e.inc +3 -3
@@ -21,6 +21,6 @@ TI_VXE_VXD_DRIVER:bsp-ti-6_18 = "" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw vxd-dec-fw ti-eth-fw-j721e ${TI_VXE_VXD_DRIVER}" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-ti-6_18 = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" -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" +TI_CORE_INITRAMFS_KERNEL_MODULES = "kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_6 = "" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_12 = ""
meta-ti-bsp/conf/machine/include/j784s4.inc +3 -3
@@ -14,6 +14,6 @@ OPTEEMACHINE = "k3-j784s4" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw-j784s4" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-ti-6_18 = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" -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" +TI_CORE_INITRAMFS_KERNEL_MODULES = "kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_6 = "" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_12 = ""
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +29 -0
@@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------ +# +# To turn off the ti-core-initramfs.cpio creation just set: +# +# TI_CORE_INITRAMFS_ENABLED = "0" +# +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_ENABLED ?= "0" + +TI_CORE_INITRAMFS_KERNEL_MODULES ?= "" + +TI_CORE_INITRAMFS_IMAGE = "ti-core-initramfs" +TI_CORE_INITRAMFS_IMAGE_FILE = "${TI_CORE_INITRAMFS_IMAGE}.cpio.xz" + +#------------------------------------------------------------------------------ +# Only enable the initramf code if TI_CORE_INITRAMFS_KERNEL_MODULES is set. +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_DO_IMAGE_WIC = "${@ '${TI_CORE_INITRAMFS_IMAGE}:do_image_complete' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') else ''}" +TI_CORE_INITRAMFS_WKS_FLAG = "${@ ',initrd=${TI_CORE_INITRAMFS_IMAGE_FILE}' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') else ''}" +TI_CORE_INITRAMFS_IMAGE_BOOT_FILES = "${@ '${TI_CORE_INITRAMFS_IMAGE_FILE}' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') else ''}" + +#------------------------------------------------------------------------------ +# Apply all of the needed changes to create/use the initramfs (if enabled). +#------------------------------------------------------------------------------ +do_image_wic[depends] += "${@ '${TI_CORE_INITRAMFS_DO_IMAGE_WIC}' if d.getVar('TI_CORE_INITRAMFS_ENABLED') == "1" else ''}" + +TI_WKS_INITRAMFS ?= "${@ '${TI_CORE_INITRAMFS_WKS_FLAG}' if d.getVar('TI_CORE_INITRAMFS_ENABLED') == "1" else ''}" + +IMAGE_BOOT_FILES += "${@ '${TI_CORE_INITRAMFS_IMAGE_BOOT_FILES}' if d.getVar('TI_CORE_INITRAMFS_ENABLED') == "1" else ''}"
meta-ti-bsp/conf/machine/include/ti-soc.inc +1 -19
@@ -3,6 +3,7 @@ SOC_FAMILY = "ti-soc" require conf/machine/include/soc-family.inc require conf/machine/include/ti-extras.inc +require conf/machine/include/ti-core-initramfs.inc # kernel, initrd load addresses for the fitImage in all TI platforms UBOOT_ENTRYPOINT = "0x82000000"
@@ -28,22 +29,3 @@ CLASS_DEVICETREE_PREFIX = "${@ 'ti-devicetree-prefix' if d.getVar('KERNEL_DEVICE KERNEL_CLASSES += "${CLASS_DEVICETREE_PREFIX}" IMAGE_CLASSES += "${CLASS_DEVICETREE_PREFIX}" - -BUILD_CORE_INITRAMFS_IMAGE = "ti-core-initramfs" -BUILD_CORE_INITRAMFS_IMAGE_FILE = "${BUILD_CORE_INITRAMFS_IMAGE}.cpio.xz" - -BUILD_CORE_INITRAMFS_IMAGE_STEP ?= "" -BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-ti-6_18 = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete" -BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-mainline = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete" -BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-next = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete" - -do_image_wic[depends] += "${BUILD_CORE_INITRAMFS_IMAGE_STEP}" - -TI_WKS_INITRAMFS ?= "" -TI_WKS_INITRAMFS:bsp-ti-6_18 = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -TI_WKS_INITRAMFS:bsp-mainline = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -TI_WKS_INITRAMFS:bsp-next = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}" - -IMAGE_BOOT_FILES:append:bsp-ti-6_18 = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -IMAGE_BOOT_FILES:append:bsp-mainline = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -IMAGE_BOOT_FILES:append:bsp-next = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}"
meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb +2 -2
@@ -6,10 +6,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup -TI_INITRAMFS_KERNEL_MODULES ?= "" +TI_CORE_INITRAMFS_KERNEL_MODULES ?= "" RDEPENDS:${PN} += "\ - ${TI_INITRAMFS_KERNEL_MODULES} \ + ${TI_CORE_INITRAMFS_KERNEL_MODULES} \ ${VIRTUAL-RUNTIME_base-utils} \ base-passwd \ initramfs-framework-base \
Signature · 1 line
2.43.0
meta-ti / na / 20260211200414.1642061-1-reatmon
PRC Results: PASS
=========================================================
check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed
=========================================================
apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-ti][master][PATCH] ti-core-initramfs: Rework logic
- Submitter: From: Ryan Eatmon <[email protected]>
- Date: Date: Wed, 11 Feb 2026 14:04:14 -0600
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: a3d3864182e452a9f2004bccdde0cd26d61b8075
Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-next
- Commit Author: Ryan Eatmon <[email protected]>
- Commit Subject: u-boot: Update ECDSA signing make option
- Commit SHA: c0e80f86dec421d7518f47617c970eec6630640e
Patches
----------------------------------------
All patches applied
=========================================================
check-yocto-repo: PASS
=========================================================
master
=====================
PASS
=========================================================
yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed
Quoted 7 lines · Ryan Eatmon via lists.yoctoproject.org
Clean up the logic of the new ti-core-initramfs to reduce the impact on downstream layers.
- Flip the logic in the machine .conf files to track the list of required kernel modules for that platform, but if the variable is set to "" then the ti-core-initramfs will not be created.
Quoted 8 lines
- Redo the logic of when we require creation/usage of the initramfs to just platforms that need it (ie that set
TI_CORE_INITRAMFS_KERNEL_MODULES).- Add a big switch to disable the initramfs entirely. In that case, the user is on their own to make sure that the kernel has everything it needs to boot either via config fragments to turn on the needed modules, or by using the
TI_CORE_INITRAMFS_KERNEL_MODULESvariable to populate their own initramfs.
In our discussion we agreed to use TI_CORE_INITRAMFS_KERNEL_MODULES to determine whether to enable initramfs or not. While I don't mind adding a separate global TI_CORE_INITRAMFS_ENABLED switch, but I now wonder if two checks are redundant and whether it makes sense to create initramfs even when the list of modules is empty, if it's enabled?
Also see below for another comment.
Quoted 59 lines
Signed-off-by Ryan Eatmon <[email protected]>--- meta-ti-bsp/conf/machine/include/am62axx.inc | 6 ++-- meta-ti-bsp/conf/machine/include/j721e.inc | 6 ++-- meta-ti-bsp/conf/machine/include/j784s4.inc | 6 ++-- .../machine/include/ti-core-initramfs.inc | 29 +++++++++++++++++++ meta-ti-bsp/conf/machine/include/ti-soc.inc | 20 +------------ .../packagegroup-ti-core-initramfs.bb | 4 +-- 6 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 meta-ti-bsp/conf/machine/include/ti-core-initramfs.incmeta-ti-bsp/conf/machine/include/am62axx.inc +3
-3@@ -12,6 +12,6 @@ OPTEEMACHINE = "k3-am62x" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cnm-wave-fw" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-ti-6_18 = " kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-mainline = " kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-next = " kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" +TI_CORE_INITRAMFS_KERNEL_MODULES = "kernel-module-tps6594-i2c kernel-module-tps6594-regulator kernel-module-tps6594-core" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_6 = "" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_12 = ""meta-ti-bsp/conf/machine/include/j721e.inc +3
-3@@ -21,6 +21,6 @@ TI_VXE_VXD_DRIVER:bsp-ti-6_18 = "" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw vxd-dec-fw ti-eth-fw-j721e ${TI_VXE_VXD_DRIVER}" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-ti-6_18 = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" -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" +TI_CORE_INITRAMFS_KERNEL_MODULES = "kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_6 = "" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_12 = ""meta-ti-bsp/conf/machine/include/j784s4.inc +3
-3@@ -14,6 +14,6 @@ OPTEEMACHINE = "k3-j784s4" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw-j784s4" -TI_INITRAMFS_KERNEL_MODULES:append:bsp-ti-6_18 = " kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" -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" +TI_CORE_INITRAMFS_KERNEL_MODULES = "kernel-module-cdns-pltfrm kernel-module-ti-j721e-ufs" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_6 = "" +TI_CORE_INITRAMFS_KERNEL_MODULES:bsp-ti-6_12 = ""meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +0
-0
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc line 8
Quoted 8 lines
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +8
-0@@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------ +# +# To turn off the ti-core-initramfs.cpio creation just set: +# +# TI_CORE_INITRAMFS_ENABLED = "0" +# +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_ENABLED ?= "0"
Did you mean to weakly set it to "1" here? :)
Quoted 74 lines
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +20
-0+TI_CORE_INITRAMFS_KERNEL_MODULES ?= "" + +TI_CORE_INITRAMFS_IMAGE = "ti-core-initramfs" +TI_CORE_INITRAMFS_IMAGE_FILE = "${TI_CORE_INITRAMFS_IMAGE}.cpio.xz" + +#------------------------------------------------------------------------------ +# Only enable the initramf code if TI_CORE_INITRAMFS_KERNEL_MODULES is set. +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_DO_IMAGE_WIC = "${@ '${TI_CORE_INITRAMFS_IMAGE}:do_image_complete' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') else ''}" +TI_CORE_INITRAMFS_WKS_FLAG = "${@ ',initrd=${TI_CORE_INITRAMFS_IMAGE_FILE}' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') else ''}" +TI_CORE_INITRAMFS_IMAGE_BOOT_FILES = "${@ '${TI_CORE_INITRAMFS_IMAGE_FILE}' if d.getVar('TI_CORE_INITRAMFS_KERNEL_MODULES') else ''}" + +#------------------------------------------------------------------------------ +# Apply all of the needed changes to create/use the initramfs (if enabled). +#------------------------------------------------------------------------------ +do_image_wic[depends] += "${@ '${TI_CORE_INITRAMFS_DO_IMAGE_WIC}' if d.getVar('TI_CORE_INITRAMFS_ENABLED') == "1" else ''}" + +TI_WKS_INITRAMFS ?= "${@ '${TI_CORE_INITRAMFS_WKS_FLAG}' if d.getVar('TI_CORE_INITRAMFS_ENABLED') == "1" else ''}" + +IMAGE_BOOT_FILES += "${@ '${TI_CORE_INITRAMFS_IMAGE_BOOT_FILES}' if d.getVar('TI_CORE_INITRAMFS_ENABLED') == "1" else ''}"meta-ti-bsp/conf/machine/include/ti-soc.inc +1
-19@@ -3,6 +3,7 @@ SOC_FAMILY = "ti-soc" require conf/machine/include/soc-family.inc require conf/machine/include/ti-extras.inc +require conf/machine/include/ti-core-initramfs.inc # kernel, initrd load addresses for the fitImage in all TI platforms UBOOT_ENTRYPOINT = "0x82000000"@@ -28,22 +29,3 @@ CLASS_DEVICETREE_PREFIX = "${@ 'ti-devicetree-prefix' if d.getVar('KERNEL_DEVICE KERNEL_CLASSES += "${CLASS_DEVICETREE_PREFIX}" IMAGE_CLASSES += "${CLASS_DEVICETREE_PREFIX}" - -BUILD_CORE_INITRAMFS_IMAGE = "ti-core-initramfs" -BUILD_CORE_INITRAMFS_IMAGE_FILE = "${BUILD_CORE_INITRAMFS_IMAGE}.cpio.xz" - -BUILD_CORE_INITRAMFS_IMAGE_STEP ?= "" -BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-ti-6_18 = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete" -BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-mainline = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete" -BUILD_CORE_INITRAMFS_IMAGE_STEP:bsp-next = "${BUILD_CORE_INITRAMFS_IMAGE}:do_image_complete" - -do_image_wic[depends] += "${BUILD_CORE_INITRAMFS_IMAGE_STEP}" - -TI_WKS_INITRAMFS ?= "" -TI_WKS_INITRAMFS:bsp-ti-6_18 = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -TI_WKS_INITRAMFS:bsp-mainline = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -TI_WKS_INITRAMFS:bsp-next = ",initrd=${BUILD_CORE_INITRAMFS_IMAGE_FILE}" - -IMAGE_BOOT_FILES:append:bsp-ti-6_18 = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -IMAGE_BOOT_FILES:append:bsp-mainline = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}" -IMAGE_BOOT_FILES:append:bsp-next = " ${BUILD_CORE_INITRAMFS_IMAGE_FILE}"meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb +2
-2@@ -6,10 +6,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup -TI_INITRAMFS_KERNEL_MODULES ?= "" +TI_CORE_INITRAMFS_KERNEL_MODULES ?= "" RDEPENDS:${PN} += "\ - ${TI_INITRAMFS_KERNEL_MODULES} \ + ${TI_CORE_INITRAMFS_KERNEL_MODULES} \ ${VIRTUAL-RUNTIME_base-utils} \ base-passwd \ initramfs-framework-base \Signature · 1 line
2.43.0
Quoted 17 lines · Denys Dmytriyenko
Quoted 7 lines · Ryan Eatmon via lists.yoctoproject.org
Clean up the logic of the new ti-core-initramfs to reduce the impact on downstream layers.
- Flip the logic in the machine .conf files to track the list of required kernel modules for that platform, but if the variable is set to "" then the ti-core-initramfs will not be created.
Quoted 8 lines
- Redo the logic of when we require creation/usage of the initramfs to just platforms that need it (ie that set
TI_CORE_INITRAMFS_KERNEL_MODULES).- Add a big switch to disable the initramfs entirely. In that case, the user is on their own to make sure that the kernel has everything it needs to boot either via config fragments to turn on the needed modules, or by using the
TI_CORE_INITRAMFS_KERNEL_MODULESvariable to populate their own initramfs.
Quoted 5 lines
In our discussion we agreed to use
TI_CORE_INITRAMFS_KERNEL_MODULESto determine whether to enable initramfs or not. While I don't mind adding a separate globalTI_CORE_INITRAMFS_ENABLEDswitch, but I now wonder if two checks are redundant and whether it makes sense to create initramfs even when the list of modules is empty, if it's enabled?
I thought about this and went this way for a reason. If you want to turn off the initramfs, but you still want the list of what modules are required say for your own initramfs, then the list is gone. Because the list was the switch.
By splitting them into two lists, we gain the fact that we don't force the initramfs on platforms that don't need it, and you can still turn it all off if you want but have all of the infrastructure in place to use it in your own layer later.
Quoted 15 lines
Also see below for another comment.
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc line 8
Quoted 10 lines
+++ b/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +8
-0@@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------ +# +# To turn off the ti-core-initramfs.cpio creation just set: +# +# TI_CORE_INITRAMFS_ENABLED = "0" +# +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_ENABLED ?= "0"Did you mean to weakly set it to "1" here? :)
Doh. I did. That was from testing. I'll send a v2. Good catch.
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Quoted 31 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 17 lines · Denys Dmytriyenko
Quoted 7 lines · Ryan Eatmon via lists.yoctoproject.org
Clean up the logic of the new ti-core-initramfs to reduce the impact on downstream layers.
- Flip the logic in the machine .conf files to track the list of required kernel modules for that platform, but if the variable is set to "" then the ti-core-initramfs will not be created.
Quoted 8 lines
- Redo the logic of when we require creation/usage of the initramfs to just platforms that need it (ie that set
TI_CORE_INITRAMFS_KERNEL_MODULES).- Add a big switch to disable the initramfs entirely. In that case, the user is on their own to make sure that the kernel has everything it needs to boot either via config fragments to turn on the needed modules, or by using the
TI_CORE_INITRAMFS_KERNEL_MODULESvariable to populate their own initramfs.Quoted 5 lines
In our discussion we agreed to use
TI_CORE_INITRAMFS_KERNEL_MODULESto determine whether to enable initramfs or not. While I don't mind adding a separate globalTI_CORE_INITRAMFS_ENABLEDswitch, but I now wonder if two checks are redundant and whether it makes sense to create initramfs even when the list of modules is empty, if it's enabled?I thought about this and went this way for a reason. If you want to turn off the initramfs, but you still want the list of what modules are required say for your own initramfs, then the list is gone. Because the list was the switch.
Quoted 4 lines
By splitting them into two lists, we gain the fact that we don't force the initramfs on platforms that don't need it, and you can still turn it all off if you want but have all of the infrastructure in place to use it in your own layer later.
I think you missed my point - I'm not against the "enable" flag, but since we now have it explicitly, does it make sense to also build the initramfs with an empty modules list when the "enable" flag is set to "1"?
Quoted 17 lines
Quoted 15 lines
Also see below for another comment.
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc line 8
Quoted 10 lines
+++ b/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +8
-0@@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------ +# +# To turn off the ti-core-initramfs.cpio creation just set: +# +# TI_CORE_INITRAMFS_ENABLED = "0" +# +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_ENABLED ?= "0"Did you mean to weakly set it to "1" here? :)
Doh. I did. That was from testing. I'll send a v2. Good catch.
Quoted 33 lines · Denys Dmytriyenko via lists.yoctoproject.org
Quoted 31 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 17 lines · Denys Dmytriyenko
Quoted 7 lines · Ryan Eatmon via lists.yoctoproject.org
Clean up the logic of the new ti-core-initramfs to reduce the impact on downstream layers.
- Flip the logic in the machine .conf files to track the list of required kernel modules for that platform, but if the variable is set to "" then the ti-core-initramfs will not be created.
Quoted 8 lines
- Redo the logic of when we require creation/usage of the initramfs to just platforms that need it (ie that set
TI_CORE_INITRAMFS_KERNEL_MODULES).- Add a big switch to disable the initramfs entirely. In that case, the user is on their own to make sure that the kernel has everything it needs to boot either via config fragments to turn on the needed modules, or by using the
TI_CORE_INITRAMFS_KERNEL_MODULESvariable to populate their own initramfs.Quoted 5 lines
In our discussion we agreed to use
TI_CORE_INITRAMFS_KERNEL_MODULESto determine whether to enable initramfs or not. While I don't mind adding a separate globalTI_CORE_INITRAMFS_ENABLEDswitch, but I now wonder if two checks are redundant and whether it makes sense to create initramfs even when the list of modules is empty, if it's enabled?I thought about this and went this way for a reason. If you want to turn off the initramfs, but you still want the list of what modules are required say for your own initramfs, then the list is gone. Because the list was the switch.
Quoted 8 lines
Quoted 4 lines
By splitting them into two lists, we gain the fact that we don't force the initramfs on platforms that don't need it, and you can still turn it all off if you want but have all of the infrastructure in place to use it in your own layer later.
I think you missed my point - I'm not against the "enable" flag, but since we now have it explicitly, does it make sense to also build the initramfs with an empty modules list when the "enable" flag is set to "1"?
Being able to create an initramfs without modules makes sense to me. We've had to use initramfs before for mounting filesystems in a particular order for example. And didn't really need extra modules at the time. Just a thought.
Quoted 28 lines
Quoted 18 lines
Quoted 5 lines
Also see below for another comment.
Quoted 12 lines
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc line 8
Quoted 10 lines
+++ b/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +8
-0@@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------ +# +# To turn off the ti-core-initramfs.cpio creation just set: +# +# TI_CORE_INITRAMFS_ENABLED = "0" +# +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_ENABLED ?= "0"Did you mean to weakly set it to "1" here? :)
Quoted 1 line
Doh. I did. That was from testing. I'll send a v2. Good catch.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19491): https://lists.yoctoproject.org/g/meta-ti/message/19491
Mute This Topic: https://lists.yoctoproject.org/mt/117763070/7902621
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 7 lines
Jonathan Cormier Senior Software Engineer Office: 315.425.4045 x222 http://www.CriticalLink.com 6712 Brooklawn Parkway, Syracuse, NY 13211
Quoted 40 lines · Jon Cormier
Quoted 38 lines · Denys Dmytriyenko via lists.yoctoproject.org
Quoted 35 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 17 lines · Denys Dmytriyenko
Quoted 7 lines · Ryan Eatmon via lists.yoctoproject.org
Clean up the logic of the new ti-core-initramfs to reduce the impact on downstream layers.
- Flip the logic in the machine .conf files to track the list of required kernel modules for that platform, but if the variable is set to "" then the ti-core-initramfs will not be created.
Quoted 8 lines
- Redo the logic of when we require creation/usage of the initramfs to just platforms that need it (ie that set
TI_CORE_INITRAMFS_KERNEL_MODULES).- Add a big switch to disable the initramfs entirely. In that case, the user is on their own to make sure that the kernel has everything it needs to boot either via config fragments to turn on the needed modules, or by using the
TI_CORE_INITRAMFS_KERNEL_MODULESvariable to populate their own initramfs.Quoted 5 lines
In our discussion we agreed to use
TI_CORE_INITRAMFS_KERNEL_MODULESto determine whether to enable initramfs or not. While I don't mind adding a separate globalTI_CORE_INITRAMFS_ENABLEDswitch, but I now wonder if two checks are redundant and whether it makes sense to create initramfs even when the list of modules is empty, if it's enabled?I thought about this and went this way for a reason. If you want to turn off the initramfs, but you still want the list of what modules are required say for your own initramfs, then the list is gone. Because the list was the switch.
By splitting them into two lists, we gain the fact that we don't force the initramfs on platforms that don't need it, and you can still turn it all off if you want but have all of the infrastructure in place to use it in your own layer later.
Quoted 7 lines
Quoted 3 lines
I think you missed my point - I'm not against the "enable" flag, but since we now have it explicitly, does it make sense to also build the initramfs with an empty modules list when the "enable" flag is set to "1"?
Being able to create an initramfs without modules makes sense to me. We've had to use initramfs before for mounting filesystems in a particular order for example. And didn't really need extra modules at the time. Just a thought.
I am going to send a second patch that adds support for adding additional packages to the ti-core-initramfs that also turns it on. That way a distro can chose to always turn it on and add in that kind of change.
Quoted 29 lines
Quoted 27 lines
Quoted 17 lines
Quoted 4 lines
Also see below for another comment.
Quoted 12 lines
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc line 8
Quoted 10 lines
+++ b/meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc
meta-ti-bsp/conf/machine/include/ti-core-initramfs.inc new file +8
-0@@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------ +# +# To turn off the ti-core-initramfs.cpio creation just set: +# +# TI_CORE_INITRAMFS_ENABLED = "0" +# +#------------------------------------------------------------------------------ +TI_CORE_INITRAMFS_ENABLED ?= "0"Did you mean to weakly set it to "1" here? :)
Quoted 1 line
Doh. I did. That was from testing. I'll send a v2. Good catch.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19491): https://lists.yoctoproject.org/g/meta-ti/message/19491
Mute This Topic: https://lists.yoctoproject.org/mt/117763070/7902621
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS