4 get_image "$file" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"'
7 platform_check_image() {
11 magic=$(get_magic_at "$file" 510)
12 [ "$magic" != "55aa" ] && {
13 echo "Failed to verify MBR boot signature."
20 platform_do_upgrade() {
22 get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync
26 platform_copy_config() {
28 [ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 /boot
29 cp -af "$CONF_TAR" /boot/