summaryrefslogtreecommitdiffstats
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 15:58:11 +0100
commit0437a59e3c298d40aaa96af09b80bff8fcbe292d (patch)
tree0f97feda6f977e4e4c837897313413347ee36273 /meta/recipes-kernel
parent077377e912ce3eabd4978b4246272665f8304b66 (diff)
downloadopenembedded-core-contrib-0437a59e3c298d40aaa96af09b80bff8fcbe292d.tar.gz
openembedded-core-contrib-0437a59e3c298d40aaa96af09b80bff8fcbe292d.tar.bz2
openembedded-core-contrib-0437a59e3c298d40aaa96af09b80bff8fcbe292d.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. (From OE-Core rev: 849b67b2e4820564b5e5c9bd4bb293c44351c5f3) 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>
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
}