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 +} -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19404): https://lists.yoctoproject.org/g/meta-ti/message/19404 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]] -=-=-=-=-=-=-=-=-=-=-=-
