procd: some cleanup for SysupgradeNAND
authorJohn Crispin <john@openwrt.org>
Tue, 17 Jun 2014 15:40:02 +0000 (15:40 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 17 Jun 2014 15:40:02 +0000 (15:40 +0000)
Removed unused ubi file file from template as ubinized images are
passed directly and not inside the tarball.
Also removed left-over white-space.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
SVN-Revision: 41237

include/image.mk
package/system/procd/files/nand.sh

index 605474ce9960defeb594313e1010fd0ff4c799f5..66ac497849f4e4b0a2c5c20a06410b0adb4468e8 100644 (file)
@@ -132,14 +132,12 @@ endif
 # $(1): board name
 # $(2): kernel image
 # $(3): rootfs image
-# $(4): ubi image
 ifneq ($(CONFIG_NAND_SUPPORT),)
    define Image/Build/SysupgradeNAND
        mkdir -p $(KDIR_TMP)/sysupgrade-$(1)/
        echo "BOARD=$(1)" > $(KDIR_TMP)/sysupgrade-$(1)/CONTROL
        [ -z "$(2)" ] || $(CP) $(2) $(KDIR_TMP)/sysupgrade-$(1)/kernel
        [ -z "$(3)" ] || $(CP) $(3) $(KDIR_TMP)/sysupgrade-$(1)/root
-       [ -z "$(4)" ] || $(CP) $(4) $(KDIR_TMP)/sysupgrade-$(1)/ubi
        (cd $(KDIR_TMP); $(TAR) cvf \
                $(BIN_DIR)/$(IMG_PREFIX)-$(1)-ubi-sysupgrade.tar sysupgrade-$(1))
    endef
index 0b58a0313d65b0ade036058f397057c3442a01ff..9131ddaa7bb949d30ae39ebff8ed3bbc53e05df7 100644 (file)
@@ -4,8 +4,6 @@
 
 . /lib/functions.sh
 
-# combined-image uses 64k blocks
-CI_BLKSZ=65536
 # 'data' partition on NAND contains UBI
 CI_UBIPART="ubi"
 
@@ -192,7 +190,7 @@ nand_upgrade_ubinized() {
 
        if [ ! "$mtdnum" ]; then
                echo "cannot find mtd device $CI_UBIPART"
-               return 1;
+               reboot -f
        fi
 
        local mtddev="/dev/mtd${mtdnum}"
@@ -212,10 +210,9 @@ nand_do_upgrade_stage2() {
 
        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`
-       local ubi_length=`(tar xf $tar_file sysupgrade-$board_name/ubi -O | wc -c) 2> /dev/null`
-       
+
        local rootfs_type="$(identify_tar "$tar_file" root)"
-       
+
        local has_kernel=1
        local has_env=0