Patchwork kernel.bbclass: allow customization of initramfs image symlink name

login
register
mail settings
Submitter Michaël Burtin
Date Nov. 28, 2013, 11:10 a.m.
Message ID <1385637002-15201-1-git-send-email-michael.burtin@innotis.org>
Download mbox | patch
Permalink /patch/62529/
State New
Headers show

Comments

Michaël Burtin - Nov. 28, 2013, 11:10 a.m.
Allow customization of symlink created when kernel contains an initramfs
image using INITRAMFS_SYMLINK_NAME variable.
---
 meta/classes/kernel.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 4974507..2ceb176 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -118,6 +118,7 @@  copy_initramfs() {
 }
 
 INITRAMFS_BASE_NAME = "${KERNEL_IMAGETYPE}-initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
+INITRAMFS_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-initramfs-${MACHINE}"
 INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
 do_bundle_initramfs () {
 	if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
@@ -474,7 +475,7 @@  kernel_do_deploy() {
 	if [ -e "${KERNEL_OUTPUT}.initramfs" ]; then
 		echo "Copying deploy kernel-initramfs image and setting up links..."
 		initramfs_base_name=${INITRAMFS_BASE_NAME}
-		initramfs_symlink_name=${KERNEL_IMAGETYPE}-initramfs-${MACHINE}
+		initramfs_symlink_name=${INITRAMFS_SYMLINK_NAME}
 		install -m 0644 ${KERNEL_OUTPUT}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
 		cd ${DEPLOYDIR}
 		ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin