1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-08 20:55:27 +03:00

lantiq: add /lib/lantiq.sh and make hotplug handlers use it

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29003 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic 2011-11-12 23:40:16 +00:00
parent a8be2afd85
commit bddadbe32b
2 changed files with 12 additions and 1 deletions

View File

@ -24,9 +24,11 @@ rt2x00_eeprom_extract() {
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/lantiq.sh
case "$FIRMWARE" in
"RT2860.eeprom" )
local board=$(grep ^machine /proc/cpuinfo | sed "s/machine.*: \(.*\) - .*/\1/g")
local board=$(lantiq_board_name)
case $board in
ARV7525PW)
rt2x00_eeprom_extract "board_config" 1040 272

View File

@ -0,0 +1,9 @@
#!/bin/sh
lantiq_soc_name() {
grep ^system /proc/cpuinfo | sed "s/system type.*: \(.*\)/\1/g"
}
lantiq_board_name() {
grep ^machine /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"
}