diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2018-07-09 15:04:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-10 17:33:00 +0100 |
commit | c159b6249a61211d9fa0ec9ac9ac426cf71b9a5e (patch) | |
tree | 5a0cac42d898a010e94d78644d1b02eb4ff3aab1 | |
parent | c5b70d7155a76b727400db225c446d1b2f7072a6 (diff) | |
download | poky-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.bbclass | 19 |
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 | ||
232 | INITRAMFS_BASE_NAME ?= "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}" | ||
233 | INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME" | ||
234 | do_bundle_initramfs () { | 232 | do_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" | |||
673 | MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" | 671 | MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" |
674 | MODULE_TARBALL_DEPLOY ?= "1" | 672 | MODULE_TARBALL_DEPLOY ?= "1" |
675 | 673 | ||
674 | INITRAMFS_BASE_NAME ?= "initramfs-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" | ||
675 | INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME" | ||
676 | INITRAMFS_SYMLINK_NAME ?= "initramfs-${MACHINE}" | ||
677 | |||
676 | kernel_do_deploy() { | 678 | kernel_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 | } |
712 | do_deploy[cleandirs] = "${DEPLOYDIR}" | 711 | do_deploy[cleandirs] = "${DEPLOYDIR}" |
713 | do_deploy[dirs] = "${DEPLOYDIR} ${B}" | 712 | do_deploy[dirs] = "${DEPLOYDIR} ${B}" |