summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorHerve Jourdain <herve.jourdain@neuf.fr>2016-07-29 15:27:59 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-10 10:46:33 +0100
commitd90eaa8518abc294aa072c3267463fce3f940af6 (patch)
treeadf3f7ab55e0620cc2f0733e76cc950231990164 /meta/recipes-kernel
parenta960d9b40129394e98924481ba84a005fbe1dce1 (diff)
downloadpoky-d90eaa8518abc294aa072c3267463fce3f940af6.tar.gz
linux-dtb.inc: Support for .dtbo files for dtb overlays
(From OE-Core rev: 831207ee8fa6fedd6080191bb77a871b0f33e1c1) Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr> Signed-off-by: Khem Raj <raj.khem@gmail.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.inc18
1 files changed, 11 insertions, 7 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index 74f5ef8ca8..8528d646dd 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -33,12 +33,13 @@ do_compile_append() {
33do_install_append() { 33do_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_EXT=${DTB##*.}
37 DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
37 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do 38 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
38 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} 39 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
39 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 40 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
40 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` 41 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
41 install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb 42 install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
42 done 43 done
43 done 44 done
44} 45}
@@ -46,7 +47,8 @@ do_install_append() {
46do_deploy_append() { 47do_deploy_append() {
47 for DTB in ${KERNEL_DEVICETREE}; do 48 for DTB in ${KERNEL_DEVICETREE}; do
48 DTB=`normalize_dtb "${DTB}"` 49 DTB=`normalize_dtb "${DTB}"`
49 DTB_BASE_NAME=`basename ${DTB} .dtb` 50 DTB_EXT=${DTB##*.}
51 DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
50 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do 52 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
51 base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME} 53 base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME}
52 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} 54 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
@@ -54,8 +56,8 @@ do_deploy_append() {
54 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 56 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
55 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` 57 DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
56 install -d ${DEPLOYDIR} 58 install -d ${DEPLOYDIR}
57 install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb 59 install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT}
58 ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb 60 ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT}
59 done 61 done
60 done 62 done
61} 63}
@@ -65,9 +67,10 @@ pkg_postinst_kernel-devicetree () {
65 for DTB in ${KERNEL_DEVICETREE}; do 67 for DTB in ${KERNEL_DEVICETREE}; do
66 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do 68 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
67 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} 69 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
70 DTB_EXT=${DTB##*.}
68 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'` 71 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
69 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 72 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 73 update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
71 done 74 done
72 done 75 done
73} 76}
@@ -77,9 +80,10 @@ pkg_postrm_kernel-devicetree () {
77 for DTB in ${KERNEL_DEVICETREE}; do 80 for DTB in ${KERNEL_DEVICETREE}; do
78 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do 81 for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
79 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} 82 symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
83 DTB_EXT=${DTB##*.}
80 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'` 84 DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
81 DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 85 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 86 update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
83 done 87 done
84 done 88 done
85} 89}