Commit eed7d873 authored by Daniel Mack's avatar Daniel Mack Committed by Peter Korsgaard
Browse files

Add support for custom post-build script



The config help text says it all:

  Specify a script to be run after the build has finished and before
  the BR2 starts packing the files into selected packages.

  This gives users the oportunity to do board-specific cleanups,
  add-ons and the like, so the generated files can be used directly
  without further processing.

  The script is called with the target directory name as first and
  only argument. Make sure the exit code of that script is 0,
  otherwise make will stop after calling it.

Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 0cb591eb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -363,6 +363,10 @@ endif
	find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
	$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null

ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
	$(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
endif

ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
LOCALE_WHITELIST=$(PROJECT_BUILD_DIR)/locales.nopurge
LOCALE_NOPURGE=$(strip $(subst ",,$(BR2_ENABLE_LOCALE_WHITELIST)))
+15 −0
Original line number Diff line number Diff line
@@ -12,6 +12,21 @@ config BR2_ROOTFS_SUFFIX
	help
	  Add a custom string to the end of the root file system name.

config BR2_ROOTFS_POST_BUILD_SCRIPT
	string "Custom script to run before packing files"
	default ""
	help
	  Specify a script to be run after the build has finished and before
	  the BR2 starts packing the files into selected packages.

	  This gives users the oportunity to do board-specific cleanups,
	  add-ons and the like, so the generated files can be used directly
	  without further processing.

	  The script is called with the target directory name as first and
	  only argument. Make sure the exit code of that script is 0,
	  otherwise make will stop after calling it.

comment "filesystem for target device"

source "target/cramfs/Config.in"