[Buildroot] [PATCH 1/1] linux: add option to enable generation of DTBs symbols

Arnout Vandecappelle arnout at mind.be
Sun Feb 3 19:28:51 UTC 2019


 Hi Titouan,

On 05/01/2019 11:59, Titouan Christophe wrote:
> Add an option to compile device trees in Linux with symbol generation
> such that device tree overlays can be loaded on the target system
> 
> Signed-off-by: Titouan Christophe <titouan.christophe at railnova.eu>
> ---
>  linux/Config.in | 8 ++++++++
>  linux/linux.mk  | 4 ++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/linux/Config.in b/linux/Config.in
> index 9a4d46e534..6d695be6c3 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -392,6 +392,14 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
>  	  You can provide a list of dts paths to copy and
>  	  build, separated by spaces.
>  
> +config BR2_LINUX_KERNEL_DTB_WITH_SYMBOLS
> +	bool "Enable the generation of symbols in the linux device tree"
> +	default n

 We don't put "default n" because that's implicit.

> +	help
> +	  If enabled, pass the "-@" option to the device tree compiler,
> +	  such that symbols in compiled device tree are visible.
> +	  Choose this option to support devicetree overlays
> +
>  endif
>  
>  config BR2_LINUX_KERNEL_INSTALL_TARGET
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 6bf2b88038..59c7268e49 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -381,6 +381,10 @@ ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
>  # reproducibility, we use our owns rather than the host ones.
>  LINUX_DEPENDENCIES += host-bison host-flex
>  
> +ifeq ($(BR2_LINUX_KERNEL_DTB_WITH_SYMBOLS),y)
> +	LINUX_MAKE_ENV += DTC_FLAGS=-@
> +endif

 The other LINUX_MAKE_ENV settings are all the way in the beginning of the file,
so this one should be there as well.

 I've fixed both issues and applied, thanks.

 And this is a patch which I've actually used myself!

 Regards,
 Arnout

> +
>  ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)
>  define LINUX_BUILD_DTB
>  	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_DTBS)
> 


More information about the buildroot mailing list