2 # based on gabors ralink wisoc implementation
5 echo "rt2x00 eeprom: " "$*"
9 rt2x00_eeprom_extract
() {
18 mtd
=$
(find_mtd_part
$part)
20 rt2x00_eeprom_die
"no mtd device found for partition $part"
22 if [ $swab -gt 0 ]; then
23 dd if=$mtd of
=/lib
/firmware
/$FIRMWARE bs
=2 skip
=$offset count
=$count conv
=swab || \
24 rt2x00_eeprom_die
"failed to extract from $mtd"
26 dd if=$mtd of
=/lib
/firmware
/$FIRMWARE bs
=1 skip
=$offset count
=$count || \
27 rt2x00_eeprom_die
"failed to extract from $mtd"
31 [ -e /lib
/firmware
/$FIRMWARE ] && exit 0
32 .
/lib
/functions
/lantiq.sh
36 local board
=$
(lantiq_board_name
)
38 ARV7506PW11|ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519
)
39 rt2x00_eeprom_extract
"board_config" 520 256 1
42 rt2x00_eeprom_extract
"board_config" 1040 512 0
45 rt2x00_eeprom_die
"board $board is not supported yet"
50 local board
=$
(lantiq_board_name
)
53 rt2x00_eeprom_extract
"board_config" 520 256 1
56 rt2x00_eeprom_die
"board $board is not supported yet"