From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 10 of 13] manual/user guide/customization: add section on project-specific packages
Date: Thu, 18 Sep 2014 21:39:33 +0200 [thread overview]
Message-ID: <493dc449feeaa92bce5c.1411069173@localhost> (raw)
In-Reply-To: <patchbomb.1411069163@localhost>
This patch adds a new section to chapter 'Project-specific customization' to
describe how to add project-specific packages from a project-specific
directory. The principle was already described in the presentation 'Using
Buildroot for real projects' but was never documented in official Buildroot
documentation.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
docs/manual/customize-packages.txt | 71 ++++++++++++++++++++++++++++++
docs/manual/customize.txt | 2 +
2 files changed, 73 insertions(+), 0 deletions(-)
diff --git a/docs/manual/customize-packages.txt b/docs/manual/customize-packages.txt
new file mode 100644
--- /dev/null
+++ b/docs/manual/customize-packages.txt
@@ -0,0 +1,71 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+[[customize-packages]]
+=== Adding project-specific packages
+
+In general, any new package should be added directly in the +package+
+directory and submitted to the Buildroot upstream project. How to add
+packages to Buildroot in general is explained in full detail in
+xref:adding-packages[] and will not be repeated here. However, your
+project may need some proprietary packages that cannot be upstreamed.
+This section will explain how you can keep such project-specific
+packages in a project-specific directory.
+
+As shown in xref:customize-dir-structure[], the recommended location for
+project-specific packages is +package/<company>/+. If you are using the
++BR2_EXTERNAL+ feature (see xref:outside-br-custom[]) the recommended
+location is +$(BR2_EXTERNAL)/package/+.
+
+However, Buildroot will not be aware of the packages in this location,
+unless we perform some additional steps. As explained in
+xref:adding-packages[], a package in Buildroot basically consists of two
+files: a +.mk+ file (describing how to build the package) and a
++Config.in+ file (describing the configuration options for this
+package).
+
+Buildroot will automatically include the +.mk+ files in first-level
+subdirectories of the +package+ directory (using the pattern
++package/\*/*.mk+). If we want Buildroot to include +.mk+ files from
+deeper subdirectories (like +package/<company>/package1/+) then we
+simply have to add a +.mk+ file in a first-level subdirectory that
+includes these additional +.mk+ files. Therefore, create a file
++package/<company>/<company>.mk+ with following contents (assuming you
+have only one extra directory level below +package/<company>/+):
+
+-----
+include $(sort $(wildcard package/<company>/*/*.mk))
+-----
+
+If you are using +BR2_EXTERNAL+, create a file
++$(BR2_EXTERNAL)/external.mk+ with following contents (again assuming only
+one extra level):
+
+-----
+include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))
+-----
+
+For the +Config.in+ files, create a file +package/<company>/Config.in+
+that includes the +Config.in+ files of all your packages. An exhaustive
+list has to be provided since wildcards are not supported in the source command of kconfig.
+For example:
+
+-----
+source "package/<company>/package1/Config.in"
+source "package/<company>/package2/Config.in"
+-----
+
+Include this new file +package/<company>/Config.in+ from
++package/Config.in+, preferably in a company-specific menu to make
+merges with future Buildroot versions easier.
+
+If you are using +BR2_EXTERNAL+, create a file
++$(BR2_EXTERNAL)/Config.in+ with similar contents:
+
+-----
+source "$BR2_EXTERNAL/package/package1/Config.in"
+source "$BR2_EXTERNAL/package/package2/Config.in"
+-----
+
+You do not have to add an include for this +$(BR2_EXTERNAL)/Config.in+
+file as it is included automatically.
diff --git a/docs/manual/customize.txt b/docs/manual/customize.txt
--- a/docs/manual/customize.txt
+++ b/docs/manual/customize.txt
@@ -55,4 +55,6 @@
include::customize-patches.txt[]
+include::customize-packages.txt[]
+
include::customize-store.txt[]
next prev parent reply other threads:[~2014-09-18 19:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 19:39 [Buildroot] [PATCH 00 of 13] manual: improvements in 'Project-specific customization' section Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 01 of 13] manual: move 'Creating your own board support' from User to Developer guide Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 02 of 13] manual/developer guide: minor rework of 'adding board support' section Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 03 of 13] manual/user guide/customization: move section on storing configuration Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 04 of 13] manual/user guide/customization: rework " Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 05 of 13] manual/user guide/customization: re-order introduction Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 06 of 13] manual/user guide/customization: add section on device/permission tables Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 07 of 13] manual/user guide/customization: add section on users tables Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 08 of 13] manual/user guide/customization: rename section 'Customizing packages' Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 09 of 13] manual/user guide/customization: change recommendation for package paths Thomas De Schampheleire
2014-09-18 19:39 ` Thomas De Schampheleire [this message]
2014-09-18 19:39 ` [Buildroot] [PATCH 11 of 13] manual/user guide/customization: refer to dir structure from rootfs section Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 12 of 13] manual/user guide/customization: rework 'step-by-step instructions' Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 13 of 13] manual/user guide/customization: add section on layered customization Thomas De Schampheleire
2014-09-18 20:03 ` [Buildroot] [PATCH 00 of 13] manual: improvements in 'Project-specific customization' section Thomas Petazzoni
2014-09-19 6:40 ` Thomas De Schampheleire
2014-09-21 17:42 ` Thomas Petazzoni
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=493dc449feeaa92bce5c.1411069173@localhost \
--to=patrickdepinguin@gmail.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