* [PATCH] linux-dtb.inc: Fix dtb generation for kernels newer than 3.8
@ 2013-08-16 18:34 Otavio Salvador
2013-08-18 1:20 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: Otavio Salvador @ 2013-08-16 18:34 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
The 3.8 kernel has change the default directory where the dtb file is
stored. The change has been done at:
,----[ Quote of 3.8 kernel change ]
| commit 499cd8298628eeabf0eb5eb6525d4faa0eec80d8
| Author: Grant Likely <grant.likely@secretlab.ca>
| Date: Tue Nov 27 16:29:11 2012 -0700
|
| ARM: dt: change .dtb build rules to build in dts directory
|
| The current rules have the .dtb files build in a different directory
| from the .dts files. The only reason for this is that it was what
| PowerPC has done historically. This patch changes ARM to use the generic
| dtb rule which builds .dtb files in the same directory as the source .dts.
|
| Cc: Russell King <linux@arm.linux.org.uk>
| Cc: Arnd Bergmann <arnd@arndb.de>
| Acked-by: Olof Johansson <olof@lixom.net>
| Cc: linux-arm-kernel@lists.infradead.org
| Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| [swarren: added rm command for old stale .dtb files]
| Signed-off-by: Stephen Warren <swarren@nvidia.com>
| Signed-off-by: Rob Herring <rob.herring@calxeda.com>
`----
This change adds support for both places to backward and forward
compatibility.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/recipes-kernel/linux/linux-dtb.inc | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index cebc76a..6b8f1a5 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -15,8 +15,12 @@ do_install_append() {
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="${B}/arch/${ARCH}/boot/dts/${DTB}"
oe_runmake ${DTB}
- install -m 0644 ${B}/arch/${ARCH}/boot/${DTB} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
+ if [ ! -e "${DTB_PATH}" ]; then
+ DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+ fi
+ install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
done
fi
}
@@ -31,8 +35,12 @@ do_deploy_append() {
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="${B}/arch/${ARCH}/boot/dts/${DTB}"
+ if [ ! -e "${DTB_PATH}" ]; then
+ DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+ fi
install -d ${DEPLOYDIR}
- install -m 0644 ${B}/arch/${ARCH}/boot/${DTB} ${DEPLOYDIR}/${DTB_NAME}.dtb
+ install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
cd ${DEPLOYDIR}
ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb
cd -
--
1.8.4.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] linux-dtb.inc: Fix dtb generation for kernels newer than 3.8
2013-08-16 18:34 [PATCH] linux-dtb.inc: Fix dtb generation for kernels newer than 3.8 Otavio Salvador
@ 2013-08-18 1:20 ` Bruce Ashfield
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2013-08-18 1:20 UTC (permalink / raw)
To: Otavio Salvador; +Cc: OpenEmbedded Core Mailing List
On 13-08-16 2:34 PM, Otavio Salvador wrote:
> The 3.8 kernel has change the default directory where the dtb file is
> stored. The change has been done at:
Indeed. I've been working around this with the reference boards during
my efforts to bump them to 3.10. I just didn't have my patch quite
ready yet .. so let's review this one!
>
> ,----[ Quote of 3.8 kernel change ]
> | commit 499cd8298628eeabf0eb5eb6525d4faa0eec80d8
> | Author: Grant Likely <grant.likely@secretlab.ca>
> | Date: Tue Nov 27 16:29:11 2012 -0700
> |
> | ARM: dt: change .dtb build rules to build in dts directory
> |
> | The current rules have the .dtb files build in a different directory
> | from the .dts files. The only reason for this is that it was what
> | PowerPC has done historically. This patch changes ARM to use the generic
> | dtb rule which builds .dtb files in the same directory as the source .dts.
> |
> | Cc: Russell King <linux@arm.linux.org.uk>
> | Cc: Arnd Bergmann <arnd@arndb.de>
> | Acked-by: Olof Johansson <olof@lixom.net>
> | Cc: linux-arm-kernel@lists.infradead.org
> | Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> | [swarren: added rm command for old stale .dtb files]
> | Signed-off-by: Stephen Warren <swarren@nvidia.com>
> | Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> `----
>
> This change adds support for both places to backward and forward
> compatibility.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> meta/recipes-kernel/linux/linux-dtb.inc | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
> index cebc76a..6b8f1a5 100644
> --- a/meta/recipes-kernel/linux/linux-dtb.inc
> +++ b/meta/recipes-kernel/linux/linux-dtb.inc
> @@ -15,8 +15,12 @@ do_install_append() {
> 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="${B}/arch/${ARCH}/boot/dts/${DTB}"
> oe_runmake ${DTB}
> - install -m 0644 ${B}/arch/${ARCH}/boot/${DTB} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
> + if [ ! -e "${DTB_PATH}" ]; then
> + DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
> + fi
perfect. Just what I was looking for, allowing the older style
kernels to continue to work.
> + install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
> done
> fi
> }
> @@ -31,8 +35,12 @@ do_deploy_append() {
> 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="${B}/arch/${ARCH}/boot/dts/${DTB}"
> + if [ ! -e "${DTB_PATH}" ]; then
> + DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
> + fi
> install -d ${DEPLOYDIR}
> - install -m 0644 ${B}/arch/${ARCH}/boot/${DTB} ${DEPLOYDIR}/${DTB_NAME}.dtb
> + install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
The change looks fine to me.
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Cheers,
Bruce
> cd ${DEPLOYDIR}
> ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb
> cd -
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-18 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-16 18:34 [PATCH] linux-dtb.inc: Fix dtb generation for kernels newer than 3.8 Otavio Salvador
2013-08-18 1:20 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.