On 1/13/2026 5:55 AM, Nishanth Menon wrote:
On 08:43-20260112, Ryan Eatmon wrote:
why is this needed?
On 1/12/2026 3:31 AM, Moteen Shah wrote:
Install the dt_to_config script to initramfs image from
the linux kernel tree.
Signed-off-by: Moteen Shah <[email protected]>
---
.../recipes-ti/initramfs/ti-core-initramfs.bb | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
b/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
index 1a102d82..44574377 100644
--- a/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
+++ b/meta-ti-bsp/recipes-ti/initramfs/ti-core-initramfs.bb
@@ -29,7 +29,23 @@ IMAGE_OVERHEAD_FACTOR = "1.1"
# 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; "
+ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; install_dt_to_config; "
+
empty_boot_dir () {
rm -rf ${IMAGE_ROOTFS}/boot/*
}
+
+install_dt_to_config () {
+ # Install dt_to_config script from kernel source to kernel build tree
location
+ if [ -f ${STAGING_KERNEL_DIR}/scripts/dtc/dt_to_config ]; then
+ KERNEL_VER=$(ls ${IMAGE_ROOTFS}/lib/modules/ 2>/dev/null | head
-n1)
+ if [ -n "$KERNEL_VER" ]; then
+ install -d
${IMAGE_ROOTFS}/lib/modules/$KERNEL_VER/build/scripts/dtc
+ install -m 0755
${STAGING_KERNEL_DIR}/scripts/dtc/dt_to_config
${IMAGE_ROOTFS}/lib/modules/$KERNEL_VER/build/scripts/dtc/dt_to_config
+ else
+ bbwarn "No kernel modules directory found in initramfs,
cannot install dt_to_config"
+ fi
+ else
+ bbwarn "dt_to_config script not found in kernel source"
+ fi
+}
Not in this form. we need a smarter version of dt_to_config that can
help pick the right kernel modules needed for initramfs. dt_to_config is
just one part of the puzzle. Context here is this: we would like to try
and transition default upstream defconfig to enable ramdisk by default
and then with the right modules in ramdisk switch over to the final
rootfs. if we install all the modules in ramdisk, ramdisk will be
unwieldy.. So need a smarter solution to the same.
We currently have the list coded in the machine configs. So we are only
included those. What does moving to this flow buy us? And it sounds
like this is more of a build time thing and not a boot time thing. So
this shouldn't be needed to be present in the initramfs, right? Or am I
still missing something?
--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19410):
https://lists.yoctoproject.org/g/meta-ti/message/19410
Mute This Topic: https://lists.yoctoproject.org/mt/117220879/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-