4 echo "rt2x00 eeprom: " "$*"
8 rt2x00_eeprom_extract() {
16 mtd=$(find_mtd_part $part)
18 rt2x00_eeprom_die "no mtd device found for partition $part"
20 dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count || \
21 rt2x00_eeprom_die "failed to extract from $mtd"
24 [ -e /lib/firmware/$FIRMWARE ] && exit 0
31 local board=$(ramips_board_name)
37 rt2x00_eeprom_extract "devdata" 16384 272
41 rt2x00_eeprom_extract "devconf" 0 272
46 rt2x00_eeprom_extract "u-boot" 262144 272
67 rt2x00_eeprom_extract "factory" 0 272
71 rt2x00_eeprom_die "board $board is not supported yet"