diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-11-26 18:01:50 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-12-02 09:15:18 +0100 |
commit | e7bd6cce4c382e33a62c462bf07bafba23b22e1a (patch) | |
tree | c9ca9dd44f52e15bc875f24c980ebb63caaec5ab /target/linux/bcm53xx/base-files/lib | |
parent | 51d4e85068e0c2e0e15d3226c1d8946ebf7ad1c1 (diff) | |
download | upstream-e7bd6cce4c382e33a62c462bf07bafba23b22e1a.tar.gz upstream-e7bd6cce4c382e33a62c462bf07bafba23b22e1a.tar.bz2 upstream-e7bd6cce4c382e33a62c462bf07bafba23b22e1a.zip |
bcm53xx: sysupgrade: simplify extracting image from Seama seal
Use "oseama extract" which supports now writing to stdout.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm53xx/base-files/lib')
-rw-r--r-- | target/linux/bcm53xx/base-files/lib/upgrade/platform.sh | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index cbb8290275..0973e4048b 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -396,20 +396,8 @@ platform_img_from_safeloader() { echo -n $dir/os-image } -platform_img_from_seama() { - local dir="/tmp/sysupgrade-bcm53xx" - local offset=$(oseama info "$1" -e 0 | grep "Entity offset:" | sed "s/.*:\s*//") - local size=$(oseama info "$1" -e 0 | grep "Entity size:" | sed "s/.*:\s*//") - - # Busybox doesn't support required iflag-s - # echo -n dd iflag=skip_bytes,count_bytes skip=$offset count=$size - - rm -fR $dir - mkdir -p $dir - dd if="$1" of=$dir/image-noheader.bin bs=$offset skip=1 - dd if=$dir/image-noheader.bin of=$dir/image-entity.bin bs=$size count=1 - - echo -n $dir/image-entity.bin +platform_img_from_seama_cmd() { + echo -n oseama extract "$1" -e 0 } platform_other_do_upgrade() { @@ -438,7 +426,7 @@ platform_other_do_upgrade() { "lxl") cmd=$(platform_trx_from_lxl_cmd "$trx");; "lxlold") cmd=$(platform_trx_from_lxlold_cmd "$trx");; "safeloader") trx=$(platform_img_from_safeloader "$trx"); PART_NAME=os-image;; - "seama") trx=$(platform_img_from_seama "$trx");; + "seama") cmd=$(platform_img_from_seama_cmd "$trx");; esac default_do_upgrade "$trx" "$cmd" |