brcm2708: convert to dt-based board-detection
[openwrt/openwrt.git] / target / linux / brcm2708 / base-files / lib / preinit / 05_set_preinit_iface_brcm2708
1 #!/bin/sh
2 # Copyright (C) 2015-2016 OpenWrt.org
3 # Copyright (C) 2017 LEDE project
4
5 set_preinit_iface() {
6 . /lib/functions.sh
7
8 case "$(board_name)" in
9 raspberrypi,2-model-b |\
10 raspberrypi,3-model-b |\
11 raspberrypi,model-b |\
12 raspberrypi,model-b-plus |\
13 raspberrypi,model-b-rev2)
14 ifname=eth0
15 ;;
16 esac
17 }
18
19 boot_hook_add preinit_main set_preinit_iface