OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 1... Line 1...
1 platform_do_upgrade() { 1 platform_do_upgrade() {
2 local board=$(board_name) -  
3 case "$board" in -  
4 "unielec,u7623"*) -  
5 #Keep the persisten random mac address (if it exists) -  
6 mkdir -p /tmp/recovery -  
7 mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery -  
8 [ -f "/tmp/recovery/mac_addr" ] && \ -  
9 mv -f /tmp/recovery/mac_addr /tmp/ -  
10 umount /tmp/recovery -  
11   -  
12 #1310720 is the offset in bytes from the start of eMMC and to -  
13 #the location of the kernel (2560 512 byte sectors) -  
14 get_image "$1" | dd of=/dev/mmcblk0 bs=1310720 seek=1 conv=fsync -  
15   -  
16 mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery -  
17 [ -f "/tmp/mac_addr" ] && mv -f /tmp/mac_addr /tmp/recovery -  
18 sync -  
19 umount /tmp/recovery -  
20 ;; -  
21 *) -  
22 default_do_upgrade "$ARGV" 2 default_do_upgrade "$ARGV"
23 ;; -  
24 esac -  
25 } 3 }
Line 26... Line 4...
26   4  
Line 27... Line 5...
27 PART_NAME=firmware 5 PART_NAME=firmware
28   6  
29 platform_check_image() { 7 platform_check_image() {
Line 30... Line 8...
30 local board=$(board_name) 8 local board=$(board_name)
Line 31... Line 9...
31 local magic="$(get_magic_long "$1")" 9 local magic="$(get_magic_long "$1")"
32   10  
33 [ "$#" -gt 1 ] && return 1 -  
34   11 [ "$#" -gt 1 ] && return 1
35 case "$board" in 12  
36 bananapi,bpi-r2|\ 13 case "$board" in
37 "unielec,u7623"*) 14 bananapi,bpi-r2)
38 [ "$magic" != "27051956" ] && { 15 [ "$magic" != "27051956" ] && {
Line 47... Line 24...
47 return 1 24 return 1
48 ;; 25 ;;
49 esac 26 esac
Line 50... Line 27...
50   27  
51 return 0 28 return 0
52 } -  
53   -  
54 platform_copy_config_emmc() { -  
55 mkdir -p /recovery -  
56 mount -o rw,noatime /dev/mmcblk0p1 /recovery -  
57 cp -af "$CONF_TAR" /recovery/ -  
58 sync -  
59 umount /recovery -  
60 } -  
61   -  
62 platform_copy_config() { -  
63 case "$(board_name)" in -  
64 "unielec,u7623"*) -  
65 platform_copy_config_emmc -  
66 ;; -  
67 esac -