Some embedded pcs like the pcengine apu2 has a bios
that emulates cga and ps2 keyboard using the serial
console.
This leads to doubling of characters in the bootloader
console, as the code would output on both, the uart
and on the cga "screen".
To avoid this, *nocga= boot parameter is added,
which essentially disables the cga text mode. This
boot parameter might also be usefull for no-legacy
uefi machines that generally have no cga text mode
anymore.
Second, we add *nokbd= which makes both the kernel and
9boot stop accessing the ps2 keyboard.
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
I'm a bit tired of ndb/ipquery having a different interface
than ndb/query. Given that most scripts are running it in a sed
pipeline to extact just the value without the attribute name
while ndb/query does the thing one would expect.
So this allows one to do ipinfo searches (also thru ndb/cs
using the -c flag) while only getting the values (when only
one rattr is specified). And honiuring the the -a and -m
flags as well.
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.
Some attributes such as vendor and txt require double-quoting
to be parsable by libndb. Provide the fmtinstall(2) formatter
ndbvalfmt for programs outputting ndb(6) format.
* turning trackball leds on/off via /dev/light
* give the keyboard a chance to finish shutdown animation
* report combined voltage of all cells
* instead of an error "battery is missing" just report the state as "missing"
* fix LPC shutdown fallback if keyboard failed to shut down the computer
Now that kbdfs supports reseting the map to
the default itself we no longer need to
manually load the ascii maps.
This also fixes a 'bug in the making' in
the buffer read logic that would cause it
to cut lines in half when writing to the
kbmap file. All of our kbmaps are under
8k so this never showed up.
Also fix a small bug in kbremap where it
was not writing out the last null when writing out
kbd events.
This only works when we'r not already having a interface
bound to that ethernet. Otherwise ipconfig can get
confused and adds the addresses to the wrong interface.
Change ip/ppp to call ip/ipconfig to add and remove
addresses to avoid duplicating code for removing
ndb entries and handling default routes as well as
allow ipv6 address auto-configuration.
This adds a very basic (probably wrong) DHCPv6 client,
to handle the "managed"-flag in IPv6 router solicitations.
We add -U option to pass the DHCPv6 client id as well as
an -s flag to manually add a dns server (because ppp
is going to call ipconfig to handle all the configuration
and write-back to /net/ndb in the future).
Have the remove command also remove default routes and
/net/ndb entries. (needed by ppp).
establish ipv6 link-local addresses if supported.
to get a full prefix, one would need to do dhcpv6
or using slaac configuration. this will come later.
remove ipv4 default route on exit.
maintain the entries in /net/ndb on ip change and
also remove them on exit.
dont filter source address, this should be done
differently.
fix various bugs in the option iteration loops.
honour primary flag (it used to just ignore that
and set it unasked in the code... what the hell...)
This implements a retry strategy (similar to ip/ipconfig -r),
continuing to attempt to connect forever.
Also handle termination request from the server.
The loaders can generate export tables in executables and build
dynamically loadable modules and there is a library to load those
floating around. This documents the format of dynamically loadable
modules.
The dot and inner products are not the same, and neither are cross and
outer ones.
Trimmed function signatures—similar to those in draw(2)—were added to
aid in comprehension.
Timing is not as good as it needs to be,
but servicable in more forgiving scenarios.
Clock drift between two paired systems sits
around 8 - 32 cycles when tested locally.
This is similar to plan9port dial(1), but names aux/dial
because we already have the expect(1) commands in
/bin/dial.
One difference is that our dial allows specifying a
command, similar to aux/listen1 that will get connected
it standard input and output to the network connection.
I think this is better done by a shell script
doing the extra copying as it breaks use cases
where we want to consume bitmaps in a loop
from a file-descriptor.
While the logic described in these has been
preserved carefully and still accurate,
the man page now covers all that is presented
and includes documentation on newer features.
Revisiting the man page example and README from the
original ktrans there was some descripency on how
to handle punction marks and special characters.
Notably 。(.) and 、(,) need special casing. If we
have anything in the buffer we need to tack on
these characters as an Okuri tail and avoid the actual
punction from entering the Kanji buffer.
Newlines were previously modified to be taken as a completion
if there was runes in the buffer. This has been backed out,
instead Shift + Space can serve this role via kbmap should they
prefer (and as is done in the jp kbmap). Instead we treat newlines
as hints to reset the buffer.
There was also a bug in where after cycling through all options the
original hiragana was not printed back. This has been corrected.
The max number of candidates has been bumped to 32 and moved to an enum.
This does nearly double our resident memory size, but we reguarly had
matches exceed this limit. A better solution is slated.
The man page now makes an attempt to explain the rules around Okuri and
Joshi input modes.
When using a packet interface, such as /net/ipifc/x as the
packet-soucre, there is no media header and the ip protocol
version has to be determined from the first byte.
The ippkt protocol solves this, allowing one to decode
both ipv4 and ipv6, such as:
snoopy -h ippkt /net/ipifc/2
Aux/imx8pm and aux/wm8960 had pretty cryptic names and it made
more sense to use a reform/pm and reform/audio naming, accordingly.
Instead of having special mount points /mnt/pm and /mnt/wm8960,
/dev is used directly, removing the need to do any manual work -
stats(1) will continue showing the CPU temperature, and zuke(1)
will still be able to control the volume, etc.
Brightness controls were changed to a better interface -
/dev/light, where each line contains a "a_thing its_light_value".
This way more parts can be controlled. Right now it's only "lcd",
but later it might be "kbd" and "trackball" as well.
Example of lib/profile:
reform/audio
echo master 80 > /dev/volume
reform/pm
echo lcd 100 > /dev/light
The kbdtap is now given as the first argument instead.
The use of stdio allows for multiple taps to be chained
together in something like:
; </dev/kbdtap ktrans | progB | progC >/dev/kbdtap
Here, patch grows a dry run option (-n), which allows
git/import to bail out early if it would patch files
that are dirty in tree.
Once git/import refuses to patch dirty files, git/rebase
can skip checking if the whole tree is clean, which is
both convenient and much faster on large trees.
This change adds support for dkim signing to upas.
It has2 pieces:
1. Adding support for different asn1 formats to auth/rsa2asn1;
we can now generate SubjectPublicKeyInfo RSA keys, which
wrap the keys up with an algorithm identifier.
2. Adding a upas/dkim command which filters a message and signs
it using dkim.
To configure dkim, you need to generate a (small-ish) rsa key;
large keys do not fit into DNS text records:
# generate the private key and add it to factotum
ramfs -p
cd /tmp
auth/rsagen -b 2048 -t 'service=dkim role=sign hash=sha256 domain=orib.dev owner=*' > dkim.key
cat dkim.key > factotum.ctl
# extract the public key, encode it, and strip out the junk
pubkey=`{
<dkim.key auth/rsa2asn1 -f spki | \
auth/pemencode WHATEVER | \
grep -v 'WHATEVER' | \
ssam 'x/\n/d'
}
domain=example.org
# then add it to /lib/ndb.local
echo 'dom=dkim._domainkey.'$domain' soa=
ip=144.202.1.203
refresh=600 ttl=600
ns=ns.orib.dev
txt="k=rsa; v='$pubkey \
>> /lib/ndb/local
Then, finally, insert it into your outgoing mail pipeline. One
thing to be careful of is that upas will do some outgoing 'From:'
rewriting, so you may need to make sure that either '$upasname'
is set, or 'upas/dkim' is inserted after the rewrite stage.
A good place is in /mail/lib/qmail, in place of upas/vf:
% cat /mail/lib/qmail
rfork s
upas/dkim -d example.com | upas/qer /mail/queue mail $* || exit 'qer failed'
upas/runq -n 10 /mail/queue /mail/lib/remotemail </dev/null >/dev/null >[2=1] &
History was built using a heuristic where a file not present in
the dump in 30 days was considered as a deleted file, without
being important if those days had an actual dump. Having the file
server off 30 days made all the files to be deleted from the
history point of view. This new version is rewriten from scratch
in rc and it does not try to detect deleted files since it can
be derived only with fragile assumptions.
Rewrite of ktrans to act as an overlay to kbdfs.
Move map files outside of the binary in to /lib/ktrans
and get our dictionaries out of /lib while we're at it.
Use \n as an alias for ctrl-\ for first lookup, use ^w
to clear okurigana input. This also in general changes
the logic to never us to 'swallow' a character and always echo
them out, using backspaces for cleaning us up.
The mount ID is a sequence number in a 32 bit integer, which means that
it can't be unique. This is largely harmless, because there is no way to
use the mount id, beyond checking if it's negative.
However, there's no overflow check, so the mount ID can wrap negative,
which will break error checks on mount calls.
Because it's useless, let's just stop returning it.
Auth/box previously switched to /, rather than
preserving the cwd. This would break relative
paths to items that would get pulled into the
namespace.
This change removes the '-.' flag, and causes
auth/box to keep the current working directory,
making it more usable for scripting.
Our #! line length is very short, and the naïve quoting
makes it difficult to pass more complicated arguments to
the programs being run. This is fine for simple interpreters,
but it's often useful to pass arguments to more complicated
interpreters like auth/box or awk.
This change raises the limit, but also switches to tokenizing
via tokenize(2), rather than hand rolled whitespace splitting.
The limits chosen are arbitrary, but they leave approximately
3 KiB of stack space on 386, and 13k on amd64. This is a lot
of stack used, but it should leave enough for fairly deep
devtab chan stacks.
-. decides where we chdir to before execing, we can't
sit where we are because our directory may not exist.
If not specified we go to '/'.
-s is used to source a rc script instead of execing cmd.
This is primarily to enable:
'#!/bin/auth/box -s'
Shebang line size is a bit tight(32), so we have this shorthand
to use rc along with setting up the required namespace components.
This specifically fixes
% man -P ktrans
We dont have font widths for kanji in our troff
font files, so we can use aux/mnihongo to render
the character using libdraw, and grab the bitmap from
there. It's not pretty, but aux/mnihongo exists so
lets at least use it.
This also updates /sys/man/1/ktrans to specify the
Jp font to comply with aux/mnihongo.
The original intention was to put devskel in to the
kernel to detach what it provides from devsrv.
That is not a good reason, just move it to userspace.
auth/box has been changed to exec skelfs instead
of relying on '#z'.
Changing the user to none doesn't do much for us
here. For kernel drivers that check the user of the
current proc we'll be none, but anything from devmnt
will still be accessed using creds from the original
attachment. Instead, running with none can be done
by chaining with auth/none:
auth/none auth/box ...
This patch makes sam's = cmd output what seems to me a more
useful (plumbable) format: /full/path/to/file:addr , where
addr is line(s) under = and rune(s) under =#.
This avoids ipconfig having to explicitely specify the tag
when we want to set route type, as the tag can be provided
implicitely thru the "tag" command.
This adds a new route "t"-flag that enables network address translation,
replacing the source address (and local port) of a forwarded packet to
one of the outgoing interface.
The state for a translation is kept in a new Translation structure,
which contains two Iphash entries, so it can be inserted into the
per protocol 4-tuple hash table, requiering no extra lookups.
Translations have a low overhead (~200 bytes on amd64),
so we can have many of them. They get reused after 5 minutes
of inactivity or when the per protocol limit of 1000 entries
is reached (then the one with longest inactivity is reused).
The protocol needs to export a "forward" function that is responsible
for modifying the forwarded packet, and then handle translations in
its input function for iphash hits with Iphash.trans != 0.
This patch also fixes a few minor things found during development:
- Include the Iphash in the Conv structure, avoiding estra malloc
- Fix ttl exceeded check (ttl < 1 -> ttl <= 1)
- Router should not reply with ttl exceeded for multicast flows
- Extra checks for icmp advice to avoid protocol confusions.
The altsetting was handled only for a single endpoint
(per interface number), but has to be handled for each
endpoint (per interface *AND* altsetting number).
A multi function device (like a disk) can have
multiple interfaces, all with the same interface number
but varying altsetting numbers and each of these
interfaces would list distict endpoint configurations.
Multiple interfaces can even share some endpoints (they
use the same endpoint addresses), but
we still have to duplicate them for each
interface+altsetting number (as they'r part of
actually distict interfaces with distict endpoint
configurations).
It is also important to *NOT* make endpoints bi-directional
(dir == Eboth) when only one direction is used in a
interface/altsetting and the other direction in another.
This was the case for nusb/disk with some seagate drive
where endpoints where shared between the UAS and
usb storage class interface (but with distict altsettings).
The duplicate endpoints (as in using the same endpoint address)
are chained together by a next pointer and the head
is stored in Usbdev.ep[addr], where addr is the endpoint
address. These Ep structures will have distinct endpoint
numbers Ep.id (when they have conflicting types), but all
will share the endpoint address (lower 4 bits of the
endpoint number).
The consequence is that all of the endpoints configuration
(attributes, interval) is now stored in the Ep struct and
no more Altc struct is present.
A pointer to the Ep struct has to be passed to openep()
for it to configure the endpoint.
For the Iface struct, we will now create multiple of them:
one for each interface *AND* altsetting nunber,
chained together on a next pointer and the head being
stored in conf->iface[ifaceid].
--
cinap