aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/procd
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2014-07-14 14:53:15 +0000
committerImre Kaloz <kaloz@openwrt.org>2014-07-14 14:53:15 +0000
commit44e7bc82d5abf0af9b13d02283a3505fe26ba8f0 (patch)
treea59447b5a6bce048a10ade7901eef73e1cb5946f /package/system/procd
parentee5716106641f66b1476f70bbb64a991adae306b (diff)
downloadupstream-44e7bc82d5abf0af9b13d02283a3505fe26ba8f0.tar.gz
upstream-44e7bc82d5abf0af9b13d02283a3505fe26ba8f0.tar.bz2
upstream-44e7bc82d5abf0af9b13d02283a3505fe26ba8f0.zip
[procd]: allow overriding the kernel partition's name
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41646 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/system/procd')
-rw-r--r--package/system/procd/files/nand.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 5f307d09b0..4aa56e37ae 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -4,6 +4,9 @@
. /lib/functions.sh
+# 'kernel' partition on NAND contains the kernel
+CI_KERNPART="kernel"
+
# 'ubi' partition on NAND contains UBI
CI_UBIPART="ubi"
@@ -221,7 +224,7 @@ nand_upgrade_ubifs() {
nand_upgrade_tar() {
local tar_file="$1"
local board_name="$(cat /tmp/sysinfo/board_name)"
- local kernel_mtd="$(find_mtd_index kernel)"
+ 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`
local rootfs_length=`(tar xf $tar_file sysupgrade-$board_name/root -O | wc -c) 2> /dev/null`
@@ -232,7 +235,7 @@ nand_upgrade_tar() {
local has_env=0
[ "kernel_length" = 0 -o -z "$kernel_mtd" ] || {
- tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - kernel
+ tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - $CI_KERNPART
}
[ "kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=0