9front - general discussion about 9front
 help / color / mirror / Atom feed
* NVRAM access on Raspi
@ 2020-08-10 18:14 Eckard Brauer
  2020-08-10 18:19 ` [9front] " ori
  0 siblings, 1 reply; 9+ messages in thread
From: Eckard Brauer @ 2020-08-10 18:14 UTC (permalink / raw)
  To: 9front

Hello,

after I finally managed to get a Raspberry running some more than the
original install image, a few more problems arise.

When trying to auth/wrkey I only get an error that accessing the nvram
is to an unknown device. src auth/nvram shows me that only readnvram()
is called there, but the man page doesn't even mention arm systems, and
what's stated there seems to indicate that the correct location,
/dev/sdM0/nvram isn't even tried.

So is there a trick to work around that? Could I simply dd to the
device, if I knew the correct format (I still don't) or bind /dev/sdM0
to /dev/sdC0 or the like?

Another point: as I have an SD card larger than the decompressed SD
image, how is it possible to expand the HJFS (or at least be able to
use the rest as file system space)?

Thanks in advance && best regards
Eckard


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [9front] NVRAM access on Raspi
@ 2020-08-10 19:08 Romano
  0 siblings, 0 replies; 9+ messages in thread
From: Romano @ 2020-08-10 19:08 UTC (permalink / raw)
  To: eckard.brauer, 9front

> Am Mon, 10 Aug 2020 11:19:45 -0700 schrieb ori@eigenstate.org:
>> nvram=#S/sdM0/nvram in plan9.ini (or whatever the acutal
>> device is. You also need to do this with nvme.)
> Just tried that, seems not to work. Errors are unchanged.
> 
> Can I check it's taken from plan9.ini, as it also doesn't seem to like
> my -a tcp!*!564 and nobootprompt= lines?
> 
> lc '#S/sdM0' does show the nvram entry, but I don't trust that so far,
> as it also shows an 9fat entry, and even 9fs 9fat (taken from FQA to
> acceess plan9.ini) doesn't work. I have to do 9fs dos, maybe as only
> /dev/sdM0/fs and /dev/sdM0/dos are mentioned with a short name at boot
> (or in /dev/kmesg). But OTOH xd /dev/sdM0/nvram shows me a disk block
> of zeroed storage, so I'd expect the device entry to be correct.

For the rpi4, there's no default in /sys/src/libauthsrv/readnvram.c
for arm64.  Updating to have an arm64 default as /dev/sdM0/nvram
allows for the pi3 image downloaded from 9front to use that
autoamatically without having to set nvram=/dev/sdM0/nvram before
running auth/wrkey, or set it in cmdline.txt.

cmdline.txt is where the plan9.ini values are taken from, but it all
needs to be *on* *one* *line*:

	console=0 bootargs='/dev/sdM0/fs -A -a tcp!*!564' ...

Also, there's no default arm64 when creating a profile--there should
be.  Update /sys/lib/newuser to include that.

(I have the above in my notes and have been meaning to put out a patch to update readnvram.c and newuser, but haven't.)

Also note that if you're going to be running rio on the rpi4 as a cpu
server instead of drawterm'ing in, you might run into another problem.
 From time to time when running rio, I get this on /dev/kprint:

	rio: setname faled: unknown id for draw image'

which I tracked down to /sys/src/cmd/rio/wind.c.  But I don't know the
cause, and it makes the entire graphics messed up: a window seemingly
is maximized to take the entire screen, but it actually does not, and
the re-paint of the windows has to be done by moving the different
windows around.  I have to slay rio, and restart to get the graphics
"fixed".

I hope the above helps.  An rpi4 is my primary 9front device for now,
so that's where I'm writing this from.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-15 19:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 18:14 NVRAM access on Raspi Eckard Brauer
2020-08-10 18:19 ` [9front] " ori
2020-08-10 18:55   ` Eckard Brauer
2020-08-10 19:21   ` Eckard Brauer
2020-08-15 15:08     ` Ramakrishnan Muthukrishnan
2020-08-15 15:47       ` Pi 4 CPU server problems (Was Re: [9front] NVRAM access on Raspi) Ramakrishnan Muthukrishnan
2020-08-15 19:18         ` Eckard Brauer
2020-08-15 16:45       ` [9front] NVRAM access on Raspi ori
2020-08-10 19:08 Romano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).