summaryrefslogtreecommitdiff
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2016-05-25 04:47:16 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-30 09:30:30 +0100
commit849b67b2e4820564b5e5c9bd4bb293c44351c5f3 (patch)
tree41a83ed3ff34e8e9c7c8effbbc09b666fa971ee7 /meta/recipes-kernel
parentfb3457a454b045abf1fa6b560b8f96257a4405c1 (diff)
downloadopenembedded-core-849b67b2e4820564b5e5c9bd4bb293c44351c5f3.tar.gz
openembedded-core-849b67b2e4820564b5e5c9bd4bb293c44351c5f3.tar.bz2
openembedded-core-849b67b2e4820564b5e5c9bd4bb293c44351c5f3.zip
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. Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc49
1 files changed, 30 insertions, 19 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index 651a19e4ae..74f5ef8ca8 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -34,9 +34,12 @@ do_install_append() {
for DTB in ${KERNEL_DEVICETREE}; do
DTB=`normalize_dtb "${DTB}"`
DTB_BASE_NAME=`basename ${DTB} .dtb`
- DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
- install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
+ for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
+ symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
+ DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+ DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
+ install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
+ done
done
}
@@ -44,31 +47,39 @@ do_deploy_append() {
for DTB in ${KERNEL_DEVICETREE}; do
DTB=`normalize_dtb "${DTB}"`
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"`
- DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
- install -d ${DEPLOYDIR}
- install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
- ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
+ for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; 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"`
+ DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+ DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
+ install -d ${DEPLOYDIR}
+ install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
+ ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
+ done
done
}
pkg_postinst_kernel-devicetree () {
cd /${KERNEL_IMAGEDEST}
- for DTB in ${KERNEL_DEVICETREE}
- do
- DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
- DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+ for DTB in ${KERNEL_DEVICETREE}; do
+ for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
+ symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
+ DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
+ DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+ done
done
}
pkg_postrm_kernel-devicetree () {
cd /${KERNEL_IMAGEDEST}
- for DTB in ${KERNEL_DEVICETREE}
- do
- DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
- DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+ for DTB in ${KERNEL_DEVICETREE}; do
+ for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
+ symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
+ DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
+ DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+ update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+ done
done
}