openwrtv4/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
John Crispin 2de7910102 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
2015-07-14 07:39:10 +00:00

17 lines
293 B
Bash

platform_check_image() {
# i know no way to verify the image
return 0;
}
platform_do_upgrade() {
sync
get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync
sleep 1
}
platform_copy_config() {
mount -t vfat -o rw,noatime /dev/mmcblk0p1 /mnt
cp -af "$CONF_TAR" /mnt/
sync
umount /mnt
}