<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>You're right, device tree doesn't provide that functionality directly, but there's a preinit script which exports it from DT:</div><div><a href="https://github.com/openwrt-es/openwrt/blob/master/package/base-files/files/lib/preinit/10_sysinfo">https://github.com/openwrt-es/openwrt/blob/master/package/base-files/files/lib/preinit/10_sysinfo</a><br><br>The LEDs are exported from DT and network config is the same for all boards (network script remains untouched).</div><div><br>El 15/7/2015, a las 7:31, John Crispin <<a href="mailto:blogic@openwrt.org">blogic@openwrt.org</a>> escribió:<br><br></div><blockquote type="cite"><div><span></span><br><span></span><br><span>On 14/07/2015 20:15, Álvaro Fernández Rojas wrote:</span><br><blockquote type="cite"><span>Device tree exports board name/model and device LEDs.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span></span><br><span>this patch makes no sense to me and removes functionality. DT does not</span><br><span>provide this functionality at all.</span><br><span></span><br><span> John</span><br><span></span><br><blockquote type="cite"><span>Signed-off-by: Álvaro Fernández Rojas <<a href="mailto:noltari@gmail.com">noltari@gmail.com</a>></span><br></blockquote><blockquote type="cite"><span>---</span><br></blockquote><blockquote type="cite"><span> .../brcm2708/base-files/etc/uci-defaults/01_leds | 11 -------</span><br></blockquote><blockquote type="cite"><span> target/linux/brcm2708/base-files/lib/brcm2708.sh | 36 ----------------------</span><br></blockquote><blockquote type="cite"><span> .../lib/preinit/03_preinit_do_brcm2708.sh | 9 ------</span><br></blockquote><blockquote type="cite"><span> 3 files changed, 56 deletions(-)</span><br></blockquote><blockquote type="cite"><span> delete mode 100644 target/linux/brcm2708/base-files/etc/uci-defaults/01_leds</span><br></blockquote><blockquote type="cite"><span> delete mode 100755 target/linux/brcm2708/base-files/lib/brcm2708.sh</span><br></blockquote><blockquote type="cite"><span> delete mode 100644 target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>diff --git a/target/linux/brcm2708/base-files/etc/uci-defaults/01_leds b/target/linux/brcm2708/base-files/etc/uci-defaults/01_leds</span><br></blockquote><blockquote type="cite"><span>deleted file mode 100644</span><br></blockquote><blockquote type="cite"><span>index ad52c68..0000000</span><br></blockquote><blockquote type="cite"><span>--- a/target/linux/brcm2708/base-files/etc/uci-defaults/01_leds</span><br></blockquote><blockquote type="cite"><span>+++ /dev/null</span><br></blockquote><blockquote type="cite"><span>@@ -1,11 +0,0 @@</span><br></blockquote><blockquote type="cite"><span>-#!/bin/sh</span><br></blockquote><blockquote type="cite"><span>-#</span><br></blockquote><blockquote type="cite"><span>-# Copyright (C) 2015 <a href="http://OpenWrt.org">OpenWrt.org</a></span><br></blockquote><blockquote type="cite"><span>-#</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-. /lib/functions/uci-defaults.sh</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-ucidef_set_led_mmc "mmc" "MMC" "led0" "mmc0"</span><br></blockquote><blockquote type="cite"><span>-ucidef_commit_leds</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-exit 0</span><br></blockquote><blockquote type="cite"><span>diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh b/target/linux/brcm2708/base-files/lib/brcm2708.sh</span><br></blockquote><blockquote type="cite"><span>deleted file mode 100755</span><br></blockquote><blockquote type="cite"><span>index 76870c6..0000000</span><br></blockquote><blockquote type="cite"><span>--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh</span><br></blockquote><blockquote type="cite"><span>+++ /dev/null</span><br></blockquote><blockquote type="cite"><span>@@ -1,36 +0,0 @@</span><br></blockquote><blockquote type="cite"><span>-#!/bin/sh</span><br></blockquote><blockquote type="cite"><span>-#</span><br></blockquote><blockquote type="cite"><span>-# Copyright (C) 2015 <a href="http://OpenWrt.org">OpenWrt.org</a></span><br></blockquote><blockquote type="cite"><span>-#</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-brcm2708_board_detect() {</span><br></blockquote><blockquote type="cite"><span>- local machine</span><br></blockquote><blockquote type="cite"><span>- local name</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /Hardware/ {print $2}' /proc/cpuinfo)</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- case "$machine" in</span><br></blockquote><blockquote type="cite"><span>- BCM2708)</span><br></blockquote><blockquote type="cite"><span>- name="Raspberry Pi"</span><br></blockquote><blockquote type="cite"><span>- ;;</span><br></blockquote><blockquote type="cite"><span>- BCM2709)</span><br></blockquote><blockquote type="cite"><span>- name="Raspberry Pi 2"</span><br></blockquote><blockquote type="cite"><span>- ;;</span><br></blockquote><blockquote type="cite"><span>- esac</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- [ -z "$name" ] && name="unknown"</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- echo "$machine" > /tmp/sysinfo/board_name</span><br></blockquote><blockquote type="cite"><span>- echo "$name" > /tmp/sysinfo/model</span><br></blockquote><blockquote type="cite"><span>-}</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-brcm2708_board_name() {</span><br></blockquote><blockquote type="cite"><span>- local name</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)</span><br></blockquote><blockquote type="cite"><span>- [ -z "$name" ] && name="unknown"</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- echo "$name"</span><br></blockquote><blockquote type="cite"><span>-}</span><br></blockquote><blockquote type="cite"><span>diff --git a/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh</span><br></blockquote><blockquote type="cite"><span>deleted file mode 100644</span><br></blockquote><blockquote type="cite"><span>index e3cf56d..0000000</span><br></blockquote><blockquote type="cite"><span>--- a/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh</span><br></blockquote><blockquote type="cite"><span>+++ /dev/null</span><br></blockquote><blockquote type="cite"><span>@@ -1,9 +0,0 @@</span><br></blockquote><blockquote type="cite"><span>-#!/bin/sh</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-do_brcm2708() {</span><br></blockquote><blockquote type="cite"><span>- . /lib/brcm2708.sh</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>- brcm2708_board_detect</span><br></blockquote><blockquote type="cite"><span>-}</span><br></blockquote><blockquote type="cite"><span>-</span><br></blockquote><blockquote type="cite"><span>-boot_hook_add preinit_main do_brcm2708</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote></div></blockquote></body></html>