Changeset 45900


Ignore:
Timestamp:
2015-06-05T16:12:05+02:00 (3 years ago)
Author:
blogic
Message:

base-files: default_do_upgrade: accept & forward image extraction command

get_image allows passing 2nd argument that is used in a pipe for
extracting firmware from a non-native format. By accepting such command
in default_do_upgrade we allow platforms to use this helper for vendor
specific images.

Signed-off-by: Rafał Miłecki <zajec5@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/lib/upgrade/common.sh

    r45813 r45900  
    213213} 
    214214 
     215# Flash firmware to MTD partition 
     216# 
     217# $(1): path to image 
     218# $(2): (optional) pipe command to extract firmware, e.g. dd bs=n skip=m 
    215219default_do_upgrade() { 
    216220        sync 
    217221        if [ "$SAVE_CONFIG" -eq 1 ]; then 
    218                 get_image "$1" | mtd $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}" 
     222                get_image "$1" "$2" | mtd $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}" 
    219223        else 
    220                 get_image "$1" | mtd write - "${PART_NAME:-image}" 
     224                get_image "$1" "$2" | mtd write - "${PART_NAME:-image}" 
    221225        fi 
    222226} 
Note: See TracChangeset for help on using the changeset viewer.