[Buildroot] [PATCH v3] Add dtc (device tree compiler) as host tool

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Fri Mar 23 15:01:16 UTC 2012


On Fri, Mar 23, 2012 at 3:51 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Le Fri, 23 Mar 2012 15:37:34 +0100,
> Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> a écrit :
>
>> +HOST_DTC_SOURCE =
>> +HOST_DTC_DEPENDENCIES = linux
>> +
>> +define HOST_DTC_INSTALL_CMDS
>> +    $(INSTALL) -D -m 0755 $(LINUX_DIR)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc
>> +endef
>
> The problem is that this DTC binary is only built if CONFIG_DTC is
> selected in the kernel configuration. So if the selected kernel does
> not have this option enabled, the installation step of this package is
> going to fail.
>
> I am not sure what to do here. Just let the user figure this out? Check
> the kernel .config to see if CONFIG_DTC is enabled, and if it isn't
> while this package is selected, error out with a nice explanation for
> the user? Simply ignore the installation if the dtc binary was not
> built?

I hadn't though about this case.
One could question whether it is a valid case that someone selects dtc
in buildroot but not in the kernel.

Probably the nicest way is to not use dtc from the linux kernel
sources but download the dtc sources explicitly. I thought this was a
bit overkill, and I'm not sure if there can be inconsistencies between
these sources and the kernel ones.

Best regards,
Thomas


More information about the buildroot mailing list