mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-19 18:31:33 +00:00
Drop the vendor specific target. Also fix ct-fwcfg for this board. Signed-off-by: John Crispin <john@phrozen.org>
32 lines
746 B
Bash
32 lines
746 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
case "$(board_name)" in
|
|
edgecore,ecw5211)
|
|
MODEL=$(cat /tmp/sysinfo/board_name)
|
|
SERIAL="$(fw_printenv SN | cut -d= -f2)"
|
|
PLATFORM=$(cat /tmp/sysinfo/model)
|
|
;;
|
|
linksys,ea8300)
|
|
MODEL=$(grep modelNumber= /dev/mtd9 | tr -d '\r\n' | sed "s/modelNumber=//")
|
|
SERIAL=$(grep serial_number= /dev/mtd9 | tr -d '\r\n' | sed "s/serial_number=//")
|
|
PLATFORM=OPENWRT_EA8300
|
|
;;
|
|
tp-link,ec420-g1)
|
|
MODEL=$(cat /tmp/sysinfo/board_name)
|
|
SERIAL=$(cat /sys/class/net/eth0/address)
|
|
PLATFORM=$(cat /tmp/sysinfo/model)
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
uci set system.tip=tip
|
|
uci set system.tip.serial="${SERIAL}"
|
|
uci set system.tip.model="${MODEL}"
|
|
uci set system.tip.platform="${PLATFORM}"
|
|
uci set system.tip.firmware='0.1.0'
|
|
uci commit
|