6f04128892
Use the values populated by the generic board detect function. The first compatible from the device tree source file will be the board name in userspace. The model property from the device tree source file will be the model name. Change the board name where used in the userspace and drop the target specific board detect, to use the generic one. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
29 lines
485 B
Bash
Executable file
29 lines
485 B
Bash
Executable file
#!/bin/sh
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
# Copyright (C) 2017 LEDE project
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
raspberrypi,model-b |\
|
|
raspberrypi,model-b-plus |\
|
|
raspberrypi,model-b-rev2 |\
|
|
raspberrypi,2-model-b |\
|
|
raspberrypi,3-model-b)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
|
|
raspberrypi,model-zero-w)
|
|
ucidef_set_interface_lan "wlan0"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|