[Buildroot] [PATCH] Add some support for device tree kernels with appended trees

Arnout Vandecappelle arnout at mind.be
Mon Jul 2 19:52:23 UTC 2012


On 07/02/12 17:30, Maxime Ripard wrote:
> Hi Arnout,
>
> Thanks for the review!
>
> Le 30/06/2012 20:51, Arnout Vandecappelle a écrit :
[snip]
>>   I have a use case where I want several dtb's to be generated
>> in a single buildroot config.  Now I do it by calling dtc outside
>> of buildroot, but it would be nice if this use case were supported
>> as well.  Of course, that would be impossible to combine with the
>> BR2_LINUX_KERNEL_APPENDED_DTB option.
>
> How would you integrate it ? Through a "additionnal device tree sources"
> options ? or in these same options?
>
> Anyway, maybe we can get this merge and build on top of that later?

  Good idea.

  Anyway, maybe it's a bit of a corner case to have two device trees for a single
buildroot config...

[snip]
>> On 06/25/12 11:05, Maxime Ripard wrote:
>>   I've had at least one kernel where I had to build dtc explicitly:
>>
>>      $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) ./scripts/dtc/
>
> Hmmm, I'm pretty sure that it is built when the device tree is enabled.
> Do you remember in what case you had to do this ?

  Now I do: I tried to build the dtb and the kernel image in one parallel
make invocation.  In that case, the dtc is not necessarily built before
it is invoked to create the dtb.  In this case, however, you do the
dtb in a separate make after the kernel image, so dtc is definitely there.
So you can safely ignore my comment.

>
>>> +    $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)
>>> $(KERNEL_DTS_NAME).dtb
>>> +endef
>>> +endif
>>> +
>>> +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
>>> +ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y)
>>> +define LINUX_APPEND_DTB
>>> +    cat $(KERNEL_ARCH_PATH)/boot/zImage
>>> $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb>
>>> $(KERNEL_ARCH_PATH)/boot/zImage_dtb
>>
>>   A space before the>  would make things more readable.
>
> Hmmm, it's there in the patch. Maybe some weird wrapping on your side ?

  Heh, yep, Thunderbird removes in when quoting the reply (as you can see in
my quoted text before :-)


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F


More information about the buildroot mailing list