Changeset 5089


Ignore:
Timestamp:
Feb 7, 2010 10:43:48 PM (3 years ago)
Author:
oxygene
Message:

newconfig is no more.

Signed-off-by: Patrick Georgi <patrick.georgi@…>
Acked-by: Ronald G. Minnich <rminnich@…>

Location:
trunk
Files:
415 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/util/abuild/abuild

    r5068 r5089  
    3535# Configure-only mode 
    3636configureonly=0 
    37 # use old config method "newconfig" 
    38 oldconfig=0 
    3937 
    4038# One might want to adjust these in case of cross compiling 
     
    123121        VENDOR=$1 
    124122        MAINBOARD=$2 
    125         if [ $oldconfig -eq 1 ]; then 
    126                 ARCH=`cat $ROOT/src/mainboard/$VENDOR/$MAINBOARD/Config.lb | \ 
    127                         grep ^arch | cut -f 2 -d\ ` 
    128                 echo $ARCH | sed s/ppc/powerpc/ 
    129         else 
    130                 ARCH=`cat $ROOT/src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \ 
    131                         grep "select ARCH_"|cut -f2- -d_` 
    132                 echo $ARCH | sed s/X86/i386/ 
    133         fi 
    134 } 
    135  
    136 function create_config_old 
    137 { 
    138         VENDOR=$1 
    139         MAINBOARD=$2 
    140         CONFIG=$3 
    141         TARCH=$( architecture $VENDOR $MAINBOARD ) 
    142         TARGCONFIG=$ROOT/targets/$VENDOR/$MAINBOARD/Config-abuild.lb 
    143  
    144         if [ "$CONFIG" != "" ]; then 
    145                 TARGCONFIG=$ROOT/targets/$VENDOR/$MAINBOARD/$CONFIG 
    146         fi 
    147  
    148         # get a working payload for the board if we have one. 
    149         # the --payload option expects a directory containing  
    150         # a shell script payload.sh 
    151         #   Usage: payload.sh [VENDOR] [DEVICE] 
    152         # the script returns an absolute path to the payload binary. 
    153  
    154         if [ -f $payloads/payload.sh ]; then 
    155                 PAYLOAD=`sh $payloads/payload.sh $VENDOR $MAINBOARD` 
    156                 printf "Using payload $PAYLOAD\n" 
    157         fi 
    158          
    159         mkdir -p $TARGET 
    160  
    161         if [ -f $TARGCONFIG ]; then 
    162                 cp $TARGCONFIG $TARGET/Config-${VENDOR}_${MAINBOARD}.lb 
    163                 printf "Using existing test target $TARGCONFIG" 
    164                 xml "  <config>$TARGCONFIG</config>" 
    165         else 
    166                 printf "  Creating config file..." 
    167                 xml "  <config>autogenerated</config>" 
    168                 ( cat << EOF 
    169 # This will make a target directory of ./VENDOR_MAINBOARD 
    170  
    171 target VENDOR_MAINBOARD 
    172 mainboard VENDOR/MAINBOARD 
    173  
    174 option CC="CROSSCC" 
    175 option CONFIG_CROSS_COMPILE="CROSS_PREFIX" 
    176 option HOSTCC="CROSS_HOSTCC" 
    177  
    178 __COMPRESSION__ 
    179 __LOGLEVEL__ 
    180  
    181 EOF 
    182                 if [ "$TARCH" == i386 ] ; then 
    183                         cat <<EOF 
    184 romimage "normal" 
    185         option CONFIG_USE_FALLBACK_IMAGE=0 
    186         option COREBOOT_EXTRA_VERSION=".0-normal" 
    187         payload __PAYLOAD__ 
    188 end 
    189  
    190 romimage "fallback"  
    191         option CONFIG_USE_FALLBACK_IMAGE=1 
    192         option COREBOOT_EXTRA_VERSION=".0-fallback" 
    193         payload __PAYLOAD__ 
    194 end 
    195 buildrom ./coreboot.rom CONFIG_ROM_SIZE "normal" "fallback" 
    196 EOF 
    197                 else 
    198                         cat <<EOF 
    199 romimage "only" 
    200         option COREBOOT_EXTRA_VERSION=".0" 
    201         payload __PAYLOAD__ 
    202 end 
    203 buildrom ./coreboot.rom CONFIG_ROM_SIZE "only" 
    204 EOF 
    205                 fi  
    206                 ) > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb 
    207         fi 
    208  
    209         if [ "$loglevel" != "default" ]; then 
    210                 LOGLEVEL1="option CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=$loglevel" 
    211                 LOGLEVEL2="option CONFIG_DEFAULT_CONSOLE_LOGLEVEL=$loglevel" 
    212         else 
    213                 LOGLEVEL1="# no loglevel override" 
    214                 LOGLEVEL2="" 
    215         fi 
    216  
    217         COMPRESSION="# no compression" 
    218         if which lzma >/dev/null 2>/dev/null; then 
    219                 if [ "$PAYLOAD" != /dev/null ]; then 
    220                         COMPRESSION="option CONFIG_COMPRESSED_PAYLOAD_LZMA=1" 
    221                 fi 
    222         fi 
    223  
    224         cp $TARGET/Config-${VENDOR}_${MAINBOARD}.lb $TARGET/Config-${VENDOR}_${MAINBOARD}.lb.pre 
    225         sed -e s:VENDOR:$VENDOR:g \ 
    226                 -e s:MAINBOARD:$MAINBOARD:g \ 
    227                 -e s:payload\ __PAYLOAD__:payload\ $PAYLOAD:g \ 
    228                 -e s:CROSSCC:"$CC":g \ 
    229                 -e s:CROSS_PREFIX:"$CROSS_COMPILE":g \ 
    230                 -e s:CROSS_HOSTCC:"$HOSTCC":g \ 
    231                 -e s:__COMPRESSION__:"$COMPRESSION":g \ 
    232                 -e s:__LOGLEVEL__:"$LOGLEVEL1"\ 
    233 "$LOGLEVEL2":g \ 
    234                 $TARGET/Config-${VENDOR}_${MAINBOARD}.lb.pre > $TARGET/Config-${VENDOR}_${MAINBOARD}.lb 
    235         printf " ok\n" 
     123        ARCH=`cat $ROOT/src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \ 
     124                grep "select ARCH_"|cut -f2- -d_` 
     125        echo $ARCH | sed s/X86/i386/ 
    236126} 
    237127 
     
    309199} 
    310200 
    311 function create_builddir 
    312 {        
    313         VENDOR=$1 
    314         MAINBOARD=$2 
    315          
    316         printf "  Creating builddir..." 
    317  
    318         target_dir=$TARGET 
    319         config_dir=$ROOT/util/newconfig 
    320         yapps2_py=$config_dir/yapps2.py 
    321         config_g=$config_dir/config.g 
    322         config_lb=Config-${VENDOR}_${MAINBOARD}.lb 
    323  
    324         cd $target_dir 
    325  
    326         build_dir=${VENDOR}_${MAINBOARD} 
    327         config_py=$build_dir/config.py 
    328  
    329         if [ ! -d $build_dir ] ; then 
    330                 mkdir -p $build_dir 
    331         fi 
    332         if [ ! -f $config_py ]; then 
    333                 $PYTHON $yapps2_py $config_g $config_py &> $build_dir/py.log 
    334         fi 
    335  
    336         # make sure config.py is up-to-date 
    337  
    338         export PYTHONPATH=$config_dir 
    339         $PYTHON $config_py $config_lb $ROOT &> $build_dir/config.log 
    340         if [ $? -eq 0 ]; then 
    341                 printf "ok\n" 
    342                 xml "  <builddir>ok</builddir>" 
    343                 xml "  <log>" 
    344                 xmlfile $build_dir/config.log 
    345                 xml "  </log>" 
    346                 xml "" 
    347                 return 0 
    348         else 
    349                 printf "FAILED! Log excerpt:\n" 
    350                 xml "  <builddir>failed</builddir>" 
    351                 xml "  <log>" 
    352                 xmlfile $build_dir/config.log 
    353                 xml "  </log>" 
    354                 xml "" 
    355                 tail -n $CONTEXT $build_dir/config.log 2> /dev/null || tail -$CONTEXT $build_dir/config.log 
    356                 return 1 
    357         fi 
    358 } 
    359  
    360201function create_buildenv 
    361202{ 
     
    363204        MAINBOARD=$2 
    364205        CONFIG=$3 
    365         if [ $oldconfig -eq 1 ]; then 
    366                 create_config_old $VENDOR $MAINBOARD $CONFIG 
    367                 create_builddir $VENDOR $MAINBOARD 
    368         else 
    369                 create_config $VENDOR $MAINBOARD $CONFIG 
    370         fi 
     206        create_config $VENDOR $MAINBOARD $CONFIG 
    371207} 
    372208 
     
    383219        CURR=$( pwd ) 
    384220        stime=`perl -e 'print time();'` 
    385         if [ $oldconfig -eq 1 ]; then 
    386                 cd $TARGET/${VENDOR}_${MAINBOARD} 
    387                 eval $MAKE $silent -j $cpus &> make.log 
    388                 ret=$? 
    389         else 
    390                 build_dir=$TARGET/${VENDOR}_${MAINBOARD} 
    391                 eval $MAKE $silent -j $cpus obj=${build_dir} \ 
    392                         &> ${build_dir}/make.log 
    393                 ret=$? 
    394                 mv .config ${build_dir}/config.build 
    395                 mv .xcompile ${build_dir}/xcompile.build 
    396                 mv ..config.tmp ${build_dir}/config.deps 
    397                 cd $TARGET/${VENDOR}_${MAINBOARD} 
    398         fi 
     221        build_dir=$TARGET/${VENDOR}_${MAINBOARD} 
     222        eval $MAKE $silent -j $cpus obj=${build_dir} \ 
     223                &> ${build_dir}/make.log 
     224        ret=$? 
     225        mv .config ${build_dir}/config.build 
     226        mv .xcompile ${build_dir}/xcompile.build 
     227        mv ..config.tmp ${build_dir}/config.deps 
     228        cd $TARGET/${VENDOR}_${MAINBOARD} 
    399229        etime=`perl -e 'print time();'` 
    400230        duration=$(( $etime - $stime )) 
     
    693523verbose=false 
    694524 
    695 test -f util/newconfig/config.g && ROOT=$( pwd ) 
    696 test -f ../util/newconfig/config.g && ROOT=$( cd ..; pwd ) 
     525test -f util/sconfig/config.g && ROOT=$( pwd ) 
     526test -f ../util/sconfig/config.g && ROOT=$( cd ..; pwd ) 
    697527test "$ROOT" = "" && ROOT=$( cd ../..; pwd ) 
    698528 
     
    701531if [ "${getoptbrand:0:6}" == "getopt" ]; then 
    702532        # Detected GNU getopt that supports long options. 
    703         args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent,xml,config,loglevel:,oldconfig Vvhat:bp:Tc:sxCl:o -- "$@"` 
     533        args=`getopt -l version,verbose,help,all,target:,broken,payloads:,test,cpus:,silent,xml,config,loglevel: Vvhat:bp:Tc:sxCl: -- "$@"` 
    704534        eval set "$args" 
    705535else 
     
    732562                -C|--config)    shift; configureonly=1;; 
    733563                -l|--loglevel)  shift; loglevel="$1"; shift;; 
    734                 -o|--oldconfig) shift; oldconfig=1;; 
    735564                --)             shift; break;; 
    736565                -*)             printf "Invalid option\n\n"; myhelp; exit 1;; 
Note: See TracChangeset for help on using the changeset viewer.