summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/base-files/lib/adm5120.sh
blob: fb0526e402d40ef8ad06c6a9080f8357de342bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
#
# Copyright (C) 2007 OpenWrt.org
#
#

board_name=""
status_led=""
sys_mtd_part=""

adm5120_detect() {
	board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo)

	case "$board_name" in
	"Cellvision"*)
		status_led="status"
		sys_mtd_part="firmware"
		;;
	"Compex"*)
		status_led="diag"
		case "$board_name" in
		*-WRT)
			sys_mtd_part="trx"
			;;
		*)
			sys_mtd_part="partition1"
			;;
		esac
		;;
	"Edimax"*)
		status_led="power"
		sys_mtd_part="firmware"
		;;
	"Infineon"*)
		sys_mtd_part="firmware"
		;;
	"Mikrotik"*)
		status_led="power"
		;;
	"ZyXEL"*)
		status_led="power"
		sys_mtd_part="trx"
		;;
	*)
		;;
	esac
}

adm5120_detect