mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
8c0930b70b
Ubiquiti UniFi Security Gateway (USG) is largely identical to the EdgeRouter Lite (ERLite-3) apart from a different board ID and two dome leds. Device data (from WikiDev): CPU: Cavium Octeon Plus CN5020 @500MHz 2-cores Ethernet: 3x Atheros AR8035-A GbE PHY's Flash: On-board 4MB Flash Storage: Internal 3.8GB USB Flash (Kingston ID) drive w/ 1.5GB free for use occupies single internal USB port. Serial: 1x RJ45 port on front panel. 115200, 8N1 Buttons: 1x Reset Flash instructions are identical to EdgeRouter Lite. Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
42 lines
644 B
Plaintext
42 lines
644 B
Plaintext
do_sysinfo_octeon() {
|
|
local machine
|
|
local name
|
|
|
|
machine=$(grep "^system type" /proc/cpuinfo | sed "s/system type.*: \(.*\)/\1/g")
|
|
|
|
case "$machine" in
|
|
"UBNT_E100"*)
|
|
name="erlite"
|
|
;;
|
|
|
|
"UBNT_E200"*)
|
|
name="er"
|
|
;;
|
|
|
|
"UBNT_E220"*)
|
|
name="erpro"
|
|
;;
|
|
|
|
"UBNT_E300"*|\
|
|
"UBNT_USG"*)
|
|
# let generic 02_sysinfo handle it since device has its own device tree
|
|
return 0
|
|
;;
|
|
|
|
"ITUS_SHIELD"*)
|
|
name="itus,shield-router"
|
|
;;
|
|
|
|
*)
|
|
name="generic"
|
|
;;
|
|
esac
|
|
|
|
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
|
|
|
echo "$name" > /tmp/sysinfo/board_name
|
|
echo "$machine" > /tmp/sysinfo/model
|
|
}
|
|
|
|
boot_hook_add preinit_main do_sysinfo_octeon
|