brcm2708: add device detection and use it for network, leds and preinit

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 47572
This commit is contained in:
John Crispin
2015-11-22 08:04:37 +00:00
parent deff5fb6c8
commit cd9d0ee0d0
9 changed files with 110 additions and 18 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org
do_brcm2708() {
. /lib/brcm2708.sh
brcm2708_detect
}
boot_hook_add preinit_main do_brcm2708

View File

@@ -0,0 +1,18 @@
#!/bin/sh
#
# Copyright (C) 2015 OpenWrt.org
#
. /lib/brcm2708.sh
set_preinit_iface() {
case "$(brcm2708_board_name)" in
rpi-b |\
rpi-b-plus |\
rpi-2-b)
ifname=eth0
;;
esac
}
boot_hook_add preinit_main set_preinit_iface