Yocto Bug #6945
v2 cover Yocto Bug #6945
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define KERNEL_IMAGETYPE as a list.
- Modify wherever reference KERNEL_IMAGETYPE accordingly.
- Pass mkimage in sysroot to kernel makefile by NATIVE_MKIMAGE to avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-core
He Zhe (2):
kernel: Define KERNEL_IMAGETYPE as a list
kernel: Pass sysroot mkimage to kernel makefile
meta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)
Signature · 1 line
2.1.0
PATCH v2 1/2 kernel: Define KERNEL_IMAGETYPE as a list
From: He Zhe <[email protected]>
To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define KERNEL_IMAGETYPE as a list.
Modify wherever reference KERNEL_IMAGETYPE accordingly.
Fixes [YOCTO #6945].
--- meta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 125 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 174 insertions(+), 80 deletions(-)
meta/classes/image_types.bbclass +5 -1
@@ -4,6 +4,10 @@ # set this value to 2048 (2MiB alignment). IMAGE_ROOTFS_ALIGNMENT ?= "1" +python __anonymous () { + d.setVar('KERNEL_IMAGETYPE_0', d.getVar('KERNEL_IMAGETYPE', True).strip().split(' ')[0]) +} + def imagetypes_getdepends(d): def adddep(depstr, deps): for i in (depstr or "").split():
@@ -86,7 +90,7 @@ IMAGE_CMD_cpio () { fi } -ELF_KERNEL ?= "${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE}" +ELF_KERNEL ?= "${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE_0}" ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console=" IMAGE_CMD_elf () {
meta/classes/kernel-fitimage.bbclass +13 -9
@@ -1,8 +1,8 @@ inherit kernel-uboot python __anonymous () { - kerneltype = d.getVar('KERNEL_IMAGETYPE', True) - if kerneltype == 'fitImage': + kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or "" + if 'fitImage' in kerneltype.strip().split(' '): depends = d.getVar("DEPENDS", True) depends = "%s u-boot-mkimage-native dtc-native" % depends d.setVar("DEPENDS", depends)
@@ -10,7 +10,11 @@ python __anonymous () { # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal # to kernel.bbclass . We have to override it, since we pack zImage # (at least for now) into the fitImage . - d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage") + typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or "" + list = typeformake.strip().split(' ') + if 'fitImage' in list: + list.remove('fitImage') + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', ' '.join(list)) image = d.getVar('INITRAMFS_IMAGE', True) if image:
@@ -154,7 +158,7 @@ EOF } do_assemble_fitimage() { - if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then + if test "x${KERNEL_IMAGETYPE}" != "x${KERNEL_IMAGETYPE//fitImage/}" ; then kernelcount=1 dtbcount="" rm -f fit-image.its
@@ -217,14 +221,14 @@ addtask assemble_fitimage before do_install after do_compile kernel_do_deploy_append() { # Update deploy directory - if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then + if test "x${KERNEL_IMAGETYPE}" != "x${KERNEL_IMAGETYPE//fitImage/}" ; then cd ${B} echo "Copying fit-image.its source file..." - its_base_name="${KERNEL_IMAGETYPE}-its-${PV}-${PR}-${MACHINE}-${DATETIME}" - its_symlink_name=${KERNEL_IMAGETYPE}-its-${MACHINE} + its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}" + its_symlink_name=fitImage-its-${MACHINE} install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its - linux_bin_base_name="${KERNEL_IMAGETYPE}-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}" - linux_bin_symlink_name=${KERNEL_IMAGETYPE}-linux.bin-${MACHINE} + linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}" + linux_bin_symlink_name=fitImage-linux.bin-${MACHINE} install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin cd ${DEPLOYDIR}
meta/classes/kernel-grub.bbclass +32 -15
85 lines not on this page · raw message
meta/classes/kernel-uimage.bbclass +20 -11
@@ -1,24 +1,33 @@ inherit kernel-uboot python __anonymous () { - kerneltype = d.getVar('KERNEL_IMAGETYPE', True) - if kerneltype == 'uImage': + if "uImage" in (d.getVar('KERNEL_IMAGETYPE', True) or "").strip().split(' '): depends = d.getVar("DEPENDS", True) depends = "%s u-boot-mkimage-native" % depends d.setVar("DEPENDS", depends) - # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal - # to kernel.bbclass . We override the variable here, since we need - # to build uImage using the kernel build system if and only if - # KEEPUIMAGE == yes. Otherwise, we pack compressed vmlinux into - # the uImage . - if d.getVar("KEEPUIMAGE", True) != 'yes': - d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage") + # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal + # to kernel.bbclass . We override the variable here, since we need + # to build uImage using the kernel build system if and only if + # KEEPUIMAGE == yes. Otherwise, we pack compressed vmlinux into + # the uImage . + if d.getVar("KEEPUIMAGE", True) != 'yes': + typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or "" + list = typeformake.strip().split(' ') + if 'uImage' in list: + list.remove('uImage') + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', ' '.join(list)) } do_uboot_mkimage() { - if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then - if test "x${KEEPUIMAGE}" != "xyes" ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then + for type in ${KERNEL_IMAGETYPE} ; do + if test "x${type}" = "xuImage" ; then + found=1 + fi + done + + if test found = 1 ; then uboot_prep_kimage ENTRYPOINT=${UBOOT_ENTRYPOINT}
meta/classes/kernel.bbclass +90 -35
199 lines not on this page · raw message
meta/conf/documentation.conf +1 -1
@@ -244,7 +244,7 @@ KBRANCH_DEFAULT[doc] = "Defines the Linux kernel source repository's default bra KERNEL_CLASSES[doc] = "A list of classes defining kernel image types that kernel class should inherit." KERNEL_EXTRA_ARGS[doc] = "Specifies additional make command-line arguments the OpenEmbedded build system passes on when compiling the kernel." KERNEL_FEATURES[doc] = "Includes additional metadata from the Yocto Project kernel Git repository. The metadata you add through this variable includes config fragments and features descriptions." -KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'." ++KERNEL_IMAGETYPE[doc] = "The list of types of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'." KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot" KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules" KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
meta/lib/oeqa/controllers/masterimage.py +1 -1
@@ -52,7 +52,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget): # test rootfs + kernel self.image_fstype = self.get_image_fstype(d) self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) - self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') + self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), (d.getVar("KERNEL_IMAGETYPE", False) or "").strip().split(' ')[0] + '-' + d.getVar('MACHINE', False) + '.bin') if not os.path.isfile(self.rootfs): # we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be # the same as the config with which the image was build, ie
meta/lib/oeqa/targetcontrol.py +1 -1
@@ -121,7 +121,7 @@ class QemuTarget(BaseTarget): self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime) self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype) - self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') + self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), (d.getVar("KERNEL_IMAGETYPE", False) or "").strip().split(' ')[0] + '-' + d.getVar('MACHINE', False) + '.bin') if d.getVar("DISTRO", True) == "poky-tiny": self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True),
meta/recipes-kernel/linux/linux-dtb.inc +10 -5
@@ -25,7 +25,8 @@ do_install_append() { DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` fi DTB_BASE_NAME=`basename ${DTB} .dtb` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + IMAGE_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | awk -F " " '{print $1}'` + DTB_SYMLINK_NAME=`echo ${IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" if [ ! -e "${DTB_PATH}" ]; then DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
@@ -43,8 +44,10 @@ do_deploy_append() { DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` fi DTB_BASE_NAME=`basename ${DTB} .dtb` - DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + IMAGE_BASE_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | awk -F " " '{print $1}'` + DTB_NAME=`echo ${IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + IMAGE_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | awk -F " " '{print $1}'` + DTB_SYMLINK_NAME=`echo ${IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" if [ ! -e "${DTB_PATH}" ]; then DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
@@ -63,7 +66,8 @@ pkg_postinst_kernel-devicetree () { for DTB_FILE in ${KERNEL_DEVICETREE} do DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + IMAGE_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | awk -F " " '{print $1}'` + DTB_SYMLINK_NAME=`echo ${IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true done }
@@ -73,7 +77,8 @@ pkg_postrm_kernel-devicetree () { for DTB_FILE in ${KERNEL_DEVICETREE} do DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + IMAGE_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | awk -F " " '{print $1}'` + DTB_SYMLINK_NAME=`echo ${IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true done }
scripts/test-remote-image +1 -1
@@ -139,7 +139,7 @@ class AutoTargetProfile(BaseTargetProfile): def __init__(self, image_type): super(AutoTargetProfile, self).__init__(image_type) self.image_name = get_bb_var('IMAGE_LINK_NAME', target=image_type) - self.kernel_type = get_bb_var('KERNEL_IMAGETYPE', target=image_type) + self.kernel_type = get_bb_var('KERNEL_IMAGETYPE', target=image_type).strip().split(' ')[0] self.controller = self.get_controller() self.set_kernel_file()
Signature · 1 line
2.1.0
Re: [PATCH v2 1/2] kernel: Define KERNEL_IMAGETYPE as a list
Quoted 11 lines · On Tue, Jul 21, 2015 at 12:23 AM, <[email protected]> wrote:
From: He Zhe <[email protected]>
To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
Modify wherever referenceKERNEL_IMAGETYPEaccordingly.Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected]>
Question, why not add KERNEL_IMAGETYPES, and make KERNEL_IMAGETYPE equal to your new KERNEL_IMAGETYPE_0?
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH v2 1/2] kernel: Define KERNEL_IMAGETYPE as a list
Quoted 10 lines · Christopher Larson
On Tue, Jul 21, 2015 at 12:23 AM, <[email protected] <mailto:[email protected]>>wrote:
From: He Zhe <[email protected] <mailto:[email protected]>>
To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
Quoted 6 lines
Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected] <mailto:[email protected]>>Question, why not add
KERNEL_IMAGETYPES, and makeKERNEL_IMAGETYPEequal to your newKERNEL_IMAGETYPE_0?
Adding a new KERNEL_IMAGETYPES will also work. But it should be better not to change the name of KERNEL_IMAGETYPE, so that those who have used it don't have to change their code.
Thank you for reviewing.
Zhe
Quoted 6 lines
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH v2 1/2] kernel: Define KERNEL_IMAGETYPE as a list
Quoted 16 lines · He Zhe
Quoted 15 lines · Christopher Larson
On Tue, Jul 21, 2015 at 12:23 AM, <[email protected] <mailto:[email protected]>>wrote:
From: He Zhe <[email protected] <mailto:[email protected]>>
To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
Modify wherever referenceKERNEL_IMAGETYPEaccordingly.Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected] <mailto:[email protected]>>
Quoted 7 lines
Quoted 1 line
Question, why not add
KERNEL_IMAGETYPES, and makeKERNEL_IMAGETYPEequal to your newKERNEL_IMAGETYPE_0?Adding a new
KERNEL_IMAGETYPESwill also work. But it should be better not to change the name ofKERNEL_IMAGETYPE, so that those who have used it don't have to change their code.Thank you for reviewing.
I have to agree with Chris here, keeping KERNEL_IMAGETYPE as used today and equivalent to KERNEL_IMAGETYPE_0 and adding KERNEL_IMAGETYPES does seem like a cleaner way to implement this.
Cheers,
Richard
Re: [PATCH v2 1/2] kernel: Define KERNEL_IMAGETYPE as a list
Quoted 17 lines · Richard Purdie
Quoted 16 lines · He Zhe
Quoted 15 lines · Christopher Larson
On Tue, Jul 21, 2015 at 12:23 AM, <[email protected] <mailto:[email protected]>>wrote:
From: He Zhe <[email protected] <mailto:[email protected]>>
To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
Modify wherever referenceKERNEL_IMAGETYPEaccordingly.Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected] <mailto:[email protected]>>Question, why not add
KERNEL_IMAGETYPES, and makeKERNEL_IMAGETYPEequal to your newKERNEL_IMAGETYPE_0?
Quoted 8 lines
Quoted 5 lines
Adding a new
KERNEL_IMAGETYPESwill also work. But it should be better not to change the name ofKERNEL_IMAGETYPE, so that those who have used it don't have to change their code.Thank you for reviewing.
I have to agree with Chris here, keeping
KERNEL_IMAGETYPEas used today and equivalent toKERNEL_IMAGETYPE_0and addingKERNEL_IMAGETYPESdoes seem like a cleaner way to implement this.
But it might mean we are going to check both KERNEL_IMAGETYPE and KERNEL_IMAGETYPES to generate final image type list. Is that OK?
Thanks,
Zhe
Quoted 8 lines
Cheers,
Richard
Re: [PATCH v2 1/2] kernel: Define KERNEL_IMAGETYPE as a list
Quoted 22 lines · He Zhe
Quoted 21 lines · Richard Purdie
Quoted 20 lines · He Zhe
Quoted 9 lines · Christopher Larson
On Tue, Jul 21, 2015 at 12:23 AM, <[email protected] <mailto:[email protected]>>wrote:
From: He Zhe <[email protected] <mailto:[email protected]>>
To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
Modify wherever referenceKERNEL_IMAGETYPEaccordingly.Quoted 6 lines
Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected] <mailto:[email protected]>>Question, why not add
KERNEL_IMAGETYPES, and makeKERNEL_IMAGETYPEequal to your newKERNEL_IMAGETYPE_0?Adding a new
KERNEL_IMAGETYPESwill also work. But it should be better not to change the name ofKERNEL_IMAGETYPE, so that those who have used it don't have to change their code.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Thank you for reviewing.
I have to agree with Chris here, keeping
KERNEL_IMAGETYPEas used today and equivalent toKERNEL_IMAGETYPE_0and addingKERNEL_IMAGETYPESdoes seem like a cleaner way to implement this.But it might mean we are going to check both
KERNEL_IMAGETYPEandKERNEL_IMAGETYPESto generate final image type list. Is that OK?
Well, in some places you will use one and in some places you'll use the other, that is unavoidable.
I much prefer "KERNEL_IMAGETYPE and KERNEL_IMAGETYPES" to "KERNEL_IMAGETYPE_0 and KERNEL_IMAGETYPE" as variable names though.
Cheers,
Richard
PATCH v2 2/2 kernel: Pass sysroot mkimage to kernel makefile
In reply to [email protected]From: He Zhe <[email protected]>
Pass mkimage in sysroot to kernel makefile by NATIVE_MKIMAGE to avoid depending on build machine's when KEEPUIMAGE is "yes".
Fixes [YOCTO #6945].
--- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
@@ -141,7 +141,7 @@ UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" # Some Linux kernel configurations need additional parameters on the command line -KERNEL_EXTRA_ARGS ?= "" +KERNEL_EXTRA_ARGS ?= "NATIVE_MKIMAGE=${STAGING_BINDIR_NATIVE}/mkimage" # For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. # We don't want to override kernel Makefile variables from the environment
Signature · 1 line
2.1.0
Re: [PATCH v2 2/2] kernel: Pass sysroot mkimage to kernel makefile
Quoted 17 lines · On Tue, 2015-07-21 at 15:23 +0800, [email protected] wrote:
From: He Zhe <[email protected]>
Pass mkimage in sysroot to kernel makefile by
NATIVE_MKIMAGEto avoid depending on build machine's when KEEPUIMAGE is "yes".Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected]>--- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/kernel.bbclass +0
-0
meta/classes/kernel.bbclass UBOOT_ENTRYPOINT ?= "20008000" · line 147
Quoted 8 lines
meta/classes/kernel.bbclass +1
-1@@ -141,7 +141,7 @@ UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" # Some Linux kernel configurations need additional parameters on the command line -KERNEL_EXTRA_ARGS ?= "" +KERNEL_EXTRA_ARGS ?= "NATIVE_MKIMAGE=${STAGING_BINDIR_NATIVE}/mkimage" # For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. # We don't want to override kernel Makefile variables from the environment
${STAGING_BINDIR_NATIVE} should be in PATH ahead of the usual system paths. Why therefore is this necessary? Is something resetting PATH?
Cheers,
Richard
Re: [PATCH v2 2/2] kernel: Pass sysroot mkimage to kernel makefile
Quoted 20 lines · Richard Purdie
Quoted 19 lines · On Tue, 2015-07-21 at 15:23 +0800, [email protected] wrote:
From: He Zhe <[email protected]>
Pass mkimage in sysroot to kernel makefile by
NATIVE_MKIMAGEto avoid depending on build machine's when KEEPUIMAGE is "yes".Fixes [YOCTO #6945].
Signed-off-by He Zhe <[email protected]>--- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/kernel.bbclass +0
-0@@ -141,7 +141,7 @@ UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
Quoted 8 lines
meta/classes/kernel.bbclass UBOOT_ENTRYPOINT ?= "20008000" · line 147
Quoted 6 lines
meta/classes/kernel.bbclass +1
-1# Some Linux kernel configurations need additional parameters on the command line -KERNEL_EXTRA_ARGS ?= "" +KERNEL_EXTRA_ARGS ?= "NATIVE_MKIMAGE=${STAGING_BINDIR_NATIVE}/mkimage" # For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. # We don't want to override kernel Makefile variables from the environment${STAGING_BINDIR_NATIVE} should be in PATH ahead of the usual system paths. Why therefore is this necessary? Is something resetting PATH?
You are right. There's no need to modify KERNEL_EXTRA_ARGS. Actually I made a mistake when I verified mkimage... I'll delete this patch in next version. Thank you for reviewing.
BTW, what about [PATCH v2 1/2] ?
Zhe
Quoted 6 lines
Cheers,
Richard
Ping.
Quoted 26 lines · On 07/21/2015 03:23 PM, [email protected] wrote:
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
- Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
- Pass mkimage in sysroot to kernel makefile byNATIVE_MKIMAGEto avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-coreHe Zhe (2):
kernel: DefineKERNEL_IMAGETYPEas a list
kernel: Pass sysroot mkimage to kernel makefilemeta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)
Ping.
Quoted 29 lines · He Zhe
Ping.
Quoted 26 lines · On 07/21/2015 03:23 PM, [email protected] wrote:
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
- Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
- Pass mkimage in sysroot to kernel makefile byNATIVE_MKIMAGEto avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-coreHe Zhe (2):
kernel: DefineKERNEL_IMAGETYPEas a list
kernel: Pass sysroot mkimage to kernel makefilemeta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)
Ping.
Quoted 32 lines · He Zhe
Ping.
Quoted 29 lines · He Zhe
Ping.
Quoted 26 lines · On 07/21/2015 03:23 PM, [email protected] wrote:
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
- Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
- Pass mkimage in sysroot to kernel makefile byNATIVE_MKIMAGEto avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-coreHe Zhe (2):
kernel: DefineKERNEL_IMAGETYPEas a list
kernel: Pass sysroot mkimage to kernel makefilemeta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)
Ping.
Is there any comments on this?
Zhe
Quoted 35 lines · He Zhe
Ping.
Quoted 32 lines · He Zhe
Ping.
Quoted 29 lines · He Zhe
Ping.
Quoted 26 lines · On 07/21/2015 03:23 PM, [email protected] wrote:
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
- Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
- Pass mkimage in sysroot to kernel makefile byNATIVE_MKIMAGEto avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-coreHe Zhe (2):
kernel: DefineKERNEL_IMAGETYPEas a list
kernel: Pass sysroot mkimage to kernel makefilemeta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)
Quoted 3 lines · He Zhe
Ping.
Is there any comments on this?
I'm obviously ok with the patch in its current RFC status. It works and I've tested it in my tree (hence why I've been quiet on this one).
If it meets the style for merging into core, and that it doesn't break other layers we can't see .. I was hoping to hear from others.
Bruce
Quoted 40 lines
Zhe
Quoted 35 lines · He Zhe
Ping.
Quoted 32 lines · He Zhe
Ping.
Quoted 29 lines · He Zhe
Ping.
Quoted 26 lines · On 07/21/2015 03:23 PM, [email protected] wrote:
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
- Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
- Pass mkimage in sysroot to kernel makefile byNATIVE_MKIMAGEto avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-coreHe Zhe (2):
kernel: DefineKERNEL_IMAGETYPEas a list
kernel: Pass sysroot mkimage to kernel makefilemeta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)
Ping.
Quoted 57 lines · Bruce Ashfield
Quoted 3 lines · He Zhe
Ping.
Is there any comments on this?
I'm obviously ok with the patch in its current RFC status. It works and I've tested it in my tree (hence why I've been quiet on this one).
If it meets the style for merging into core, and that it doesn't break other layers we can't see .. I was hoping to hear from others.
Bruce
Quoted 40 lines
Zhe
Quoted 35 lines · He Zhe
Ping.
Quoted 32 lines · He Zhe
Ping.
Quoted 29 lines · He Zhe
Ping.
Quoted 26 lines · On 07/21/2015 03:23 PM, [email protected] wrote:
From: He Zhe <[email protected]>
- To support building packaging and installing multi types of kernel images, such as zImage uImage, at one time define
KERNEL_IMAGETYPEas a list.
- Modify wherever referenceKERNEL_IMAGETYPEaccordingly.
- Pass mkimage in sysroot to kernel makefile byNATIVE_MKIMAGEto avoid depending on build machine's, when KEEPUIMAGE is "yes".
- v2: update with the latest oe-coreHe Zhe (2):
kernel: DefineKERNEL_IMAGETYPEas a list
kernel: Pass sysroot mkimage to kernel makefilemeta/classes/image_types.bbclass | 6 +- meta/classes/kernel-fitimage.bbclass | 22 +++--- meta/classes/kernel-grub.bbclass | 47 ++++++++---- meta/classes/kernel-uimage.bbclass | 31 +++++--- meta/classes/kernel.bbclass | 127 ++++++++++++++++++++++--------- meta/conf/documentation.conf | 2 +- meta/lib/oeqa/controllers/masterimage.py | 2 +- meta/lib/oeqa/targetcontrol.py | 2 +- meta/recipes-kernel/linux/linux-dtb.inc | 15 ++-- scripts/test-remote-image | 2 +- 10 files changed, 175 insertions(+), 81 deletions(-)