Manual improvements part 4
PATCH v2 1/1 Manual improvements part 4
This short series starts improving the 'Project-specific customizations' chapter in the manual. Subsequent patches are planned (even for 2014.08) but since the release is almost there I'm sending out patches as soon as they are available, to give enough time for review.
Further changes planned:
- reworking the 'Customizing the generated target filesystem' section to emphasize the recommendations of rootfs-overlay + post-build
- rework the rest of the chapter as there is some duplicate and inconsistent information.
---
Thomas De Schampheleire (3)
manual/user guide/customization: expand introduction text manual/user guide/customization: add section with recommended dir structure manual/user guide/customization: rework section on BR2_EXTERNAL
docs/manual/customize-directory-structure.txt | 59 ++++++++++++ docs/manual/customize-outside-br.txt | 90 ++++++------------ docs/manual/customize.txt | 39 ++++++- 3 files changed, 121 insertions(+), 67 deletions(-)
PATCH v2 1/1 manual/user guide/customization: expand introduction text
This patch expands the introduction text of chapter 'Project-specific customization' by listing the type of customizations that can be performed by a project.
---
v2: reword 'from a clean buildroot tree' --> 'after running make clean' to
avoid confusion (Samuel)
docs/manual/customize.txt | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-)
docs/manual/customize.txt +21 -4
@@ -3,11 +3,28 @@ == Project-specific customization -The following sections describe the various way in which you can -customize Buildroot for a given project. +Typical actions you may need to perform for a given project are: -For instructions on how to add new packages to Buildroot, refer to -xref:adding-packages[] +- configuring Buildroot (including build options and toolchain, + bootloader, kernel, package and filesystem image type selection) +- configuring other components, like the Linux kernel and BusyBox +- adding project-specific patches to some packages (using + +BR2_GLOBAL_PATCH_DIR+) +- adding or overwriting files on the target filesystem (using + +BR2_ROOTFS_OVERLAY+) +- modifying or deleting files on the target filesystem (using + +BR2_ROOTFS_POST_BUILD_SCRIPT+) +- running arbitrary commands prior to generating the filesystem image + (using +BR2_ROOTFS_POST_BUILD_SCRIPT+) +- running arbitrary commands after generating the filesystem image + (using +BR2_ROOTFS_POST_IMAGE_SCRIPT+) +- adding project-specific packages + +This chapter describes how to make such project-specific customizations +in Buildroot and how to store them in a way that you can build the same +image in a reproducible way, even after running 'make clean'. By +following the recommended strategy, you can even use the same Buildroot +tree to build multiple distinct projects! include::customize-rootfs.txt[]
PATCH v2 1/1 manual/user guide/customization: add section with recommended dir structure
In reply to Thomas De SchampheleireAlthough the user is free to choose where to put project-specific files, the presentation 'Using Buildroot for real projects' [1] first described a certain recommendation.
This patch briefly describes this recommendation in the form of a directory structure overview, the details will be added in subsequent patches.
Since the section on BR2_EXTERNAL is logically connected to the directory structure, this section is moved right after it.
[1] http://elinux.org/images/2/2a/Using-buildroot-real-project.pdf
---
v2: no changes
docs/manual/customize-directory-structure.txt | 58 +++++++++++++++++++ docs/manual/customize.txt | 6 +- 2 files changed, 62 insertions(+), 2 deletions(-)
docs/manual/customize-directory-structure.txt new file +58 -0
@@ -0,0 +1,58 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Recommended directory structure + +When customizing Buildroot for your project, you will be creating one or +more project-specific files that need to be stored somewhere. While most +of these files could be placed in _any_ location as their path is to be +specified in the Buildroot configuration, the Buildroot developers +recommend a specific directory structure which is described in this +section. + +Orthogonal to this directory structure, you can choose _where_ you place +this structure itself: either inside the Buildroot tree, or outside of +it using +BR2_EXTERNAL+. Both options are valid, the choice is up to you. + +----- ++-- board/ +| +-- <company>/ +| +-- <boardname>/ +| +-- linux.config +| +-- busybox.config +| +-- <other configuration files> +| +-- post_build.sh +| +-- post_image.sh +| +-- rootfs_overlay/ +| | +-- etc/ +| | +-- <some file> +| +-- patches/ +| +-- foo/ +| | +-- <some patch> +| +-- libbar/ +| +-- <some other patches> +| ++-- configs/ +| +-- <boardname>_defconfig +| ++-- package/ +| +-- <company>/ +| +-- Config.in (if not using BR2_EXTERNAL) +| +-- <company>.mk (if not using BR2_EXTERNAL) +| +-- <boardname>/ +| +-- package1/ +| | +-- Config.in +| | +-- package1.mk +| +-- package2/ +| +-- Config.in +| +-- package2.mk +| ++-- Config.in (if using BR2_EXTERNAL) ++-- external.mk (if using BR2_EXTERNAL) +------ + +Details on the files shown above are given further in this chapter. + +Note: if you choose to place this structure outside of the Buildroot +tree using +BR2_EXTERNAL+, the <company> and possibly <boardname> +components may be superfluous and can be left out.
docs/manual/customize.txt +4 -2
@@ -26,10 +26,12 @@ following the recommended strategy, you can even use the same Buildroot tree to build multiple distinct projects! +include::customize-directory-structure.txt[] + +include::customize-outside-br.txt[] + include::customize-rootfs.txt[] include::customize-store.txt[] include::customize-packages.txt[] - -include::customize-outside-br.txt[]
PATCH v2 1/1 manual/user guide/customization: rework section on BR2_EXTERNAL
In reply to Thomas De SchampheleireThis patch reworks the section on BR2_EXTERNAL as follows:
- move note about upstreaming to the chapter introduction
- streamline the section with the previously added section 'Recommended directory structure', avoiding duplication.
- use $(BR2_EXTERNAL) rather than BR2_EXTERNAL when referring to file paths.
- some general rewording
---
v2: new patch
docs/manual/customize-directory-structure.txt | 1 + docs/manual/customize-outside-br.txt | 90 ++++++------------ docs/manual/customize.txt | 8 + 3 files changed, 38 insertions(+), 61 deletions(-)
docs/manual/customize-directory-structure.txt +1 -0
@@ -1,6 +1,7 @@ // -*- mode:doc; -*- // vim: set syntax=asciidoc: +[[customize-dir-structure]] === Recommended directory structure When customizing Buildroot for your project, you will be creating one or
docs/manual/customize-outside-br.txt +29 -61
143 lines not on this page · raw message
docs/manual/customize.txt +8 -0
@@ -20,6 +20,14 @@ (using +BR2_ROOTFS_POST_IMAGE_SCRIPT+) - adding project-specific packages +An important note regarding such 'project-specific' customizations: +please carefully consider which changes are indeed project-specific and +which changes are also useful to developers outside your project. The +Buildroot community highly recommends and encourages the upstreaming of +improvements, packages and board support to the official Buildroot +project. Of course, it is sometimes not possible or desirable to +upstream because the changes are highly specific or proprietary. + This chapter describes how to make such project-specific customizations in Buildroot and how to store them in a way that you can build the same image in a reproducible way, even after running 'make clean'. By
PATCH v2 1/1 Manual improvements part 4
In reply to Thomas De SchampheleireQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
This short series starts improving the 'Project-specific customizations' chapter in the manual. Subsequent patches are planned (even for 2014.08) but since the release is almost there I'm sending out patches as soon as they are available, to give enough time for review.
Quoted 7 lines
Further changes planned:
- reworking the 'Customizing the generated target filesystem' section to emphasize the recommendations of rootfs-overlay + post-build
- rework the rest of the chapter as there is some duplicate and inconsistent information.Signed-off-by Thomas De Schampheleire <[email protected]>
Committed series, thanks!
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 Manual improvements part 4
Peter Korsgaard <[email protected]> schreef:
Quoted 13 lines
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
This short series starts improving the 'Project-specific customizations' chapter in the manual. Subsequent patches are planned (even for 2014.08) but since the release is almost there I'm sending out patches as soon as they are available, to give enough time for review.
Further changes planned:
- reworking the 'Customizing the generated target filesystem' section to emphasize the recommendations of rootfs-overlay + post-build
- rework the rest of the chapter as there is some duplicate and inconsistent information.
Quoted 4 lines
Quoted 1 line
Signed-off-by Thomas De Schampheleire <[email protected]>Committed series, thanks!
Thanks! It is likely that this will be the last manual
update for 2014.08, as I'm not sure I will get around doing the other planned changes before the release.
Best regards,
Thomas
PATCH v2 1/1 Manual improvements part 4
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
Thanks! It is likely that this will be the last manual
update for 2014.08, as I'm not sure I will get around doing the other planned changes before the release.
That's ok. I plan on releasing 2014.08 tomorrow, so there isn't much time left anyway.
Signature · 1 line
Bye, Peter Korsgaard