openwrtv3/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
Christian Lamparter e79b096ee1 brcm2708: convert to metadata
This patch converts all the raspberrypi images to utilize
the common metadata-based image verification.

Note: the CM1 and CM3 currently use the same "rpi-cm"
boardname.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2017-12-25 12:19:36 +01:00

20 lines
379 B
Bash

REQUIRE_IMAGE_METADATA=1
platform_check_image() {
return 0
}
platform_do_upgrade() {
sync
get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync
sleep 1
}
platform_copy_config() {
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 /boot
cp -af "$CONF_TAR" /boot/
tar --directory / -xvf "$CONF_TAR" boot/config.txt
sync
umount /boot
}