* [Buildroot] [PATCH v3] Post-image addition, and customize removal
@ 2013-02-07 21:58 Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism Thomas Petazzoni
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
Hello,
Here is the third version of the post-image addition and customize
removal patch set.
Compared to version 2:
* Slightly adjust the post-image config option prompt to use "Custom
scripts" instead of "Custom script"
* Add Acked-by from Samuel Martin
* Slightly improve the documentation as per the suggestion of Samuel.
* Add one patch to change "Custom script" to "Custom scripts" for the
post-build scripts config option.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
@ 2013-02-07 21:58 ` Thomas Petazzoni
2013-02-08 5:28 ` Samuel Martin
2013-02-08 20:56 ` Peter Korsgaard
2013-02-07 21:58 ` [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism Thomas Petazzoni
` (4 subsequent siblings)
5 siblings, 2 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
Just like we have a post-build script mechanism that gets executed
after the build of all packages but before the creation of the
filesystem images, let's introduce a post-image script mechanism, that
gets executed once all filesystem images have been generated.
This can for example be used to call a tool building a firmware image
from different images generated by Buildroot, or automatically extract
the tarball root filesystem image into some location exported by NFS,
or any other custom action.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v2 -> v3:
* Change 'script' -> 'scripts' in the config option prompt, as
suggested by Samuel Martin.
---
Makefile | 9 +++++++++
system/Config.in | 18 ++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/Makefile b/Makefile
index d9e5f24..3996d01 100644
--- a/Makefile
+++ b/Makefile
@@ -353,6 +353,8 @@ endif
include fs/common.mk
+TARGETS+=target-post-image
+
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
@@ -555,6 +557,13 @@ target-generatelocales: host-localedef
done
endif
+target-post-image:
+ifneq ($(BR2_ROOTFS_POST_IMAGE_SCRIPT),)
+ @$(call MESSAGE,"Executing post-image script\(s\)")
+ @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
+ $(s) $(BINARIES_DIR)$(sep))
+endif
+
toolchain-eclipse-register:
./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
diff --git a/system/Config.in b/system/Config.in
index fa01d91..bdd47c5 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -276,4 +276,22 @@ config BR2_ROOTFS_POST_BUILD_SCRIPT
only argument. Make sure the exit code of those scripts are 0,
otherwise make will stop after calling them.
+config BR2_ROOTFS_POST_IMAGE_SCRIPT
+ string "Custom scripts to run after creating filesystem images"
+ default ""
+ help
+ Specify a space-separated list of scripts to be run after
+ the build has finished and after Buildroot has packed the
+ files into selected filesystem images.
+
+ This can for example be used to call a tool building a
+ firmware image from different images generated by Buildroot,
+ or automatically extract the tarball root filesystem image
+ into some location exported by NFS, or any other custom
+ action.
+
+ These scripts are called with the images directory name as
+ first and only argument. The script is executed from the
+ main Buildroot source directory as the current directory.
+
endmenu
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism Thomas Petazzoni
@ 2013-02-07 21:58 ` Thomas Petazzoni
2013-02-08 5:12 ` Samuel Martin
2013-02-08 21:01 ` Peter Korsgaard
2013-02-07 21:58 ` [Buildroot] [PATCH v3 3/6] package/customize: remove Thomas Petazzoni
` (3 subsequent siblings)
5 siblings, 2 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
v1->v2:
* Fix typos noticed by Yann.
v2->v3:
* Mention that the post-image scripts are executed as the user
executing Buildroot, i.e generally not the root user. Suggested by
Samuel Martin.
---
docs/manual/customize-rootfs.txt | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index fa04d85..97af580 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -55,3 +55,25 @@ there are a few ways to customize the resulting target filesystem.
target root filesystem in +package/customize/source+, and then
enable this special package in the configuration system. _This
method is marked as deprecated_.
+
+Note also that 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.
+
+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
+will require special handling (usage of fakeroot or sudo), which is
+left to the script developer.
+
+Just like for the _post-build scripts_ mentionned above, you also have
+access to the following environment variables from your _post-image
+scripts_: +BUILDROOT_CONFIG+, +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+,
++BINARIES_DIR+ and +BASE_DIR+.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 3/6] package/customize: remove
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism Thomas Petazzoni
@ 2013-02-07 21:58 ` Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 4/6] docs/manual: no longer mention the package/customize thing Thomas Petazzoni
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
This mechanism of root filesystem customization has been deprecated
since a long time, so let's remove it now.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
---
Changelog v1 -> v2:
* Add entry in Config.in.legacy
* Remove "customize" from support/scripts/pkg-stats
Changelog v2 -> v3:
* Add Acked-by from Samuel Martin
---
Config.in.legacy | 8 ++++++++
package/Config.in | 1 -
package/customize/Config.in | 7 -------
package/customize/customize.mk | 32 --------------------------------
support/scripts/pkg-stats | 1 -
5 files changed, 8 insertions(+), 41 deletions(-)
delete mode 100644 package/customize/Config.in
delete mode 100644 package/customize/customize.mk
delete mode 100644 package/customize/source/.empty
diff --git a/Config.in.legacy b/Config.in.legacy
index 90a7b67..d90132c 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -44,6 +44,14 @@ endif
#
# Legacy options since 2012.11
#
+config BR2_PACKAGE_CUSTOMIZE
+ bool "customize package has been removed"
+ select BR2_LEGACY
+ help
+ The 'customize' special package has been removed. Instead,
+ we recommend to create either your own packages, or use a
+ post-build script to customize your root filesystem. See
+ Buildroot's documentation for more details.
config BR2_PACKAGE_XSERVER_xorg
bool "X.org modular server"
diff --git a/package/Config.in b/package/Config.in
index 8588951..2fad94d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1,7 +1,6 @@
menu "Package Selection for the target"
source "package/busybox/Config.in"
-source "package/customize/Config.in"
# Audio and video applications
source "package/multimedia/Config.in"
diff --git a/package/customize/Config.in b/package/customize/Config.in
deleted file mode 100644
index 8f8aaa2..0000000
--- a/package/customize/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_CUSTOMIZE
- bool "customize"
- depends on BR2_DEPRECATED
- help
- Add custom stuff to your buildroot.
-
- (edit package/customize/customize.mk)
diff --git a/package/customize/customize.mk b/package/customize/customize.mk
deleted file mode 100644
index d2b8518..0000000
--- a/package/customize/customize.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-#############################################################
-#
-# Any custom stuff you feel like doing....
-#
-#############################################################
-CUST_DIR:=package/customize/source
-
-$(BUILD_DIR)/.customize:
- rm -f $(BUILD_DIR)/series
- (cd $(CUST_DIR); \
- /bin/ls -d * > $(BUILD_DIR)/series || \
- touch $(BUILD_DIR)/series )
- for f in `cat $(BUILD_DIR)/series`; do \
- cp -af $(CUST_DIR)/$$f $(TARGET_DIR); \
- done
- rm -f $(BUILD_DIR)/series
- touch $@
-
-customize: $(BUILD_DIR)/.customize
-
-customize-clean:
- rm -f $(BUILD_DIR)/.customize
-
-.PHONY: customize
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_CUSTOMIZE),y)
-TARGETS+=customize
-endif
diff --git a/package/customize/source/.empty b/package/customize/source/.empty
deleted file mode 100644
index e69de29..0000000
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 929b8d1..a65a6ae 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -92,7 +92,6 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do
$i = "package/games/games.mk" -o \
$i = "package/gtk2-themes/gtk2-themes.mk" -o \
$i = "package/multimedia/multimedia.mk" -o \
- $i = "package/customize/customize.mk" -o \
$i = "package/pkg-autotools.mk" -o \
$i = "package/pkg-cmake.mk" -o \
$i = "package/pkg-generic.mk" -o \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 4/6] docs/manual: no longer mention the package/customize thing
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
` (2 preceding siblings ...)
2013-02-07 21:58 ` [Buildroot] [PATCH v3 3/6] package/customize: remove Thomas Petazzoni
@ 2013-02-07 21:58 ` Thomas Petazzoni
2013-02-08 21:07 ` Peter Korsgaard
2013-02-07 21:58 ` [Buildroot] [PATCH v3 5/6] docs/manual: slightly reword the solutions to customize rootfs Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 6/6] Adjust prompt for the post-build scripts option Thomas Petazzoni
5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
---
Changelog v2 -> v3:
* Add Acked-by from Samuel Martin.
---
docs/manual/customize-rootfs.txt | 6 ------
1 file changed, 6 deletions(-)
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 97af580..95fa91f 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -50,12 +50,6 @@ there are a few ways to customize the resulting target filesystem.
stored
- +BASE_DIR+: the base output directory
-* A special package, 'customize', stored in +package/customize+ can be
- used. You can put all the files that you want to see in the final
- target root filesystem in +package/customize/source+, and then
- enable this special package in the configuration system. _This
- method is marked as deprecated_.
-
Note also that 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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 5/6] docs/manual: slightly reword the solutions to customize rootfs
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
` (3 preceding siblings ...)
2013-02-07 21:58 ` [Buildroot] [PATCH v3 4/6] docs/manual: no longer mention the package/customize thing Thomas Petazzoni
@ 2013-02-07 21:58 ` Thomas Petazzoni
2013-02-08 5:19 ` Samuel Martin
2013-02-07 21:58 ` [Buildroot] [PATCH v3 6/6] Adjust prompt for the post-build scripts option Thomas Petazzoni
5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
The order of the solutions to customize the root filesystem is
changed: we now mention the post-build script mechanism *before* the
custom root filesystem skeleton mechanism, because the former is
preferred over the latter.
In addition to this, we give a few more details about direct
customization of the root filesystem in output/target, and about the
custom target skeleton solution.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
docs/manual/customize-rootfs.txt | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 95fa91f..fb0e877 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -12,17 +12,11 @@ there are a few ways to customize the resulting target filesystem.
simply make your changes here and run make afterwards - this will
rebuild the target filesystem image. This method allows you to do
anything to the target filesystem, but if you decide to completely
- rebuild your toolchain and tools, these changes will be lost.
- _Changes do not survive the +make clean+ command_.
-
-* Create your own 'target skeleton'. You can start with the default
- skeleton available under +system/skeleton+ and then customize it to
- suit your needs. The +BR2_ROOTFS_SKELETON_CUSTOM+ and
- +BR2_ROOTFS_SKELETON_CUSTOM_PATH+ will allow you to specify the
- location of your custom skeleton. These options can be found in the
- +System configuration+ menu. At build time, the contents of the
- skeleton are copied to output/target before any package
- installation.
+ rebuild your toolchain and tools, these changes will be lost. This
+ solution is therefore only useful for quick tests only: _changes do
+ not survive the +make clean+ command_. Once you have validated your
+ changes, you should make sure that they will persist after a +make
+ clean+ by using one of the following methods.
* Create a filesystem overlay: a tree of files that are copied directly
over the target filesystem after it has been built. Set
@@ -50,6 +44,19 @@ there are a few ways to customize the resulting target filesystem.
stored
- +BASE_DIR+: the base output directory
+* Create your own 'target skeleton'. You can start with the default
+ skeleton available under +system/skeleton+ and then customize it to
+ suit your needs. The +BR2_ROOTFS_SKELETON_CUSTOM+ and
+ +BR2_ROOTFS_SKELETON_CUSTOM_PATH+ will allow you to specify the
+ location of your custom skeleton. These options can be found in the
+ +System configuration+ menu. At build time, the contents of the
+ skeleton are copied to output/target before any package
+ 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_
+ 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
extract your root filesystem tarball in a location exported by your
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 6/6] Adjust prompt for the post-build scripts option
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
` (4 preceding siblings ...)
2013-02-07 21:58 ` [Buildroot] [PATCH v3 5/6] docs/manual: slightly reword the solutions to customize rootfs Thomas Petazzoni
@ 2013-02-07 21:58 ` Thomas Petazzoni
2013-02-08 5:31 ` Samuel Martin
5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-02-07 21:58 UTC (permalink / raw)
To: buildroot
Since the post-image config option uses the plural for "Custom
scripts", do the same for the post-build config option, for
consistency.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
system/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system/Config.in b/system/Config.in
index bdd47c5..1e4fff3 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -261,7 +261,7 @@ config BR2_ROOTFS_OVERLAY
~ and .git, .svn and .hg directories.
config BR2_ROOTFS_POST_BUILD_SCRIPT
- string "Custom script to run before creating filesystem images"
+ string "Custom scripts to run before creating filesystem images"
default ""
help
Specify a space-separated list of scripts to be run after the build
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism
2013-02-07 21:58 ` [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism Thomas Petazzoni
@ 2013-02-08 5:12 ` Samuel Martin
2013-02-08 21:01 ` Peter Korsgaard
1 sibling, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2013-02-08 5:12 UTC (permalink / raw)
To: buildroot
2013/2/7 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Samuel Martin <s.martin49@gmail.com>
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 5/6] docs/manual: slightly reword the solutions to customize rootfs
2013-02-07 21:58 ` [Buildroot] [PATCH v3 5/6] docs/manual: slightly reword the solutions to customize rootfs Thomas Petazzoni
@ 2013-02-08 5:19 ` Samuel Martin
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2013-02-08 5:19 UTC (permalink / raw)
To: buildroot
2013/2/7 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> The order of the solutions to customize the root filesystem is
> changed: we now mention the post-build script mechanism *before* the
> custom root filesystem skeleton mechanism, because the former is
> preferred over the latter.
>
> In addition to this, we give a few more details about direct
> customization of the root filesystem in output/target, and about the
> custom target skeleton solution.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Samuel Martin <s.martin49@gmail.com>
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism
2013-02-07 21:58 ` [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism Thomas Petazzoni
@ 2013-02-08 5:28 ` Samuel Martin
2013-02-08 20:56 ` Peter Korsgaard
1 sibling, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2013-02-08 5:28 UTC (permalink / raw)
To: buildroot
2013/2/7 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Just like we have a post-build script mechanism that gets executed
> after the build of all packages but before the creation of the
> filesystem images, let's introduce a post-image script mechanism, that
> gets executed once all filesystem images have been generated.
>
> This can for example be used to call a tool building a firmware image
> from different images generated by Buildroot, or automatically extract
> the tarball root filesystem image into some location exported by NFS,
> or any other custom action.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Samuel Martin <s.martin49@gmail.com>
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 6/6] Adjust prompt for the post-build scripts option
2013-02-07 21:58 ` [Buildroot] [PATCH v3 6/6] Adjust prompt for the post-build scripts option Thomas Petazzoni
@ 2013-02-08 5:31 ` Samuel Martin
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2013-02-08 5:31 UTC (permalink / raw)
To: buildroot
2013/2/7 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Since the post-image config option uses the plural for "Custom
> scripts", do the same for the post-build config option, for
> consistency.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism
2013-02-07 21:58 ` [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism Thomas Petazzoni
2013-02-08 5:28 ` Samuel Martin
@ 2013-02-08 20:56 ` Peter Korsgaard
1 sibling, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2013-02-08 20:56 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Just like we have a post-build script mechanism that gets executed
Thomas> after the build of all packages but before the creation of the
Thomas> filesystem images, let's introduce a post-image script mechanism, that
Thomas> gets executed once all filesystem images have been generated.
Thomas> This can for example be used to call a tool building a firmware image
Thomas> from different images generated by Buildroot, or automatically extract
Thomas> the tarball root filesystem image into some location exported by NFS,
Thomas> or any other custom action.
Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Thomas> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Thomas> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Thomas> ---
Thomas> v2 -> v3:
Thomas> * Change 'script' -> 'scripts' in the config option prompt, as
Thomas> suggested by Samuel Martin.
Thomas> ---
Thomas> Makefile | 9 +++++++++
Thomas> system/Config.in | 18 ++++++++++++++++++
Thomas> 2 files changed, 27 insertions(+)
Thomas> diff --git a/Makefile b/Makefile
Thomas> index d9e5f24..3996d01 100644
Thomas> --- a/Makefile
Thomas> +++ b/Makefile
Thomas> @@ -353,6 +353,8 @@ endif
Thomas> include fs/common.mk
Thomas> +TARGETS+=target-post-image
Thomas> +
Thomas> TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
Thomas> TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
Thomas> TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
Thomas> @@ -555,6 +557,13 @@ target-generatelocales: host-localedef
Thomas> done
Thomas> endif
Thomas> +target-post-image:
Thomas> +ifneq ($(BR2_ROOTFS_POST_IMAGE_SCRIPT),)
This is always true as BR2_ROOTFS_POST_IMAGE_SCRIPT atleast contains "",
so I changed this to check for "" like the post-build script and
committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism
2013-02-07 21:58 ` [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism Thomas Petazzoni
2013-02-08 5:12 ` Samuel Martin
@ 2013-02-08 21:01 ` Peter Korsgaard
1 sibling, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2013-02-08 21:01 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Thomas> ---
v1-> v2:
Thomas> * Fix typos noticed by Yann.
v2-> v3:
Thomas> * Mention that the post-image scripts are executed as the user
Thomas> executing Buildroot, i.e generally not the root user. Suggested by
Thomas> Samuel Martin.
Thomas> ---
Thomas> docs/manual/customize-rootfs.txt | 22 ++++++++++++++++++++++
Thomas> 1 file changed, 22 insertions(+)
Thomas> diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
Thomas> index fa04d85..97af580 100644
Thomas> --- a/docs/manual/customize-rootfs.txt
Thomas> +++ b/docs/manual/customize-rootfs.txt
Thomas> @@ -55,3 +55,25 @@ there are a few ways to customize the resulting target filesystem.
Thomas> target root filesystem in +package/customize/source+, and then
Thomas> enable this special package in the configuration system. _This
Thomas> method is marked as deprecated_.
Thomas> +
Thomas> +Note also that if you want to perform some specific actions *after*
Thomas> +all filesystem images have been created (for example to automatically
Thomas> +extract your root filesystem tarball in a location exported by your
Thomas> +NFS server, or to create a special firmware image that bundles your
Thomas> +root filesystem and kernel image, or any other custom action), you can
Thomas> +specify a space-separated list of scripts in the
Thomas> ++BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option.
Thomas> +
Thomas> +Each of those scripts will be called, with the path to the +images+
I don't think this comma should be here.
Thomas> +output directory as first and unique argument, and will be executed
Thomas> +with the main Buildroot source directory as the current
Thomas> +directory. Those scripts will be executed as the user that executes
Thomas> +Buildroot, which should normally not be the root user. Therefore, any
Thomas> +action requiring root permissions in one of these post-image script
Thomas> +will require special handling (usage of fakeroot or sudo), which is
Thomas> +left to the script developer.
Thomas> +
Thomas> +Just like for the _post-build scripts_ mentionned above, you also have
s/mentionned/mentioned/
Committed with these fixes, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 4/6] docs/manual: no longer mention the package/customize thing
2013-02-07 21:58 ` [Buildroot] [PATCH v3 4/6] docs/manual: no longer mention the package/customize thing Thomas Petazzoni
@ 2013-02-08 21:07 ` Peter Korsgaard
0 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2013-02-08 21:07 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed the rest of the series without any comments, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-02-08 21:07 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 21:58 [Buildroot] [PATCH v3] Post-image addition, and customize removal Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism Thomas Petazzoni
2013-02-08 5:28 ` Samuel Martin
2013-02-08 20:56 ` Peter Korsgaard
2013-02-07 21:58 ` [Buildroot] [PATCH v3 2/6] docs/manual: mention the new post-image mechanism Thomas Petazzoni
2013-02-08 5:12 ` Samuel Martin
2013-02-08 21:01 ` Peter Korsgaard
2013-02-07 21:58 ` [Buildroot] [PATCH v3 3/6] package/customize: remove Thomas Petazzoni
2013-02-07 21:58 ` [Buildroot] [PATCH v3 4/6] docs/manual: no longer mention the package/customize thing Thomas Petazzoni
2013-02-08 21:07 ` Peter Korsgaard
2013-02-07 21:58 ` [Buildroot] [PATCH v3 5/6] docs/manual: slightly reword the solutions to customize rootfs Thomas Petazzoni
2013-02-08 5:19 ` Samuel Martin
2013-02-07 21:58 ` [Buildroot] [PATCH v3 6/6] Adjust prompt for the post-build scripts option Thomas Petazzoni
2013-02-08 5:31 ` Samuel Martin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.