at91: add Device Tree based board detection
authorFlorian Fainelli <florian@openwrt.org>
Sat, 18 Jul 2015 22:36:18 +0000 (22:36 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 18 Jul 2015 22:36:18 +0000 (22:36 +0000)
Set up eth0 as LAN interface by default.

Backport of r46174

Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 46419

target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh

index 03706ffe1a87df821935f272c945e9345a6c30e1..5c981016a408476b40d8ddb8f8062b6e1b5fdf4f 100644 (file)
@@ -1,9 +1,9 @@
 #!/bin/sh
 
 do_at91() {
-       [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-       echo $(strings /proc/device-tree/compatible | head -1) > /tmp/sysinfo/board_name
-       echo $(cat /proc/device-tree/model) > /tmp/sysinfo/model
+       . /lib/at91.sh
+
+       at91_board_detect
 }
 
 boot_hook_add preinit_main do_at91