9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] NVRAM access on Raspi
@ 2020-08-10 19:08 Romano
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

* Re: [9front] NVRAM access on Raspi
  2020-08-15 15:08     ` Ramakrishnan Muthukrishnan
@ 2020-08-15 16:45       ` ori
  0 siblings, 0 replies; 6+ messages in thread
From: ori @ 2020-08-15 16:45 UTC (permalink / raw)
  To: ram, 9front


> 9fs dos
> acme /n/dos/plan9.ini
> 
> and added:
> nvram=#S/sdM0/nvram
> 
> I did not understand the bit about nvme. 

I shouldn't have mentioned it -- it confused things.

What I meant is that I don't have a raspberry pi, but
that I needed to do the same for my CPU server, which
runs off of an nvme drive.



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

* Re: [9front] NVRAM access on Raspi
  2020-08-10 19:21   ` Eckard Brauer
@ 2020-08-15 15:08     ` Ramakrishnan Muthukrishnan
  2020-08-15 16:45       ` ori
  0 siblings, 1 reply; 6+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2020-08-15 15:08 UTC (permalink / raw)
  To: 9front

Hi Eckard.


> >
> > nvram=#S/sdM0/nvram in plan9.ini (or whatever the acutal
> > device is. You also need to do this with nvme.)
> >
> 
> Aah, ok, I was damned stuck on "You also need to do this..." - setting
> nvram=... for auth/wrkey seemed to work. Sorry for misunderstanding

I am trying to do exactly this on a Pi4. This is what I did.

I created a file plan9.ini in the dos partition.

9fs dos
acme /n/dos/plan9.ini

and added:
nvram=#S/sdM0/nvram

I did not understand the bit about nvme. What is the line you added for that? There is no nvme in /dev/sdM0. I rebooted and auth/wrkey is still complaining about nvram. There is no /env/nvram. How did you progress from this? 

Thanks
-- 
  Ramakrishnan


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

* Re: [9front] NVRAM access on Raspi
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Eckard Brauer @ 2020-08-10 19:21 UTC (permalink / raw)
  To: 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.)
>

Aah, ok, I was damned stuck on "You also need to do this..." - setting
nvram=... for auth/wrkey seemed to work. Sorry for misunderstanding

Eckard


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

* Re: [9front] NVRAM access on Raspi
  2020-08-10 18:19 ` [9front] " ori
@ 2020-08-10 18:55   ` Eckard Brauer
  2020-08-10 19:21   ` Eckard Brauer
  1 sibling, 0 replies; 6+ messages in thread
From: Eckard Brauer @ 2020-08-10 18:55 UTC (permalink / raw)
  To: 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.)
>

Thanks for the response.

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.

Eckard


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

* Re: [9front] NVRAM access on Raspi
  2020-08-10 18:14 Eckard Brauer
@ 2020-08-10 18:19 ` ori
  2020-08-10 18:55   ` Eckard Brauer
  2020-08-10 19:21   ` Eckard Brauer
  0 siblings, 2 replies; 6+ messages in thread
From: ori @ 2020-08-10 18:19 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

nvram=#S/sdM0/nvram in plan9.ini (or whatever the acutal
device is. You also need to do this with nvme.)



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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 19:08 [9front] NVRAM access on Raspi Romano
  -- strict thread matches above, loose matches on Subject: below --
2020-08-10 18:14 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 16:45       ` ori

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).