Changeset 889


Ignore:
Timestamp:
Dec 30, 2016, 12:47:55 PM (11 months ago)
Author:
amain
Message:

openwrt: small updates to install.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/install.sh

    r888 r889  
    5454fi
    5555
     56if echo ${dev} | grep -q "[0-9]"
     57then
     58    echo "Partition number found in ${dev}, please specify 'raw' block device"
     59    exit 1
     60fi
     61
     62if mount | grep -q ${dev}
     63then
     64    echo "Device ${dev} already mounted:"
     65    mount | grep ${dev}
     66    exit 1
     67fi
     68
    5669function get()
    5770{
     
    123136
    124137Intalling to   : ${dev}
    125     root(bytes): ${root}
    126     swap(bytes): ${swap}
     138      root(MiB): ${root}
     139      swap(MiB): ${swap}
    127140
    128141Root filesystem: ${rootfs}
     
    171184mount ${dev}1 ${BASE_DIR}/mnt
    172185
    173 extract ${rootfs} ${BASE_DIR}/mnt
    174 extract ${modules} ${BASE_DIR}/mnt
    175 extract ${headers} ${BASE_DIR}/mnt
    176 echo "Copy firmware (${firmware}) to /boot..."
     186extract ${rootfs} ${BASE_DIR}/mnt   ; echo
     187extract ${modules} ${BASE_DIR}/mnt  ; echo
     188extract ${headers} ${BASE_DIR}/mnt  ; echo
     189echo -n "Copy firmware (${firmware}) to /boot..."
    177190cp ${firmware} ${BASE_DIR}/mnt/boot
    178 
     191echo "done"
     192
     193echo
     194echo -n "Calculate module dependencies (depmod)..."
     195depmod -b ${BASE_DIR}/mnt \
     196       -a $(find ${BASE_DIR}/mnt/lib/modules/ \
     197                 -maxdepth 1 \
     198                 -mindepth 1 \
     199                 -type d \
     200                 -printf "%f\n" \
     201             | head -1)
     202echo "done"
     203
Note: See TracChangeset for help on using the changeset viewer.