[source] procd: add support for overriding the tar sysupgrade board name
LEDE Commits
lede-commits at lists.infradead.org
Wed Jan 11 04:40:45 PST 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/4d8da82c29e9c2c1691d16977f41bfe27da69f17
commit 4d8da82c29e9c2c1691d16977f41bfe27da69f17
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Jan 8 14:26:57 2017 +0100
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 at nbd.name>
---
package/system/procd/files/nand.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 70b9af5..ebaaf2a 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`
More information about the lede-commits
mailing list