brcm2708: detect Raspberry Pi Zero W
[openwrt/staging/dedeckeh.git] / target / linux / brcm2708 / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 # Copyright (C) 2014-2016 OpenWrt.org
3 # Copyright (C) 2017 LEDE project
4
5 . /lib/functions/uci-defaults.sh
6 . /lib/brcm2708.sh
7 . /lib/functions.sh
8 . /lib/functions/system.sh
9
10 board_config_update
11
12 board=$(brcm2708_board_name)
13
14 case "$board" in
15 rpi-2-b |\
16 rpi-3-b |\
17 rpi-b |\
18 rpi-b-plus)
19 ucidef_set_interface_lan "eth0"
20 ;;
21 rpi-zero-w)
22 ucidef_set_interface_lan "wlan0"
23 ;;
24 esac
25
26 board_config_flush
27
28 exit 0