aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/at91
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-04-29 21:02:40 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-04-29 21:02:40 +0000
commitfe38dcf8f376a4e01d527697033fbb3f5782a699 (patch)
tree8b8f8c7b34ba673a8bd9e29c420ab0190e5e28a1 /target/linux/at91
parentb5f9e1632bbd2b88c927543cbc0025f4d0c41165 (diff)
downloadupstream-fe38dcf8f376a4e01d527697033fbb3f5782a699.tar.gz
upstream-fe38dcf8f376a4e01d527697033fbb3f5782a699.tar.bz2
upstream-fe38dcf8f376a4e01d527697033fbb3f5782a699.zip
at91: Add AT91 board and model name to /tmp/sysinfo
From 9158e3282db592e78fb32a2c8a0903ef21b97f5c Mon Sep 17 00:00:00 2001 From: Owen Kirby <osk@exegin.com> Date: Fri, 11 Apr 2014 18:28:56 -0700 Subject: [PATCH 3/3] [at91] Add AT91 board and model name to /tmp/sysinfo. This patch extracts the board name and model information from the /proc/device-tree node in order to provide something a little more friendly on the LuCI sysinfo page than just "AT91SAM9 (Device Tree)" Signed-off-by: Owen Kirby <osk@exegin.com> SVN-Revision: 40598
Diffstat (limited to 'target/linux/at91')
-rw-r--r--target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh b/target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh
new file mode 100644
index 0000000000..03706ffe1a
--- /dev/null
+++ b/target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh
@@ -0,0 +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
+}
+
+boot_hook_add preinit_main do_at91