mirror of https://github.com/hak5/openwrt.git
octeon: sysupgrade: rename old kernel after mounting /boot
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> SVN-Revision: 43523lede-17.01
parent
52f1d8ecdc
commit
1731d5520e
|
@ -44,18 +44,19 @@ platform_do_upgrade() {
|
||||||
local kernel_length=`(tar xf $tar_file sysupgrade-erlite/kernel -O | wc -c) 2> /dev/null`
|
local kernel_length=`(tar xf $tar_file sysupgrade-erlite/kernel -O | wc -c) 2> /dev/null`
|
||||||
local rootfs_length=`(tar xf $tar_file sysupgrade-erlite/root -O | wc -c) 2> /dev/null`
|
local rootfs_length=`(tar xf $tar_file sysupgrade-erlite/root -O | wc -c) 2> /dev/null`
|
||||||
|
|
||||||
|
mkdir -p /boot
|
||||||
|
mount -t vfat /dev/sda1 /boot
|
||||||
|
|
||||||
[ -f /boot/vmlinux.64 -a ! -L /boot/vmlinux.64 ] && {
|
[ -f /boot/vmlinux.64 -a ! -L /boot/vmlinux.64 ] && {
|
||||||
mv /boot/vmlinux.64 /boot/vmlinux.64.previous
|
mv /boot/vmlinux.64 /boot/vmlinux.64.previous
|
||||||
mv /boot/vmlinux.64.md5 /boot/vmlinux.64.md5.previous
|
mv /boot/vmlinux.64.md5 /boot/vmlinux.64.md5.previous
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p /boot
|
|
||||||
mount -t vfat /dev/sda1 /boot
|
|
||||||
tar xf $tar_file sysupgrade-erlite/kernel -O > /boot/vmlinux.64
|
tar xf $tar_file sysupgrade-erlite/kernel -O > /boot/vmlinux.64
|
||||||
md5sum /boot/vmlinux.64 | cut -f1 -d " " > /boot/vmlinux.64.md5
|
md5sum /boot/vmlinux.64 | cut -f1 -d " " > /boot/vmlinux.64.md5
|
||||||
tar xf $tar_file sysupgrade-erlite/root -O | dd of="${rootfs}" bs=4096
|
tar xf $tar_file sysupgrade-erlite/root -O | dd of="${rootfs}" bs=4096
|
||||||
sync
|
sync
|
||||||
umount /mnt
|
umount /boot
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue