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; 8+ 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] 8+ messages in thread

* Re: [9front] NVRAM access on Raspi
  2020-08-10 18:14 NVRAM access on Raspi 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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 15:47       ` Pi 4 CPU server problems (Was Re: [9front] NVRAM access on Raspi) Ramakrishnan Muthukrishnan
  2020-08-15 16:45       ` [9front] NVRAM access on Raspi ori
  0 siblings, 2 replies; 8+ 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] 8+ messages in thread

* Pi 4 CPU server problems (Was Re: [9front] NVRAM access on Raspi)
  2020-08-15 15:08     ` Ramakrishnan Muthukrishnan
@ 2020-08-15 15:47       ` Ramakrishnan Muthukrishnan
  2020-08-15 19:18         ` Eckard Brauer
  2020-08-15 16:45       ` [9front] NVRAM access on Raspi ori
  1 sibling, 1 reply; 8+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2020-08-15 15:47 UTC (permalink / raw)
  To: 9front

On Sat, Aug 15, 2020, at 8:38 PM, Ramakrishnan Muthukrishnan wrote:
>
> 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? 

Answering my own query. It looks like on Pi kernels with 9front, plan9.ini does not seem to have any effect. I had to add nvram=#S/sdM0/nvram and service=cpu in the 9fat cmdline.txt file. auth/wrkey did work after that. (I could have just done nvram=/dev/sdM0/nvram as that would create the entry in /env, but took a while to sink in that environment variables are also files and I could just create one on the terminal..)

However, after a reboot, I am dropped into a shell:

cirno#

I can't seem to start rio ("rio -i riostart" says:

rio: can't open display: initdisplay: /dev/draw/new: '/dev/draw' file does not exist.

Indeed, that file does not exist. But I can drawterm into it (via drawterm compiled from 9front website): drawterm -h <ip address of pi> -u glenda

On the terminals, it shows:

aux/kbdfs: warning: can't open /dev/mousein: '/dev/mousein' './dev/mousein' file does not exist
tee: cannot open /dev/eia0: '/dev/eia0' mounted directory forbids creation

I wonder what this is saying. The mouse seem to work and I don't know what the eia device is.

Cheers
-- 
  Ramakrishnan


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

* Re: [9front] NVRAM access on Raspi
  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 16:45       ` ori
  1 sibling, 0 replies; 8+ 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] 8+ messages in thread

* Re: Pi 4 CPU server problems (Was Re: [9front] NVRAM access on Raspi)
  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
  0 siblings, 0 replies; 8+ messages in thread
From: Eckard Brauer @ 2020-08-15 19:18 UTC (permalink / raw)
  To: 9front

Am Sat, 15 Aug 2020 21:17:59 +0530
schrieb "Ramakrishnan Muthukrishnan" <ram@rkrishnan.org>:

> It looks like on Pi kernels with 9front,
> plan9.ini does not seem to have any effect. I had to add
> nvram=#S/sdM0/nvram and service=cpu in the 9fat cmdline.txt file.
> auth/wrkey did work after that. (I could have just done
> nvram=/dev/sdM0/nvram as that would create the entry in /env, but
> took a while to sink in that environment variables are also files and
> I could just create one on the terminal..)
>
> However, after a reboot, I am dropped into a shell:
>
> cirno#
>
> I can't seem to start rio ("rio -i riostart" says:
>
> rio: can't open display: initdisplay: /dev/draw/new: '/dev/draw' file
> does not exist.
>
> Indeed, that file does not exist. But I can drawterm into it (via
> drawterm compiled from 9front website): drawterm -h <ip address of
> pi> -u glenda
>
> On the terminals, it shows:
>
> aux/kbdfs: warning: can't open /dev/mousein: '/dev/mousein'
> './dev/mousein' file does not exist tee: cannot open /dev/eia0:
> '/dev/eia0' mounted directory forbids creation
>
> I wonder what this is saying. The mouse seem to work and I don't know
> what the eia device is.

That's the exact point where I'm left at the moment -- just didn't take
the time to investigate it further.

Best regards,
Eckard


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

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

Thread overview: 8+ 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

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