Commit graph

597 commits

Author SHA1 Message Date
cinap_lenrek
afe12c32f3 nusbrc: add Prolific and CP2102 serial uart
also reorganize the switches: match vid/did first,
then generic device class.
2024-11-24 17:18:59 +00:00
cinap_lenrek
a77fd25d90 gefs: remove nokill code
After discussion, it was suggested that it might make more
sense to handle the noswap stuff outside of gefs, like
with any other fileserver.

plan9 file-servers are not privileged. one might even run
them in a test script to mount an image.
2024-11-23 17:37:07 +00:00
cinap_lenrek
4ed03dff93 auth/factotum: mount factotum onto /mnt/factotum instead of /mnt by default
Factotum used to mount itself on /mnt and serving the first-level
directory "factotum" itself. This has the undesired consequence
that it has to respond to all walks crossing the /mnt directory.

Instead, we make factotum interpret the previously ignored
mount-spec (aname). If it is "factotum", it serves the
factotum directory as the root, so it can be directly mounted
onto /mnt/factotum. For backwards compatibility, the old
behaviour is preserved.

The namespace file will now always mount factotum onto /mnt/factotum.
In the case of a old factotum, that ignores the mount-spec,
do a bind moving /mnt/factotum/factotum to /mnt/factotum.
2024-11-23 16:05:11 +00:00
Noam Preil
03cb81c7a5 usb: support the pine64 UART 2024-11-18 22:22:25 +00:00
cinap_lenrek
c51566faa7 cpurc, termrc: actually, gefs not needed, still, keep it sorted (thanks ori) 2024-11-03 17:05:45 +00:00
cinap_lenrek
33efe0a189 cpurc, termrc: dont kill gefs 2024-11-03 15:16:42 +00:00
cinap_lenrek
ca672123ca cpurc: use ndb/query -cia instead of ndb/ipquery
ndb/query -a already returns the value without
the attribute name when given a single rattr
so sed pipeline can be avoided.

also use -c flag to query ndb/cs, which has
a cache of the network database.
2024-11-03 15:10:48 +00:00
qwx
6500b30363 pstree: remove unnecessary globbing and environment pollution (thanks cgnarne, cinap_lenrek) 2024-11-03 14:58:56 +00:00
qwx
493bac79b6 pstree: reimplement in awk, optionally restrict to a given process 2024-10-30 23:43:47 +00:00
Ori Bernstein
ddcfc1de22 doctype: fix custom options (thanks sirjofri)
we need to allow '$1' to expand in order to
grow the list of options.
2024-10-05 15:20:27 +00:00
qwx
084c9d6eba g: add .in, fix earlier fuckup (thanks mkf)
2d63bdbb44 was pushed modified
compared to the patch actually submitted by mkf, in error.
2024-09-04 19:57:16 +00:00
mkf
2d63bdbb44 g: add cxx and hxx 2024-08-31 07:33:30 +00:00
Ori Bernstein
6a049aafed history: add support for gefs dumps 2024-07-18 16:49:31 +00:00
Jacob Moody
71d676a12f man: also attempt to interpret argument as path 2024-06-11 02:26:47 +00:00
Jacob Moody
d76c9642e0 inst: add option to use esp as 9fat
Currently we place efi boot binaries on to the 9fat and hope that the
firmware will look in more places than just the esp.  Based on user
reports we've found that it is quite common for firmware to only
search the esp.
2024-05-22 01:49:46 +00:00
Ori Bernstein
8be7f27b75 inst: add hidden 'gefs' file system type option
one day it will graduate to experimental
2024-05-18 16:35:09 +00:00
Ori Bernstein
da1daf3012 gefs: initial import 2024-05-16 20:47:43 +00:00
Jacob Moody
86e3e0791c inst: remove net install support 2024-04-28 00:20:45 +00:00
Jacob Moody
4745cae5bc g: search .S files
Useful for searching unix-y assembly files
2024-04-21 18:51:39 +00:00
Sigrid Solveig Haflínudóttir
6be977907b fshalt: halt ext4srv as well 2024-02-14 21:51:26 +00:00
sl
7f79ce9bb8 /rc/bin/9fs: case 9front: move extra to plan9.stanleylieber.com 2024-02-01 04:43:42 +00:00
Ori Bernstein
4dbb99f478 g: search in files with .txt suffix 2024-01-28 14:03:44 +00:00
Jacob Moody
917d0fa9b4 9fs: add iso case for nightly iso box 2024-01-27 22:05:23 +00:00
cinap_lenrek
7137060d85 ethermultilink: ignore link-status of primary
when link-status on secondary is lost, always switch
back to the primary regardless of if it has a link.

this works around some ethernet driver not setting
link-status consistently and wifi's that might
only indicate a link when connected to an ap.
2023-12-07 14:48:49 +00:00
cinap_lenrek
276c090a95 fshalt: get rid of special nvme hack for disk shutdown
The kernel has been fixed, no need to exclude
nvme drives anymore.
2023-11-18 21:59:38 +00:00
Ori Bernstein
b51b623725 ircrc: fix pong message (thanks mkf)
when connecting to ngircd, we can get disconnected
with a 'Spoofed prefix' message; this fixes the problem.
2023-11-05 20:46:40 +00:00
cinap_lenrek
54c94a93f0 listen(8): remove tcp53 reference, remove !tcp53 template 2023-10-29 13:56:47 +00:00
cinap_lenrek
4bc5793a2c cpurc, termrc, bootrc: organize default device binds
reorganise device binds for bootrc, cpurc and termrc.

make parallel port, audio, i2c and pci available in
cpurc/termrc console namespace.

remove redundant binds (which are handled by other
scripts).

detailed list:

¤ ¶:
cap and swap need to be bound only in bootrc.
for cpurc/termrc, it is bound from /lib/namespace.

P:
devarch, always good to have.

S f æ:
sd, floppy, aoe are always good to have in the console
namespace. regardless if its a cpu or terminal.
also bound in bootrc for obvious reasons.

note that #k is bound by diskparts script.

t:
uart; we always need it.

b m:
keyboard and mouse only needed in bootrc
for kbdfs and nusb/kb hid devices.

for cpurc/termrc, keyboard is provided by /srv/cons,
and mouse is bound by screenrc.

u:
usb stack, never needs to be bound manually as this
is handled by nusbrc.

v i:
vga and devdraw not needed to be bound here,
handled by screenrc.

L A J $:
parallel port, audio, i2c and pci are good to have in
cpurc/termrc console namespace for trouble shooting
and custom per site / machine rc scripts.
2023-10-14 17:12:05 +00:00
cinap_lenrek
7cd0b81c83 history: set missing execute bit 2023-10-02 20:15:59 +00:00
cinap_lenrek
556618eb07 sysupdate: use the rc -b flag to keep sysupdate in memory
when /rc/bin/sysupdate gets updated itself during a sysupdate,
rc gets confused when continuing reading the original file,
but it gets data from the updated file causing confusion.

the -b flag forces rc to read the original file as a whole
before starting execution preventing this issue.

updating this should be fine as the file has been shrunk
from 230 bytes to 224 bytes.
2023-09-17 00:36:51 +00:00
Jacob Moody
483ff27f9d games/voc^(enc dec): move from audio and add encoder 2023-08-23 15:57:00 +00:00
Ori Bernstein
13b1ea7493 lstk: add /bin/lstk to dump most recent crashed proc 2023-08-14 03:50:01 +00:00
qwx
37f710de39 add /rc/bin/doom: games/doom launcher
sets the namespace for a given engine version and iwad and any
pwads and lumps; manpage pending.
2023-08-13 19:53:47 +00:00
qwx
e5c7fe6305 games/doom: use wadfs to expose genmidi lump instead of extracting to /tmp
to allow using games/dmid + games/opl3 for music playback, the genmidi
lump must be exposed;  previous attempt was insufficient since patch wads
can overwrite iwad contents, which a single wadfs cannot take into account
(commit e7b1c1aad8).
subsequent fix was to use the normal mechanisms to extract the lump to /tmp
and later the music lumps for playback, but the temp file may not always
be properly cleaned up, preventing any music playback due to conflicts.
so, spawn one wadfs for the iwad and one for each subsequently added pwad,
just making sure that they have sufficient delay to properly initialize
and bind in the right order
2023-08-09 23:01:21 +00:00
cinap_lenrek
2153eb179c ethermultilink: send gratious arp instead of flushing arp cache 2023-07-23 22:22:48 +00:00
cinap_lenrek
216ecc5460 ethermultilink: add "bypass" ctl for ethernet
Instead of having a ethersink with the same mac, implement
a "bypass" mechanism that lets us get access to the interfaces
frames and bypass the physical link.

Now no extra ethersink is required and a pre-existing
interface can be bridged transparently.
2023-07-22 17:23:06 +00:00
cinap_lenrek
c690c0b9f3 ethermultilink: switch between different physical interfaces based on link status
This adds the capability of specifying multiple
interfaces on bootargs like:

bootargs=tls!ether /net/ether1 ether /net/ether0 ...

which will be combined into a bridge and the new
ethermultilink script can dynamically add/remove
the interfaces based on link status.

a ethersink interface is used as the primary,
taking the mac address of the first secondary
interface.

this required some changes in how ethernets
and bridges interact, as bridge mode on a
ethernet interface would only forward
frames not desinted to the interfaces mac address.

we make promisc mode ethernet connections never
loop-back the frames written them
and we add a new "ethermac" type to devbridge
that uses promisc mode only without setting
bridge flag.

that way, we can attach a ethernet to a bridge
and get all its frames.

the result is that we can specify the wifi
interface as the first interface and ethernet
as the second interface and the system
will roam to ethernet transparently when the
ethernet cable is plugged in and switch back
to wifi when ethernet cable is disconnected.
2023-07-16 16:15:09 +00:00
cinap_lenrek
c9863f0ad3 termrc: start reform/pm and reform/audio drivers 2023-06-05 23:30:08 +00:00
cinap_lenrek
46bac13b16 netaudit: use new ndb/query flags instead of ndb/ipquery
Query ndb with ndb/query -x $net -cia.

This allows one to import a remote systems /net
and run a netaudit on it like:

rimport foobar /net /net.alt
netaudit /net.alt
2023-06-04 21:46:23 +00:00
mia soweli
2531938269 scram: → /rc/bin/scram
no need for scram to be a c program and duplicate the acpi shutdown code.
try writing power off to /dev/pmctl or fall back to the new -H flag
for aux/acpi.
2023-06-04 13:52:05 +00:00
cinap_lenrek
c6ca07ad4e sdnvme: add smart file for full smart info
Instead of cramming everything to the ctl file,
provide a separate file with the SMART/health information
using the format that matches the NVMe specification closely.

Also, the command to read the health information log page
can be namespace specific as indicated by bit 0 of LPA in
controller identification information.
2023-06-03 22:16:10 +00:00
Sigrid Solveig Haflínudóttir
f0084afefa fshalt: until sd* drivers get fixed (in a calm manner) only unconfigure nvme drives 2023-05-26 21:33:17 +00:00
Sigrid Solveig Haflínudóttir
390c71f0c7 sdnvme, fshalt: turn disks off on fshalt
MNT Reform's power rails are switched off abruptly on shutdown
which causes an "unsafe" shutdown on nvme. This may result in
loss of valid data in the volatile write cache, which is never
going to be synced in this case. This problem has been reported
on forums about Linux too, including actual filesystem errors
resulting from that behavior.

Notify nvme about a shutdown and wait up to 3s before disabling
the controller. This resulted in "unsafe shutdowns" nvme's counter
to never increase on fshalt.
2023-05-24 16:14:33 +00:00
Michael Forney
906ee79533 fstype: add support for gefs 2023-05-02 21:08:51 +00:00
Jacob Moody
89cb83a426 audio/vocdec: Creative Voice File decoder
slight correction in file.c from previous commit
2023-02-09 02:41:21 +00:00
cinap_lenrek
b883050361 sysinfo: use usbtree instead of just cating #u/usb/ctl 2023-01-29 20:35:10 +00:00
cinap_lenrek
6cbcac7382 usbtree: a little helper to pretty print usb hubs and devices in a tree 2023-01-05 19:27:13 +00:00
cinap_lenrek
827fdabbf9 netaudit: fix format, always state the fileserver tested 2022-12-14 18:20:48 +00:00
cinap_lenrek
16ba4693e5 netaudit: check none attach too 2022-12-14 18:06:17 +00:00
cinap_lenrek
ac0c7a5c96 netaudit: fix it for multiple results 2022-12-14 17:57:12 +00:00