forked from Ivasoft/openwrt
brcm2708: Implement sysupgrade
Implement sysupgrade for Raspberry Pi, similar to the way it is done on x86: The config files are saved in the boot partition and moved to where they are normally expected in preinit. Also add optional gzip compression for the SD card image, since this can save a lot of space (76M vs 6M), also similar to x86. Signed-off-by: Bruno Randolf <br1@einfach.org> SVN-Revision: 46347
This commit is contained in:
18
target/linux/brcm2708/base-files/lib/preinit/79_move_config
Normal file
18
target/linux/brcm2708/base-files/lib/preinit/79_move_config
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
BOOTPART=/dev/mmcblk0p1
|
||||
|
||||
move_config() {
|
||||
if [ -b $BOOTPART ]; then
|
||||
insmod nls_cp437
|
||||
insmod nls_iso8859-1
|
||||
insmod fat
|
||||
insmod vfat
|
||||
mount -t vfat -o rw,noatime $BOOTPART /mnt
|
||||
[ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
|
||||
umount /mnt
|
||||
fi
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
Reference in New Issue
Block a user