1 platform_do_upgrade
() {
2 local board
=$
(board_name
)
5 unielec
,u7623-02-emmc-512m
)
6 #Keep the persisten random mac address (if it exists)
8 mount
-o rw
,noatime
/dev
/mmcblk0p1
/tmp
/recovery
9 [ -f "/tmp/recovery/mac_addr" ] && \
10 mv -f /tmp
/recovery
/mac_addr
/tmp
/
13 #1310720 is the offset in bytes from the start of eMMC and to
14 #the location of the kernel (2560 512 byte sectors)
15 get_image
"$1" |
dd of
=/dev
/mmcblk0 bs
=1310720 seek
=1 conv
=fsync
17 mount
-o rw
,noatime
/dev
/mmcblk0p1
/tmp
/recovery
18 [ -f "/tmp/mac_addr" ] && mv -f /tmp
/mac_addr
/tmp
/recovery
23 default_do_upgrade
"$1"
30 platform_check_image
() {
31 local board
=$
(board_name
)
32 local magic
="$(get_magic_long "$1")"
34 [ "$#" -gt 1 ] && return 1
38 unielec
,u7623-02-emmc-512m
)
39 [ "$magic" != "27051956" ] && {
40 echo "Invalid image type."
46 echo "Sysupgrade is not supported on your board yet."
54 platform_copy_config_emmc
() {
56 mount
-o rw
,noatime
/dev
/mmcblk0p1
/recovery
57 cp -af "$UPGRADE_BACKUP" "/recovery/$BACKUP_FILE"
62 platform_copy_config
() {
63 case "$(board_name)" in
64 unielec
,u7623-02-emmc-512m
)
65 platform_copy_config_emmc