aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-05-14 08:38:39 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-05-14 08:38:39 +0000
commitdae241a4754428a4eca6e741056fbd3223c0fd42 (patch)
tree60e003238c3100c8df43704f3893a9a8e86da465 /target/linux/ar71xx
parent0eea4b85a2a451f6c355ae757fef708776827e9e (diff)
downloadupstream-dae241a4754428a4eca6e741056fbd3223c0fd42.tar.gz
upstream-dae241a4754428a4eca6e741056fbd3223c0fd42.tar.bz2
upstream-dae241a4754428a4eca6e741056fbd3223c0fd42.zip
ar71xx: Make wget2nand fail if copying the kernel fails and use the correct file extension for the rootfs image
wget2nand didnt check the exit status after copying the kernel, if the copying failed for some reason ( for example not enougs space on the kernel partition) it simply continued extracting the rootfs. I also changed the filename, which wget2nand trys to download ( .tar.gz instead of .tgz ). Signed-off-by: Marko Foerster <mrkfoerster@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21444 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rwxr-xr-xtarget/linux/ar71xx/base-files/sbin/wget2nand7
1 files changed, 5 insertions, 2 deletions
diff --git a/target/linux/ar71xx/base-files/sbin/wget2nand b/target/linux/ar71xx/base-files/sbin/wget2nand
index 99823be84c..171e3fa6db 100755
--- a/target/linux/ar71xx/base-files/sbin/wget2nand
+++ b/target/linux/ar71xx/base-files/sbin/wget2nand
@@ -28,7 +28,7 @@ url=$1
}
url_kernel=$url/openwrt-ar71xx-vmlinux.elf
-url_rootfs=$url/openwrt-ar71xx-rootfs.tgz
+url_rootfs=$url/openwrt-ar71xx-rootfs.tar.gz
mtd_kernel="$(find_mtd_part 'kernel')"
mtd_rootfs="$(find_mtd_part 'rootfs')"
@@ -60,7 +60,10 @@ mount -t yaffs2 "$mtd_kernel" "$mnt_kernel"
mount -t yaffs2 "$mtd_rootfs" "$mnt_rootfs"
echo "Copying kernel..."
-cp $src_kernel $mnt_kernel/kernel
+cp $src_kernel $mnt_kernel/kernel || {
+ echo "Error occured while copying the kernel"
+ exit 1
+}
chmod +x $mnt_kernel/kernel
echo "Preparing filesystem..."