9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] (no subject)
@ 2013-04-30 15:56 lucio
  2013-04-30 17:11 ` erik quanstrom
  2013-04-30 18:13 ` [9fans] Subject Sheevaplug and NVRAM David du Colombier
  0 siblings, 2 replies; 5+ messages in thread
From: lucio @ 2013-04-30 15:56 UTC (permalink / raw)
  To: 9fans

Subject Sheevaplug and NVRAM

Every time I start the Sheevaplug, I have to enter the authentication
details that ought to be written to VNRAM.  This seems unnecessary,
but my attempts to assign a single block of flash to NVRAM have so far
been unsuccessful.

Could somebody mail me an example of a successful allocation of flash
memory for Plan 9 use on a Sheevaplug so I can figure out what I am
doing wrong?

++L




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

* Re: [9fans] (no subject)
  2013-04-30 15:56 [9fans] (no subject) lucio
@ 2013-04-30 17:11 ` erik quanstrom
  2013-04-30 18:13 ` [9fans] Subject Sheevaplug and NVRAM David du Colombier
  1 sibling, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2013-04-30 17:11 UTC (permalink / raw)
  To: 9fans

On Tue Apr 30 11:57:34 EDT 2013, lucio@proxima.alt.za wrote:
> Subject Sheevaplug and NVRAM
>
> Every time I start the Sheevaplug, I have to enter the authentication
> details that ought to be written to VNRAM.  This seems unnecessary,
> but my attempts to assign a single block of flash to NVRAM have so far
> been unsuccessful.

the key for me was to add a partition for the flash to the plan9.ini, e.g.

flash0part=nvram 0x100000 0x120000/plan9.ini 0x120000 0x140000/kernel 0x140000 0x4c0000

- erik



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

* Re: [9fans] Subject Sheevaplug and NVRAM
  2013-04-30 15:56 [9fans] (no subject) lucio
  2013-04-30 17:11 ` erik quanstrom
@ 2013-04-30 18:13 ` David du Colombier
  2013-05-01  5:37   ` lucio
  1 sibling, 1 reply; 5+ messages in thread
From: David du Colombier @ 2013-04-30 18:13 UTC (permalink / raw)
  To: 9fans

> Could somebody mail me an example of a successful allocation of flash
> memory for Plan 9 use on a Sheevaplug so I can figure out what I am
> doing wrong?

In you case, you may simply include the nvram in your kernel by
adding the "nvram" file to the bootdir section of your kernel
configuration and adding "nvram=/boot/nvram" to your plan9.ini.

However, if you don't want to spread your passwords over
your network, you would prefer to use the flash, simply
by adding, for example, the following to your /cfg/*/cpurc:

echo add nvram 0x100000 0x120000 >'#'F/flashctl

See flash(3) for a description of devflash.

--
David du Colombier



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

* Re: [9fans] Subject Sheevaplug and NVRAM
  2013-04-30 18:13 ` [9fans] Subject Sheevaplug and NVRAM David du Colombier
@ 2013-05-01  5:37   ` lucio
  2013-05-01  9:31     ` David du Colombier
  0 siblings, 1 reply; 5+ messages in thread
From: lucio @ 2013-05-01  5:37 UTC (permalink / raw)
  To: 9fans

> However, if you don't want to spread your passwords over
> your network, you would prefer to use the flash, simply
> by adding, for example, the following to your /cfg/*/cpurc:
>
> echo add nvram 0x100000 0x120000 >'#'F/flashctl

That's too late for wrkey.

There's a lot about the Sheeva that doesn't make any sense to me:
/cfg/pxe/example-kw does not set the bootfile, nor does the
documentation state what loader should be specified as bootf in
/lib/ndb.

So I put the actual kernel name in /lib/ndb (/arm/9plug), which gets
loaded four times before actually activating.

But by then there is no suggestion of an nvram, no such entry exists
in /env.

I'm a little lost.

++L




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

* Re: [9fans] Subject Sheevaplug and NVRAM
  2013-05-01  5:37   ` lucio
@ 2013-05-01  9:31     ` David du Colombier
  0 siblings, 0 replies; 5+ messages in thread
From: David du Colombier @ 2013-05-01  9:31 UTC (permalink / raw)
  To: 9fans

> > echo add nvram 0x100000 0x120000 >'#'F/flashctl
>
> That's too late for wrkey.

If you look at /sys/src/libauthsrv/readnvram.c, you will
notice that on arm platforms, readnvram will try
to read the nvram from #F/flash/flash at address 0x100000.

The nvram flash partition is only useful as a convenience
if you want to read or write the nvram from Plan 9.

> There's a lot about the Sheeva that doesn't make any sense to me:
> /cfg/pxe/example-kw does not set the bootfile, nor does the
> documentation state what loader should be specified as bootf in
> /lib/ndb.

There is no need for a bootfile, since u-boot is able to
boot directly from the kernel.

> So I put the actual kernel name in /lib/ndb (/arm/9plug), which gets
> loaded four times before actually activating.

Yes, you have to use bootf=/arm/9plug in /lib/ndb/local.

The kernel is loaded four times, because the booting(8)
manual suggests the following bootcmd, with tree BOOTP
requests, probably to make sure you get the IP address
before trying to load the files:

bootp; bootp; tftp 0x1000 %C; bootp; tftp 0x800000; go 0x800000

Alternatively, you may want to set a static IP address
with the serverip and ipaddr environment variables and
use the following bootcmd:

tftp 0x1000 %C; tftp 0x800000 /arm/9plug; go 0x800000

> But by then there is no suggestion of an nvram, no
> such entry exists in /env.

There is no need for an nvram environment variable
in this case, readnvram already knows where to look
for the nvram.

--
David du Colombier



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

end of thread, other threads:[~2013-05-01  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 15:56 [9fans] (no subject) lucio
2013-04-30 17:11 ` erik quanstrom
2013-04-30 18:13 ` [9fans] Subject Sheevaplug and NVRAM David du Colombier
2013-05-01  5:37   ` lucio
2013-05-01  9:31     ` David du Colombier

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