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)
downloadpoky-0437a59e3c298d40aaa96af09b80bff8fcbe292d.tar.gz
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() {
34 for DTB in ${KERNEL_DEVICETREE}; do 34 for DTB in ${KERNEL_DEVICETREE}; do
35 DTB=`normalize_dtb "${DTB}"` 35 DTB=`normalize_dtb "${DTB}"`
36 DTB_BASE_NAME=`basename ${DTB} .dtb` 36 DTB_BASE_NAME=`basename ${DTB} .dtb`
37 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 37 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
38 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` 38 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
39 install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb 39 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
40 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
41 install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
42 done
40 done 43 done
41} 44}
42 45
@@ -44,31 +47,39 @@ do_deploy_append() {
44 for DTB in ${KERNEL_DEVICETREE}; do 47 for DTB in ${KERNEL_DEVICETREE}; do
45 DTB=`normalize_dtb "${DTB}"` 48 DTB=`normalize_dtb "${DTB}"`
46 DTB_BASE_NAME=`basename ${DTB} .dtb` 49 DTB_BASE_NAME=`basename ${DTB} .dtb`
47 DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 50 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
48 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 51 base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME}
49 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` 52 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
50 install -d ${DEPLOYDIR} 53 DTB_NAME=`echo ${base_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
51 install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb 54 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
52 ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb 55 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
56 install -d ${DEPLOYDIR}
57 install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
58 ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
59 done
53 done 60 done
54} 61}
55 62
56pkg_postinst_kernel-devicetree () { 63pkg_postinst_kernel-devicetree () {
57 cd /${KERNEL_IMAGEDEST} 64 cd /${KERNEL_IMAGEDEST}
58 for DTB in ${KERNEL_DEVICETREE} 65 for DTB in ${KERNEL_DEVICETREE}; do
59 do 66 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
60 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'` 67 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
61 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 68 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
62 update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true 69 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
70 update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
71 done
63 done 72 done
64} 73}
65 74
66pkg_postrm_kernel-devicetree () { 75pkg_postrm_kernel-devicetree () {
67 cd /${KERNEL_IMAGEDEST} 76 cd /${KERNEL_IMAGEDEST}
68 for DTB in ${KERNEL_DEVICETREE} 77 for DTB in ${KERNEL_DEVICETREE}; do
69 do 78 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
70 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'` 79 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
71 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 80 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
72 update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true 81 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
82 update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
83 done
73 done 84 done
74} 85}