Pull request for branch for-master/doc
Hello,
Here is some updates and fixes in the manual.
The following changes since commit 6056de8971bf25c9853c38583dc50b5abcb982de:
rpi-userland: update to fix no-longer applying patch (2013-02-10 13:58:51 +0100)
are available in the git repository at:
git at github.com:tSed/buildroot.git for-master/doc
for you to fetch changes up to 73205fcda9f19a8e4717799831d0eb41a376da27:
Makefile: add to the release target a warning about the manual updates. (2013-02-13 23:49:12 +0100)
----------------------------------------------------------------
Samuel Martin (9):
manual: cleanup and update editor tags
manual: fix cross-refs
manual: sprinkle with some calls to MESSAGE
manual: faq: add entry about the relocatable toolchain
manual: faq: add workaround to avoid rebuilding the buildroot toolchain after
manual: minor fix in patch-policy.txt
manual: misc. post-{build,image} scripts fixes
manual: update {deprecated,package}-list.txt
Makefile: add to the release target a warning about the manual updates.
Makefile | 2 + docs/manual/adding-packages-autotools.txt | 1 + docs/manual/adding-packages-cmake.txt | 1 + docs/manual/adding-packages-conclusion.txt | 1 + docs/manual/adding-packages-directory.txt | 1 + docs/manual/adding-packages-generic.txt | 1 + docs/manual/adding-packages-gettext.txt | 1 + docs/manual/adding-packages-tips.txt | 1 + docs/manual/adding-packages.txt | 3 +- docs/manual/advanced.txt | 1 + docs/manual/appendix.txt | 14 +- docs/manual/beyond-buildroot.txt | 1 + docs/manual/ccache-support.txt | 3 +- docs/manual/common-usage.txt | 2 + docs/manual/configure.txt | 6 +- docs/manual/contribute.txt | 1 + docs/manual/customize-busybox-config.txt | 3 +- docs/manual/customize-kernel-config.txt | 3 +- docs/manual/customize-rootfs.txt | 33 +- docs/manual/customize-store.txt | 10 +- docs/manual/customize-toolchain.txt | 5 +- docs/manual/customize-uclibc-config.txt | 3 +- docs/manual/customize.txt | 1 + docs/manual/deprecated-list.txt | 81 ++- docs/manual/developer-guide.txt | 1 + docs/manual/download-infra.txt | 3 +- docs/manual/download-location.txt | 1 + docs/manual/eclipse-integration.txt | 1 + docs/manual/faq-troubleshooting.txt | 56 ++ docs/manual/get-involved.txt | 1 + docs/manual/getting.txt | 3 +- docs/manual/going-further.txt | 1 + docs/manual/how-buildroot-works.txt | 1 + docs/manual/introduction.txt | 1 + docs/manual/legal-notice.txt | 1 + docs/manual/make-tips.txt | 3 +- docs/manual/makedev-syntax.txt | 3 +- docs/manual/manual.mk | 9 +- docs/manual/manual.txt | 1 + docs/manual/package-list.txt | 948 +++++++++++++++++++++++++++++ docs/manual/package-make-target.txt | 1 + docs/manual/patch-policy.txt | 7 +- docs/manual/pkg-list.txt | 870 -------------------------- docs/manual/prerequisite.txt | 3 +- docs/manual/rebuilding-packages.txt | 3 +- docs/manual/starting-up.txt | 1 + docs/manual/using-buildroot-toolchain.txt | 1 + docs/manual/using.txt | 1 + docs/manual/working-with.txt | 4 +- docs/manual/writing-rules.txt | 1 + support/scripts/gen-manual-lists.py | 237 ++++++++ 51 files changed, 1383 insertions(+), 959 deletions(-) create mode 100644 docs/manual/package-list.txt delete mode 100644 docs/manual/pkg-list.txt create mode 100755 support/scripts/gen-manual-lists.py
Yours,
--
Samuel
PATCH 1/9 manual: cleanup and update editor tags
--- docs/manual/adding-packages-autotools.txt | 1 + docs/manual/adding-packages-cmake.txt | 1 + docs/manual/adding-packages-conclusion.txt | 1 + docs/manual/adding-packages-directory.txt | 1 + docs/manual/adding-packages-generic.txt | 1 + docs/manual/adding-packages-gettext.txt | 1 + docs/manual/adding-packages-tips.txt | 1 + docs/manual/adding-packages.txt | 3 ++- docs/manual/advanced.txt | 1 + docs/manual/appendix.txt | 1 + docs/manual/beyond-buildroot.txt | 1 + docs/manual/ccache-support.txt | 3 ++- docs/manual/common-usage.txt | 1 + docs/manual/configure.txt | 3 ++- docs/manual/contribute.txt | 1 + docs/manual/customize-busybox-config.txt | 3 ++- docs/manual/customize-kernel-config.txt | 3 ++- docs/manual/customize-rootfs.txt | 3 ++- docs/manual/customize-store.txt | 3 ++- docs/manual/customize-toolchain.txt | 3 ++- docs/manual/customize-uclibc-config.txt | 3 ++- docs/manual/customize.txt | 1 + docs/manual/developer-guide.txt | 1 + docs/manual/download-infra.txt | 3 ++- docs/manual/download-location.txt | 1 + docs/manual/eclipse-integration.txt | 1 + docs/manual/faq-troubleshooting.txt | 1 + docs/manual/get-involved.txt | 1 + docs/manual/getting.txt | 3 ++- docs/manual/going-further.txt | 1 + docs/manual/how-buildroot-works.txt | 1 + docs/manual/introduction.txt | 1 + docs/manual/legal-notice.txt | 1 + docs/manual/make-tips.txt | 3 ++- docs/manual/makedev-syntax.txt | 3 ++- docs/manual/manual.txt | 1 + docs/manual/package-make-target.txt | 1 + docs/manual/patch-policy.txt | 1 + docs/manual/prerequisite.txt | 3 ++- docs/manual/rebuilding-packages.txt | 3 ++- docs/manual/starting-up.txt | 1 + docs/manual/using-buildroot-toolchain.txt | 1 + docs/manual/using.txt | 1 + docs/manual/working-with.txt | 1 + docs/manual/writing-rules.txt | 1 + 45 files changed, 60 insertions(+), 15 deletions(-)
docs/manual/adding-packages-autotools.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Infrastructure for autotools-based packages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/adding-packages-cmake.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Infrastructure for CMake-based packages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/adding-packages-conclusion.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Conclusion ~~~~~~~~~~
docs/manual/adding-packages-directory.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Package directory ~~~~~~~~~~~~~~~~~
docs/manual/adding-packages-generic.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Infrastructure for packages with specific build systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/adding-packages-gettext.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Gettext integration and interaction with packages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/adding-packages-tips.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Tips and tricks ~~~~~~~~~~~~~~~
docs/manual/adding-packages.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[adding-packages]] Adding new packages to Buildroot
docs/manual/advanced.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Advanced usage --------------
docs/manual/appendix.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Appendix ========
docs/manual/beyond-buildroot.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Beyond Buildroot ================
docs/manual/ccache-support.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[ccache]] Using +ccache+ in Buildroot
docs/manual/common-usage.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Daily use ---------
docs/manual/configure.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[configure]] Details on Buildroot configuration
docs/manual/contribute.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Contibuting to Buildroot ========================
docs/manual/customize-busybox-config.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[busybox-custom]] Customizing the Busybox configuration
docs/manual/customize-kernel-config.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[kernel-custom]] Customizing the Linux kernel configuration
docs/manual/customize-rootfs.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[rootfs-custom]] Customizing the generated target filesystem
docs/manual/customize-store.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[customize-store]] Storing the configuration
docs/manual/customize-toolchain.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[toolchain-custom]] Customizing the toolchain
docs/manual/customize-uclibc-config.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[uclibc-custom]] Customizing the uClibc configuration
docs/manual/customize.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Customization -------------
docs/manual/developer-guide.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Developer Guidelines ====================
docs/manual/download-infra.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[download-infra]]
docs/manual/download-location.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Location of downloaded packages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/eclipse-integration.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Integration with Eclipse ------------------------
docs/manual/faq-troubleshooting.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Frequently Asked Questions & Troubleshooting ============================================
docs/manual/get-involved.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Getting involved ================
docs/manual/getting.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[getting-buildroot]] Getting Buildroot
docs/manual/going-further.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Going further in Buildroot's innards ====================================
docs/manual/how-buildroot-works.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: How Buildroot works -------------------
docs/manual/introduction.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: About Buildroot ===============
docs/manual/legal-notice.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[legal-info]]
docs/manual/make-tips.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[make-tips]] 'make' tips
docs/manual/makedev-syntax.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[makedev-syntax]] Makedev syntax documentation
docs/manual/manual.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: The Buildroot user manual =========================
docs/manual/package-make-target.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[pkg-build-steps]]
docs/manual/patch-policy.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[patch-policy]]
docs/manual/prerequisite.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[requirement]] System requirements
docs/manual/rebuilding-packages.txt +2 -1
@@ -1,4 +1,5 @@ -// -*- mode:doc -*- ; +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: [[full-rebuild]] Understanding when a full rebuild is necessary
docs/manual/starting-up.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Starting up ===========
docs/manual/using-buildroot-toolchain.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Using the generated toolchain outside Buildroot ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/using.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Using Buildroot ---------------
docs/manual/working-with.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Working with Buildroot ======================
docs/manual/writing-rules.txt +1 -0
@@ -1,4 +1,5 @@ // -*- mode:doc; -*- +// vim: set syntax=asciidoc: Coding style ------------
Signature · 1 line
1.8.1.3
PATCH 1/9 manual: cleanup and update editor tags
Quoted 1 line · Samuel Martin
Signed-off-by Samuel Martin<[email protected]>
Doesn't hurt to include it in 2013.02.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/9 manual: cleanup and update editor tags
In reply to Samuel MartinQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Samuel" == Samuel Martin <[email protected]> writes:
Samuel> Signed-off-by: Samuel Martin <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/9 manual: fix cross-refs
In reply to Samuel Martin--- docs/manual/configure.txt | 3 +++ docs/manual/customize-store.txt | 7 ++++++- docs/manual/customize-toolchain.txt | 2 +- docs/manual/working-with.txt | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-)
docs/manual/configure.txt +3 -0
@@ -64,6 +64,7 @@ Type+ option in the +Toolchain+ menu. Once one solution has been chosen, a number of configuration options appear, they are detailed in the following sections. +[[internal-toolchain-backend]] Internal toolchain backend ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -138,6 +139,7 @@ Drawbacks of this backend: using the _External toolchain backend_. * Limited to the _uClibc_ C library. +[[external-toolchain-backend]] External toolchain backend ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -240,6 +242,7 @@ Drawbacks of this backend: fix from the toolchain vendor, unless you build your external toolchain by yourself using Crosstool-NG. +[[crosstool-ng-toolchain-backend]] Crosstool-NG toolchain backend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docs/manual/customize-store.txt +6 -1
@@ -13,10 +13,13 @@ consists of the buildroot configuration, the configuration files for packages that you use (kernel, busybox, uClibc, ...), and your rootfs modifications. + +[[customize-store-basics]] Basics for storing the configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -[[customize-store-basics]] + +[[customize-store-buildroot-config]] Buildroot configuration ^^^^^^^^^^^^^^^^^^^^^^^
@@ -35,6 +38,7 @@ Alternatively, you can copy the file to any other place and rebuild with +make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>+. +[[customize-store-package-config]] Other package configuration ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -71,6 +75,7 @@ configuration files easier. resp. +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+. +[[customize-store-board-support]] Creating your own board support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
docs/manual/customize-toolchain.txt +1 -1
@@ -15,7 +15,7 @@ There is no way of tuning an external toolchain since Buildroot does not generate it. It also requires to set the Buildroot settings according to the toolchain ones -(see xref:external-toolchain[]). +(see xref:external-toolchain-backend[]). Using the internal Buildroot toolchain backend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docs/manual/working-with.txt +2 -1
@@ -25,4 +25,5 @@ interested in hacking it to add: * new packages: refer to the xref:adding-packages[Developer guide] -* new board support: refer to the xref:board-support[Developer guide] +* new board support: refer to the xref:customize-store[], more specifically + xref:customize-store-board-support[].
Signature · 1 line
1.8.1.3
PATCH 2/9 manual: fix cross-refs
docs/manual/working-with.txt interested in hacking it to add: · line 29
Quoted 11 lines · Samuel Martin
docs/manual/working-with.txt +2
-1@@ -25,4 +25,5 @@ interested in hacking it to add: * new packages: refer to the xref:adding-packages[Developer guide] -* new board support: refer to the xref:board-support[Developer guide] +* new board support: refer to the xref:customize-store[], more specifically + xref:customize-store-board-support[].
I haven't checked, but doesn't this render to something like "refer to
the 3.4, more specifically 3.7"? Why not just:
* new board support: refer to the xref:customize-store-board-support[Developer guide].
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 3/9 manual: sprinkle with some calls to MESSAGE
In reply to Samuel Martin--- docs/manual/manual.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/manual/manual.mk +1 -1
@@ -18,7 +18,7 @@ $(1): $(1)-$(3) $(1)-$(3): $$(O)/docs/$(1)/$(1).$(4) $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) - @echo "Generating $(5) $(1)..." + @$(call MESSAGE,"Generating $(5) $(1)...") $(Q)mkdir -p $$(@D) $(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \ -D $$(@D) $$<
Signature · 1 line
1.8.1.3
PATCH 3/9 manual: sprinkle with some calls to MESSAGE
Quoted 2 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>
Doesn't hurt to include it in 2013.02.
Regards,
Arnout
Quoted 18 lines
--- docs/manual/manual.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docs/manual/manual.mk +1
-1@@ -18,7 +18,7 @@ $(1): $(1)-$(3) $(1)-$(3): $$(O)/docs/$(1)/$(1).$(4) $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) - @echo "Generating $(5) $(1)..." + @$(call MESSAGE,"Generating $(5) $(1)...") $(Q)mkdir -p $$(@D) $(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \ -D $$(@D) $$<
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 3/9 manual: sprinkle with some calls to MESSAGE
In reply to Samuel MartinQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Samuel" == Samuel Martin <[email protected]> writes:
Samuel> Signed-off-by: Samuel Martin <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/9 manual: faq: add entry about the relocatable toolchain
In reply to Samuel Martin--- docs/manual/faq-troubleshooting.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
docs/manual/faq-troubleshooting.txt +21 -0
@@ -126,3 +126,24 @@ directory as the new root, will most likely fail. If you want to run the target filesystem inside a chroot, or as an NFS root, then use the tarball image generated in +images/+ and extract it as root. + +[[faq-relocatable-toolchains]] +Are Buildroot toolchains relocatable? +------------------------------------- + +Because Buildroot uses several toolchain backends, there is one anwser +per backend: + +Using the external or crosstool-NG toolchain backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These toolchains are mostly likely relocatable; the _Buildroot compiler +wrapper_ is relocatable. + +However, some tools built and installed into the +HOST_DIR+ may not be +relocatable, with some absolute pathes hard-coded inside. + +Using the internal Buildroot toolchain backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These toolchains are currently *not relocatable*.
Signature · 1 line
1.8.1.3
PATCH 4/9 manual: faq: add entry about the relocatable toolchain
Quoted 20 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/faq-troubleshooting.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)docs/manual/faq-troubleshooting.txt +6
-0@@ -126,3 +126,24 @@ directory as the new root, will most likely fail. If you want to run the target filesystem inside a chroot, or as an NFS root, then use the tarball image generated in +images/+ and extract it as root. + +[[faq-relocatable-toolchains]] +Are Buildroot toolchains relocatable? +------------------------------------- + +Because Buildroot uses several toolchain backends, there is one anwser
docs/manual/faq-troubleshooting.txt directory as the new root, will most likely fail. · line 144
Quoted 10 lines
docs/manual/faq-troubleshooting.txt +10
-0+per backend: + +Using the external or crosstool-NG toolchain backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These toolchains are mostly likely relocatable; the _Buildroot compiler +wrapper_ is relocatable. + +However, some tools built and installed into the +HOST_DIR+ may not be +relocatable, with some absolute pathes hard-coded inside.
^^^^^^ paths
Regards,
Arnout
Quoted 6 lines
docs/manual/faq-troubleshooting.txt +5
-0+ +Using the internal Buildroot toolchain backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These toolchains are currently *not relocatable*.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 4/9 manual: faq: add entry about the relocatable toolchain
In reply to Samuel MartinDear Samuel Martin,
Quoted 20 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/faq-troubleshooting.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)docs/manual/faq-troubleshooting.txt +6
-0@@ -126,3 +126,24 @@ directory as the new root, will most likely fail. If you want to run the target filesystem inside a chroot, or as an NFS root, then use the tarball image generated in +images/+ and extract it as root. + +[[faq-relocatable-toolchains]] +Are Buildroot toolchains relocatable? +------------------------------------- + +Because Buildroot uses several toolchain backends, there is one anwser
docs/manual/faq-troubleshooting.txt directory as the new root, will most likely fail. · line 144
Quoted 10 lines
docs/manual/faq-troubleshooting.txt +10
-0+per backend: + +Using the external or crosstool-NG toolchain backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These toolchains are mostly likely relocatable; the _Buildroot compiler +wrapper_ is relocatable. + +However, some tools built and installed into the +HOST_DIR+ may not be +relocatable, with some absolute pathes hard-coded inside.
I find this text rather confusing. What does "mostly likely" means for the reader? The reader surely wants to know if the toolchain is relocatable or not.
Therefore, I think this text should be changed to clarify what is meant by "toolchain". Is it just the bare toolchain (gcc, binutils, libc, kernel headers), or is it the complete toolchain that Buildroot produces, with all the additional libraries and headers?
Also, you mention the "Buildroot compiler wrapper", but nowhere in the documentation we explain what it is, and I don't think it should be explained in the documentation, except in a section dedicated to "Deep Buildroot internals", but certainly not to answer a FAQ question about relocatable toolchains.
I would rather think that a section discussing how to use the "SDK" produced by Buildroot, and how it can be shared with application developers, could mention that the SDK is currently not relocatable, but that we are working on fixing this.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 4/9 manual: faq: add entry about the relocatable toolchain
Hi Thomas,
2013/2/14 Thomas Petazzoni <[email protected]>:
Quoted 38 lines
Dear Samuel Martin,
Quoted 20 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/faq-troubleshooting.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)docs/manual/faq-troubleshooting.txt +6
-0@@ -126,3 +126,24 @@ directory as the new root, will most likely fail. If you want to run the target filesystem inside a chroot, or as an NFS root, then use the tarball image generated in +images/+ and extract it as root. + +[[faq-relocatable-toolchains]] +Are Buildroot toolchains relocatable? +------------------------------------- + +Because Buildroot uses several toolchain backends, there is one anwserdocs/manual/faq-troubleshooting.txt directory as the new root, will most likely fail. · line 144
Quoted 10 lines
docs/manual/faq-troubleshooting.txt +10
-0+per backend: + +Using the external or crosstool-NG toolchain backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These toolchains are mostly likely relocatable; the _Buildroot compiler +wrapper_ is relocatable. + +However, some tools built and installed into the +HOST_DIR+ may not be +relocatable, with some absolute pathes hard-coded inside.I find this text rather confusing. What does "mostly likely" means for the reader? The reader surely wants to know if the toolchain is relocatable or not.
Quoted 4 lines
Therefore, I think this text should be changed to clarify what is meant by "toolchain". Is it just the bare toolchain (gcc, binutils, libc, kernel headers), or is it the complete toolchain that Buildroot produces, with all the additional libraries and headers?
I agree with this point.
Quoted 6 lines
Also, you mention the "Buildroot compiler wrapper", but nowhere in the documentation we explain what it is, and I don't think it should be explained in the documentation, except in a section dedicated to "Deep Buildroot internals", but certainly not to answer a FAQ question about relocatable toolchains.
Agree.
Quoted 5 lines
I would rather think that a section discussing how to use the "SDK" produced by Buildroot, and how it can be shared with application developers, could mention that the SDK is currently not relocatable, but that we are working on fixing this.
Well, this will certainly be a better section to develop this point.
The SDK section will come later (not sure it'll be ready for the 2013.02 release...).
Regards,
Signature · 1 line
Samuel
PATCH 5/9 manual: faq: add workaround to avoid rebuilding the buildroot toolchain after each clean
In reply to Samuel Martin--- docs/manual/common-usage.txt | 1 + docs/manual/faq-troubleshooting.txt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)
docs/manual/common-usage.txt +1 -0
@@ -20,6 +20,7 @@ all sources that you previously selected in the configurator You can now disconnect or copy the content of your +dl+ directory to the build-host. +[[daily-oot-build]] Building out-of-tree ~~~~~~~~~~~~~~~~~~~~
docs/manual/faq-troubleshooting.txt +34 -0
@@ -147,3 +147,37 @@ Using the internal Buildroot toolchain backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These toolchains are currently *not relocatable*. + +However, it is possible to build a toolchain using the internal Buildroot +backend in another location (see xref:daily-oot-build[]), then use it as an +_external_ one to prevent from rebuilding it after issuing +make clean+ +(see xref:faq-avoid-rebuild-toolchain[]). + +[[faq-avoid-rebuild-toolchain]] +How to avoid always rebuilding the toolchain? +--------------------------------------------- + +When using the internal Buildroot toolchain backend or the +http://crosstool-ng.org[crosstool-NG] one, runnong +make clean+ not only +remove the built binaries, but also the whole toolchain. + +It is possible to prevent this by, first, building the toolchain in a +place different from the one where the images will be built. + +To do so: + +1. Build the toolchain somewhere: ++ +---------------------------- +make toolchain O=/path/to/toolchain +---------------------------- ++ +1. Use this pre-built toolchain as an external one in a new and clean + build (see xref:external-toolchain-backend[]) with a different output + directory than the pre-built toolchain one. + +This way, you will not have to rebuild the toolchain after invoking ++make clean+. + +However, the toolchain should be regenerated after any change of the ++Target Architecture+ (or its _variant_), or done in the +Toolchain+ menu.
Signature · 1 line
1.8.1.3
PATCH 5/9 manual: faq: add workaround to avoid rebuilding the buildroot toolchain after each clean
Quoted 12 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/common-usage.txt | 1 + docs/manual/faq-troubleshooting.txt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)docs/manual/common-usage.txt +0
-0
docs/manual/common-usage.txt all sources that you previously selected in the configurator · line 25
Quoted 6 lines
docs/manual/common-usage.txt +1
-0@@ -20,6 +20,7 @@ all sources that you previously selected in the configurator You can now disconnect or copy the content of your +dl+ directory to the build-host. +[[daily-oot-build]] Building out-of-tree ~~~~~~~~~~~~~~~~~~~~
The other tags in this section don't have the 'daily-' prefix, and it
took me a while to understand what the daily meant in the first place. So I'd rename it to out-of-tree-build.
Quoted 6 lines
docs/manual/faq-troubleshooting.txt +0
-0
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 154
Quoted 8 lines
docs/manual/faq-troubleshooting.txt +5
-0@@ -147,3 +147,37 @@ Using the internal Buildroot toolchain backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These toolchains are currently *not relocatable*. + +However, it is possible to build a toolchain using the internal Buildroot +backend in another location (see xref:daily-oot-build[]), then use it as an +_external_ one to prevent from rebuilding it after issuing +make clean+ +(see xref:faq-avoid-rebuild-toolchain[]).
xreffing to immediately below is a bit silly...
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 161
Quoted 7 lines
docs/manual/faq-troubleshooting.txt +7
-0+ +[[faq-avoid-rebuild-toolchain]] +How to avoid always rebuilding the toolchain? +--------------------------------------------- + +When using the internal Buildroot toolchain backend or the +http://crosstool-ng.org[crosstool-NG] one, runnong +make clean+ not only
^^^^^^^ running
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 165
Quoted 4 lines
docs/manual/faq-troubleshooting.txt +4
-0+remove the built binaries, but also the whole toolchain. + +It is possible to prevent this by, first, building the toolchain in a +place different from the one where the images will be built.
The 'first' sounds a bit strange here. How about:
It is possible to prevent this by building the toolchain in a different place than the one where the images will be built. To do so:
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 172
Quoted 7 lines
docs/manual/faq-troubleshooting.txt +7
-0+ +To do so: + +1. Build the toolchain somewhere: ++ +---------------------------- +make toolchain O=/path/to/toolchain
I personally would do it with
make toolchain BR2_HOST_DIR=/path/to/toolchain
That gives you everything you need and nothing more (no build dir and
stuff).
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 177
Quoted 5 lines
docs/manual/faq-troubleshooting.txt +5
-0+---------------------------- ++ +1. Use this pre-built toolchain as an external one in a new and clean + build (see xref:external-toolchain-backend[]) with a different output + directory than the pre-built toolchain one.
Not clear enough. How about:
1. Reconfigure buildroot with a custom external toolchain (see xref:external-toolchain-backend[]). Set the toolchain path to /path/to/toolchain/usr.
// Note: that's actually not a good example, because the default for // BR2_TOOLCHAIN_EXTERNAL_PATH is literally /path/to/toolchain/usr, so a // dumb user could think it is already correct...]
1. make clean; make
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 183
Quoted 6 lines
docs/manual/faq-troubleshooting.txt +6
-0+ +This way, you will not have to rebuild the toolchain after invoking ++make clean+. + +However, the toolchain should be regenerated after any change of the ++Target Architecture+ (or its _variant_), or done in the +Toolchain+ menu.
However, the toolchain should be regenerated after you change a target architecture option (architecture variant, ABI, floating point, ...), or when you make any change in the +Toolchain+ menu.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 5/9 manual: faq: add workaround to avoid rebuilding the buildroot toolchain after each clean
In reply to Samuel MartinDear Samuel Martin,
Quoted 51 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/common-usage.txt | 1 + docs/manual/faq-troubleshooting.txt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)docs/manual/common-usage.txt +1
-0@@ -20,6 +20,7 @@ all sources that you previously selected in the configurator You can now disconnect or copy the content of your +dl+ directory to the build-host. +[[daily-oot-build]] Building out-of-tree ~~~~~~~~~~~~~~~~~~~~docs/manual/faq-troubleshooting.txt +24
-0@@ -147,3 +147,37 @@ Using the internal Buildroot toolchain backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These toolchains are currently *not relocatable*. + +However, it is possible to build a toolchain using the internal Buildroot +backend in another location (see xref:daily-oot-build[]), then use it as an +_external_ one to prevent from rebuilding it after issuing +make clean+ +(see xref:faq-avoid-rebuild-toolchain[]). + +[[faq-avoid-rebuild-toolchain]] +How to avoid always rebuilding the toolchain? +--------------------------------------------- + +When using the internal Buildroot toolchain backend or the +http://crosstool-ng.org[crosstool-NG] one, runnong +make clean+ not only +remove the built binaries, but also the whole toolchain. + +It is possible to prevent this by, first, building the toolchain in a +place different from the one where the images will be built. + +To do so: + +1. Build the toolchain somewhere: ++ +---------------------------- +make toolchain O=/path/to/toolchain +----------------------------
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 183
Quoted 10 lines
docs/manual/faq-troubleshooting.txt +10
-0++ +1. Use this pre-built toolchain as an external one in a new and clean + build (see xref:external-toolchain-backend[]) with a different output + directory than the pre-built toolchain one. + +This way, you will not have to rebuild the toolchain after invoking ++make clean+. + +However, the toolchain should be regenerated after any change of the ++Target Architecture+ (or its _variant_), or done in the +Toolchain+ menu.
I think this text is misleading, because it suggests that the only way to avoid rebuilding the toolchain over and over again is to build a toolchain with Buildroot, and then use it as an external toolchain in Buildroot. There are other options that are possible:
* Use Crosstool-NG outside of Buildroot to generate a toolchain
* Use a pre-built toolchain
I have the feeling that this new text doesn't articulate very well with the text that was added in 401d323698266468e322471530ee1997835fc335.
We have to be careful to not add a set of random facts in the manual one after the other, without keeping a consistency and ordering on the different parts of the manual.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 5/9 manual: faq: add workaround to avoid rebuilding the buildroot toolchain after each clean
Hi Thomas,
2013/2/14 Thomas Petazzoni <[email protected]>:
Quoted 63 lines
Dear Samuel Martin,
Quoted 60 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/common-usage.txt | 1 + docs/manual/faq-troubleshooting.txt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)docs/manual/common-usage.txt +1
-0@@ -20,6 +20,7 @@ all sources that you previously selected in the configurator You can now disconnect or copy the content of your +dl+ directory to the build-host. +[[daily-oot-build]] Building out-of-tree ~~~~~~~~~~~~~~~~~~~~docs/manual/faq-troubleshooting.txt +33
-0@@ -147,3 +147,37 @@ Using the internal Buildroot toolchain backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These toolchains are currently *not relocatable*. + +However, it is possible to build a toolchain using the internal Buildroot +backend in another location (see xref:daily-oot-build[]), then use it as an +_external_ one to prevent from rebuilding it after issuing +make clean+ +(see xref:faq-avoid-rebuild-toolchain[]). + +[[faq-avoid-rebuild-toolchain]] +How to avoid always rebuilding the toolchain? +--------------------------------------------- + +When using the internal Buildroot toolchain backend or the +http://crosstool-ng.org[crosstool-NG] one, runnong +make clean+ not only +remove the built binaries, but also the whole toolchain. + +It is possible to prevent this by, first, building the toolchain in a +place different from the one where the images will be built. + +To do so: + +1. Build the toolchain somewhere: ++ +---------------------------- +make toolchain O=/path/to/toolchain +---------------------------- ++ +1. Use this pre-built toolchain as an external one in a new and clean + build (see xref:external-toolchain-backend[]) with a different output + directory than the pre-built toolchain one. + +This way, you will not have to rebuild the toolchain after invoking ++make clean+. + +However, the toolchain should be regenerated after any change of the
Quoted 8 lines
docs/manual/faq-troubleshooting.txt Using the internal Buildroot toolchain backend · line 183
Quoted 1 line
docs/manual/faq-troubleshooting.txt +1
-0++Target Architecture+ (or its _variant_), or done in the +Toolchain+ menu.I think this text is misleading, because it suggests that the only way to avoid rebuilding the toolchain over and over again is to build a toolchain with Buildroot, and then use it as an external toolchain in Buildroot. There are other options that are possible:
* Use Crosstool-NG outside of Buildroot to generate a toolchain
* Use a pre-built toolchain
Here, I only focus on the internal backend, but I agree it may not be as clear as I thought...
Quoted 3 lines
I have the feeling that this new text doesn't articulate very well with the text that was added in
401d323698266468e322471530ee1997835fc335.
My bad :s, I forgot to check how it goes with the rest of the manual...
Quoted 4 lines
We have to be careful to not add a set of random facts in the manual one after the other, without keeping a consistency and ordering on the different parts of the manual.
Agree.
Well, I see 2 options (at least) to rework this patch:
- either reword it (still as a faq entry) to properly integrate it with the rest of the manual;
- or add this workaround in the paragraph "Internal toolchain backend" from the section 3.1.1.
But any other suggestion is welcome.
Regards,
Signature · 1 line
Samuel
PATCH 6/9 manual: minor fix in patch-policy.txt
In reply to Samuel Martin--- docs/manual/patch-policy.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
docs/manual/patch-policy.txt +3 -3
@@ -34,7 +34,7 @@ Most patches are provided within Buildroot, in the package directory; these typically aim to fix cross-compilation, libc support, or other such issues. -These patch files should be named +<packagename>-*.patch+. +These patch files should be named +<packagename>-<description>.patch+. A +series+ file, as used by +quilt+, may also be added in the package directory. In that case, the +series+ file defines the patch
@@ -57,8 +57,8 @@ How patches are applied applied according to the +series+ file; + * Otherwise, patch files matching `<packagename>-*.patch` or - `<packagename>-*.patch.<arch>` (where +<arch>+ is the architecture - name) are applied following the +ls+ command order. + `<packagename>-<description>.patch.<arch>` (where +<arch>+ is the + architecture name) are applied following the +ls+ command order. . Run the +<packagename>_POST_PATCH_HOOKS+ commands if defined.
Signature · 1 line
1.8.1.3
PATCH 6/9 manual: minor fix in patch-policy.txt
Quoted 2 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>
Quoted 29 lines
--- docs/manual/patch-policy.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)docs/manual/patch-policy.txt +3
-3@@ -34,7 +34,7 @@ Most patches are provided within Buildroot, in the package directory; these typically aim to fix cross-compilation, libc support, or other such issues. -These patch files should be named +<packagename>-*.patch+. +These patch files should be named +<packagename>-<description>.patch+. A +series+ file, as used by +quilt+, may also be added in the package directory. In that case, the +series+ file defines the patch@@ -57,8 +57,8 @@ How patches are applied applied according to the +series+ file; + * Otherwise, patch files matching `<packagename>-*.patch` or - `<packagename>-*.patch.<arch>` (where +<arch>+ is the architecture - name) are applied following the +ls+ command order. + `<packagename>-<description>.patch.<arch>` (where +<arch>+ is the + architecture name) are applied following the +ls+ command order. . Run the +<packagename>_POST_PATCH_HOOKS+ commands if defined.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 6/9 manual: minor fix in patch-policy.txt
In reply to Samuel MartinDear Samuel Martin,
Quoted 20 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/patch-policy.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)docs/manual/patch-policy.txt +1
-1@@ -34,7 +34,7 @@ Most patches are provided within Buildroot, in the package directory; these typically aim to fix cross-compilation, libc support, or other such issues. -These patch files should be named +<packagename>-*.patch+. +These patch files should be named +<packagename>-<description>.patch+. A +series+ file, as used by +quilt+, may also be added in the package directory. In that case, the +series+ file defines the patch
docs/manual/patch-policy.txt How patches are applied · line 61
Quoted 7 lines
docs/manual/patch-policy.txt +2
-2@@ -57,8 +57,8 @@ How patches are applied applied according to the +series+ file; + * Otherwise, patch files matching `<packagename>-*.patch` or - `<packagename>-*.patch.<arch>` (where +<arch>+ is the architecture - name) are applied following the +ls+ command order. + `<packagename>-<description>.patch.<arch>` (where +<arch>+ is the + architecture name) are applied following the +ls+ command order.
The <packagename>-<description>.patch.<arch> naming is deprecated, and I think should no longer be mentioned in the documentation.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 6/9 manual: minor fix in patch-policy.txt
In reply to Samuel MartinQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Samuel" == Samuel Martin <[email protected]> writes:
Samuel> Signed-off-by: Samuel Martin <[email protected]>
Committed with the .patch.<arch> part dropped as mentioned by Thomas.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 7/9 manual: misc. post-{build, image} scripts fixes
In reply to Samuel Martin* update post-build scripts mechanism that now support several scripts
* fix formatting
--- docs/manual/customize-rootfs.txt | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
docs/manual/customize-rootfs.txt +16 -14
@@ -25,18 +25,18 @@ there are a few ways to customize the resulting target filesystem. directories, +.empty+ files and files ending with +~+ are excluded. _Among these first 3 methods, this one should be preferred_. -* In the Buildroot configuration, you can specify the path to a - *post-build script*, that gets called 'after' Buildroot builds all the - selected software, but 'before' the rootfs packages are - assembled. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ will allow you to - specify the location of your post-build script. This option can be +* In the Buildroot configuration, you can specify the pathes to a + *post-build scripts*, that get called in order, *after* _Buildroot builds + all the selected software_, but *before* _the rootfs packages are + assembled_. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ will allow you to + specify the location of your post-build scripts. This option can be found in the +System configuration+ menu. The destination root - filesystem folder is given as the first argument to this script, - and this script can then be used to remove or modify any file in your + filesystem folder is given as the first argument to these scripts, + and these scripts can then be used to remove or modify any file in your target filesystem. You should, however, use this feature with care. Whenever you find that a certain package generates wrong or unneeded - files, you should fix that package rather than work around it with a - post-build cleanup script. + files, you should fix that package rather than work around it with some + post-build cleanup scripts. You may also use these variables in your post-build script: - +BUILDROOT_CONFIG+: the path to the Buildroot .config file - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see
@@ -55,23 +55,25 @@ there are a few ways to customize the resulting target filesystem. installation. Note that this method is *not recommended*, as it duplicates the entire skeleton, which prevents from taking advantage of the fixes or improvements brought to the default Buildroot - skeleton. The recommended method is to use the _post-build script_ + skeleton. The recommended method is to use the _post-build scripts_ mechanism described in the previous item. -Note also that if you want to perform some specific actions *after* -all filesystem images have been created (for example to automatically +Note also that you can use the *post-image scripts* +if you want to perform some specific actions *after* _all +filesystem images have been created_ (for example to automatically extract your root filesystem tarball in a location exported by your NFS server, or to create a special firmware image that bundles your root filesystem and kernel image, or any other custom action), you can specify a space-separated list of scripts in the -+BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option. ++BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option. This option can be +found in the +System configuration+ menu as well. Each of those scripts will be called with the path to the +images+ output directory as first and unique argument, and will be executed with the main Buildroot source directory as the current directory. Those scripts will be executed as the user that executes Buildroot, which should normally not be the root user. Therefore, any -action requiring root permissions in one of these post-image script +action requiring root permissions in one of these _post-image scripts_ will require special handling (usage of fakeroot or sudo), which is left to the script developer.
Signature · 1 line
1.8.1.3
PATCH 7/9 manual: misc. post-{build, image} scripts fixes
Quoted 16 lines · Samuel Martin
* update post-build scripts mechanism that now support several scripts
* fix formattingSigned-off-by Samuel Martin <[email protected]>--- docs/manual/customize-rootfs.txt | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)docs/manual/customize-rootfs.txt +0
-0@@ -25,18 +25,18 @@ there are a few ways to customize the resulting target filesystem. directories, +.empty+ files and files ending with +~+ are excluded. _Among these first 3 methods, this one should be preferred_.
docs/manual/customize-rootfs.txt there are a few ways to customize the resulting target filesystem. · line 32
Quoted 10 lines
docs/manual/customize-rootfs.txt +5
-5-* In the Buildroot configuration, you can specify the path to a - *post-build script*, that gets called 'after' Buildroot builds all the - selected software, but 'before' the rootfs packages are - assembled. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ will allow you to - specify the location of your post-build script. This option can be +* In the Buildroot configuration, you can specify the pathes to a + *post-build scripts*, that get called in order, *after* _Buildroot builds + all the selected software_, but *before* _the rootfs packages are + assembled_. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ will allow you to + specify the location of your post-build scripts. This option can be
Several remarks:
- pathes -> paths
- plural doesn't have 'a'
- bold should be used very sparsely
- don't see a reason to emphasize the Buildroot builds... clause.
Alternative:
* In the Buildroot configuration, you can specify the paths to one or more *post-build scripts*. These scripts are called in the given order, 'after' Buildroot builds all the selected software, but 'before' the rootfs images are assembled. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ allows you to specify the location of your post-build scripts. This option can be
Quoted 17 lines
docs/manual/customize-rootfs.txt +4
-4found in the +System configuration+ menu. The destination root - filesystem folder is given as the first argument to this script, - and this script can then be used to remove or modify any file in your + filesystem folder is given as the first argument to these scripts, + and these scripts can then be used to remove or modify any file in your target filesystem. You should, however, use this feature with care. Whenever you find that a certain package generates wrong or unneeded - files, you should fix that package rather than work around it with a - post-build cleanup script. + files, you should fix that package rather than work around it with some + post-build cleanup scripts. You may also use these variables in your post-build script: - +BUILDROOT_CONFIG+: the path to the Buildroot .config file - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see@@ -55,23 +55,25 @@ there are a few ways to customize the resulting target filesystem. installation. Note that this method is *not recommended*, as it duplicates the entire skeleton, which prevents from taking advantage
docs/manual/customize-rootfs.txt there are a few ways to customize the resulting target filesystem. · line 63
Quoted 10 lines
docs/manual/customize-rootfs.txt +4
-3of the fixes or improvements brought to the default Buildroot - skeleton. The recommended method is to use the _post-build script_ + skeleton. The recommended method is to use the _post-build scripts_ mechanism described in the previous item. -Note also that if you want to perform some specific actions *after* -all filesystem images have been created (for example to automatically +Note also that you can use the *post-image scripts* +if you want to perform some specific actions *after* _all +filesystem images have been created_ (for example to automatically
Same remark about emphasis.
Regards,
Arnout
Quoted 19 lines
docs/manual/customize-rootfs.txt +3
-2extract your root filesystem tarball in a location exported by your NFS server, or to create a special firmware image that bundles your root filesystem and kernel image, or any other custom action), you can specify a space-separated list of scripts in the -+BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option. ++BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option. This option can be +found in the +System configuration+ menu as well. Each of those scripts will be called with the path to the +images+ output directory as first and unique argument, and will be executed with the main Buildroot source directory as the current directory. Those scripts will be executed as the user that executes Buildroot, which should normally not be the root user. Therefore, any -action requiring root permissions in one of these post-image script +action requiring root permissions in one of these _post-image scripts_ will require special handling (usage of fakeroot or sudo), which is left to the script developer.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 8/9 manual: update {deprecated, package}-list.txt
In reply to Samuel Martin* add the gen-manual-lists.py script generating the target and host package tables, and the deprecated stuff list as well. These tables and lists are generated parsing the Config.in files;
* add a make target to update these lists in the manual;
* update the these appendices of the manual.
--- docs/manual/appendix.txt | 13 +- docs/manual/deprecated-list.txt | 81 ++- docs/manual/manual.mk | 7 + docs/manual/package-list.txt | 948 ++++++++++++++++++++++++++++++++++++ docs/manual/pkg-list.txt | 870 --------------------------------- support/scripts/gen-manual-lists.py | 237 +++++++++ 6 files changed, 1233 insertions(+), 923 deletions(-) create mode 100644 docs/manual/package-list.txt delete mode 100644 docs/manual/pkg-list.txt create mode 100755 support/scripts/gen-manual-lists.py
docs/manual/appendix.txt +3 -10
@@ -6,15 +6,8 @@ Appendix include::makedev-syntax.txt[] -[[package-list]] -Available packages ------------------- -// docs/manaual/pkg-list.txt is generated using the following command: -// $ git grep -E '\((autotools|cmake|generic)-package\)' package/ | \ -// cut -d':' -f1 | grep '\.mk$' | \ -// sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \ -// sort > docs/manual/pkg-list.txt - -include::pkg-list.txt[] +// autogenerated +include::package-list.txt[] +// autogenerated include::deprecated-list.txt[]
docs/manual/deprecated-list.txt +38 -43
84 lines not on this page · raw message
docs/manual/manual.mk +7 -0
@@ -24,6 +24,13 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) -D $$(@D) $$< endef +manual-update-lists: + @$(call MESSAGE,"Updating the manual lists...") + $(Q)BR2_DEFCONFIG="" srctree=$(TOPDIR) \ + $(TOPDIR)/support/scripts/gen-manual-lists.py \ + --package-file $(TOPDIR)/docs/manual/package-list.txt \ + --deprecated-file $(TOPDIR)/docs/manual/deprecated-list.txt + ################################################################################ # GENDOC -- generates the make targets needed to build asciidoc documentation. #
docs/manual/package-list.txt new file +948 -0
948 lines not on this page · raw message
docs/manual/pkg-list.txt deleted +0 -870
870 lines not on this page · raw message
support/scripts/gen-manual-lists.py new file +237 -0
237 lines not on this page · raw message
Signature · 1 line
1.8.1.3
PATCH 8/9 manual: update {deprecated, package}-list.txt
Hi Samuel,
Quoted 5 lines · Samuel Martin
* add the
gen-manual-lists.pyscript generating the target and host package tables, and the deprecated stuff list as well. These tables and lists are generated parsing the Config.in files;
* add a make target to update these lists in the manual;
* update the these appendices of the manual.
The first two should be a separate patch from the third one. Although,
admittedly, it was pretty convenient to review all of them together.
Even though I have a lot of comments, this patch should be included in
-rc2, otherwise the package list in the manual is inconsistent.
Quoted 8 lines
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/appendix.txt | 13 +- docs/manual/deprecated-list.txt | 81 ++- docs/manual/manual.mk | 7 + docs/manual/package-list.txt | 948 ++++++++++++++++++++++++++++++++++++ docs/manual/pkg-list.txt | 870 ---------------------------------
Any particular reason to rename it?
Quoted 34 lines
support/scripts/gen-manual-lists.py | 237 +++++++++ 6 files changed, 1233 insertions(+), 923 deletions(-)create mode 100644
docs/manual/package-list.txtdelete mode 100644docs/manual/pkg-list.txtcreate mode 100755support/scripts/gen-manual-lists.pydocs/manual/appendix.txt +3
-10@@ -6,15 +6,8 @@ Appendix include::makedev-syntax.txt[] -[[package-list]] -Available packages ------------------- -// docs/manaual/pkg-list.txt is generated using the following command: -// $ git grep -E '\((autotools|cmake|generic)-package\)' package/ | \ -// cut -d':' -f1 | grep '\.mk$' | \ -// sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \ -// sort > docs/manual/pkg-list.txt - -include::pkg-list.txt[] +// autogenerated +include::package-list.txt[] +// autogenerated include::deprecated-list.txt[]docs/manual/deprecated-list.txt +0
-0
docs/manual/deprecated-list.txt line 8
Quoted 8 lines
docs/manual/deprecated-list.txt +0
-8@@ -1,46 +1,41 @@ -// -*- mode:doc -*- ; - -[[deprecated]] -Deprecated list ---------------- - -The following stuff are marked as _deprecated_ in Buildroot due to -their status either too old or unmaintained.
It's a pity that this part is gone. I would by the way move this to
appendix.txt: that's cleaner than putting part of the manual text in the python script. Same for the text in package-list.txt.
[snip]
Quoted 5 lines
docs/manual/manual.mk +0
-0
docs/manual/manual.mk $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) · line 33
Quoted 10 lines
docs/manual/manual.mk +7
-0@@ -24,6 +24,13 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) -D $$(@D) $$< endef +manual-update-lists: + @$(call MESSAGE,"Updating the manual lists...") + $(Q)BR2_DEFCONFIG="" srctree=$(TOPDIR) \ + $(TOPDIR)/support/scripts/gen-manual-lists.py \ + --package-file $(TOPDIR)/docs/manual/package-list.txt \ + --deprecated-file $(TOPDIR)/docs/manual/deprecated-list.txt +
This new goal should be added to .PHONY.
Quoted 12 lines
docs/manual/manual.mk +0
-0################################################################################ # GENDOC -- generates the make targets needed to build asciidoc documentation. #docs/manual/package-list.txt new file +3
-0@@ -0,0 +1,948 @@ +// +// Automatically generated list for Buildroot manual. +// Buildroot 2013.02-00794-g199d6d6-dirty
docs/manual/package-list.txt line 13
Quoted 10 lines
docs/manual/package-list.txt new file +10
-0+// Generation date: 2013-02-11 22:24:44.739087 +// + +[[package-list]] +Package Selection for the target +-------------------------------- + +[width="90%",cols="^1,4",options="header"] +|=================================================== +| Packages | Package Selection for the target -> ...
Nice! Maybe even better if this stands out a bit from the rest, perhaps:
<| Packages | Package Selection for the target -> ...
Quoted 9 lines
docs/manual/package-list.txt new file +9
-0+| acl | . -> System tools +| acpid | . -> Hardware handling +| alsa-lib | . -> Libraries -> Audio/Sound +| alsa-utils | . -> Audio and video applications +| alsamixergui | . -> Graphic libraries and applications (graphic/text) +| applewmproto | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols +| appres | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications +| apr | . -> Libraries -> Other +| apr-util | . -> Libraries -> Other
docs/manual/package-list.txt line 32
Quoted 10 lines
docs/manual/package-list.txt new file +10
-0+| argp-standalone | . -> Libraries -> Other +| argus | . -> Networking applications +| arptables | . -> Networking applications +| at | . -> Shell and utilities +| atk | . -> Libraries -> Graphics +| attr | . -> System tools +| audiofile | . -> Libraries -> Audio/Sound +| aumix | . -> Audio and video applications +| autoconf *(deprecated)* | . -> Development tools +| automake *(deprecated)* | . -> Development tools
Is it intentional to keep the deprecated ones in this list?
[snip]
Quoted 31 lines
support/scripts/gen-manual-lists.py new file +25
-0@@ -0,0 +1,237 @@ +#!/usr/bin/env python2 +## +## gen-manual-lists.py +## +## This script generates the following Buildroot manual appendices: +## - the package tables (one for the target, the other for host tools); +## - the deprecated items. +## +## Author(s): +## - Samuel Martin <[email protected]> +## +## Copyright (C) 2013 Samuel Martin +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software
support/scripts/gen-manual-lists.py line 35
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## + +## Note about python2. +## +## This script can currently only be run using python2 interpreter due to +## its kconfiglib dependency (which is not yet python3 friendly). + +from __future__ import print_function +from __future__ import unicode_literals
These future things only exist in recent pythons, and we don't do any
checks for a specific python version... That said, this script isn't supposed to be run by a normal user so I guess it doesn't really matter.
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ +import os +import re +import sys +import datetime +from argparse import ArgumentParser + +try: + import kconfiglib +except ImportError:
support/scripts/gen-manual-lists.py line 55
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ message = """ +Could not find the module 'kconfiglib' in the PYTHONPATH: +""" + message += "\n".join([" {0}".format(path) for path in sys.path]) + message += """ + +Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch the script. + +You can get kconfiglib from: + https://github.com/ulfalizer/Kconfiglib
Can we not just dump a copy of kconfiglib in the scripts directory? Or
is it more than one file?
support/scripts/gen-manual-lists.py line 63
Quoted 8 lines
support/scripts/gen-manual-lists.py new file +8
-0+ + +""" + sys.stderr.write(message) + raise + + +_LIST_FORMAT = """\
This symbol would be more appropriate as an attribute of the Buildroot
class.
support/scripts/gen-manual-lists.py line 72
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +9
-0+// +// Automatically generated list for Buildroot manual. +// Buildroot {br_version_full} +// Generation date: {gen_date} +// + +[[{section_anchor}]] +{section_title} +{section_level}
As I briefly mentioned before: I think it's better to just generate the
table with the script, and keep the surrounding text and title in the manually written asciidoc files. That means you'll need three files, but there's no issue with that, is there.
support/scripts/gen-manual-lists.py line 78
Quoted 6 lines
support/scripts/gen-manual-lists.py new file +6
-0+ +{table} +""" + + +def format_asciidoc_table(root, items, get_label, filter=lambda x: True, sort=True):
I would prefer using different names than standard python functions. So
filterfunc instead of filter. sort is OK because it only exists as an attribute of list objects.
support/scripts/gen-manual-lists.py line 85
Quoted 7 lines
support/scripts/gen-manual-lists.py new file +7
-0+ def _format_entry(label, parents): + return "| {0:<30} | {1}\n".format(label, " -> ".join(parents)) + def _get_parents(root, item): + parent = item.get_parent() + parents = [] + while parent and parent != root: + if parent.is_menu():
I guess the parent can be either a menu or a choice. Seems a good idea
to me to keep choices in the path as well.
support/scripts/gen-manual-lists.py line 89
Quoted 4 lines
support/scripts/gen-manual-lists.py new file +4
-0+ parents += [parent.get_title()] + parent = parent.get_parent() + parents.reverse() + return parents
An empty line here would be nice.
support/scripts/gen-manual-lists.py line 98
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +9
-0+ lines = [] + for item in items: + if not filter(item): + continue + if not item.is_symbol() or not item.prompts: + continue + loc = [] if root is None else ["."] + loc += _get_parents(root, item) + lines += [_format_entry(get_label(item), loc)]
lines.append(...) would be more appropriate.
Quoted 4 lines
support/scripts/gen-manual-lists.py new file +4
-0+ if sort: + lines.sort(key=lambda x:x.lower()) + if root: + loc_label = _get_parents(None, root) + [root.get_title(), "..."]
support/scripts/gen-manual-lists.py line 112
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ else: + loc_label = ["Location"] + lines.insert(0, _format_entry("Packages", loc_label)) + table = "[width=\"90%\",cols=\"^1,4\",options=\"header\"]\n" + table += "|===================================================\n" + table += "".join(lines) + table += "|===================================================\n" + return table + +def get_symbol_subset(items, filter):
Same remark about filter here.
support/scripts/gen-manual-lists.py line 120
Quoted 8 lines
support/scripts/gen-manual-lists.py new file +8
-0+ subset = [] + for item in items: + if item.is_symbol(): + if not item.prompts: + continue + if not filter(item): + continue + subset += [item]
subset.append(item)
support/scripts/gen-manual-lists.py line 123
Quoted 3 lines
support/scripts/gen-manual-lists.py new file +3
-0+ elif item.is_menu() or item.is_choice(): + subset += get_symbol_subset(item.get_items(), filter) + return subset
This function is an ideal candidate for an iterator. But iterators are
a bit tricky to understand so I don't mind keeping it as it is.
support/scripts/gen-manual-lists.py line 133
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ + +class Buildroot: + root_config = "Config.in" + package_dirname = "package" + package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"] + deprecated_symbol = "BR2_DEPRECATED" + + def __init__(self): + self.base_dir = os.environ.get("srctree")
Why not use the TOPDIR variable?
Quoted 11 lines
support/scripts/gen-manual-lists.py new file +11
-0+ self.package_dir = os.path.join(self.base_dir, self.package_dirname) + self.config = kconfiglib.Config(os.path.join(self.base_dir, self.root_config)) + self.package_symbols = [] + self._fill_package_symbols() + self._deprecated = self.config.get_symbol(self.deprecated_symbol) + self.br_version_full = os.environ.get("BR2_VERSION_FULL") + self.generation_date = str(datetime.datetime.utcnow()) + + def _get_package_symbol(self, package_name): + pkg_symbol = re.sub("[-+.]", "_", package_name) + pkg_symbol = pkg_symbol.upper()
support/scripts/gen-manual-lists.py line 154
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ pkg_symbols = [prefix + pkg_symbol for prefix in self.package_prefixes] + return pkg_symbols + + def _fill_package_symbols(self): + for root, _, files in os.walk(self.package_dir): + pkg_name = os.path.basename(root) + for file_ in files: + if not file_.endswith(".mk") or not pkg_name == file_[:-3]: + continue + self.package_symbols += self._get_package_symbol(pkg_name)
I don't really like this. Wouldn't it be possible to construct the
package name from the location of the Config.in where it is defined? And check for it directly in _is_package instead of pre-constructing the list?
support/scripts/gen-manual-lists.py line 166
Quoted 12 lines
support/scripts/gen-manual-lists.py new file +12
-0+ + def _is_deprecated(self, symbol): + return self._deprecated in symbol.get_referenced_symbols() + + def _is_from_package(self, symbol): + if hasattr(symbol, 'get_def_locations'): + def_loc = symbol.get_def_locations()[0][0] + elif hasattr(symbol, 'get_location'): + def_loc = symbol.get_location()[0] + else: + return False + return self.package_dir in def_loc
This function isn't used, is it?
support/scripts/gen-manual-lists.py line 172
Quoted 6 lines
support/scripts/gen-manual-lists.py new file +6
-0+ + def _is_package(self, symbol): + # return symbol.get_name().startswith(self.package_prefixes[0]) + return symbol.get_name() in self.package_symbols + pkg_name = os.path.basename(os.path.dirname(symbol.get_def_locations()[0][0])) + return symbol.get_name() in self._get_package_symbol(pkg_name)
The final commit shouldn't contain three different versions :-)
Quoted 13 lines
support/scripts/gen-manual-lists.py new file +13
-0+ + def _get_symbol_label(self, item): + label = item.prompts[0][0] + if self._is_deprecated(item): + label += " *(deprecated)*" + return label + + def _format_list(self, root, items, section_anchor, section_title): + table = format_asciidoc_table(root, items, get_label=self._get_symbol_label) + content = _LIST_FORMAT.format( + br_version_full=self.br_version_full, + gen_date=self.generation_date, + section_anchor=section_anchor,
support/scripts/gen-manual-lists.py line 195
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ section_title=section_title, + section_level=re.sub(".", "-", section_title), + table=table + ) + return content + + def print_package_list(self, output=None): + root_title = "Package Selection for the target" + root_item = [menu for menu in self.config.get_menus() + if menu.get_title().lower() == root_title.lower()][0]
This could get better error handling, and the list construct makes it
less readable than a simple for loop.
Regards,
Arnout
Quoted 43 lines
support/scripts/gen-manual-lists.py new file +42
-0+ items = get_symbol_subset(root_item.get_items(), filter=self._is_package) + content = self._format_list(root_item, items, "package-list", root_title) + content += "\n\n" + root_title = "Host utilities" + root_item = [menu for menu in self.config.get_menus() + if menu.get_title().lower() == root_title.lower()][0] + items = get_symbol_subset(root_item.get_items(), filter=self._is_package) + content += self._format_list(root_item, items, "host-package-list", root_title) + if not output: + print(content) + return + with open(output, 'w') as fout: + fout.write(content) + + def print_deprecated_list(self, output=None): + items = get_symbol_subset(self.config.get_top_level_items(), + filter=self._is_deprecated) + content = self._format_list(None, items, "deprecated", "Deprecated stuff") + if not output: + print(content) + return + with open(output, 'w') as fout: + fout.write(content) + +if __name__ == '__main__': + parser = ArgumentParser() + parser.add_argument("--package-file", dest="package_file", + help="output package list file") + parser.add_argument("--deprecated-file", dest="deprecated_file", + help="output deprecated list file") + parser.add_argument("-n", "--dry-run", dest="dry_run", action='store_true', + help="output both package list and deprecated stuff into stdout") + args = parser.parse_args() + buildroot = Buildroot() + if args.dry_run: + buildroot.print_package_list() + buildroot.print_deprecated_list() + sys.exit() + if args.package_file: + buildroot.print_package_list(output=args.package_file) + if args.deprecated_file: + buildroot.print_deprecated_list(output=args.deprecated_file)
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 8/9 manual: update {deprecated, package}-list.txt
Hi Arnout,
2013/2/18 Arnout Vandecappelle <[email protected]>:
Quoted 12 lines
Hi Samuel,
Quoted 6 lines · Samuel Martin
* add the
gen-manual-lists.pyscript generating the target and host package tables, and the deprecated stuff list as well. These tables and lists are generated parsing the Config.in files;
* add a make target to update these lists in the manual;
* update the these appendices of the manual.
Quoted 2 lines
The first two should be a separate patch from the third one. Although,
admittedly, it was pretty convenient to review all of them together.
I hesitated to do so ;)
Quoted 18 lines
Even though I have a lot of comments, this patch should be included in
-rc2, otherwise the package list in the manual is inconsistent.Quoted 10 lines
Signed-off-by Samuel Martin <[email protected]>--- docs/manual/appendix.txt | 13 +- docs/manual/deprecated-list.txt | 81 ++- docs/manual/manual.mk | 7 + docs/manual/package-list.txt | 948 ++++++++++++++++++++++++++++++++++++ docs/manual/pkg-list.txt | 870---------------------------------
Quoted 1 line
Any particular reason to rename it?
Using plain noun in file names, keeping consistency with the rest of the doc source file names.
BTW, restrict the generated stuff to the tables themselves implies generating 3 files.
So, automating this generation will certainly lead to rename few files.
Quoted 42 lines
Quoted 42 lines
support/scripts/gen-manual-lists.py | 237 +++++++++ 6 files changed, 1233 insertions(+), 923 deletions(-)create mode 100644
docs/manual/package-list.txtdelete mode 100644docs/manual/pkg-list.txtcreate mode 100755support/scripts/gen-manual-lists.pydocs/manual/appendix.txt +3
-10@@ -6,15 +6,8 @@ Appendix include::makedev-syntax.txt[] -[[package-list]] -Available packages ------------------- -// docs/manaual/pkg-list.txt is generated using the following command: -// $ git grep -E '\((autotools|cmake|generic)-package\)' package/ | \ -// cut -d':' -f1 | grep '\.mk$' | \ -// sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \ -// sort > docs/manual/pkg-list.txt - -include::pkg-list.txt[] +// autogenerated +include::package-list.txt[] +// autogenerated include::deprecated-list.txt[]docs/manual/deprecated-list.txt +0
-5@@ -1,46 +1,41 @@ -// -*- mode:doc -*- ; - -[[deprecated]] -Deprecated list ----------------
Quoted 8 lines
docs/manual/deprecated-list.txt line 8
Quoted 3 lines
docs/manual/deprecated-list.txt +0
-3- -The following stuff are marked as _deprecated_ in Buildroot due to -their status either too old or unmaintained.It's a pity that this part is gone. I would by the way move this to
appendix.txt: that's cleaner than putting part of the manual text in the python script. Same for the text in package-list.txt.
Good catch! I didn't notice this was dropped.
BTW, for the package list, there was no text, just a commented command line used to generate the list, which is obsolete with this patch...
Quoted 12 lines
[snip]
Quoted 9 lines
docs/manual/manual.mk +0
-0@@ -24,6 +24,13 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) -D $$(@D) $$< endef
Quoted 11 lines
Quoted 8 lines
docs/manual/manual.mk +6
-0+manual-update-lists: + @$(call MESSAGE,"Updating the manual lists...") + $(Q)BR2_DEFCONFIG="" srctree=$(TOPDIR) \ + $(TOPDIR)/support/scripts/gen-manual-lists.py \ + --package-file $(TOPDIR)/docs/manual/package-list.txt \ + --deprecated-file$(TOPDIR)/docs/manual/deprecated-list.txt
+This new goal should be added to .PHONY.
done.
Quoted 22 lines
Quoted 22 lines
################################################################################
# GENDOC -- generates the make targets needed to build asciidoc
documentation.
#docs/manual/package-list.txt new file +9
-0@@ -0,0 +1,948 @@ +// +// Automatically generated list for Buildroot manual. +// Buildroot 2013.02-00794-g199d6d6-dirty +// Generation date: 2013-02-11 22:24:44.739087 +// + +[[package-list]] +Package Selection for the target +--------------------------------
Quoted 8 lines
docs/manual/package-list.txt line 13
Quoted 5 lines
docs/manual/package-list.txt new file +4
-0+ +[width="90%",cols="^1,4",options="header"] +|=================================================== +| Packages | Package Selection for the target ->Nice! Maybe even better if this stands out a bit from the rest, perhaps:
ok, I'll add a blank line before and after the table content.
Quoted 27 lines
<| Packages | Package Selection for the target -> ...
Quoted 11 lines
+| acl | . -> System tools +| acpid | . -> Hardware handling +| alsa-lib | . -> Libraries -> Audio/Sound +| alsa-utils | . -> Audio and video applications +| alsamixergui | . -> Graphic libraries andapplications (graphic/text)
+| applewmproto | . -> Graphic libraries and
applications (graphic/text) -> X11R7 X protocols
+| appres | . -> Graphic libraries and
applications (graphic/text) -> X11R7 ApplicationsQuoted 12 lines
+| apr | . -> Libraries -> Other +| apr-util | . -> Libraries -> Other +| argp-standalone | . -> Libraries -> Other +| argus | . -> Networking applications +| arptables | . -> Networking applications +| at | . -> Shell and utilities +| atk | . -> Libraries -> Graphics +| attr | . -> System tools +| audiofile | . -> Libraries -> Audio/Sound +| aumix | . -> Audio and video applications +| autoconf *(deprecated)* | . -> Development tools +| automake *(deprecated)* | . -> Development tools
Quoted 1 line
Is it intentional to keep the deprecated ones in this list?
Yes, shall we drop them from the list?
Though I think deprecated features should not be documented, I have no strong opinion about this specific point.
Someone may think it is redundant with the "Deprecated" appendix. But for packages, it is also a way to tell to the users, they should either not use packages marked as deprecated,
or do some work to maintain it and get it back in the official supported package list...
Quoted 44 lines
[snip]
Quoted 40 lines
support/scripts/gen-manual-lists.py new file +26
-0@@ -0,0 +1,237 @@ +#!/usr/bin/env python2 +## +## gen-manual-lists.py +## +## This script generates the following Buildroot manual appendices: +## - the package tables (one for the target, the other for host tools); +## - the deprecated items. +## +## Author(s): +## - Samuel Martin <[email protected]> +## +## Copyright (C) 2013 Samuel Martin +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA
support/scripts/gen-manual-lists.py new file +6
-0+## + +## Note about python2. +## +## This script can currently only be run using python2 interpreter due to +## its kconfiglib dependency (which is not yet python3 friendly).
Quoted 8 lines
support/scripts/gen-manual-lists.py line 35
Quoted 3 lines
support/scripts/gen-manual-lists.py new file +3
-0+ +from __future__ import print_function +from __future__ import unicode_literalsThese future things only exist in recent pythons, and we don't do any
checks for a specific python version... That said, this script isn't supposed to be run by a normal user so I guess it doesn't really matter.
Indeed, it does not really matter since the kconfiglib package is not python3-friendly, so it could have been write in pure python2...
Quoted 19 lines
Quoted 19 lines
support/scripts/gen-manual-lists.py new file +17
-0+ +import os +import re +import sys +import datetime +from argparse import ArgumentParser + +try: + import kconfiglib +except ImportError: + message = """ +Could not find the module 'kconfiglib' in the PYTHONPATH: +""" + message += "\n".join([" {0}".format(path) for path in sys.path]) + message += """ + +Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch
Quoted 8 lines
support/scripts/gen-manual-lists.py line 55
Quoted 4 lines
the script.
support/scripts/gen-manual-lists.py new file +3
-0+ +You can get kconfiglib from: + https://github.com/ulfalizer/KconfiglibCan we not just dump a copy of kconfiglib in the scripts directory? Or is
it more than one file?
I think we can, it's just one *.py file. I'll do it.
Quoted 16 lines
support/scripts/gen-manual-lists.py line 63
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +8
-0+ + +""" + sys.stderr.write(message) + raise + + +_LIST_FORMAT = """\This symbol would be more appropriate as an attribute of the Buildroot
class.
Quoted 15 lines
support/scripts/gen-manual-lists.py line 72
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +9
-0+// +// Automatically generated list for Buildroot manual. +// Buildroot {br_version_full} +// Generation date: {gen_date} +// + +[[{section_anchor}]] +{section_title} +{section_level}As I briefly mentioned before: I think it's better to just generate the
table with the script, and keep the surrounding text and title in the manually written asciidoc files. That means you'll need three files, but there's no issue with that, is there.
ok, I'll put all the surrounding text in the appendix.txt file.
Quoted 14 lines
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +6
-0+ +{table} +""" + + +def format_asciidoc_table(root, items, get_label, filter=lambda x: True,sort=True):
I would prefer using different names than standard python functions. So
filterfunc instead of filter. sort is OK because it only exists as an attribute of list objects.
ok.
Quoted 11 lines
support/scripts/gen-manual-lists.py line 85
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +7
-0+ def _format_entry(label, parents): + return "| {0:<30} | {1}\n".format(label, " -> ".join(parents)) + def _get_parents(root, item): + parent = item.get_parent() + parents = [] + while parent and parent != root: + if parent.is_menu():
Quoted 2 lines
I guess the parent can be either a menu or a choice. Seems a good idea to
me to keep choices in the path as well.
done.
Quoted 57 lines
support/scripts/gen-manual-lists.py line 89
Quoted 6 lines
support/scripts/gen-manual-lists.py new file +4
-0+ parents += [parent.get_title()] + parent = parent.get_parent() + parents.reverse() + return parentsAn empty line here would be nice.
support/scripts/gen-manual-lists.py line 98
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +9
-0+ lines = [] + for item in items: + if not filter(item): + continue + if not item.is_symbol() or not item.prompts: + continue + loc = [] if root is None else ["."] + loc += _get_parents(root, item) + lines += [_format_entry(get_label(item), loc)]
lines.append(...)would be more appropriate.Quoted 4 lines
support/scripts/gen-manual-lists.py new file +4
-0+ if sort: + lines.sort(key=lambda x:x.lower()) + if root: + loc_label = _get_parents(None, root) + [root.get_title(), "..."]support/scripts/gen-manual-lists.py line 112
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ else: + loc_label = ["Location"] + lines.insert(0, _format_entry("Packages", loc_label)) + table = "[width=\"90%\",cols=\"^1,4\",options=\"header\"]\n" + table += "|===================================================\n" + table += "".join(lines) + table += "|===================================================\n" + return table + +def get_symbol_subset(items, filter):Same remark about filter here.
support/scripts/gen-manual-lists.py line 120
Quoted 8 lines
support/scripts/gen-manual-lists.py new file +8
-0+ subset = [] + for item in items: + if item.is_symbol(): + if not item.prompts: + continue + if not filter(item): + continue + subset += [item]
subset.append(item)
Quoted 7 lines
support/scripts/gen-manual-lists.py line 123
Quoted 3 lines
support/scripts/gen-manual-lists.py new file +3
-0+ elif item.is_menu() or item.is_choice(): + subset += get_symbol_subset(item.get_items(), filter) + return subsetThis function is an ideal candidate for an iterator. But iterators are a
bit tricky to understand so I don't mind keeping it as it is.
done.
Quoted 15 lines
support/scripts/gen-manual-lists.py line 133
Quoted 12 lines
support/scripts/gen-manual-lists.py new file +10
-0+ + +class Buildroot: + root_config = "Config.in" + package_dirname = "package" + package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"] + deprecated_symbol = "BR2_DEPRECATED" + + def __init__(self): + self.base_dir = os.environ.get("srctree")Why not use the TOPDIR variable?
Indeed, it'd be better.
BTW, the kconfiglib.Config class expects (and requires) a "srctree" variable in the environment.
Quoted 24 lines
Quoted 24 lines
+ self.package_dir = os.path.join(self.base_dir,
self.package_dirname)
+ self.config = kconfiglib.Config(os.path.join(self.base_dir,
self.root_config))support/scripts/gen-manual-lists.py new file +10
-0+ self.package_symbols = [] + self._fill_package_symbols() + self._deprecated = self.config.get_symbol(self.deprecated_symbol) + self.br_version_full = os.environ.get("BR2_VERSION_FULL") + self.generation_date = str(datetime.datetime.utcnow()) + + def _get_package_symbol(self, package_name): + pkg_symbol = re.sub("[-+.]", "_", package_name) + pkg_symbol = pkg_symbol.upper() + pkg_symbols = [prefix + pkg_symbol for prefix inself.package_prefixes]
support/scripts/gen-manual-lists.py new file +7
-0+ return pkg_symbols + + def _fill_package_symbols(self): + for root, _, files in os.walk(self.package_dir): + pkg_name = os.path.basename(root) + for file_ in files: + if not file_.endswith(".mk") or not pkg_name ==
Quoted 8 lines
Quoted 4 lines
file_[:-3]:
support/scripts/gen-manual-lists.py new file +2
-0+ continue + self.package_symbols +=
self._get_package_symbol(pkg_name)I don't really like this. Wouldn't it be possible to construct the package
name from the location of the Config.in where it is defined?
Me neither, but the problem is that few package symbols are not defined in their own package directory :(
For example, libjpeg and jpeg-turbo symbols are both defined in package/jpeg/Config.in;
so just looking at the location of the Config.in leads to missing both the libjpeg and jpeg-turbo packages.
Another problem is that the kconfig symbol/package name tuple is not a bijection, e.g.:
from the kconfig symbol, we get several package names (and this number increase a lot when the case is not ignored):BR2_PACKAGE_XLIB_LIBXAU => xlib-libxau | xlib_libxau | xlib-libXau | xlib_libXau | ...
from the package name, we easy get the unique kconfig symbol:xlib_libXau => BR2_PACKAGE_XLIB_LIBXAU
So, it is more expensive to get the package name from the kconfig symbol than getting the symbol from the package name.
Note that the actual package check would be grepping the *.mk files for '\$(eval \$(\(host-\)\?\(generic\|autotools\|cmake\)-package))'. So, I made a choice. With this compromise, no package is missed, but the "virtual" packages (that actually are choices) are also catched.
Quoted 1 line
And check for it directly in
_is_packageinstead of pre-constructing the list?
done.
Quoted 17 lines
Quoted 4 lines
support/scripts/gen-manual-lists.py new file +2
-0+ + def _is_deprecated(self, symbol):support/scripts/gen-manual-lists.py line 166
Quoted 10 lines
support/scripts/gen-manual-lists.py new file +10
-0+ return self._deprecated in symbol.get_referenced_symbols() + + def _is_from_package(self, symbol): + if hasattr(symbol, 'get_def_locations'): + def_loc = symbol.get_def_locations()[0][0] + elif hasattr(symbol, 'get_location'): + def_loc = symbol.get_location()[0] + else: + return False + return self.package_dir in def_locThis function isn't used, is it?
Indeed.
Quoted 11 lines
Quoted 9 lines
support/scripts/gen-manual-lists.py new file +5
-0+ + def _is_package(self, symbol): + # return symbol.get_name().startswith(self.package_prefixes[0]) + return symbol.get_name() in self.package_symbols + pkg_name =os.path.basename(os.path.dirname(symbol.get_def_locations()[0][0]))
+ returnsymbol.get_name()inself._get_package_symbol(pkg_name)
Quoted 1 line
The final commit shouldn't contain three different versions :-)
Arf... I forgot to cleanup before posting!
Quoted 22 lines
Quoted 22 lines
support/scripts/gen-manual-lists.py new file +9
-0+ + def _get_symbol_label(self, item): + label = item.prompts[0][0] + if self._is_deprecated(item): + label += " *(deprecated)*" + return label + + def _format_list(self, root, items, section_anchor, section_title): + table = format_asciidoc_table(root, items,get_label=self._get_symbol_label)
support/scripts/gen-manual-lists.py new file +10
-0+ content = _LIST_FORMAT.format( + br_version_full=self.br_version_full, + gen_date=self.generation_date, + section_anchor=section_anchor, + section_title=section_title, + section_level=re.sub(".", "-", section_title), + table=table + ) + return content +
Quoted 8 lines
support/scripts/gen-manual-lists.py line 195
Quoted 4 lines
support/scripts/gen-manual-lists.py new file +4
-0+ def print_package_list(self, output=None): + root_title = "Package Selection for the target" + root_item = [menu for menu in self.config.get_menus() + if menu.get_title().lower() == root_title.lower()][0]This could get better error handling, and the list construct makes it less
readable than a simple for loop.
Indeed. Done.
Regards,
Signature · 1 line
Samuel
PATCH 9/9 Makefile: add to the release target a warning about the manual updates.
In reply to Samuel MartinThe manual-update-lists target is not added to the dependencies of the release target to allow editing the generated files.
--- Makefile | 2 ++ 1 file changed, 2 insertions(+)
Makefile +2 -0
@@ -815,6 +815,8 @@ release: OUT=buildroot-$(BR2_VERSION) # Create release tarballs. We need to fiddle a bit to add the generated # documentation to the git output release: + $(warning Make sure the manual is up-to-date. To update the manual, run:) + $(warning $$ make manual-update-lists) git archive --format=tar --prefix=$(OUT)/ master > $(OUT).tar $(MAKE) O=$(OUT) manual-html manual-txt manual-pdf tar rf $(OUT).tar $(OUT)
Signature · 1 line
1.8.1.3