[OE-core] [PATCH v3] linux-dtb.inc: Support for .dtbo files for dtb overlays
piotr.lewicki
piotr.lewicki at elfin.de
Thu Jul 21 07:49:48 UTC 2016
Hi,
+1 : I also use this and I think this would be perfect to have this in
master instead of using patched fork.
Can this be merged?
Thanks,
Piotr
On 19.07.2016 16:57, Herve Jourdain wrote:
> Ping...
> This is needed for support of "dynamic" device tree overlays, with
> extensions .dtbo (instead of xxx-overlay.dtb), which are used in RaspberryPi
> kernel since 4.4.6.
>
> -----Original Message-----
> From: Herve Jourdain [mailto:herve.jourdain at neuf.fr]
> Sent: mardi 31 mai 2016 09:55
> To: openembedded-core at lists.openembedded.org
> Cc: Herve Jourdain <herve.jourdain at neuf.fr>
> Subject: [OE-core][PATCH v3] linux-dtb.inc: Support for .dtbo files for dtb
> overlays
>
> Signed-off-by: Herve Jourdain <herve.jourdain at neuf.fr>
> ---
> meta/recipes-kernel/linux/linux-dtb.inc | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-dtb.inc
> b/meta/recipes-kernel/linux/linux-dtb.inc
> index 74f5ef8..8528d64 100644
> --- a/meta/recipes-kernel/linux/linux-dtb.inc
> +++ b/meta/recipes-kernel/linux/linux-dtb.inc
> @@ -33,12 +33,13 @@ do_compile_append() {
> do_install_append() {
> for DTB in ${KERNEL_DEVICETREE}; do
> DTB=`normalize_dtb "${DTB}"`
> - DTB_BASE_NAME=`basename ${DTB} .dtb`
> + DTB_EXT=${DTB##*.}
> + DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
> 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
> + install -m 0644 ${DTB_PATH}
> ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
> done
> done
> }
> @@ -46,7 +47,8 @@ do_install_append() {
> do_deploy_append() {
> for DTB in ${KERNEL_DEVICETREE}; do
> DTB=`normalize_dtb "${DTB}"`
> - DTB_BASE_NAME=`basename ${DTB} .dtb`
> + DTB_EXT=${DTB##*.}
> + DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
> for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
> base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME}
> symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
> @@ -54,8 +56,8 @@ do_deploy_append() {
> 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
> + install -m 0644 ${DTB_PATH}
> ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT}
> + ln -sf ${DTB_NAME}.${DTB_EXT}
> ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT}
> done
> done
> }
> @@ -65,9 +67,10 @@ pkg_postinst_kernel-devicetree () {
> for DTB in ${KERNEL_DEVICETREE}; do
> for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
> symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
> + DTB_EXT=${DTB##*.}
> 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
> + 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
> done
> }
> @@ -77,9 +80,10 @@ pkg_postrm_kernel-devicetree () {
> for DTB in ${KERNEL_DEVICETREE}; do
> for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
> symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
> + DTB_EXT=${DTB##*.}
> 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
> + update-alternatives --remove
> ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
> ${KERNEL_PRIORITY} || true
> done
> done
> }
More information about the Openembedded-core
mailing list