kernel: introduce two convenient variables
PATCH 1/1 kernel: introduce two convenient variables
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(-)
meta/classes/kernel-artifact-names.bbclass +3 -0
@@ -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"
meta/classes/kernel-fitimage.bbclass +1 -1
@@ -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
meta/classes/kernel.bbclass +1 -1
@@ -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
Signature · 1 line
2.7.4