brcm2708: convert to dt-based board-detection
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>
This commit is contained in:
committed by
Álvaro Fernández Rojas
parent
778543dab4
commit
6f04128892
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
do_brcm2708() {
|
||||
. /lib/brcm2708.sh
|
||||
|
||||
brcm2708_detect
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_brcm2708
|
||||
@@ -6,10 +6,11 @@ set_preinit_iface() {
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
rpi-2-b |\
|
||||
rpi-3-b |\
|
||||
rpi-b |\
|
||||
rpi-b-plus)
|
||||
raspberrypi,2-model-b |\
|
||||
raspberrypi,3-model-b |\
|
||||
raspberrypi,model-b |\
|
||||
raspberrypi,model-b-plus |\
|
||||
raspberrypi,model-b-rev2)
|
||||
ifname=eth0
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user