mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[ar71xx] dir-825-b1: Fix wholeflash images: Attempting to flash a wholeflash (-openwrt) image from the normal image would brick (but recoverable via emergency flash) the router if the wholeflash image was larger than the maximum size for a normal image. First we rename the -openwrt images to -wholeflash since -openwrt is really too generic. We also revert the changes to the regular dir-825-b1 image, which now is the same as before, but add a -towholeflash image which is almost the same as the regular dir-825-b1 image, but copies caldata to new location and allows flashing of images that use the full flash (except u-boot, u-boot-env, and caldata paritition space) (these are the -wholeflash images).
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33447 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -44,12 +44,13 @@ getifmac() {
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
dir-825-b1)
|
||||
dir-825-b1-towholeflash)
|
||||
mac1="$(getcalmac caldata 65440)"
|
||||
mac1="$(calcmacX "$mac1" 2)"
|
||||
mac2="$(calcmacX "$mac1" 1)"
|
||||
|
||||
if grep -q '"owrt_caldata"' /proc/mtd && [ "$mac1" = "$(getifmac eth0)" ] && [ "$mac2" = "$(getifmac eth1)" ]; then
|
||||
mtd erase owrt_caldata
|
||||
dd if=/dev/$(findmtd caldata) of=/dev/$(findmtd owrt_caldata) bs=65536 count=1
|
||||
fi
|
||||
;;
|
||||
@@ -58,6 +59,7 @@ dir-825-b1-tostock)
|
||||
mac1="$(calcmacX "$mac1" 2)"
|
||||
mac2="$(calcmacX "$mac1" 1)"
|
||||
if grep -q '"owrt_caldata"' /proc/mtd && [ "$mac1" = "$(getifmac eth0)" ] && [ "$mac2" = "$(getifmac eth1)" ]; then
|
||||
mtd erase caldata
|
||||
dd if=/dev/$(findmtd owrt_caldata) of=/dev/$(findmtd caldata) bs=65536 count=1
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -54,7 +54,10 @@ dir-615-e4)
|
||||
ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10"
|
||||
;;
|
||||
|
||||
dir-825-b1)
|
||||
dir-825-b1|\
|
||||
dir-825-b1-towholeflash|\
|
||||
dir-825-b1-wholeflash|\
|
||||
dir-825-b1-tostock)
|
||||
ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
|
||||
;;
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ rb-2011uas-2hnd)
|
||||
;;
|
||||
|
||||
dir-825-b1|\
|
||||
dir-825-b1-openwrt|\
|
||||
dir-825-b1-towholeflash|\
|
||||
dir-825-b1-wholeflash|\
|
||||
dir-825-b1-tostock|\
|
||||
tew-673gru)
|
||||
ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
|
||||
|
||||
Reference in New Issue
Block a user