aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-08 14:26:57 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-11 13:40:36 +0100
commit4d8da82c29e9c2c1691d16977f41bfe27da69f17 (patch)
treecfa889ce070a339983a3b4ef485033c3c8dacff3 /package
parente21cb649a235180563363b8af5ba8296b9ac0baa (diff)
downloadupstream-4d8da82c29e9c2c1691d16977f41bfe27da69f17.tar.gz
upstream-4d8da82c29e9c2c1691d16977f41bfe27da69f17.tar.bz2
upstream-4d8da82c29e9c2c1691d16977f41bfe27da69f17.zip
procd: add support for overriding the tar sysupgrade board name
Useful for providing images that work for multiple devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/system/procd/files/nand.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 70b9af559d..ebaaf2aa16 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -239,9 +239,18 @@ nand_upgrade_ubifs() {
nand_do_upgrade_success
}
+nand_board_name() {
+ if type 'platform_nand_board_name' >/dev/null 2>/dev/null; then
+ platform_nand_board_name
+ return
+ fi
+
+ cat /tmp/sysinfo/board_name
+}
+
nand_upgrade_tar() {
local tar_file="$1"
- local board_name="$(cat /tmp/sysinfo/board_name)"
+ local board_name="$(nand_board_name)"
local kernel_mtd="$(find_mtd_index $CI_KERNPART)"
local kernel_length=`(tar xf $tar_file sysupgrade-$board_name/kernel -O | wc -c) 2> /dev/null`