Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: buildroot@busybox.net
Subject: [Buildroot] Tesla is using Buildroot
Date: Mon, 14 May 2018 18:00:07 +0000	[thread overview]
Message-ID: <1526320807.30073.31.camel@impinj.com> (raw)
In-Reply-To: <CAOesGMimW+-9zEaSoJk0-Xjwg7O6-NJ3fXMYDdkzGRDUSaKB9A@mail.gmail.com>

On Sat, 2018-05-12 at 10:51 -0700, Olof Johansson wrote:
> On Sat, May 12, 2018 at 10:06 AM, Joseph Kogut <joseph.kogut@gmail.com> wrote:
> > On Sat, May 12, 2018 at 6:27 AM, Adrian Perez de Castro
> > <aperez@igalia.com> wrote:
> > > On Fri, 11 May 2018 22:42:45 -0300 (BRT), Carlos Santos <casantos@datacom.ind.br> wrote:
> > > > > From: "ratbert90" <aduskett@gmail.com>
> > > > > To: anisse at astier.eu, "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
> > > > > 
> > > > 
> > > > Makes me wonder why they don't use a BR2_EXTERNAL.
> > > 
> > > Probably because (AFAIK) it is not yet possible to override base package in
> > > a BR2_EXTERNAL. I have tripped on this myself a couple of times, and ended
> > > up providing a top-level Makefile in the repo for my BR2_EXTERNAL which
> > > downloads a certain version of the Buildroot tarball and applies a couple
> > > of patches over it, then proceeds to chain up to the Buildroot Makefiles
> > > passing the path BR2_EXTERNAL path down to them (so from the point of view
> > > of somebody building, they just download the BR2_EXTERNAL repo and do ?make
> > > foo_defconfig && make?).

Since the external mk file is included after all of buildroot's
internal packages and infrastructure files, it's possible to re-define
variables from buildroot packages in external.  In some case this could
can be a way to override or patch a buildroot package via BR2_EXTERNAL
instead of as a patch to buildroot.

> > I do the same thing. The top level Makefile exports BR2_EXTERNAL="..",
> > there's a target for cloning and checking out a specific Buildroot
> > revision, then there's a wildcard pattern at the end to pass any
> > unrecognized targets up to Buildroot's Makefile, so things like
> > "linux-menuconfig" still work.

> I liked the split of having third party software in an upstream-based
> separate buildroot repo, and only proprietary components in
> BR2_EXTERNAL. That way it's easier to separate out the portion you
> need to share for compliance (i.e. see current github contents), while
> having a place to keep confidential material, work on new
> configs/products/prototypes/internal uses that are not yet released,
> etc in the BR2_EXTERNAL. As expressed above, wrapping it with a second
> layer of makefiles makes it relatively easy to deal with.

We have a top-level project with a top level Makefile that contains the
 BR2_EXTERNAL tree.  I.e., the BR2_EXTERNAL tree is the top level
project.  Buildroot exists as a git submodule in a directory of this
project.  We can update buildroot by pulling from upstream and rebasing
and can git format-patch a patch to send to the list.

We patch buildroot if:
1. We think the patch is upstreamable.
2. There appears to be no reasonable way to accomplish what we want
otherwise.

The top level makefile uses a pattern rule to provide a target for
every defconfig that exists in br2-external/configs directory.  It'll
call buildroot's build with BR2_EXTERNAL and O set build that defconfig
into an output directory.  Or just do a buildroot *_defconfig call but
not actually build.

buildroot sets itself up so that once you go to the output directory,
there is a Makefile that will execute any buildroot target (menuconfig,
pkg-rebuild, all, etc.) with BR2_EXTERNAL configured.

  reply	other threads:[~2018-05-14 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 15:23 [Buildroot] Tesla is using Buildroot Thomas Petazzoni
2018-05-11 21:55 ` anisse at astier.eu
2018-05-12  1:22   ` ratbert90
2018-05-12  1:42     ` Carlos Santos
2018-05-12 13:27       ` Adrian Perez de Castro
2018-05-12 16:34         ` Adam Duskett
2018-05-12 17:06         ` Joseph Kogut
2018-05-12 17:51           ` Olof Johansson
2018-05-14 18:00             ` Trent Piepho [this message]
2018-05-15 20:18               ` Arnout Vandecappelle
2018-05-19 11:08                 ` Angelo Compagnucci
2018-05-22  7:51                   ` Andreas Naumann
2018-05-22 17:40                     ` Trent Piepho
2018-05-12 18:16       ` Olof Johansson

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=1526320807.30073.31.camel@impinj.com \
    --to=tpiepho@impinj.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