summaryrefslogtreecommitdiff
path: root/etc/etc.riscv64
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2021-04-28 03:26:26 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2021-04-28 03:26:26 +0000
commit8a16502a91032255b6bdf8c9b1c4beed9c80ae26 (patch)
tree44eac4f277437c5e995700a5759d1cabe0821e9a /etc/etc.riscv64
parent67e981fcbce4c309fae5649efc4fb2144bf347ad (diff)
riscv64 etc support
copied from arm64 MAKEDEV.md contents are kinda partially there, needs more work.
Diffstat (limited to 'etc/etc.riscv64')
-rw-r--r--etc/etc.riscv64/MAKEDEV.md115
-rw-r--r--etc/etc.riscv64/Makefile5
-rw-r--r--etc/etc.riscv64/Makefile.inc8
-rw-r--r--etc/etc.riscv64/disktab11
-rw-r--r--etc/etc.riscv64/fbtab2
-rw-r--r--etc/etc.riscv64/login.conf115
-rw-r--r--etc/etc.riscv64/sysctl.conf0
-rw-r--r--etc/etc.riscv64/ttys26
8 files changed, 282 insertions, 0 deletions
diff --git a/etc/etc.riscv64/MAKEDEV.md b/etc/etc.riscv64/MAKEDEV.md
new file mode 100644
index 00000000000..9bb8b3d29c7
--- /dev/null
+++ b/etc/etc.riscv64/MAKEDEV.md
@@ -0,0 +1,115 @@
+define(MACHINE,riscv64)dnl
+vers(__file__,
+ {-$OpenBSD: MAKEDEV.md,v 1.1 2021/04/28 03:26:25 drahn Exp $-},
+etc.MACHINE)dnl
+dnl
+dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
+dnl
+dnl Permission to use, copy, modify, and distribute this software for any
+dnl purpose with or without fee is hereby granted, provided that the above
+dnl copyright notice and this permission notice appear in all copies.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+dnl WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+dnl MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+dnl ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl
+__devitem(apm, apm, Power Management Interface)dnl
+_TITLE(make)
+_DEV(all)
+_DEV(ramdisk)
+_DEV(std)
+_DEV(local)
+_TITLE(dis)
+_DEV(cd, 15, 6)
+_DEV(rd, 47, 8)
+_DEV(sd, 13, 4)
+_DEV(vnd, 41, 14)
+_TITLE(tap)
+_DEV(ch, 17)
+_TITLE(term)
+_DEV(com, 8)
+_TITLE(pty)
+_DEV(ptm, 81)
+_DEV(pty, 6)
+_DEV(tty, 5)
+_TITLE(cons)
+_DEV(wsdisp, 12)
+_DEV(wscons)
+_DEV(wskbd, 67)
+_DEV(wsmux, 69)
+_TITLE(point)
+_DEV(wsmouse, 68)
+_TITLE(prn)
+_TITLE(usb)
+_DEV(ttyU, 66)
+_DEV(uall)
+_DEV(ugen, 63)
+_DEV(uhid, 62)
+_DEV(fido, 98)
+_DEV(ulpt, 64)
+_DEV(usb, 61)
+_TITLE(spec)
+_DEV(apm, 83)
+_DEV(au, 42)
+_DEV(bio, 79)
+_DEV(bktr, 49)
+_DEV(bpf, 23)
+_DEV(dt, 30)
+_DEV(diskmap, 90)
+_DEV(fdesc, 22)
+_DEV(fuse, 92)
+_DEV(gpio, 88)
+_DEV(hotplug, 82)
+_DEV(ipmi, 96)
+dnl _DEV(joy, 26)
+_DEV(pci, 72)
+_DEV(pf, 73)
+_DEV(pppx, 91)
+_DEV(pppac, 99)
+_DEV(radio, 76)
+_DEV(rnd, 45)
+_DEV(rmidi, 52)
+_DEV(tun, 40)
+_DEV(tap, 93)
+_DEV(uk, 20)
+_DEV(vi, 44)
+_DEV(vscsi, 89)
+_DEV(switch, 97)
+_DEV(kstat, 51)
+dnl
+divert(__mddivert)dnl
+dnl
+ramdisk)
+ _recurse std bpf wd0 sd0 tty00 tty01 rd0 bio diskmap
+ _recurse cd0 ttyC0 wskbd0 wskbd1 wskbd2 random
+ ;;
+
+_std(1, 2, 50, 7)
+ M openprom c 70 0 600
+ ;;
+
+dnl
+dnl riscv specific targets
+dnl
+twrget(all, au, audio, 0, 1, 2, 3)dnl
+target(all, ch, 0)dnl
+target(all, vscsi, 0)dnl
+target(all, diskmap)dnl
+target(all, pty, 0)dnl
+target(all, bio)dnl
+target(all, tun, 0, 1, 2, 3)dnl
+target(all, tap, 0, 1, 2, 3)dnl
+target(all, rd, 0)dnl
+target(all, cd, 0, 1)dnl
+target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
+target(all, vnd, 0, 1, 2, 3)dnl
+target(all, bktr, 0)dnl
+target(all, gpio, 0, 1, 2)dnl
+target(all, ipmi, 0)dnl
+target(all, switch, 0, 1, 2, 3)dnl
+twrget(ramd, wsdisp, ttyC, 0)dnl
diff --git a/etc/etc.riscv64/Makefile b/etc/etc.riscv64/Makefile
new file mode 100644
index 00000000000..8bccc0ddfdd
--- /dev/null
+++ b/etc/etc.riscv64/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2021/04/28 03:26:25 drahn Exp $
+
+all: MAKEDEV
+
+.include <bsd.prog.mk>
diff --git a/etc/etc.riscv64/Makefile.inc b/etc/etc.riscv64/Makefile.inc
new file mode 100644
index 00000000000..6ebfee16219
--- /dev/null
+++ b/etc/etc.riscv64/Makefile.inc
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile.inc,v 1.1 2021/04/28 03:26:25 drahn Exp $
+
+KERNELS +=
+
+bootblocks:
+ cp -p ${DESTDIR}/usr/mdec/BOOTRISCV64.EFI ${RELEASEDIR}
+
+MDEXT= bsd.rd BOOTRISCV64.EFI miniroot${OSrev}.img
diff --git a/etc/etc.riscv64/disktab b/etc/etc.riscv64/disktab
new file mode 100644
index 00000000000..66928108a9d
--- /dev/null
+++ b/etc/etc.riscv64/disktab
@@ -0,0 +1,11 @@
+# $OpenBSD: disktab,v 1.1 2021/04/28 03:26:25 drahn Exp $
+
+# Leave nc=16; adjust size using: ns
+rdroot|ramdiskroot|RAM-disk root FS image:\
+ :dt=rdroot:se#512:nc#16:nt#2:ns#512:\
+ :ta=4.2BSD:oa#0:pa#16384:fa#512:ba#4096:\
+ :ob#0:pb#0:oc#0:pc#16384:
+
+miniroot:\
+ :dt=rdroot:se#512:nc#33:nt#16:ns#128:\
+ :oc#0:pc#67584:
diff --git a/etc/etc.riscv64/fbtab b/etc/etc.riscv64/fbtab
new file mode 100644
index 00000000000..cd12fe76997
--- /dev/null
+++ b/etc/etc.riscv64/fbtab
@@ -0,0 +1,2 @@
+/dev/tty00 0600 /dev/console
+/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/dev/ttyC4:/dev/drm0:/dev/drmR128
diff --git a/etc/etc.riscv64/login.conf b/etc/etc.riscv64/login.conf
new file mode 100644
index 00000000000..dc6634b970e
--- /dev/null
+++ b/etc/etc.riscv64/login.conf
@@ -0,0 +1,115 @@
+# $OpenBSD: login.conf,v 1.1 2021/04/28 03:26:25 drahn Exp $
+
+#
+# Sample login.conf file. See login.conf(5) for details.
+#
+
+#
+# Standard authentication styles:
+#
+# passwd Use only the local password file
+# chpass Do not authenticate, but change user's password (change
+# the YP password if the user has one, else change the
+# local password)
+# lchpass Do not login; change user's local password instead
+# radius Use radius authentication
+# reject Use rejected authentication
+# skey Use S/Key authentication
+# activ ActivCard X9.9 token authentication
+# crypto CRYPTOCard X9.9 token authentication
+# snk Digital Pathways SecureNet Key authentication
+# tis TIS Firewall Toolkit authentication
+# token Generic X9.9 token authentication
+# yubikey YubiKey authentication
+#
+
+# Default allowed authentication styles
+auth-defaults:auth=passwd,skey:
+
+# Default allowed authentication styles for authentication type ftp
+auth-ftp-defaults:auth-ftp=passwd:
+
+#
+# The default values
+# To alter the default authentication types change the line:
+# :tc=auth-defaults:\
+# to read something like: (enables passwd, "myauth", and activ)
+# :auth=passwd,myauth,activ:\
+# Any value changed in the daemon class should be reset in default
+# class.
+#
+default:\
+ :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
+ :umask=022:\
+ :datasize-max=1024M:\
+ :datasize-cur=1024M:\
+ :maxproc-max=256:\
+ :maxproc-cur=128:\
+ :openfiles-max=1024:\
+ :openfiles-cur=512:\
+ :stacksize-cur=4M:\
+ :localcipher=blowfish,8:\
+ :tc=auth-defaults:\
+ :tc=auth-ftp-defaults:
+
+#
+# Settings used by /etc/rc and root
+# This must be set properly for daemons started as root by inetd as well.
+# Be sure to reset these values to system defaults in the default class!
+#
+daemon:\
+ :ignorenologin:\
+ :datasize=infinity:\
+ :maxproc=infinity:\
+ :openfiles-max=1024:\
+ :openfiles-cur=128:\
+ :stacksize-cur=8M:\
+ :localcipher=blowfish,9:\
+ :tc=default:
+
+#
+# Staff have fewer restrictions and can login even when nologins are set.
+#
+staff:\
+ :datasize-cur=768M:\
+ :datasize-max=infinity:\
+ :maxproc-max=512:\
+ :maxproc-cur=128:\
+ :ignorenologin:\
+ :requirehome@:\
+ :tc=default:
+
+#
+# Authpf accounts get a special motd and shell
+#
+authpf:\
+ :welcome=/etc/motd.authpf:\
+ :shell=/usr/sbin/authpf:\
+ :tc=default:
+
+#
+# Building ports with DPB uses raised limits
+#
+pbuild:\
+ :datasize-max=infinity:\
+ :datasize-cur=6144M:\
+ :maxproc-max=1024:\
+ :maxproc-cur=384:\
+ :stacksize-cur=8M:\
+ :priority=5:\
+ :tc=default:
+
+#
+# Override resource limits for certain daemons started by rc.d(8)
+#
+bgpd:\
+ :openfiles=512:\
+ :tc=daemon:
+
+unbound:\
+ :openfiles=512:\
+ :tc=daemon:
+
+xenodm:\
+ :openfiles=512:\
+ :tc=daemon:
diff --git a/etc/etc.riscv64/sysctl.conf b/etc/etc.riscv64/sysctl.conf
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/etc/etc.riscv64/sysctl.conf
diff --git a/etc/etc.riscv64/ttys b/etc/etc.riscv64/ttys
new file mode 100644
index 00000000000..838ad81686b
--- /dev/null
+++ b/etc/etc.riscv64/ttys
@@ -0,0 +1,26 @@
+#
+# $OpenBSD: ttys,v 1.1 2021/04/28 03:26:25 drahn Exp $
+#
+# name getty type status comments
+#
+console "/usr/libexec/getty std.115200" vt220 on secure
+ttyC0 "/usr/libexec/getty std.9600" vt220 off secure
+ttyC1 "/usr/libexec/getty std.9600" vt220 on secure
+ttyC2 "/usr/libexec/getty std.9600" vt220 on secure
+ttyC3 "/usr/libexec/getty std.9600" vt220 on secure
+ttyC4 "/usr/libexec/getty std.9600" vt220 off secure
+ttyC5 "/usr/libexec/getty std.9600" vt220 on secure
+ttyC6 "/usr/libexec/getty std.9600" vt220 off secure
+ttyC7 "/usr/libexec/getty std.9600" vt220 off secure
+ttyC8 "/usr/libexec/getty std.9600" vt220 off secure
+ttyC9 "/usr/libexec/getty std.9600" vt220 off secure
+ttyCa "/usr/libexec/getty std.9600" vt220 off secure
+ttyCb "/usr/libexec/getty std.9600" vt220 off secure
+tty00 "/usr/libexec/getty std.115200" unknown off secure
+tty01 "/usr/libexec/getty std.9600" unknown off secure
+tty02 "/usr/libexec/getty std.9600" unknown off
+tty03 "/usr/libexec/getty std.9600" unknown off
+tty04 "/usr/libexec/getty std.9600" unknown off
+tty05 "/usr/libexec/getty std.9600" unknown off
+tty06 "/usr/libexec/getty std.9600" unknown off
+tty07 "/usr/libexec/getty std.9600" unknown off