diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2009-04-15 16:07:27 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-04-15 16:07:27 +0000 |
commit | 4e006407ec347a79b60949b03a2badccf923bb06 (patch) | |
tree | 1e9188eaeca74f3972a44769dd571afef781390c /util/abuild | |
parent | d086e5d966da9e2a3d0dfb7d4e388e271ff2d51d (diff) | |
download | coreboot-4e006407ec347a79b60949b03a2badccf923bb06.tar.xz |
Add -r|--remove option to force abuild to remove the output directory
after every board build, in order to save disk space if you don't need
the actual output files.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4119 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/abuild')
-rwxr-xr-x | util/abuild/abuild | 26 | ||||
-rw-r--r-- | util/abuild/abuild.1 | 8 |
2 files changed, 32 insertions, 2 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild index a60bd50fb1..33e0a335bb 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -499,9 +499,30 @@ function test_target return 0 } +function remove_target +{ + if [ "$remove" != "true" ]; then + return 0 + fi + + VENDOR=$1 + MAINBOARD=$2 + + # Save the generated coreboot.rom file of each board. + if [ -r "$TARGET/${VENDOR}_${MAINBOARD}/coreboot.rom" ]; then + cp $TARGET/${VENDOR}_${MAINBOARD}/coreboot.rom \ + ${VENDOR}_${MAINBOARD}_coreboot.rom + fi + + printf "Removing build dir for board $VENDOR $MAINBOARD...\n" + rm -rf $TARGET/${VENDOR}_${MAINBOARD} + + return 0 +} + function myhelp { - printf "Usage: $0 [-v] [-a] [-b] [-t <vendor/board>] [-p <dir>] [lbroot]\n" + printf "Usage: $0 [-v] [-a] [-b] [-r] [-t <vendor/board>] [-p <dir>] [lbroot]\n" printf " $0 [-V|--version]\n" printf " $0 [-h|--help]\n\n" @@ -509,6 +530,7 @@ function myhelp printf " [-v|--verbose] print more messages\n" printf " [-a|--all] build previously succeeded ports as well\n" printf " [-b|--broken] attempt to build ports that are known broken\n" + printf " [-r|--remove] remove output dir after build\n" printf " [-t|--target <vendor/board>] attempt to build target vendor/board only\n" printf " [-p|--payloads <dir>] use payloads in <dir> to build images\n" printf " [-V|--version] print version number and exit\n" @@ -570,6 +592,7 @@ while true ; do -t|--target) shift; target="$1"; shift;; -a|--all) shift; buildall=true;; -b|--broken) shift; buildbroken=true;; + -r|--remove) shift; remove=true; shift;; -v|--verbose) shift; verbose=true;; -V|--version) shift; myversion; exit 0;; -h|--help) shift; myversion; myhelp; exit 0;; @@ -606,6 +629,7 @@ else for MAINBOARD in $( mainboards $VENDOR ); do build_target $VENDOR $MAINBOARD test_target $VENDOR $MAINBOARD + remove_target $VENDOR $MAINBOARD done done fi diff --git a/util/abuild/abuild.1 b/util/abuild/abuild.1 index 251a91279e..44439e9213 100644 --- a/util/abuild/abuild.1 +++ b/util/abuild/abuild.1 @@ -3,7 +3,7 @@ abuild \- build coreboot images for all available targets .SH SYNOPSIS .B abuild -\fR[\fB\-abvxsTVh\fR] [\fB\-c\fR numcpus|max] [\fB\-t\fR vendor/board] [\fB\-p\fR dir] +\fR[\fB\-abrvxsTVh\fR] [\fB\-c\fR numcpus|max] [\fB\-t\fR vendor/board] [\fB\-p\fR dir] [LBROOT] .SH DESCRIPTION .B abuild @@ -36,6 +36,12 @@ path of the payload. .B "\-t, \-\-target <vendor/board>" Attempt to build target vendor/board only. .TP +.B "\-r, \-\-remove" +Remove mainboard build directory after the respective target has been +built. This is mainly used for development purposes, when you don't need +the actual build output, but rather only want to know if a build failed +or not. +.TP .B "\-x, \-\-xml" Write an XML log file instead of a plain-text one. The file will be called |