summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@microsoft.com>2021-12-20 13:58:23 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-22 23:11:45 +0000
commit65e8df66d9579b609791deb74d8e1b9ec17c1115 (patch)
tree38d39d5f4e2234ea73b268de5c60a355b26d60c3 /meta
parent9eb8c5195e622dffe53b3c25432afc4db4985477 (diff)
downloadpoky-65e8df66d9579b609791deb74d8e1b9ec17c1115.tar.gz
classes/kernel*: add variables to allow changing artifact extension
Allow .bin suffix to be removed (or changed) in the various artifact filenames. Removing this extension is useful when trying to remove symlinks and present only unversioned image files (especially for the FIT image). (From OE-Core rev: cbecc3cf06eb7359fedf3c6af281cc72178cad18) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-artifact-names.bbclass4
-rw-r--r--meta/classes/kernel-devicetree.bbclass12
-rw-r--r--meta/classes/kernel-fitimage.bbclass8
-rw-r--r--meta/classes/kernel.bbclass10
4 files changed, 19 insertions, 15 deletions
diff --git a/meta/classes/kernel-artifact-names.bbclass b/meta/classes/kernel-artifact-names.bbclass
index e1d943b2d5..e77107c893 100644
--- a/meta/classes/kernel-artifact-names.bbclass
+++ b/meta/classes/kernel-artifact-names.bbclass
@@ -8,16 +8,20 @@ inherit image-artifact-names
8 8
9KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 9KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
10KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 10KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
11KERNEL_ARTIFACT_BIN_EXT ?= ".bin"
11 12
12KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" 13KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
13KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 14KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
15KERNEL_IMAGE_BIN_EXT ?= "${KERNEL_ARTIFACT_BIN_EXT}"
14KERNEL_IMAGETYPE_SYMLINK ?= "1" 16KERNEL_IMAGETYPE_SYMLINK ?= "1"
15 17
16KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" 18KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
17KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 19KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
20KERNEL_DTB_BIN_EXT ?= "${KERNEL_ARTIFACT_BIN_EXT}"
18 21
19KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" 22KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
20KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 23KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
24KERNEL_FIT_BIN_EXT ?= "${KERNEL_ARTIFACT_BIN_EXT}"
21 25
22MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" 26MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
23MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 27MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
index c8aaf7458f..b4338da1b1 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -93,18 +93,18 @@ do_deploy:append() {
93 if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then 93 if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
94 cat ${D}/${KERNEL_IMAGEDEST}/$type \ 94 cat ${D}/${KERNEL_IMAGEDEST}/$type \
95 $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ 95 $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
96 > $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin 96 > $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT}
97 if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then 97 if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then
98 ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \ 98 ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} \
99 $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin 99 $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT}
100 fi 100 fi
101 if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then 101 if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
102 cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \ 102 cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \
103 $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ 103 $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
104 > $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin 104 > $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT}
105 if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then 105 if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then
106 ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \ 106 ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} \
107 $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin 107 $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT}
108 fi 108 fi
109 fi 109 fi
110 fi 110 fi
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 11dce67400..b0c971b0eb 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -727,9 +727,9 @@ kernel_do_deploy:append() {
727 fi 727 fi
728 728
729 echo "Copying linux.bin file..." 729 echo "Copying linux.bin file..."
730 install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin 730 install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}
731 if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then 731 if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
732 ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" 732 ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}"
733 fi 733 fi
734 fi 734 fi
735 735
@@ -742,9 +742,9 @@ kernel_do_deploy:append() {
742 742
743 if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then 743 if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then
744 echo "Copying fitImage-${INITRAMFS_IMAGE} file..." 744 echo "Copying fitImage-${INITRAMFS_IMAGE} file..."
745 install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin" 745 install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}"
746 if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then 746 if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
747 ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" 747 ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}"
748 fi 748 fi
749 fi 749 fi
750 fi 750 fi
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 57990bd3b9..5d709400f7 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -768,12 +768,12 @@ kernel_do_deploy() {
768 768
769 for imageType in ${KERNEL_IMAGETYPES} ; do 769 for imageType in ${KERNEL_IMAGETYPES} ; do
770 baseName=$imageType-${KERNEL_IMAGE_NAME} 770 baseName=$imageType-${KERNEL_IMAGE_NAME}
771 install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName.bin 771 install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT}
772 if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then 772 if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then
773 ln -sf $baseName.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}.bin 773 ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT}
774 fi 774 fi
775 if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then 775 if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
776 ln -sf $baseName.bin $deployDir/$imageType 776 ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType
777 fi 777 fi
778 done 778 done
779 779
@@ -798,9 +798,9 @@ kernel_do_deploy() {
798 continue 798 continue
799 fi 799 fi
800 initramfsBaseName=$imageType-${INITRAMFS_NAME} 800 initramfsBaseName=$imageType-${INITRAMFS_NAME}
801 install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$initramfsBaseName.bin 801 install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$initramfsBaseName${KERNEL_IMAGE_BIN_EXT}
802 if [ -n "${INITRAMFS_LINK_NAME}" ] ; then 802 if [ -n "${INITRAMFS_LINK_NAME}" ] ; then
803 ln -sf $initramfsBaseName.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}.bin 803 ln -sf $initramfsBaseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT}
804 fi 804 fi
805 done 805 done
806 fi 806 fi