diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-04-21 20:31:18 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-04-21 20:31:18 +0000 |
commit | 2d3e712d5698b75270acfafaf7cf1c15aeb0be8a (patch) | |
tree | c0912a022c75a7fe3ab20a26ec8ac08a56a2efdd /util/abuild | |
parent | 16cdbb244cded6f3d8df719b7a0217fdf6bf327d (diff) | |
download | coreboot-2d3e712d5698b75270acfafaf7cf1c15aeb0be8a.tar.xz |
Add an "-l <num>" argument to abuild that sets the LOGLEVEL variables
to the specified value.
Only change Config-abuild.lb, as the others are for manual buildtarget
use - adding __LOGLEVEL__ there would kill the build as it isn't
replaced by the actual content.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4153 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/abuild')
-rwxr-xr-x | util/abuild/abuild | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild index 33e0a335bb..0fd4226b99 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -52,6 +52,9 @@ scanbuild=false # stackprotect mode enabled by -ns option. stackprotect=false +# loglevel changed with -l / --loglevel option +loglevel=default + ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/i86pc/i386/ \ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \ @@ -154,6 +157,7 @@ option CROSS_COMPILE="CROSS_PREFIX" option HOSTCC="CROSS_HOSTCC" __COMPRESSION__ +__LOGLEVEL__ EOF if [ "$TARCH" == i386 ] ; then @@ -185,6 +189,14 @@ EOF ) > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb fi + if [ "$loglevel" != "default" ]; then + LOGLEVEL1="option MAXIMUM_CONSOLE_LOGLEVEL=$loglevel" + LOGLEVEL2="option DEFAULT_CONSOLE_LOGLEVEL=$loglevel" + else + LOGLEVEL1="# no loglevel override" + LOGLEVEL2="" + fi + if [ "`which lzma`" != "" -a "$PAYLOAD" != /dev/null ]; then COMPRESSION="option CONFIG_COMPRESSED_PAYLOAD_LZMA=1" else @@ -199,6 +211,8 @@ EOF -e s:CROSS_PREFIX:"$CROSS_COMPILE":g \ -e s:CROSS_HOSTCC:"$HOSTCC":g \ -e s:__COMPRESSION__:"$COMPRESSION":g \ + -e s:__LOGLEVEL__:"$LOGLEVEL1"\ +"$LOGLEVEL2":g \ $TARGET/Config-${VENDOR}_${MAINBOARD}.lb.pre > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb printf " ok\n" } @@ -573,11 +587,11 @@ verbose=false getoptbrand="`getopt -V`" if [ "${getoptbrand:0:6}" == "getopt" ]; then # Detected GNU getopt that supports long options. - args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent,xml,config Vvhat:bp:Tc:sxC -- "$@"` + args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent,xml,config,loglevel Vvhat:bp:Tc:sxCl: -- "$@"` eval set "$args" else # Detected non-GNU getopt - args=`getopt Vvhat:bp:Tc:sxC $*` + args=`getopt Vvhat:bp:Tc:sxCl: $*` set -- $args fi @@ -603,6 +617,7 @@ while true ; do -ns|--nostackprotect) shift; stackprotect=true;; -sb|--scan-build) shift; scanbuild=true;; -C|--config) shift; configureonly=1;; + -l|--loglevel) shift; loglevel="$1"; shift;; --) shift; break;; -*) printf "Invalid option\n\n"; myhelp; exit 1;; *) break;; |