Commit graph

9139 commits

Author SHA1 Message Date
Ori Bernstein
bc64cc50ac auth/box: preserve cwd name, but clear it out
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.
2022-07-26 04:57:40 +00:00
Ori Bernstein
520a39efcd sysproc: raise limit on #! lines, and allow quoted args
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.
2022-07-25 04:48:44 +00:00
cinap_lenrek
3cc07dddfb devrtc: fix mistake. 2022-07-21 00:44:34 +00:00
cinap_lenrek
4063334e6f pc/rtc: make sure string is NUL terminates for rtc write 2022-07-20 18:52:02 +00:00
cinap_lenrek
951ab17262 imx8: add simple i2c rtc driver for NXP PCF8523
datasheet:

http://nxp.com/docs/en/data-sheet/PCF8523.pdf
2022-07-20 18:49:28 +00:00
Ori Bernstein
dd8a2d3964 git/log: only count the messages we show when limiting counts
when logging with `git/log -c count', we would count all messages
that we inspected, rather than just the ones that got printed.
This isn't what we should have done.

While we're in here, refactor show() to only show the message,
rather than filtering and then showing.
2022-07-19 03:56:00 +00:00
cinap_lenrek
d1acc58316 kernel: consistently add devbridge and netdevmedium to kernel configs 2022-07-18 17:19:57 +00:00
glenda
d4eb08a860 /sys/games/lib/fortunes: Use a client written in Go? -- Skip Tavakkolian 2022-07-17 22:28:44 +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
Sigrid Solveig Haflínudóttir
1c585c2cc2 sam(1): clarify "<rio>" works on dot just like "look" 2022-07-14 21:12:37 +00:00
Sigrid Solveig Haflínudóttir
ce2ad9701d imx8: gic: irqenable → intrenable 2022-07-14 01:06:52 +00:00
Ori Bernstein
8f1954c0dd upas/Mail: check if plumb attrs are nil 2022-07-13 21:01:11 +00:00
Sigrid Solveig Haflínudóttir
62a4e64d31 imx8: fix reduced lcdif pix clk workaround by enabling underflow recovery 2022-07-12 16:38:41 +00:00
rodri
76f8d642ee ktrans(1): added a history section (thanks moody!) 2022-07-11 20:24:24 +00:00
cinap_lenrek
845f8d12e4 /sys/lib/dist/mkfile: create a default plan9.ini for reform image 2022-07-10 16:50:07 +00:00
cinap_lenrek
65bd53b9b8 imx8: load a plan9.ini at CONFADDR 0x40010000 2022-07-10 16:40:36 +00:00
Jacob Moody
cd64b7129c auth/box: -s, -. flags
-. 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.
2022-07-10 13:13:03 +00:00
cinap_lenrek
34dab15f40 imx8: reset lcdif and sn65sdi86 bridge before init 2022-07-10 13:03:55 +00:00
rodri
739e15c178 ktrans(1): documented $jisho and made some improvements. (thanks to Kenji Okamoto, cinap, BurnZez, romi and Aaron for your work on ktrans!) 2022-07-10 12:54:09 +00:00
cinap_lenrek
fe14f67c92 imx8: get mac address from OTP rom 2022-07-10 12:02:00 +00:00
cinap_lenrek
fdd3e1808f imx8: cleanup mem.h 2022-07-10 11:42:03 +00:00
cinap_lenrek
32183b1abf imx8: implement /dev/reboot support 2022-07-10 11:35:58 +00:00
cinap_lenrek
414cefcb0b imx8: fix fracpll code, enable 1.4Ghz turbo for arm 2022-07-09 21:12:20 +00:00
cinap_lenrek
90f47fadf8 imx8: detect cpu lcycles() frequency 2022-07-09 16:06:42 +00:00
cinap_lenrek
2b89cdee02 imx8: set virtual timer offset to zero for all cores
we want CNTVCT_EL0 to be the same on all cores,
so we set the offset the same so it effectively
becomes the system counter.
2022-07-09 15:15:55 +00:00
cinap_lenrek
29a6cbf7ee imx8: turn backlight off when blanking 2022-07-09 14:13:07 +00:00
Jacob Moody
c539d64d22 man: turn on troff -mnihongo if JP font is used
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.
2022-07-09 03:43:33 +00:00
rodri
566c512106 add ktrans. こんにちは! 2022-07-06 20:19:14 +00:00
Sigrid Solveig Haflínudóttir
6972974f8d imx8: ccm: fix sai copy-paste typos 2022-07-04 23:51:56 +00:00
cinap_lenrek
c5cf9b3e26 imx8: qos magic to avoid interference between pcie and lcdif
when writing to the nvme ssd, the screen can glitch out.

found this in linux lcdif driver (mxcfb) that appears to
resolve the issue.

the QoSc registers are all completely undocumented tho :-(
2022-07-03 16:13:19 +00:00
cinap_lenrek
940e3165d3 imx8: less stupid pci interrupt handler 2022-07-03 12:10:27 +00:00
cinap_lenrek
548a48d156 imx8: pcie and nvme support 2022-07-03 11:36:50 +00:00
cinap_lenrek
e39d924907 sdnvme: add dmaflush() instructions, move to port/ 2022-07-03 11:35:20 +00:00
Ori Bernstein
c2c397422f git/log: fix log count
saved wrong version when rebasing, oops.
2022-07-03 06:42:17 +00:00
Ori Bernstein
126cc163e2 git/compat: expand to cover go bootstrap
go bootstrap uses more of git than we supported, so
stub in enough that we can bootstrap go.
2022-07-03 04:25:08 +00:00
Ori Bernstein
21aac62c1f git/log: support -n option to restrict log counts
this is useful for scripting, and convenient for
interactive use.
2022-07-03 04:38:13 +00:00
Ori Bernstein
d457233c70 patch: handle stripped/empty lines mid-hunk
Some programs will strip trailing spaces from hunks;
in this case we want to treat the line as though it
came with a leading space.

This fixes applying some patches, such as

	[PATCH] Permissions for child boards in /srv
2022-07-02 20:13:31 +00:00