[U-Boot] [PATCH 3/7] arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Thomas Chou thomas at wytron.com.tw
Tue Dec 29 01:55:45 CET 2015


Hi Simon,

On 2015年12月29日 08:22, Simon Glass wrote:
> Hi Thomas,
>
> On 27 December 2015 at 19:16, Bin Meng <bmeng.cn at gmail.com> wrote:
>> On Sun, Dec 27, 2015 at 9:44 PM, Thomas Chou <thomas at wytron.com.tw> wrote:
>>> Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that
>>> there is no need to list all the dtb for different targets/boards.
>>>
>>> Signed-off-by: Thomas Chou <thomas at wytron.com.tw>
>>> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
>>> ---
>>>   arch/arm/dts/Makefile | 192 +-------------------------------------------------
>>>   1 file changed, 1 insertion(+), 191 deletions(-)
>>>
>>
>> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
>
> The problem with these patches is that it prevents building all the
> compatible device tree files for a board family. The default device
> tree is just that - it is not the only one that can be used. A build
> system can taken one of the output device tree files and package it
> with U-Boot. If we don't build then, then that becomes impossible.
>
> What is the purpose of these patches?
>
> A better solution might be to add an option to list the files which
> should be built. Then we gain control over this, if that is what you
> are trying to achieve.

The device tree describes hardware. Each board is a hardware, and should 
have only one device tree. The u-boot is a boot loader, which might have 
different options to load the next stage, eg. Linux. As I see in the 
configs/ dir, there can be several defconfig for a board and uses the 
same device tree. With device tree controlled u-boot, the output is 
u-boot-dtb.bin for each configuration.

The next stage, say, Linux, gets device tree from u-boot. A single 
kernel can work on many different boards bond with possibly different 
device tree blob and booting configuration.

We can use buildman to build a family of target binary including device 
tree blob. So I don't see the reason to keep the list of device tree per 
target.

Best regards,
Thomas


More information about the U-Boot mailing list