[3/5] kernel.bbclass: eliminate (initramfs_)symlink_name variables

Submitted by Martin Jansa on Sept. 16, 2020, 12:54 p.m. | Patch ID: 176564

Details

Message ID 20200916125449.1564380-3-Martin.Jansa@gmail.com
State Accepted
Commit 22874b43de45e86418f683eb9d4394d7a8a08033
Headers show

Commit Message

Martin Jansa Sept. 16, 2020, 12:54 p.m.
* they are used only once, we can use the value directly
* notice that .bin extension isn't part of the variable values

[YOCTO #12937]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 10e734a19e..fbd2959341 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -718,8 +718,7 @@  kernel_do_deploy() {
 	for imageType in ${KERNEL_IMAGETYPES} ; do
 		base_name=$imageType-${KERNEL_IMAGE_NAME}
 		install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$base_name.bin
-		symlink_name=$imageType-${KERNEL_IMAGE_LINK_NAME}
-		ln -sf $base_name.bin $deployDir/$symlink_name.bin
+		ln -sf $base_name.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}.bin
 		ln -sf $base_name.bin $deployDir/$imageType
 	done
 
@@ -742,9 +741,8 @@  kernel_do_deploy() {
 				continue
 			fi
 			initramfs_base_name=$imageType-${INITRAMFS_NAME}
-			initramfs_symlink_name=$imageType-${INITRAMFS_LINK_NAME}
 			install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$initramfs_base_name.bin
-			ln -sf $initramfs_base_name.bin $deployDir/$initramfs_symlink_name.bin
+			ln -sf $initramfs_base_name.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}.bin
 		done
 	fi
 }