* [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include
@ 2011-02-09 6:27 Bruce Ashfield
2011-02-09 6:27 ` [PATCH 1/3] " Bruce Ashfield
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Bruce Ashfield @ 2011-02-09 6:27 UTC (permalink / raw)
To: rpurdie; +Cc: yocto, poky, saul.wold
Richard/Saul,
This fixes BUGID 610, and kicks off a bit of cleaning with the various
kernel include files. Patch 1/3 says it all:
[
The powerpc linux-yocto kernels were not creating dtb images
in the deploy directories. This was due to two problems:
- the dtb generation rules were not being configured
- the boards were not specifying a device tree in their config
This change addresses the first point by factoring out the
dtb generation routines into a new include that can be used by
multiple recipes.
]
With these changes I've built and generated a dtb for the
mpc8315-rdb.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: zedd/dtb
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/dtb
Thanks,
Bruce Ashfield <bruce.ashfield@windriver.com>
---
Bruce Ashfield (3):
linux: factor dts/dtc/dtb handling into a specific include
dtc: add LIC_FILES_CHKSUM to dtc-native
mpc8315-rdb: add dtb generation configuration
meta/conf/machine/mpc8315e-rdb.conf | 1 +
meta/recipes-kernel/dtc/dtc-native_git.bb | 3 +++
meta/recipes-kernel/linux/linux-dtb.inc | 27 +++++++++++++++++++++++++++
meta/recipes-kernel/linux/linux-yocto.inc | 1 +
meta/recipes-kernel/linux/linux.inc | 27 +--------------------------
5 files changed, 33 insertions(+), 26 deletions(-)
create mode 100644 meta/recipes-kernel/linux/linux-dtb.inc
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/3] linux: factor dts/dtc/dtb handling into a specific include 2011-02-09 6:27 [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Bruce Ashfield @ 2011-02-09 6:27 ` Bruce Ashfield 2011-02-10 21:06 ` [poky] " Esben Haabendal 2011-02-09 6:27 ` [PATCH 2/3] dtc: add LIC_FILES_CHKSUM to dtc-native Bruce Ashfield ` (2 subsequent siblings) 3 siblings, 1 reply; 9+ messages in thread From: Bruce Ashfield @ 2011-02-09 6:27 UTC (permalink / raw) To: rpurdie; +Cc: yocto, poky, saul.wold Fixes [BUGID #610] The powerpc linux-yocto kernels were not creating dtb images in the deploy directories. This was due to two problems: - the dtb generation rules were not being configured - the boards were not specifying a device tree in their config This change addresses the first point by factoring out the dtb generation routines into a new include that can be used by multiple recipes. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> --- meta/recipes-kernel/linux/linux-dtb.inc | 27 +++++++++++++++++++++++++++ meta/recipes-kernel/linux/linux-yocto.inc | 1 + meta/recipes-kernel/linux/linux.inc | 27 +-------------------------- 3 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 meta/recipes-kernel/linux/linux-dtb.inc diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc new file mode 100644 index 0000000..0b27d18 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dtb.inc @@ -0,0 +1,27 @@ +# Support for device tree generation +FILES_kernel_devicetree = "/boot/devicetree*" +KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000" + +python __anonymous () { + import bb + + devicetree = bb.data.getVar("KERNEL_DEVICETREE", d, 1) or '' + if devicetree: + depends = bb.data.getVar("DEPENDS", d, 1) + bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d) + packages = bb.data.getVar("PACKAGES", d, 1) + bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d) +} + +do_install_append() { + if test -n "${KERNEL_DEVICETREE}"; then + dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} + install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} + install -d ${DEPLOY_DIR_IMAGE} + install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb + cd ${DEPLOY_DIR_IMAGE} + rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb + ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb + fi +} + diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 03935fa..0812144 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -18,5 +18,6 @@ addtask kernel_configme before do_configure after do_patch # Pick up shared functions inherit kernel-yocto +require linux-dtb.inc B = "${WORKDIR}/linux-${MACHINE}-${LINUX_KERNEL_TYPE}-build" diff --git a/meta/recipes-kernel/linux/linux.inc b/meta/recipes-kernel/linux/linux.inc index 93859bb..726d3d6 100644 --- a/meta/recipes-kernel/linux/linux.inc +++ b/meta/recipes-kernel/linux/linux.inc @@ -3,6 +3,7 @@ SECTION = "kernel" LICENSE = "GPL" inherit kernel +require linux-dtb.inc DEPENDS_append_em-x270 = " mtd-utils " @@ -15,21 +16,6 @@ CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfs #boot from nfs #CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0" -# Support for device tree generation -FILES_kernel_devicetree = "/boot/devicetree*" -KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000" - -python __anonymous () { - import bb - - devicetree = bb.data.getVar("KERNEL_DEVICETREE", d, 1) or '' - if devicetree: - depends = bb.data.getVar("DEPENDS", d, 1) - bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d) - packages = bb.data.getVar("PACKAGES", d, 1) - bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d) -} - do_configure_prepend() { echo "" > ${S}/.config @@ -105,14 +91,3 @@ do_install_prepend() { fi } -do_install_append() { - if test -n "${KERNEL_DEVICETREE}"; then - dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} - install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb - cd ${DEPLOY_DIR_IMAGE} - rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb - ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb - fi -} -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] linux: factor dts/dtc/dtb handling into a specific include 2011-02-09 6:27 ` [PATCH 1/3] " Bruce Ashfield @ 2011-02-10 21:06 ` Esben Haabendal 0 siblings, 0 replies; 9+ messages in thread From: Esben Haabendal @ 2011-02-10 21:06 UTC (permalink / raw) To: Bruce Ashfield; +Cc: yocto, poky, saul.wold On Wed, 2011-02-09 at 01:27 -0500, Bruce Ashfield wrote: > diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc > new file mode 100644 > index 0000000..0b27d18 > --- /dev/null > +++ b/meta/recipes-kernel/linux/linux-dtb.inc > @@ -0,0 +1,27 @@ > +# Support for device tree generation > +FILES_kernel_devicetree = "/boot/devicetree*" I guess that should be FILES_kernel-devicetree to actually match the package name. > +KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000" > + > +python __anonymous () { > + import bb > + > + devicetree = bb.data.getVar("KERNEL_DEVICETREE", d, 1) or '' > + if devicetree: > + depends = bb.data.getVar("DEPENDS", d, 1) > + bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d) > + packages = bb.data.getVar("PACKAGES", d, 1) > + bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d) > +} > + > +do_install_append() { > + if test -n "${KERNEL_DEVICETREE}"; then > + dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} > + install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} > + install -d ${DEPLOY_DIR_IMAGE} > + install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb > + cd ${DEPLOY_DIR_IMAGE} > + rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb > + ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb > + fi > +} > + ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [poky] [PATCH 1/3] linux: factor dts/dtc/dtb handling into a specific include @ 2011-02-10 21:06 ` Esben Haabendal 0 siblings, 0 replies; 9+ messages in thread From: Esben Haabendal @ 2011-02-10 21:06 UTC (permalink / raw) To: Bruce Ashfield; +Cc: yocto, poky, saul.wold On Wed, 2011-02-09 at 01:27 -0500, Bruce Ashfield wrote: > diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc > new file mode 100644 > index 0000000..0b27d18 > --- /dev/null > +++ b/meta/recipes-kernel/linux/linux-dtb.inc > @@ -0,0 +1,27 @@ > +# Support for device tree generation > +FILES_kernel_devicetree = "/boot/devicetree*" I guess that should be FILES_kernel-devicetree to actually match the package name. > +KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000" > + > +python __anonymous () { > + import bb > + > + devicetree = bb.data.getVar("KERNEL_DEVICETREE", d, 1) or '' > + if devicetree: > + depends = bb.data.getVar("DEPENDS", d, 1) > + bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d) > + packages = bb.data.getVar("PACKAGES", d, 1) > + bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d) > +} > + > +do_install_append() { > + if test -n "${KERNEL_DEVICETREE}"; then > + dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} > + install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} > + install -d ${DEPLOY_DIR_IMAGE} > + install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb > + cd ${DEPLOY_DIR_IMAGE} > + rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb > + ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb > + fi > +} > + ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] linux: factor dts/dtc/dtb handling into a specific include 2011-02-10 21:06 ` [poky] " Esben Haabendal @ 2011-02-11 10:27 ` Richard Purdie -1 siblings, 0 replies; 9+ messages in thread From: Richard Purdie @ 2011-02-11 10:27 UTC (permalink / raw) To: Esben Haabendal; +Cc: yocto, poky, saul.wold On Thu, 2011-02-10 at 22:06 +0100, Esben Haabendal wrote: > On Wed, 2011-02-09 at 01:27 -0500, Bruce Ashfield wrote: > > diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc > > new file mode 100644 > > index 0000000..0b27d18 > > --- /dev/null > > +++ b/meta/recipes-kernel/linux/linux-dtb.inc > > @@ -0,0 +1,27 @@ > > +# Support for device tree generation > > +FILES_kernel_devicetree = "/boot/devicetree*" > > I guess that should be FILES_kernel-devicetree to actually match the > package name. Yes, I've pushed a fix for that, thanks. Richard ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [poky] [PATCH 1/3] linux: factor dts/dtc/dtb handling into a specific include @ 2011-02-11 10:27 ` Richard Purdie 0 siblings, 0 replies; 9+ messages in thread From: Richard Purdie @ 2011-02-11 10:27 UTC (permalink / raw) To: Esben Haabendal; +Cc: yocto, poky, saul.wold On Thu, 2011-02-10 at 22:06 +0100, Esben Haabendal wrote: > On Wed, 2011-02-09 at 01:27 -0500, Bruce Ashfield wrote: > > diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc > > new file mode 100644 > > index 0000000..0b27d18 > > --- /dev/null > > +++ b/meta/recipes-kernel/linux/linux-dtb.inc > > @@ -0,0 +1,27 @@ > > +# Support for device tree generation > > +FILES_kernel_devicetree = "/boot/devicetree*" > > I guess that should be FILES_kernel-devicetree to actually match the > package name. Yes, I've pushed a fix for that, thanks. Richard ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] dtc: add LIC_FILES_CHKSUM to dtc-native 2011-02-09 6:27 [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Bruce Ashfield 2011-02-09 6:27 ` [PATCH 1/3] " Bruce Ashfield @ 2011-02-09 6:27 ` Bruce Ashfield 2011-02-09 6:27 ` [PATCH 3/3] mpc8315-rdb: add dtb generation configuration Bruce Ashfield 2011-02-09 11:17 ` [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Richard Purdie 3 siblings, 0 replies; 9+ messages in thread From: Bruce Ashfield @ 2011-02-09 6:27 UTC (permalink / raw) To: rpurdie; +Cc: yocto, poky, saul.wold The new license processing rules error if dtc-native itself doesn't have license information. Previously only the .inc files contained this information, so we make a copy and leave the existing license info to be removed pending further review. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> --- meta/recipes-kernel/dtc/dtc-native_git.bb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/meta/recipes-kernel/dtc/dtc-native_git.bb b/meta/recipes-kernel/dtc/dtc-native_git.bb index 2d6f092..fd5bde5 100644 --- a/meta/recipes-kernel/dtc/dtc-native_git.bb +++ b/meta/recipes-kernel/dtc/dtc-native_git.bb @@ -1,2 +1,5 @@ +LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c" + require dtc-native.inc require dtc_git.inc -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] mpc8315-rdb: add dtb generation configuration 2011-02-09 6:27 [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Bruce Ashfield 2011-02-09 6:27 ` [PATCH 1/3] " Bruce Ashfield 2011-02-09 6:27 ` [PATCH 2/3] dtc: add LIC_FILES_CHKSUM to dtc-native Bruce Ashfield @ 2011-02-09 6:27 ` Bruce Ashfield 2011-02-09 11:17 ` [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Richard Purdie 3 siblings, 0 replies; 9+ messages in thread From: Bruce Ashfield @ 2011-02-09 6:27 UTC (permalink / raw) To: rpurdie; +Cc: yocto, poky, saul.wold Fixes [BUGID #610] dtb files were not being built for the mpc8315e-rdb, since they weren't being configured into the machine. With this and the related dtc fixes, we now get a dtb in the deployment directories. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> --- meta/conf/machine/mpc8315e-rdb.conf | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/meta/conf/machine/mpc8315e-rdb.conf b/meta/conf/machine/mpc8315e-rdb.conf index ac518fb..578751c 100644 --- a/meta/conf/machine/mpc8315e-rdb.conf +++ b/meta/conf/machine/mpc8315e-rdb.conf @@ -17,3 +17,4 @@ PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" UBOOT_ENTRYPOINT = "0x00000000" +KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8315erdb.dts" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include 2011-02-09 6:27 [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Bruce Ashfield ` (2 preceding siblings ...) 2011-02-09 6:27 ` [PATCH 3/3] mpc8315-rdb: add dtb generation configuration Bruce Ashfield @ 2011-02-09 11:17 ` Richard Purdie 3 siblings, 0 replies; 9+ messages in thread From: Richard Purdie @ 2011-02-09 11:17 UTC (permalink / raw) To: Bruce Ashfield; +Cc: yocto, poky, saul.wold On Wed, 2011-02-09 at 01:27 -0500, Bruce Ashfield wrote: > Richard/Saul, > > This fixes BUGID 610, and kicks off a bit of cleaning with the various > kernel include files. Patch 1/3 says it all: > > [ > The powerpc linux-yocto kernels were not creating dtb images > in the deploy directories. This was due to two problems: > > - the dtb generation rules were not being configured > - the boards were not specifying a device tree in their config > > This change addresses the first point by factoring out the > dtb generation routines into a new include that can be used by > multiple recipes. > ] > > With these changes I've built and generated a dtb for the > mpc8315-rdb. > > Pull URL: git://git.pokylinux.org/poky-contrib.git > Branch: zedd/dtb > Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/dtb Looks good, merged to master, thanks. Richard ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-02-11 10:28 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-02-09 6:27 [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Bruce Ashfield 2011-02-09 6:27 ` [PATCH 1/3] " Bruce Ashfield 2011-02-10 21:06 ` Esben Haabendal 2011-02-10 21:06 ` [poky] " Esben Haabendal 2011-02-11 10:27 ` Richard Purdie 2011-02-11 10:27 ` [poky] " Richard Purdie 2011-02-09 6:27 ` [PATCH 2/3] dtc: add LIC_FILES_CHKSUM to dtc-native Bruce Ashfield 2011-02-09 6:27 ` [PATCH 3/3] mpc8315-rdb: add dtb generation configuration Bruce Ashfield 2011-02-09 11:17 ` [PATCH 0/3] linux: factor dts/dtc/dtb handling into a specific include Richard Purdie
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.