Changeset 20538 for trunk


Ignore:
Timestamp:
2010-03-28T13:55:07+02:00 (7 years ago)
Author:
florian
Message:

[x86] sysupgrade: Get target device from kernel cmdline, patch from acinonyx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/x86/base-files/lib/upgrade/platform.sh

    r20514 r20538  
    1414 
    1515platform_do_upgrade() { 
     16        local ROOTFS 
    1617        sync 
    17         get_image "$1" > /dev/sda 
     18        grep -q -e "jffs2" -e "squashfs" /proc/cmdline \ 
     19                && ROOTFS="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "block2mtd.block2mtd") { print substr($2,1,index($2, ",")-1) }' < /proc/cmdline)" \ 
     20                || ROOTFS="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "root") { print $2 ) }' < /proc/cmdline)" 
     21        [ -b ${ROOTFS%[0-9]} ] && get_image "$1" > ${ROOTFS%[0-9]} 
    1822} 
    1923 
Note: See TracChangeset for help on using the changeset viewer.