X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Flinux%2Frb532%2Fbase-files%2Fsbin%2Fwget2nand;h=57f4128642d9539ae7cff7e39787d32eb8ad3145;hb=18d905d52ddd7be753fca9246685bb8522edad47;hp=67e4a94a8164ba4352b39973b19e632d0c5b9dc9;hpb=7aa11efc1796c29d446eca99ec7d9bc7ed2c0072;p=openwrt-10.03%2F.git diff --git a/target/linux/rb532/base-files/sbin/wget2nand b/target/linux/rb532/base-files/sbin/wget2nand index 67e4a94a8..57f412864 100755 --- a/target/linux/rb532/base-files/sbin/wget2nand +++ b/target/linux/rb532/base-files/sbin/wget2nand @@ -23,9 +23,9 @@ url=$1 echo "No URL specified for image TGZ" echo "Usage : $0 URL" exit 1 -} +} -boot="$(find_mtd_part 'RouterBoard NAND Boot')" +boot="$(find_mtd_part 'Routerboard NAND Boot')" main="$(find_mtd_part 'rootfs')" [ -z "$boot" -o -z "$main" ] && { echo "Cannot find NAND Flash partitions" @@ -44,8 +44,8 @@ mount -t yaffs2 "$main" /tmp/wget2nand/ mount -t yaffs2 "$boot" /tmp/wget2nand-boot echo "Copying filesystem..." -( wget -O - $url/openwrt-rb532-2.6-rootfs.tgz) | ( cd /tmp/wget2nand/; tar xvz ) -wget -O /tmp/wget2nand-boot/kernel $url/openwrt-rb532-2.6-vmlinux +( wget -O - $url/openwrt-rb532-rootfs.tgz) | ( cd /tmp/wget2nand/; tar xvz ) +wget -O /tmp/wget2nand-boot/kernel $url/openwrt-rb532-vmlinux # No need to patch the kernel, this was done during the build process chmod +x /tmp/wget2nand-boot/kernel @@ -55,6 +55,12 @@ echo "chmod ugo+x /" > /tmp/wget2nand/etc/uci-defaults/set_root_permission sync ls /tmp/wget2nand-boot/ ls /tmp/wget2nand/ +# use kexec if present +[ -x /usr/bin/kexec ] && { + kexec -l /tmp/wget2nand-boot/kernel --command-line="$(cat /proc/cmdline) root=$main rootfstype=yaffs2" + kexec -e +} + # unmount the partitions and remove the directories into which they were mounted umount /tmp/wget2nand-boot umount /tmp/wget2nand