riscv64: add a very basic base-files pack
authorZoltan HERPAI <wigyori@uid0.hu>
Tue, 16 Oct 2018 14:27:34 +0000 (16:27 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Tue, 16 Oct 2018 14:27:34 +0000 (16:27 +0200)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
target/linux/riscv64/base-files/etc/board.d/02_network [new file with mode: 0755]
target/linux/riscv64/base-files/etc/inittab [new file with mode: 0644]
target/linux/riscv64/base-files/lib/preinit/80_debug [new file with mode: 0644]

diff --git a/target/linux/riscv64/base-files/etc/board.d/02_network b/target/linux/riscv64/base-files/etc/board.d/02_network
new file mode 100755 (executable)
index 0000000..df48b43
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Copyright (C) 2013-2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+*)
+       ucidef_set_interface_lan 'eth0'
+       ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/riscv64/base-files/etc/inittab b/target/linux/riscv64/base-files/etc/inittab
new file mode 100644 (file)
index 0000000..be81ab3
--- /dev/null
@@ -0,0 +1,5 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+tts/0::askfirst:/usr/libexec/login.sh
+ttyS0::askfirst:/usr/libexec/login.sh
+tty1::askfirst:/usr/libexec/login.sh
diff --git a/target/linux/riscv64/base-files/lib/preinit/80_debug b/target/linux/riscv64/base-files/lib/preinit/80_debug
new file mode 100644 (file)
index 0000000..10ab6a4
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Copyright (C) 2012-2015 OpenWrt.org
+
+riscv_debug() {
+       cat /proc/cpuinfo
+       df
+       ifconfig -a
+       ls -l /dev
+}
+
+boot_hook_add preinit_main riscv_debug
+