Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] linux: build default dtbs if no specific source files given
Date: Thu, 16 Aug 2018 22:34:44 +0200	[thread overview]
Message-ID: <20180816223444.41200c10@windsurf> (raw)
In-Reply-To: <1533313674-722-1-git-send-email-bos@je-eigen-domein.nl>

Hello Floris,

Thanks for this contribution. It definitely makes sense to support this.

On Fri,  3 Aug 2018 18:27:54 +0200, Floris Bos wrote:
> Currently if one wants to build dtbs, one has to specify which
> dts source files to build exactly.
> This is inconvenient, and some platforms use non-standard file
> names that are currently not supported by buildroot.
> (e.g. the overlay files in downstream Raspberry Pi kernel)

Could you give some more specific example of those non-standard names ?
Are we talking about .dtbo files ?

> diff --git a/linux/Config.in b/linux/Config.in
> index d30489e..40d337d 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -377,6 +377,10 @@ config BR2_LINUX_KERNEL_INTREE_DTS_NAME
>  	  the trailing .dts. You can provide a list of
>  	  dts files to build, separated by spaces.
>  
> +	  If both this option and out-of-tree path is left empty
> +	  the default set of dtbs for the kernel configuration
> +	  is build.

I think this should rather be in the help text of the
BR2_LINUX_KERNEL_DTS_SUPPORT. Basically, if you enable
BR2_LINUX_KERNEL_DTS_SUPPORT, but leave
BR2_LINUX_KERNEL_INTREE_DTS_NAME and BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
empty, you'll have all Device Tree for the selected configuration built
and installed.

As a separate patch, we should also change:

  bool "Build a Device Tree Blob (DTB)"

to

  bool "Build Device Tree Blobs (DTBs)"

>  ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
>  ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)
> +ifeq ($(strip $(LINUX_DTS_NAME)),)
> +define LINUX_BUILD_DTB
> +	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) dtbs

Perhaps we can do:

	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) \
		$(if $(LINUX_DTS_NAME),$(LINUX_DTBS),dtbs)

to handle both situations at once.

> +define LINUX_INSTALL_DTB
> +	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) \
> +		INSTALL_DTBS_PATH=$(1) dtbs_install

I see one problem with see: no all architecture that support building
dtbs have the dtbs_install target.

Can we install all *.dtb* for example ? Or should we say we don't care
if this new feature only works for a subset of the CPU architectures
that use DT ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-08-16 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 16:27 [Buildroot] [PATCH 1/1] linux: build default dtbs if no specific source files given Floris Bos
2018-08-16 20:34 ` Thomas Petazzoni [this message]
2018-08-16 21:11   ` Floris Bos
2018-08-21 22:39     ` Arnout Vandecappelle
2018-08-21 22:59       ` Floris Bos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180816223444.41200c10@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox