[yocto] [PATCH 1/1] Support for .dtbo files for dtb overlays
Herve Jourdain
herve.jourdain at neuf.fr
Sat May 14 01:59:13 PDT 2016
Hi Khem,
OK, sorry for that.
V2 is coming.
Cheers,
Herve
-----Original Message-----
From: Khem Raj [mailto:raj.khem at gmail.com]
Sent: samedi 14 mai 2016 09:15
To: Herve Jourdain <herve.jourdain at neuf.fr>
Cc: yocto at yoctoproject.org
Subject: Re: [yocto] [PATCH 1/1] Support for .dtbo files for dtb overlays
That patch is ok, however you should have not changed the formatting. So
please send a v2 with original formatting preserved.
> On May 13, 2016, at 11:47 PM, Herve Jourdain <herve.jourdain at neuf.fr>
wrote:
>
> Signed-off-by: Herve Jourdain <herve.jourdain at neuf.fr>
> ---
> meta/recipes-kernel/linux/linux-dtb.inc | 66
> +++++++++++++++++----------------
> 1 file changed, 35 insertions(+), 31 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-dtb.inc
> b/meta/recipes-kernel/linux/linux-dtb.inc
> index 651a19e..44782d8 100644
> --- a/meta/recipes-kernel/linux/linux-dtb.inc
> +++ b/meta/recipes-kernel/linux/linux-dtb.inc
> @@ -31,44 +31,48 @@ do_compile_append() { }
>
> 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
> - done
> + for DTB in ${KERNEL_DEVICETREE}; do
> + DTB=`normalize_dtb "${DTB}"`
> + DTB_EXT=${DTB##*.}
> + DTB_BASE_NAME=`basename ${DTB} ".${DTB_EXT}"`
> + 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_EXT}
> + done
> }
>
> 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
> - done
> + for DTB in ${KERNEL_DEVICETREE}; do
> + DTB=`normalize_dtb "${DTB}"`
> + DTB_EXT=${DTB##*.}
> + DTB_BASE_NAME=`basename ${DTB} ".${DTB_EXT}"`
> + 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_EXT}
> + ln -sf ${DTB_NAME}.${DTB_EXT}
${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT}
> + 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
> - done
> + cd /${KERNEL_IMAGEDEST}
> + for DTB in ${KERNEL_DEVICETREE}
> + do
> + DTB_EXT=${DTB##*.}
> + 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_EXT} ${DTB_BASE_NAME}.${DTB_EXT}
/boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
> + 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
> - done
> + cd /${KERNEL_IMAGEDEST}
> + for DTB in ${KERNEL_DEVICETREE}
> + do
> + DTB_EXT=${DTB##*.}
> + 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_EXT}
/boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
> + done
> }
> --
> 2.7.4
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
More information about the yocto
mailing list