diff options
author | He Zhe <zhe.he@windriver.com> | 2016-05-25 11:47:16 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-11-04 05:22:07 +0300 |
commit | fe76b1ec0b5413620968e9c9f8bcb2ad24730758 (patch) | |
tree | 1b24c4fd0ca9920576a8a1c0b873586baafe7af4 /import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass | |
parent | 80c99333ffad81f6d85bfa297f78f15c3b4a6b8c (diff) | |
download | openbmc-fe76b1ec0b5413620968e9c9f8bcb2ad24730758.tar.xz |
kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.
KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE work as before.
(From OE-Core rev: 849b67b2e4820564b5e5c9bd4bb293c44351c5f3)
Change-Id: I23e413e3c950f6daed923c69b882993a214dd49c
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Rick Altherr <raltherr@google.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass')
-rw-r--r-- | import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass index e5b75edf5..7e6ea98ff 100644 --- a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass +++ b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass @@ -1,8 +1,8 @@ inherit kernel-uboot python __anonymous () { - kerneltype = d.getVar('KERNEL_IMAGETYPE', True) - if kerneltype == 'fitImage': + kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or "" + if 'fitImage' in kerneltypes.split(): depends = d.getVar("DEPENDS", True) depends = "%s u-boot-mkimage-native dtc-native" % depends d.setVar("DEPENDS", depends) @@ -10,7 +10,9 @@ 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 "" + if 'fitImage' in typeformake.split(): + d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', 'zImage')) image = d.getVar('INITRAMFS_IMAGE', True) if image: @@ -154,7 +156,7 @@ EOF } do_assemble_fitimage() { - if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then kernelcount=1 dtbcount="" rm -f fit-image.its @@ -218,14 +220,14 @@ addtask assemble_fitimage before do_install after do_compile kernel_do_deploy[vardepsexclude] = "DATETIME" kernel_do_deploy_append() { # Update deploy directory - if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then + if echo ${KERNEL_IMAGETYPES} | grep -wq "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} |