All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2 of 6 v2] manual: add documentation for kconfig-package
Date: Wed, 30 Jul 2014 21:58:03 +0200	[thread overview]
Message-ID: <7e76c27202ece126eb36.1406750283@localhost> (raw)
In-Reply-To: <patchbomb.1406750281@localhost>

This patch adds documentation for the new kconfig-package infrastructure to
the manual.

Note that due to the simplicity of the infrastructure, the documentation
is not split in a 'tutorial' and a 'reference', like for the other
infrastructures. Instead, the usage is described in one section.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
v2: update after move to a real infrastructure

 docs/manual/adding-packages-kconfig.txt |  56 +++++++++++++++++++++++++++++
 docs/manual/adding-packages.txt         |   2 +
 2 files changed, 58 insertions(+), 0 deletions(-)

diff -r 83a2e5f2641a -r 7e76c27202ec docs/manual/adding-packages-kconfig.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/manual/adding-packages-kconfig.txt	Thu Jul 24 20:54:50 2014 +0200
@@ -0,0 +1,56 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+=== Infrastructure for packages using kconfig for configuration files
+
+A popular way for a software package to handle user-specified
+configuration is +kconfig+. Among others, it is used by the Linux
+kernel, Busybox, and Buildroot itself. The presence of a .config file
+and a +menuconfig+ target are two well-known symptoms of kconfig being
+used.
+
+Buildroot features an infrastructure for packages that use kconfig for
+configuration. This infrastructure provides the necessary make logic to
+expose the package +menuconfig+ target as +foo-menuconfig+ in Buildroot,
+and to handle the copying and copy-back of the configuration file in a
+correct way.
+
+The +kconfig-package+ infrastructure is based on the +generic-package+
+infrastructure. All variables supported by +generic-package+ are
+available in +kconfig-package+ as well. See
+xref:generic-package-reference[] for more details.
+
+In order to use the +kconfig-package+ infrastructure for a Buildroot
+package, the minimally required lines in the .mk file in addition to
+the variables required by the +generic-package+ infrastructure, are:
+
+------------------------------
+FOO_KCONFIG_FILE = reference-to-source-configuration-file
+
+$(eval $(kconfig-package))
+------------------------------
+
+This snippet will create following make targets:
+
+* +foo-menuconfig+, which calls the package's +menuconfig+ target
+
+* +foo-update-config+, which copies back the configuration to the source
+  configuration file.
+
+and will ensure that the source configuration file is copied to the build
+directory at the right moment.
+
+In addition to these minimally required lines, several optional variables can
+be set to suit the needs of the package under consideration:
+
+* +FOO_KCONFIG_EDITORS+: a space-separated list of kconfig editors to
+  support, for example 'menuconfig xconfig'. By default, 'menuconfig'.
+
+* +FOO_KCONFIG_OPT+: extra options to pass when calling the kconfig
+  ediftors. This may need to include '$(FOO_MAKE_OPT)', for example. By
+  default, empty.
+
+* +FOO_KCONFIG_FIXUP_CMDS+: a list of shell commands needed to fixup the
+  configuration file after copying it or running a kconfig editor. Such
+  commands may be needed to ensure a configuration consistent with other
+  configuration of Buildroot, for example. By default, empty.
diff -r 83a2e5f2641a -r 7e76c27202ec docs/manual/adding-packages.txt
--- a/docs/manual/adding-packages.txt	Mon Jun 30 21:08:13 2014 +0200
+++ b/docs/manual/adding-packages.txt	Thu Jul 24 20:54:50 2014 +0200
@@ -25,6 +25,8 @@
 
 include::adding-packages-virtual.txt[]
 
+include::adding-packages-kconfig.txt[]
+
 include::adding-packages-hooks.txt[]
 
 include::adding-packages-gettext.txt[]

  parent reply	other threads:[~2014-07-30 19:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 19:58 [Buildroot] [PATCH 0 of 6 v2] Introduction of kconfig-package Thomas De Schampheleire
2014-07-30 19:58 ` [Buildroot] [PATCH 1 of 6 v2] infra: introduce a kconfig-package infrastructure Thomas De Schampheleire
2014-07-31 20:42   ` Yann E. MORIN
2014-08-01 19:22     ` Thomas De Schampheleire
2014-07-30 19:58 ` Thomas De Schampheleire [this message]
2014-07-31 21:03   ` [Buildroot] [PATCH 2 of 6 v2] manual: add documentation for kconfig-package Yann E. MORIN
2014-07-30 19:58 ` [Buildroot] [PATCH 3 of 6 v2] uclibc: convert to kconfig-package infrastructure Thomas De Schampheleire
2014-07-31 21:07   ` Yann E. MORIN
2014-08-01 19:42     ` Thomas De Schampheleire
2014-08-01 20:21       ` Yann E. MORIN
2014-07-30 19:58 ` [Buildroot] [PATCH 4 of 6 v2] uclibc: only add targets if uclibc is enabled Thomas De Schampheleire
2014-07-31 21:08   ` Yann E. MORIN
2014-07-31 21:13   ` Thomas Petazzoni
2014-08-01 19:37     ` Thomas De Schampheleire
2014-08-01 20:38       ` Yann E. MORIN
2014-07-30 19:58 ` [Buildroot] [PATCH 5 of 6 v2] busybox: convert to kconfig-package infrastructure Thomas De Schampheleire
2014-07-31 21:53   ` Yann E. MORIN
2014-07-30 19:58 ` [Buildroot] [PATCH 6 of 6 v2] busybox: only add kconfig targets if uclibc is enabled Thomas De Schampheleire
2014-07-31 21:12   ` Yann E. MORIN

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=7e76c27202ece126eb36.1406750283@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.