aboutsummaryrefslogtreecommitdiffstats
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 11:10:14 +0100
commit935b9d5a2bd12effad65f69a631ecff96b8bb553 (patch)
tree8fe0f8cb1a533a14052c08ecbd6919d2c452ed22
parent1860d9d3c62e2e94cd68a809385873ffd8270b6d (diff)
downloadopenembedded-core-contrib-935b9d5a2bd12effad65f69a631ecff96b8bb553.tar.gz
openembedded-core-contrib-935b9d5a2bd12effad65f69a631ecff96b8bb553.tar.bz2
openembedded-core-contrib-935b9d5a2bd12effad65f69a631ecff96b8bb553.zip
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} 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 7ce64fd19ff..0045cec819e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -229,8 +229,6 @@ copy_initramfs() {
echo "Finished copy of initramfs into ./usr"
}
-INITRAMFS_BASE_NAME ?= "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
-INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
do_bundle_initramfs () {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
echo "Creating a kernel image with a bundled initramfs..."
@@ -673,6 +671,10 @@ MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz"
MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
MODULE_TARBALL_DEPLOY ?= "1"
+INITRAMFS_BASE_NAME ?= "initramfs-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
+INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
+INITRAMFS_SYMLINK_NAME ?= "initramfs-${MACHINE}"
+
kernel_do_deploy() {
deployDir="${DEPLOYDIR}"
if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then
@@ -697,17 +699,14 @@ kernel_do_deploy() {
ln -sf ${base_name}.bin $deployDir/${type}
done
- cd ${B}
- # Update deploy directory
- for type in ${KERNEL_IMAGETYPES} ; do
- if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
- echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
+ if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+ for type in ${KERNEL_IMAGETYPES} ; do
initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
- initramfs_symlink_name=${type}-initramfs-${MACHINE}
+ initramfs_symlink_name=${type}-${INITRAMFS_SYMLINK_NAME}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin
ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
- fi
- done
+ done
+ fi
}
do_deploy[cleandirs] = "${DEPLOYDIR}"
do_deploy[dirs] = "${DEPLOYDIR} ${B}"