kernel-devicetree.bbclass: replace KERNEL_IMAGETYPE_FOR_MAKE with KERNEL_IMAGETYPE
PATCH 1/1 kernel-devicetree.bbclass: replace KERNEL_IMAGETYPE_FOR_MAKE with KERNEL_IMAGETYPE
From: Ming Liu <[email protected]>
It should be KERNEL_IMAGETYPE rather than KERNEL_IMAGETYPE_FOR_MAKE to be handled in do_install and do_deploy tasks, since we are having some special logic in kernel-uimage.bbclass and kernel-fitimage.bbclass to replace the real kernel image types during do_compile, like:
in kernel-uimage.bbclass: uImage -> vmlinux
in kernel-fitimage.bbclass: fitImage -> Image/bzImage/zImage...
but the final images to be installed/deployed should still be uImage or fitImage.
--- meta/classes/kernel-devicetree.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/kernel-devicetree.bbclass +2 -2
@@ -63,7 +63,7 @@ do_install_append() { DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + for type in ${KERNEL_IMAGETYPE}; do symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` ln -sf ${DTB_BASE_NAME}.${DTB_EXT} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
@@ -82,7 +82,7 @@ do_deploy_append() { DTB=`normalize_dtb "${DTB}"` DTB_EXT=${DTB##*.} DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + for type in ${KERNEL_IMAGETYPE}; do base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME} symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} DTB_NAME=`echo ${base_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
Signature · 1 line
2.7.4
Quoted 3 lines · On Thu, May 31, 2018 at 1:55 AM, <[email protected]> wrote:
From: Ming Liu <[email protected]>
It should be
KERNEL_IMAGETYPErather thanKERNEL_IMAGETYPE_FOR_MAKEto
KERNEL_IMAGETYPE is a legacy variable, in the process of being replaced by KERNEL_IMAGETYPES. You should probably use the new variable if possible.
Quoted 44 lines
be handled in
do_installanddo_deploytasks, since we are having some special logic in kernel-uimage.bbclass and kernel-fitimage.bbclass to replace the real kernel image types duringdo_compile, like:
in kernel-uimage.bbclass: uImage -> vmlinux
in kernel-fitimage.bbclass: fitImage -> Image/bzImage/zImage...but the final images to be installed/deployed should still be uImage or fitImage.
Signed-off-by Ming Liu <[email protected]>--- meta/classes/kernel-devicetree.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/classes/kernel-devicetree.bbclass +2
-3@@ -63,7 +63,7 @@ do_install_append() { DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + for type in ${KERNEL_IMAGETYPE}; do symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` ln -sf ${DTB_BASE_NAME}.${DTB_EXT} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}@@ -82,7 +82,7 @@ do_deploy_append() { DTB=`normalize_dtb "${DTB}"` DTB_EXT=${DTB##*.} DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + for type in ${KERNEL_IMAGETYPE}; do base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME} symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} DTB_NAME=`echo ${base_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` --2.7.4
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hi, Andre:
Thanks for the review, will do that.
//Ming Liu
2018-05-31 20:00 GMT+02:00 Andre McCurdy <[email protected]>:
Quoted 61 lines · On Thu, May 31, 2018 at 1:55 AM, <[email protected]> wrote:
Quoted 3 lines
From: Ming Liu <[email protected]>
It should be
KERNEL_IMAGETYPErather thanKERNEL_IMAGETYPE_FOR_MAKEto
KERNEL_IMAGETYPEis a legacy variable, in the process of being replaced byKERNEL_IMAGETYPES. You should probably use the new variable if possible.Quoted 9 lines
be handled in
do_installanddo_deploytasks, since we are having some special logic in kernel-uimage.bbclass and kernel-fitimage.bbclass to replace the real kernel image types duringdo_compile, like:
in kernel-uimage.bbclass: uImage -> vmlinux
in kernel-fitimage.bbclass: fitImage -> Image/bzImage/zImage...but the final images to be installed/deployed should still be uImage or fitImage.
Review
Quoted 6 lines
Signed-off-by Ming Liu <[email protected]>--- meta/classes/kernel-devicetree.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/meta/classes/kernel-devicetree.bbclass
meta/classes/kernel-devicetree.bbclass do_install_append() { · line 65
Quoted 7 lines
index 4f80cc6..04e6321 100644
meta/classes/kernel-devicetree.bbclass +0
-0@@ -63,7 +63,7 @@ do_install_append() { DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT}
meta/classes/kernel-devicetree.bbclass do_install_append() {
Quoted 3 lines
meta/classes/kernel-devicetree.bbclass +1
-1- for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + for type in ${KERNEL_IMAGETYPE}; do symlink_name=${type}"-"${
KERNEL_IMAGE_SYMLINK_NAME}meta/classes/kernel-devicetree.bbclass do_install_append() { · line 68
Quoted 1 line
meta/classes/kernel-devicetree.bbclass +0
-0DTB_SYMLINK_NAME=`echo ${symlink_name} | sed"s/${MACHINE}/${DTB_BASE_NAME}/g"`
meta/classes/kernel-devicetree.bbclass do_install_append() { · line 69
Quoted 1 line
meta/classes/kernel-devicetree.bbclass +0
-0ln -sf ${DTB_BASE_NAME}.${DTB_EXT}${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
meta/classes/kernel-devicetree.bbclass do_deploy_append() { · line 87
Quoted 8 lines
meta/classes/kernel-devicetree.bbclass +1
-1@@ -82,7 +82,7 @@ do_deploy_append() { DTB=`normalize_dtb "${DTB}"` DTB_EXT=${DTB##*.} DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + for type in ${KERNEL_IMAGETYPE}; do base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME} symlink_name=${type}"-"${
KERNEL_IMAGE_SYMLINK_NAME}meta/classes/kernel-devicetree.bbclass do_deploy_append() { · line 88
Quoted 1 line
meta/classes/kernel-devicetree.bbclass +0
-0DTB_NAME=`echo ${base_name} | sed"s/${MACHINE}/${DTB_BASE_NAME}/g"`
Quoted 8 lines
--
2.7.4--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core