From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv4 4/5] docs/manual: add explanations about BR2_EXTERNAL
Date: Sat, 30 Nov 2013 23:59:46 +0100 [thread overview]
Message-ID: <20131130225946.GD3500@free.fr> (raw)
In-Reply-To: <1385751626-28967-5-git-send-email-thomas.petazzoni@free-electrons.com>
Thomas, All,
On 2013-11-29 20:00 +0100, Thomas Petazzoni spake thusly:
> This commit updates the manual to add details on how to use the
> BR2_EXTERNAL feature.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> docs/manual/customize-outside-br.txt | 132 +++++++++++++++++++++++++++++++++++
> docs/manual/customize.txt | 2 +
> 2 files changed, 134 insertions(+)
> create mode 100644 docs/manual/customize-outside-br.txt
>
> diff --git a/docs/manual/customize-outside-br.txt b/docs/manual/customize-outside-br.txt
> new file mode 100644
> index 0000000..623a421
> --- /dev/null
> +++ b/docs/manual/customize-outside-br.txt
> @@ -0,0 +1,132 @@
> +// -*- mode:doc -*- ;
> +
> +[[outside-br-custom]]
> +Keeping customization outside Buildroot
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +While the Buildroot community recommends and encourages upstreaming to
> +the official Buildroot version the packages and boards support that
> +are written by developers, it is sometimes not possible or desirable,
> +due to these packages or boards being highly specific or proprietary.
s/due to/because/
> +
> +In this case, Buildroot users are offered two choices:
> +
> + * They can add their packages, board support and configuration files
> + directly within the Buildroot tree, and maintain them by using
> + branches in a version control system.
> +
> + * They can use the +BR2_EXTERNAL+ mechanism, which allows to keep
> + package recipes, board support and configuration files outside of
> + the Buildroot tree, while still having them nicely integrated in
> + the build logic. The following paragraphs give details on how to
> + use +BR2_EXTERNAL+.
> +
> ++BR2_EXTERNAL+ is an environment variable that one can use to point to
> +a directory that contains Buildroot customizations. It can be passed
> +to any Buildroot +make+ invocation, and when it is passed. It is
^^^^^^^^^^^^^^^^^^^^^^^^
Uh? That sentence does not make sense. What about:
It can be passed to any Buildroot +make+ invocation, and is
automatically saved in [...]
> +automatically saved in the hidden +.br-external+ file in the output
> +directory, so that it is not needed to pass +BR2_EXTERNAL+ at every
> ++make+ invocation. It can however be changed at any time by specifying
> +a new value, and can be removed by passing an empty value.
I'd start a new paragraph here, sionce we've switched to another topic.
> The
> ++BR2_EXTERNAL+ path can be either an absolute or a relative path, but
> +if it's passed as a relative path, it is important to note that it is
> +interpreted relatively to the main Buildroot source directory, not the
> +Buildroot output directory.
> +
> +Some examples:
> +
> +-----
> + buildroot/ $ make BR2_EXTERNAL=../foobar menuconfig
> +-----
> +
> +Starting from now on, external definitions fromt he +../company+
^^^^
Typo
> +directory will be used:
> +
> +-----
> + buildroot/ $ make
> + buildroot/ $ make legal-info
> +-----
> +
> +We can switch to another external definitions directory at any time:
> +
> +-----
> + buildroot/ $ make BR2_EXTERNAL=../barfoo xconfig
> +-----
> +
> +Or disable the usage of external definitions:
> +
> +-----
> + buildroot/ $ make BR2_EXTERNAL= xconfig
> +-----
> +
> +This +BR2_EXTERNAL+ then allows three different things:
> +
> + * One can store all the board-specific configuration files here, such
^^^^
there
> + as the kernel configuration, the root filesystem overlay, or any
> + other configuration file for which Buildroot allows to set its
> + location. The +BR2_EXTERNAL+ value is available within the
> + Buildroot configuration using +$(BR2_EXTERNAL)+. As an example, one
> + could set the +BR2_ROOTFS_OVERLAY+ Buildroot option to
> + +$(BR2_EXTERNAL)/board/<boardname>/overlay/+ (to specify a root
> + filesystem overlay), or the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+
> + Buildroot option to +$(BR2_EXTERNAL)/board/<boardname>/kernel.config+
> + (to specify the location of the kernel configuration file). + To
^^^
Typo
> + achieve this, it is recommended but not mandatory, to store those
> + details in directories called +board/<boardname>/+ under
> + +BR2_EXTERNAL+.
> +
> + * One can store package recipes (i.e +Config.in+ and
> + +<packagename>.mk+), or even custom configuration options and make
> + logic. Buildroot automatically includes +BR2_EXTERNAL/Config.in+ to
> + make it appear in the top-level configuration menu, and includes
> + +BR2_EXTERNAL/external.mk+ with the rest of the makefile logic.
> ++
> +The main usage of this is to store package recipes. The recommended
> + way to do this is to write a +BR2_EXTERNAL/Config.in+ that looks
> + like:
> ++
> +------
> +menu "<somecompany> packages"
> +
> +source "$BR2_EXTERNAL/package/package1/Config.in"
> +source "$BR2_EXTERNAL/package/package2/Config.in"
> +
> +endmenu
> +------
> ++
> +Then, have a +BR2_EXTERNAL/external.mk' file that looks like:
> ++
> +------
> +include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))
> +------
> ++
> +And then in +BR2_EXTERNAL/package/package1+ and
> + +BR2_EXTERNAL/package/package2+ create normal Buildroot package
> + recipes, as explained in xref:adding-packages[].
> +
> + * One can store Buildroot defconfigs in the +configs+ subdirectory of
> + +BR2_EXTERNAL+. Buildroot will automatically show them in the
> + output of +make help+ and allow them to be loaded with the normal
> + +make <name>_defconfig+ command.
> +
> +In the end, a typical +BR2_EXTERNAL+ directory organization would
> +generally be:
> +
> +-----
> +??? Config.in
> +??? external.mk
> +??? board/
> +? ??? <boardname>/
> +? ??? overlay/
> +? ??? etc/
> +? ??? <some file>
> +??? configs/
> +? ??? <boardname>_defconfig
> +??? package/
> + ??? package1/
> + ??? Config.in
> + ??? package1.mk
> + ??? package2/
Missing symbols in the tree structure.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2013-11-30 22:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 19:00 [Buildroot] [PATCHv4 0/5] Keeping customizations outside the Buildroot tree with BR2_EXTERNAL Thomas Petazzoni
2013-11-29 19:00 ` [Buildroot] [PATCHv4 1/5] core: introduce the BR2_EXTERNAL variable Thomas Petazzoni
2013-11-30 22:38 ` Yann E. MORIN
2013-12-01 0:17 ` Arnout Vandecappelle
2013-12-01 0:20 ` [Buildroot] [PATCH v5] " Arnout Vandecappelle
2013-11-29 19:00 ` [Buildroot] [PATCHv4 2/5] core: allow external Config.in/makefile code to be integrated Thomas Petazzoni
2013-11-30 22:39 ` Yann E. MORIN
2013-12-01 0:29 ` Arnout Vandecappelle
2013-11-29 19:00 ` [Buildroot] [PATCHv4 3/5] core: allow external defconfigs to be used Thomas Petazzoni
2013-11-30 22:42 ` Yann E. MORIN
2013-12-01 0:32 ` Arnout Vandecappelle
2013-11-29 19:00 ` [Buildroot] [PATCHv4 4/5] docs/manual: add explanations about BR2_EXTERNAL Thomas Petazzoni
2013-11-30 22:59 ` Yann E. MORIN [this message]
2013-12-01 0:43 ` Arnout Vandecappelle
2013-11-29 19:00 ` [Buildroot] [PATCHv4 5/5] manual: fix manual generation with BR2_EXTERNAL support Thomas Petazzoni
2013-11-30 23:10 ` Yann E. MORIN
2013-12-01 10:16 ` Samuel Martin
2013-12-01 0:46 ` Arnout Vandecappelle
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=20131130225946.GD3500@free.fr \
--to=yann.morin.1998@free.fr \
--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