From: Ming Liu <[email protected]> Introduce KERNEL_INITRAMFS_BUNDLE_TYPES and KERNEL_INITRAMFS_FIT_TYPES variables that a end user could override them easily in local.conf.
Drop the hard-coded initramfs image names, no functional changes. Signed-off-by: Ming Liu <[email protected]> --- meta/classes/kernel-artifact-names.bbclass | 3 +++ meta/classes/kernel-fitimage.bbclass | 2 +- meta/classes/kernel.bbclass | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/classes/kernel-artifact-names.bbclass b/meta/classes/kernel-artifact-names.bbclass index bbeecba..63fdbbd 100644 --- a/meta/classes/kernel-artifact-names.bbclass +++ b/meta/classes/kernel-artifact-names.bbclass @@ -16,3 +16,6 @@ MODULE_TARBALL_DEPLOY ?= "1" INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" + +KERNEL_INITRAMFS_BUNDLE_TYPES ?= "cpio cpio.gz cpio.lz4 cpio.lzma cpio.lzo cpio.xz" +KERNEL_INITRAMFS_FIT_TYPES ?= "cpio cpio.gz cpio.lz4 cpio.lzma cpio.lzo cpio.xz ext2.gz" diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index ec18a3d..386115a 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass @@ -412,7 +412,7 @@ fitimage_assemble() { # if [ "x${ramdiskcount}" = "x1" ] ; then # Find and use the first initramfs image archive type we find - for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do + for img in ${KERNEL_INITRAMFS_FIT_TYPES}; do initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}" echo "Using $initramfs_path" if [ -e "${initramfs_path}" ]; then diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 750988f..3f1fa4e 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -199,7 +199,7 @@ copy_initramfs() { mkdir -p ${B}/usr # Find and use the first initramfs image archive type we find rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio - for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do + for img in ${KERNEL_INITRAMFS_BUNDLE_TYPES}; do if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" ]; then cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/. case $img in -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
