brcm2708: convert to metadata
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / base-files / lib / upgrade / platform.sh
1 REQUIRE_IMAGE_METADATA=1
2
3 platform_check_image() {
4 return 0
5 }
6
7 platform_do_upgrade() {
8 sync
9 get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync
10 sleep 1
11 }
12
13 platform_copy_config() {
14 mkdir -p /boot
15 [ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 /boot
16 cp -af "$CONF_TAR" /boot/
17 tar --directory / -xvf "$CONF_TAR" boot/config.txt
18 sync
19 umount /boot
20 }