From b26f5d2045247ec37604905ffe82efc63f724860 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Tue, 16 Oct 2018 16:27:34 +0200 Subject: [PATCH] riscv64: add a very basic base-files pack Signed-off-by: Zoltan HERPAI --- .../riscv64/base-files/etc/board.d/02_network | 18 ++++++++++++++++++ target/linux/riscv64/base-files/etc/inittab | 5 +++++ .../riscv64/base-files/lib/preinit/80_debug | 12 ++++++++++++ 3 files changed, 35 insertions(+) create mode 100755 target/linux/riscv64/base-files/etc/board.d/02_network create mode 100644 target/linux/riscv64/base-files/etc/inittab create mode 100644 target/linux/riscv64/base-files/lib/preinit/80_debug 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 index 0000000000..df48b431af --- /dev/null +++ b/target/linux/riscv64/base-files/etc/board.d/02_network @@ -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 index 0000000000..be81ab3e23 --- /dev/null +++ b/target/linux/riscv64/base-files/etc/inittab @@ -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 index 0000000000..10ab6a4174 --- /dev/null +++ b/target/linux/riscv64/base-files/lib/preinit/80_debug @@ -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 + -- 2.30.2