diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-04-29 21:02:40 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-04-29 21:02:40 +0000 |
commit | f30d5854d01fd865498e56382a7fea179575c7fb (patch) | |
tree | 26196ee97524cf34feda4d9e46d840dcf4fa3509 /target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh | |
parent | a177d6bfafa5ace9e7ee0defe2a1b9c1ae52f23b (diff) | |
download | master-187ad058-f30d5854d01fd865498e56382a7fea179575c7fb.tar.gz master-187ad058-f30d5854d01fd865498e56382a7fea179575c7fb.tar.bz2 master-187ad058-f30d5854d01fd865498e56382a7fea179575c7fb.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40598 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh')
-rw-r--r-- | target/linux/at91/base-files/lib/preinit/03_preinit_do_at91.sh | 9 |
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 |