Changeset 821

Show
Ignore:
Timestamp:
10/03/06 13:59:39 (2 years ago)
Author:
wbx
Message:

we need to rename MODEL -> DEVICE, because model is already in
the namespace of the funky ruby webadmin plugin..

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/freewrt_1_0/scripts/ib.sh

    r810 r821  
    1919 
    2020usage() { 
    21         echo "Usage: $0 -a <arch> -b <board> -k <kernelversion> -f <filesystem> -m <model> -o <outputfile> -p <packagelist>" 
     21        echo "Usage: `basename $0` -a <arch> -b <board> -k <kernelversion> -f <filesystem> -d <device> -o <outputfile> -p <packagelist>" 
    2222        echo "          -a cpu architecture, f.e. mipsel" 
    2323        echo "          -b board type, f.e. brcm" 
    2424        echo "          -k kernel version, 2.4 or 2.6" 
    2525        echo "          -f root filesystem type, f.e. jffs2" 
    26         echo "          -m specific model of board type, f.e. asus_wl500g" 
     26        echo "          -d specific device, f.e. asus-wl500g" 
    2727        echo "          -p package list filename" 
    2828        echo "          -o output file for the firmware image" 
     
    5353allowed_archs=$(sql name arches) 
    5454allowed_boards=$(sql name boards) 
    55 allowed_models=$(sql name models) 
     55allowed_devices=$(sql name devices) 
    5656allowed_os_kernels=$(sql name os_kernels) 
    5757 
    58 while getopts a:b:f:k:m:o:p: option 
     58while getopts a:b:f:k:d:o:p: option 
    5959do 
    6060  case $option in 
     
    119119                fi 
    120120                ;; 
    121         m
    122                 models=$OPTARG 
    123                 for m in $allowed_model
     121        d
     122                devices=$OPTARG 
     123                for d in $allowed_device
    124124                  do 
    125                         if [ $models = $m
     125                        if [ $devices = $d
    126126                        then  
    127                                 model=$m 
    128                         fi 
    129                 done 
    130                 if [ -z $model
    131                   then 
    132                         echo "unsupported model: $models" 
     127                                device=$d 
     128                        fi 
     129                done 
     130                if [ -z $device
     131                  then 
     132                        echo "unsupported device: $devices" 
    133133                        exit 1 
    134134                fi 
     
    182182done 
    183183 
    184 erase_size=$(sqlw erase_size models name ${model}) 
     184erase_size=$(sqlw erase_size devices name ${device}) 
    185185 
    186186if [ $fs = "squashfs-symlinks" -o $fs = "squashfs-overlay" ] 
     
    191191fi 
    192192 
    193 case $model in  
    194         asus_wl500g) 
    195                 model_opts="-p WL500g -v 1.9.6.0" 
    196                 image_command="${toolsdir}/trx ${model_opts} -o ${outputfile} -a ${align} ${tmpdir}/root.${fs}" 
    197                 ;; 
    198         asus_wl500g_deluxe) 
    199                 model_opts="-p WL500gx -v 1.9.6.0" 
    200                 image_command="${toolsdir}/trx ${model_opts} -o ${outputfile} -a ${align} ${tmpdir}/root.${fs}" 
    201                 ;; 
    202         asus_wl500g_premium) 
    203                 model_opts="-p WL500gp -v 1.9.7.0" 
    204                 image_command="${toolsdir}/trx ${model_opts} -o ${outputfile} -a ${align} ${tmpdir}/root.${fs}" 
     193case $device in  
     194        asus-wl500g) 
     195                device_opts="-p WL500g -v 1.9.6.0" 
     196                image_command="${toolsdir}/trx ${device_opts} -o ${outputfile} -a ${align} ${tmpdir}/root.${fs}" 
     197                ;; 
     198        asus-wl500g-deluxe) 
     199                device_opts="-p WL500gx -v 1.9.6.0" 
     200                image_command="${toolsdir}/trx ${device_opts} -o ${outputfile} -a ${align} ${tmpdir}/root.${fs}" 
     201                ;; 
     202        asus-wl500g-premium) 
     203                device_opts="-p WL500gp -v 1.9.7.0" 
     204                image_command="${toolsdir}/trx ${device_opts} -o ${outputfile} -a ${align} ${tmpdir}/root.${fs}" 
    205205                ;; 
    206206esac