diff options
author | Mateja <mail@matejamaric.com> | 2021-04-03 00:37:03 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-04-03 00:37:03 +0200 |
commit | a945feb02f6d64df2219ea1044251a7fe2ea98fc (patch) | |
tree | fe0242495eb35317fd5358e403a047657dfa04b5 /openbsd | |
download | misc-a945feb02f6d64df2219ea1044251a7fe2ea98fc.tar.gz misc-a945feb02f6d64df2219ea1044251a7fe2ea98fc.zip |
Initial commit.
Diffstat (limited to 'openbsd')
-rw-r--r-- | openbsd/libreboot_grub.cfg | 30 | ||||
-rw-r--r-- | openbsd/openbsd_setup | 64 | ||||
-rw-r--r-- | openbsd/xenodm/GiveConsole | 18 | ||||
-rw-r--r-- | openbsd/xenodm/Xresources | 174 | ||||
-rw-r--r-- | openbsd/xenodm/Xsetup_0 | 18 |
5 files changed, 304 insertions, 0 deletions
diff --git a/openbsd/libreboot_grub.cfg b/openbsd/libreboot_grub.cfg new file mode 100644 index 0000000..f0259bd --- /dev/null +++ b/openbsd/libreboot_grub.cfg @@ -0,0 +1,30 @@ +default=2 +timeout=2 + +menuentry "OpenBSD" { + kopenbsd -r sd0a (ahci0,openbsd1)/bsd +} + +#menuentry "OpenBSD chainload" { +# insmod part_bsd +# insmod part_msdos +# set root=(ahci0,msdos4) +# chainloader +1 +#} + +menuentry "SeaBIOS chainload" { +# insmod part_msdos +# insmod part_bsd +# set root=(ahci0,msdos4) + chainloader (ahci0,msdos4)/grub/bios.bin.elf +# boot +} + +menuentry "VGA SeaBIOS chainload" { +# insmod part_msdos +# insmod part_bsd +# set root=(ahci0,msdos4) + multiboot (ahci0,msdos4)/grub/bios.bin.elf + module (ahci0,msdos4)/grub/vgabios.bin name=vgaroms/seavgabios.bin +# boot +} diff --git a/openbsd/openbsd_setup b/openbsd/openbsd_setup new file mode 100644 index 0000000..073f8bf --- /dev/null +++ b/openbsd/openbsd_setup @@ -0,0 +1,64 @@ +#!/bin/sh + +ifconfig + +ifconfig athn0 nwid YOUR_SSID wpakey YOUR_PASSWORD +dhclient athn0 + +cat > /etc/hostname.athn0 << EOF +nwid YOUR_SSID wpakey YOUR_PASSWORD +dhcp +EOF + +sh /etc/netstart athn0 + +cat > /etc/wsconsctl.cong << EOF +keyboard.bell.volume=0 +keyboard.map+="keysym Caps_Lock = Escape" +EOF + +cat ~/.xsession << EOF +xset b off +setxkbmap -option caps:swapescape +exec /usr/local/bin/i3 +EOF + +comment_out /etc/X11/xenodm/Xsetup_0 + +rcctl set apmd status on +rcctl set apmd flags -A + +rcctl set smtpd status off + +sysctl hw.disknames +disklabel sd1 +mount -t msdos /dev/sd1i /mnt +umount /mnt + +fw_update + +#usermod -G staff USER_NAME +#/etc/login.conf staff:maxproc + +echo 'permit persist keepenv USER_NAME' > /etc/doas.conf + +/etc/X11/xenodm/GiveConsole + +sndioctl output.level=+0.05 +sndioctl output.mute=! + +killall -USR1 i3status + +https://www.openbsd.org/anoncvs.html +--- +cd /usr +cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -rOPENBSD_6_7 -P src + +BIOS======================= +git clone https://git.seabios.org/seabios.git +Build without cbfs support +https://g00se.org/2016/11/seabios-on-libreboot.html + +https://github.com/librecore-org/librecore/wiki/Chainloading-SeaBIOS-from-a-GRUB-payload +https://github.com/bibanon/Coreboot-ThinkPads/blob/master/Libreboot-Mods/Libreboot-GRUB2.md +========================== diff --git a/openbsd/xenodm/GiveConsole b/openbsd/xenodm/GiveConsole new file mode 100644 index 0000000..079392f --- /dev/null +++ b/openbsd/xenodm/GiveConsole @@ -0,0 +1,18 @@ +#!/bin/sh +# Assign ownership of the console to the invoking user +# $OpenBSD: GiveConsole,v 1.3 2019/05/12 11:53:06 jsg Exp $ +# +# By convention, both xconsole and xterm -C check that the +# console is owned by the invoking user and is readable before attaching +# the console output. This way a random user can invoke xterm -C without +# causing serious grief. +# +pkill xclock +chown $USER /dev/console +if [ -c /dev/drm0 ]; then + chown $USER /dev/drm0 +fi +if [ -c /dev/drmR128 ]; then + chown $USER /dev/drmR128 +fi +/usr/X11R6/bin/sessreg -a -l $DISPLAY -u none $USER diff --git a/openbsd/xenodm/Xresources b/openbsd/xenodm/Xresources new file mode 100644 index 0000000..17d8e41 --- /dev/null +++ b/openbsd/xenodm/Xresources @@ -0,0 +1,174 @@ +#define WHITE #EDF6E6 +#define BLACK #252123 +#define RED #DA9B9A +#define BLUE #7AADD9 +#define DKBLUE #6187AD +#define GRAY #54697F +#define DKGRAY #4A566B + +xroot.background: BLACK + +xclock*background: BLACK +xclock*foreground: WHITE +xclock*borderWidth: 0 +xclock*geometry: -0+0 +xclock.Clock.analog: false +xclock.Clock.chime: false +xclock.Clock.render: true +xclock.Clock.twentyfour:true +xclock.Clock.update: 10 + + +xlogin*login.translations: #override \ + <Key>F1: set-session-argument(failsafe) finish-field()\n\ + <Key>Left: move-backward-character()\n\ + <Key>Right: move-forward-character()\n\ + <Key>Home: move-to-begining()\n\ + <Key>End: move-to-end()\n\ + Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\ + <Key>KP_Enter: set-session-argument() finish-field()\n\ + Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\ + <Key>Return: set-session-argument() finish-field() + +#xlogin*greeting: CLIENTHOST +#xlogin*greeting: Please, enter your login credentials. +#greeting text +xlogin*greeting: +xlogin*namePrompt: \040\040\040\040\040\040\040Login:\040 +xlogin*passwdPrompt: Password:\040 +#fail text +xlogin*fail: Login incorrect or forbidden +#background color (not prompt) +xlogin*background: BLACK +#prompt text color +xlogin*foreground: WHITE +#boreder around +xlogin*borderWidth: 0 +#what? +xlogin*frameWidth: 0 +#what? +xlogin*innerFramesWidth: 0 +xlogin.Login.innerFramesWidth: 0 +#line below greeting +xlogin*sepWidth: 0 +#inside prompt color +xlogin*inpColor: BLACK +#prompt text color +xlogin*promptColor: WHITE +#fail text color +xlogin*failColor: WHITE +#fonts passwd and prompt-text +xlogin*face: DejaVu Sans-18 +xlogin*promptFace: DejaVu Sans-18 + +##if WIDTH > 800 +#xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1 +#xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 +#xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 +#xlogin*failFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 +#xlogin*greetFace: DejaVu Sans Condensed-22:bold:italic:dpi=75 +#xlogin*face: DejaVu Sans Condensed-16:dpi=75 +#xlogin*promptFace: DejaVu Sans Condensed-16:bold:dpi=75 +#xlogin*failFace: DejaVu Sans Condensed-16:bold:dpi=75 +##else +#xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1 +#xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 +#xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 +#xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1 +#xlogin*greetFace: DejaVu Sans Condensed-18:bold:italic:dpi=75 +#xlogin*face: DejaVu Sans Condensed-12:dpi=75 +#xlogin*promptFace: DejaVu Sans Condensed-12:bold:dpi=75 +#xlogin*failFace: DejaVu Sans Condensed-12:bold:dpi=75 +##endif +# +##if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15)) +## if PLANES < 4 +## ifndef bpp1 +## define bpp1 +## endif +## else +## if PLANES > 4 +## if PLANES > 8 +## ifndef bpp15 +## define bpp15 +## endif +## else +## ifndef bpp8 +## define bpp8 +## endif bpp8 +## endif +## else +## ifndef bpp4 +## define bpp4 +## endif +## endif +## endif +##endif /* If manual override */ +# +##ifndef bpp1 +#xlogin*borderWidth: 1 +#xlogin*frameWidth: 2 +#xlogin*innerFramesWidth: 0 +# +#xlogin.Login.sepWidth: 0 +# +#! top/left border +# xlogin*hiColor: #667788 +# +#! bottom/right border +#xlogin*shdColor: #667788 +# +#! 'Welcome to..' text color +#xlogin*greetColor: #fef886 +##if defined(bpp4) || defined(bpp8) || defined(bpp15) +#! flood fill +#xlogin*background: #798a99 +#xlogin*inpColor: #99aab9 +##endif +#xlogin*failColor: #aa0000 +# +#! 'Login:' and 'Password:' +#*Foreground: #eeeeff +# +#! border/shadow +#*Background: #000000 +##else +#xlogin*borderWidth: 3 +#xlogin*frameWidth: 5 +#xlogin*innerFramesWidth: 1 +#xlogin*shdColor: white +#xlogin*hiColor: white +#xlogin*greetColor: white +#xlogin*background: black +#xlogin*failColor: white +#xlogin*promptColor: white +#*Foreground: white +#*Background: black +##endif +##ifdef bpp1 +#xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_1bpp.xpm +##endif +##ifdef bpp4 +#xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_4bpp.xpm +##endif +##ifdef bpp8 +#xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_8bpp.xpm +##endif +##ifdef bpp15 +#xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_15bpp.xpm +##endif +# +#xlogin*useShape: true +#xlogin*logoPadding: 10 +# +#! uncomment to disable logins +#! xlogin.Login.allowRootLogin: false +# +#XConsole*background: black +#XConsole*foreground: white +#XConsole*borderWidth: 2 +#XConsole*borderColor: grey +#XConsole.text.geometry: 480x130 +#XConsole.verbose: true +#XConsole*iconic: true +#XConsole*font: fixed diff --git a/openbsd/xenodm/Xsetup_0 b/openbsd/xenodm/Xsetup_0 new file mode 100644 index 0000000..a9c7c16 --- /dev/null +++ b/openbsd/xenodm/Xsetup_0 @@ -0,0 +1,18 @@ +#!/bin/sh +# $OpenBSD: Xsetup_0,v 1.6 2019/06/29 13:33:06 espie Exp $ + +#xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail + +# install package openbsd-backgrounds +# then uncomment: +# +# if test -x /usr/local/bin/openbsd-wallpaper +# then +# /usr/local/bin/openbsd-wallpaper +# fi + +# sxpm OpenBSD.xpm & + +xrandr --output default --dpi 96 +xsetroot -solid $(xrdb -query | awk '/xroot.background/ { print $2 }') +xclock -strftime "%A %d %b %Y %H:%M" & |