LINARO: Build .dtb files for packaging

Message ID 1302140570-24121-1-git-send-email-shawn.guo@freescale.com
State New
Headers show

Commit Message

Shawn Guo April 7, 2011, 1:42 a.m.
From: Shawn Guo <shawn.guo@linaro.org>

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
Hi John,

After pulling the latest bits from Nico's tree, you should be able
apply this patch on linux-linaro-natty and get .dtb files built in
linux-image-*.deb.

Regards,
Shawn

 debian/rules.d/2-binary-arch.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Comments

Shawn Guo April 7, 2011, 1:46 a.m. | #1
On Thu, Apr 07, 2011 at 09:42:50AM +0800, Shawn Guo wrote:
> From: Shawn Guo <shawn.guo@linaro.org>
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> Hi John,
> 
> After pulling the latest bits from Nico's tree, you should be able
> apply this patch on linux-linaro-natty and get .dtb files built in
> linux-image-*.deb.
> 
And I suppose you will help to add the following CONFIG to enable dt
builds.  Otherwise, please let me know what I need to do.

CONFIG_USE_OF
CONFIG_PROC_DEVICETREE
John Rigby April 7, 2011, 1:56 a.m. | #2
Shawn,

The latest packaged kernel work in progress is here:

http://git.linaro.org/gitweb?p=people/jcrigby/linux-linaro-packaged-next-wip.git;a=summary

Information on the packaged kernel including pointers to instructions
about how to build it yourself are here:

https://wiki.linaro.org/Resources/HowTo/LinaroPackagedKernel

I have added CONFIG_USE_OF and CONFIG_PROC_DEVICETREE for all platforms.

John

On Wed, Apr 6, 2011 at 7:46 PM, Shawn Guo <shawn.guo@freescale.com> wrote:
> On Thu, Apr 07, 2011 at 09:42:50AM +0800, Shawn Guo wrote:
>> From: Shawn Guo <shawn.guo@linaro.org>
>>
>> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
>> ---
>> Hi John,
>>
>> After pulling the latest bits from Nico's tree, you should be able
>> apply this patch on linux-linaro-natty and get .dtb files built in
>> linux-image-*.deb.
>>
> And I suppose you will help to add the following CONFIG to enable dt
> builds.  Otherwise, please let me know what I need to do.
>
> CONFIG_USE_OF
> CONFIG_PROC_DEVICETREE
>
> --
> Regards,
> Shawn
>
>
Shawn Guo April 7, 2011, 2:27 a.m. | #3
On Wed, Apr 06, 2011 at 07:56:20PM -0600, John Rigby wrote:
> Shawn,
> 
> The latest packaged kernel work in progress is here:
> 
> http://git.linaro.org/gitweb?p=people/jcrigby/linux-linaro-packaged-next-wip.git;a=summary
> 
> Information on the packaged kernel including pointers to instructions
> about how to build it yourself are here:
> 
> https://wiki.linaro.org/Resources/HowTo/LinaroPackagedKernel
> 
> I have added CONFIG_USE_OF and CONFIG_PROC_DEVICETREE for all platforms.
> 
The patch was tested on master of linux-linaro-natty with pulling
necessary bits from Nico's tree and adding these two CONFIGs in
debian.linaro/config/config.common.ubuntu.  And I saw .dtb files added
in folder boot/dt-2.6.38-1001-linaro-* with linux-image-*.deb.

And just tested, the patch can be applied on packaged-next-wip tree
with no problem.
John Rigby April 7, 2011, 2:44 a.m. | #4
Good news.  Thanks for testing.  I will add your patch to my tree
tomorrow.  There are other unrelated problems with the current release
so there will not  be an official release for a few days.

On Wed, Apr 6, 2011 at 8:27 PM, Shawn Guo <shawn.guo@freescale.com> wrote:
> On Wed, Apr 06, 2011 at 07:56:20PM -0600, John Rigby wrote:
>> Shawn,
>>
>> The latest packaged kernel work in progress is here:
>>
>> http://git.linaro.org/gitweb?p=people/jcrigby/linux-linaro-packaged-next-wip.git;a=summary
>>
>> Information on the packaged kernel including pointers to instructions
>> about how to build it yourself are here:
>>
>> https://wiki.linaro.org/Resources/HowTo/LinaroPackagedKernel
>>
>> I have added CONFIG_USE_OF and CONFIG_PROC_DEVICETREE for all platforms.
>>
> The patch was tested on master of linux-linaro-natty with pulling
> necessary bits from Nico's tree and adding these two CONFIGs in
> debian.linaro/config/config.common.ubuntu.  And I saw .dtb files added
> in folder boot/dt-2.6.38-1001-linaro-* with linux-image-*.deb.
>
> And just tested, the patch can be applied on packaged-next-wip tree
> with no problem.
>
> --
> Regards,
> Shawn
>
>

Patch

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 93114b2..815d134 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -36,6 +36,7 @@  $(stampdir)/stamp-build-%: prepare-%
 	@echo "Building $*..."
 	$(build_cd) $(kmake) $(build_O) $(conc_level) $(build_image)
 	$(build_cd) $(kmake) $(build_O) $(conc_level) modules
+	$(build_cd) $(kmake) $(build_O) $(conc_level) dtbs
 	@touch $@
 
 # Install the finished build
@@ -71,6 +72,11 @@  endif
 		$(pkgdir)/boot/abi-$(abi_release)-$*
 	install -m600 $(builddir)/build-$*/System.map \
 		$(pkgdir)/boot/System.map-$(abi_release)-$*
+
+	mkdir -p $(pkgdir)/boot/dt-$(abi_release)-$*/
+	install -m600 -D $(builddir)/build-$*/arch/$(build_arch)/boot/*.dtb \
+		$(pkgdir)/boot/dt-$(abi_release)-$*/
+
 ifeq ($(no_dumpfile),)
 	makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
 		-x $(builddir)/build-$*/vmlinux