Commit graph

9230 commits

Author SHA1 Message Date
cinap_lenrek
5388575c14 imx8: better syntax for iomuxpad() options using ~ for negation 2022-06-13 19:18:50 +00:00
cinap_lenrek
90428d0561 imx8: add iomuxpad() helper for pad and mux control 2022-06-13 19:06:00 +00:00
cinap_lenrek
d35e41424c imx8: make gpc functionality available with a powerup() function 2022-06-12 21:16:47 +00:00
cinap_lenrek
771a93f3b7 imx8/lcd: reduce flicker
increasing the pixel clock to 80% of the edid clock value
reduces flicker and also seems to not trigger the shifting
issue.
2022-06-12 16:15:55 +00:00
Ori Bernstein
306e7ca618 devsrv: revert 'add /srv/clone'
this leaks /srvs, revert until we can fix it.
2022-06-12 15:23:19 +00:00
cinap_lenrek
e1a95f5630 merge 2022-06-12 14:43:50 +00:00
cinap_lenrek
f1f5045b2e imx8/usbxhci: bring usb out of reset
do all the magic dwc3 specific initalization as well
as reset the hub and power on the phys.

with this, "usb start" command is not needed anymore
from u-boot.
2022-06-12 14:31:55 +00:00
Jacob Moody
c3e1346bbc kernel: add /srv/clone
/srv/clone allows a namespace to get their
own private /srv session.
2022-06-12 00:44:10 +00:00
cinap_lenrek
1d81f7eacb imx8/lcd: silly work around for display instability
running at the actual pixel clock causes the screen
to shift horizontally after a while.

using 60% seems to fix it - for now.
2022-06-12 00:21:28 +00:00
cinap_lenrek
931ae0cfeb imx8: mainscreen turn on!
supports the lcd panel and adds alot of infrastructure
like for the ccm clock module and the i2c controllers.
2022-06-11 21:12:04 +00:00
cinap_lenrek
276f2039a9 devi2c: add generic i2c bus driver 2022-06-11 21:06:39 +00:00
Ori Bernstein
3e176bd975 git/pack: add support for skipping ssh signatures
ssh signatures confused our commit parsing; teach our
commit parsing to skip them.
2022-06-11 17:48:20 +00:00
Ori Bernstein
bb33663b40 git/get: keep sending what we have until we get an ack
Git9 was sloppy about telling git what commits we have.

We would list the commits at the tip of the branch, but not
walk down it, which means we would request too much data if
our local branches were ahead of the remote.

This patch changes that, sending the tips *and* the first
256 commits after them, so that git can produce a better
pack for us, with fewer redundant commits.
2022-06-11 16:36:45 +00:00
Benjamin Riefenstahl
b3dc2af6d6 man/3/ip (ip): Discuss local IP addresses for "announce" and "bind". 2022-06-11 13:00:05 +00:00
Benjamin Riefenstahl
e402fd8340 ape/bsd/bind.c, ape/bsd/listen.c: Use _syserrno. 2022-07-06 03:46:07 +00:00
Benjamin Riefenstahl
e01e80c5e7 ape/bsd/listen.c: Drop "bind 0".
There does not seem to be a good reason for this.  The "bind" command
has no practical consequence.
2022-07-06 03:38:17 +00:00
Benjamin Riefenstahl
2ca5abbc2b ape/bsd/bind.c: Do not pretend that the port could be negative.
Ports are filtered through "htons" which returns an "unsigned short".
2022-06-11 12:34:31 +00:00
Benjamin Riefenstahl
25a0d57478 ape/bsd/bind.c, ape/bsd/listen.c: Set local IP.
Despite what the man pages say, local addresses can actually be set so
do that.
2022-06-10 20:39:28 +00:00
Benjamin Riefenstahl
d618223086 ape/bsd/listen.c: Do not try to issue "announce *".
"port >= 0" is always true, because the port always gets filtered
through "htons" which returns "unsigned short", so we can just drop
the "else" branch here.

Anyway "announce 0" works fine with the Plan9 API, there is not need
for "announce *" here.
2022-06-10 20:22:39 +00:00
Benjamin Riefenstahl
9fc38d43d4 ape/bsd/bind.c: Do not issue "bind *".
Despite the documentation, "bind *" is invalid and gives the error
"bad numeric port" in devip.c:setladdrport.

"bind 0" OTOH is actually supported fine in the Plan9 API and has the
right sematics.
2022-06-10 16:02:13 +00:00
Jacob Moody
0ec0154bc9 ktrans: don't leak on conflicting jisho lines
Tidy up the hash interface to make cleanup
a bit more explicit vs non cleanup.
2022-07-17 17:51:11 +00:00
cinap_lenrek
23620b2e70 inst: make bootsetup work for on pc architectures 2022-07-17 16:27:15 +00:00
Jacob Moody
c147614656 ktrans: 你好
This consolidates jisho and map lookups
to use the same structure and removes
the old jisho code.
2022-07-17 14:52:11 +00:00
cinap_lenrek
ccbabf1c16 i2c(3): fix typos, thanks quinq 2022-07-17 14:43:46 +00:00
cinap_lenrek
06d7118e94 i2c(3): Add documentation for kernels devi2c 2022-07-17 14:22:47 +00:00
rodri
467c95b4a8 /lib/ktrans: added tools to fetch skk dicts and convert them to ktrans jishos 2022-07-17 14:10:31 +00:00
glenda
498e9e7d83 /lib/theo: The man page says "don't do that". 2022-07-16 23:56:02 +00:00
Ori Bernstein
4eeefed7b0 cwfs: fix iounit negotiation
cwfs had an issue with iounit negotiation as a result
of the conversion to 9p2000 -- with the move to variable
size messages, the fixed message overhead decreased, but
the advertised message size was still adding the old
fixed overhead.

This meant that if the kernel negotiated the maximum io
size, cwfs would negotiate something larger than it
supported, and would hang up when an io of that size
was made.

In addition, the size of messages was stored in a short,
which means that negotiating an iounit larger than 16384
bytes would overflow the message count, and cause things
to fall over.

Finally, whle we're here, we clean up some duplicated
and unused constants.
2022-06-07 22:38:04 +00:00
Jacob Moody
13065e16b3 auth/box: don't bother switching to none
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 ...
2022-06-10 04:10:54 +00:00
Jacob Moody
1b5ea51ee1 auth/box: bind in the binary by default
This prevents stuttering on the command line by
not having to give a -r flag for the binary itself.
2022-06-08 02:44:35 +00:00
Jacob Moody
056ad652a4 auth/box: build restricted namespaces using components from the parent. 2022-06-07 05:38:08 +00:00
Jacob Moody
f4840cdba5 kernel: add devskel for pc and pc64 2022-06-07 05:25:44 +00:00
Jacob Moody
df92301d8f ip/ipconfig: refactor plan9 vendor parsing
Unless ip/dhcpd is started with the -6 option,
we only receive v4 addresses. If we do see the
v6 options we should prefer them but should
also make sure we grab the v4 addresses as a fallback.

None of the v6 options should overwrite valid
overrides given at the command line.

Add our custom types to logging.
2022-06-05 20:56:57 +00:00
Jacob Moody
207d124dfe ip/dhcpd: properly skip past ipv6 addresses in addrsopt
If the first address passed happened to be an ipv6
address we would send a malformed option by never including
a ipv4 address.
2022-06-05 18:02:58 +00:00
Jacob Moody
d8d433894a kernel: cleanup unused fields from devpipe
We don't need to multiply session path by 2, the definition
for NETQID is:

Meaning we don't need to save room between session paths
for individual Qid paths. This doubles the amount of
pipe sessions we can have before a wrap.
2022-06-05 12:29:50 +00:00
Ori Bernstein
926be5e34e git/import: use patch(1)
we have a new, pretty patch(1), lets use it.
2022-06-04 23:35:49 +00:00
Ori Bernstein
5d37407e3c diff: avoid empty hunks when there are no changes
Currently, diff outputs a file header, even if there are
no changes to the file. This is wonky.

It means that the header chunks are ambiguous, since
not all header chunks are followed by '@@ hunk', and
'--- file', '+++ file' lines can be generated from
file content.

This changes the way that we decide to print the file
header, so we only print it when outputting the first
hunk on flushchanges.

Flushchanges is called once per regular file, at the
end of `diffreg`, so we output a hunk header once per
file.
2022-06-04 02:21:19 +00:00
Ori Bernstein
9eb9c9e560 patch(1): remove options that don't exist
the summary mentions options that existed during
development, but no longer do.
2022-06-04 02:13:58 +00:00
Ori Bernstein
9e547f50d1 patch(1): add the manpage
forgot it in the last commit
2022-06-04 02:12:12 +00:00
Ori Bernstein
07e1620911 patch: implement a new, simpler patch program to replace ape/patch
ape/patch is a giant, ugly ball of code from almost 25 years ago,
which has not and will likely never been updated or maintained.

the world has since settled on unified diffs, and we just need a
simple program that can parse and apply them.
2022-06-04 01:56:01 +00:00
e72da2cdc8 Merge remote-tracking branch 'origin/front' into front 2022-05-31 21:03:39 -04:00
Jacob Moody
6efb7620e6 chdev: dont pollute environment 2022-05-31 19:30:23 +00:00
647266573c Merge remote-tracking branch 'origin' into front 2022-05-30 21:56:43 -04:00
Jacob Moody
1d09995353 kernel: be more careful about argc for /dev/drivers writes
Not crashing on 'chdev &' is important.
2022-05-30 21:55:39 -04:00
Ori Bernstein
fe2cbbb402 git: performance enhancements
Inspired by some changes made in game of trees, I've
implemented a number of speedups in git9.

First, hashing the chunks during deltification with
murmurhash instead of sha1 speeds up the delta search
significantly.

The stretch function was micro-optimized a bit as well,
since that was taking a large portion of the time when
chunking.

Finally, the full path is not stored. We only care about
grouping files with the same name and path. We don't care
about the ordering. Therefore, only the hash of the path
xored with the hash of the diretory is kept, which saves
a bunch of mallocs and string munging.

This reduces the time spent repacking some test repos
significantly.

9front:
	% time git/repack
	deltifying 97473 objects: 100%
	writing 97473 objects: 100%
	indexing 97473 objects: 100%
	58.85u 1.39s 61.82r 	 git/repack

	% time /sys/src/cmd/git/6.repack
	deltifying 97473 objects: 100%
	writing 97473 objects: 100%
	indexing 97473 objects: 100%
	43.86u 1.29s 47.51r 	 /sys/src/cmd/git/6.repack

openbsd:

	% time git/repack
	deltifying 2092325 objects: 100%
	writing 2092325 objects: 100%
	indexing 2092325 objects: 100%
	1589.48u 45.03s 1729.18r 	 git/repack

	% time /sys/src/cmd/git/6.repack
	deltifying 2092325 objects: 100%
	writing 2092325 objects: 100%
	indexing 2092325 objects: 100%
	1238.68u 41.49s 1373.15r 	 /sys/src/cmd/git/6.repack

go:
	% time git/repack
	deltifying 529507 objects: 100%
	writing 529507 objects: 100%
	indexing 529507 objects: 100%
	345.32u 7.71s 369.25r     git/repack

	% time /sys/src/cmd/git/6.repack
	deltifying 529507 objects: 100%
	writing 529507 objects: 100%
	indexing 529507 objects: 100%
	248.07u 4.47s 257.59r 	 /sys/src/cmd/git/6.repack
2022-05-30 21:55:39 -04:00
Jacob Moody
674fcda107 aux/listen: Allow per service namespace files 2022-05-30 21:55:39 -04:00
Jacob Moody
9fe925eaa5 kernel: add /rc to devroot
This makes it much easier to run a rc
program without needing to bind in all of '#s/boot'.
2022-05-30 21:55:39 -04:00
Jacob Moody
96d07474b8 ip/ftpd: use chdev in /lib/namespace.ftp
/lib/namespace.ftp is used for anonmyous logins.
2022-05-30 21:55:39 -04:00
Jacob Moody
449fe7d8ed auth/newns: add chdev command 2022-05-30 21:55:39 -04:00
Jacob Moody
e6c589312e add chdev(1) 2022-05-30 21:55:39 -04:00