Discussion:
[9fans] (no subject)
(too old to reply)
l***@proxima.alt.za
2013-04-30 15:56:36 UTC
Permalink
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
erik quanstrom
2013-04-30 17:11:43 UTC
Permalink
Post by l***@proxima.alt.za
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
David du Colombier
2013-04-30 18:13:09 UTC
Permalink
Post by l***@proxima.alt.za
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
l***@proxima.alt.za
2013-05-01 05:37:29 UTC
Permalink
Post by David du Colombier
However, if you don't want to spread your passwords over
your network, you would prefer to use the flash, simply
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
David du Colombier
2013-05-01 09:31:25 UTC
Permalink
Post by l***@proxima.alt.za
Post by David du Colombier
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.
Post by l***@proxima.alt.za
/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.
Post by l***@proxima.alt.za
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
Post by l***@proxima.alt.za
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
Loading...