summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2018-07-09 15:04:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-10 17:33:00 +0100
commitc159b6249a61211d9fa0ec9ac9ac426cf71b9a5e (patch)
tree5a0cac42d898a010e94d78644d1b02eb4ff3aab1
parentc5b70d7155a76b727400db225c446d1b2f7072a6 (diff)
downloadpoky-c159b6249a61211d9fa0ec9ac9ac426cf71b9a5e.tar.gz
kernel.bbclass: use the consistent naming schema for initramfs
* use INITRAMFS_BASE_NAME and INITRAMFS_SYMLINK_NAME variables, like other kernel artifacts are using * use "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" instead of "${PV}-${PR}-${MACHINE}-${DATETIME}" to be consistent with other files * allow to modify default symlink name with INITRAMFS_SYMLINK_NAME instead of currently used: initramfs_symlink_name=${type}-initramfs-${MACHINE} (From OE-Core rev: 935b9d5a2bd12effad65f69a631ecff96b8bb553) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/kernel.bbclass19
1 files changed, 9 insertions, 10 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 7ce64fd19f..0045cec819 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -229,8 +229,6 @@ copy_initramfs() {
229 echo "Finished copy of initramfs into ./usr" 229 echo "Finished copy of initramfs into ./usr"
230} 230}
231 231
232INITRAMFS_BASE_NAME ?= "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
233INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
234do_bundle_initramfs () { 232do_bundle_initramfs () {
235 if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then 233 if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
236 echo "Creating a kernel image with a bundled initramfs..." 234 echo "Creating a kernel image with a bundled initramfs..."
@@ -673,6 +671,10 @@ MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz"
673MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" 671MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
674MODULE_TARBALL_DEPLOY ?= "1" 672MODULE_TARBALL_DEPLOY ?= "1"
675 673
674INITRAMFS_BASE_NAME ?= "initramfs-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
675INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
676INITRAMFS_SYMLINK_NAME ?= "initramfs-${MACHINE}"
677
676kernel_do_deploy() { 678kernel_do_deploy() {
677 deployDir="${DEPLOYDIR}" 679 deployDir="${DEPLOYDIR}"
678 if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then 680 if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then
@@ -697,17 +699,14 @@ kernel_do_deploy() {
697 ln -sf ${base_name}.bin $deployDir/${type} 699 ln -sf ${base_name}.bin $deployDir/${type}
698 done 700 done
699 701
700 cd ${B} 702 if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
701 # Update deploy directory 703 for type in ${KERNEL_IMAGETYPES} ; do
702 for type in ${KERNEL_IMAGETYPES} ; do
703 if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
704 echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
705 initramfs_base_name=${type}-${INITRAMFS_BASE_NAME} 704 initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
706 initramfs_symlink_name=${type}-initramfs-${MACHINE} 705 initramfs_symlink_name=${type}-${INITRAMFS_SYMLINK_NAME}
707 install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin 706 install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin
708 ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin 707 ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
709 fi 708 done
710 done 709 fi
711} 710}
712do_deploy[cleandirs] = "${DEPLOYDIR}" 711do_deploy[cleandirs] = "${DEPLOYDIR}"
713do_deploy[dirs] = "${DEPLOYDIR} ${B}" 712do_deploy[dirs] = "${DEPLOYDIR} ${B}"