If you want to try debugging it without my help,
a) See http://wiki.laptop.org/go/Forth_Lesson_15 to learn about the Forth debugger
b) Inspect the definition of init-nvram-buffer in ofw/confvar/nvcache.fth to see what it does
c) use ok debugging init-nvram-buffer to step through that definition and find out where it is going wrong
d) cpu/x86/pc/biosload/filenv.fth contains the methods that are used to read and write to the nvram.dat file . You can debug one of those methods with, for example: ok dev /file-nvram debug write Then perform the action (e.g. setenv ...) that would trigger that method.
On 1/6/2011 4:36 AM, Christian Johansson wrote:
Hmmm ... I changed cpu/x86/pc/emu/build/devices.fth from c:\nvram.dat to a: \nvram.dat and now the file is red without errors. (used the nvram.dat from floppyof.img)
When I setenv some variable it is written to the file, but it changes the size of the file from 4k to 1k. All the nice padding at the end of the file is missing. And upon subsequent boots; the error-messages about the "configuration memory is invalid" has returned. (The variable is set thou ...). Should I flush the file, somehow, after it is updated with setenv?
//Br Christian
On Tue, 2011-01-04 at 23:57 +0100, Christian Johansson wrote:
Hi, I tried to enable the 'pseudo-nvram' by enable the 'create pseudo-nvram' in /cpu/x86/pc/emu/config.fth.
But after attaching floppyof.img (from http://www.firmworks.com/linux/ ), i get this on init:
<snip> Pseudo-NVRAM Can't read the configuration memory The configuration memory is invalid. Using default values. <snip>
If I type 'dir a:', I get the reply: fat-file-system --A-rwxrwxrwx 4096 2010-12-30 16:32:24 NVRAM.DAT
And if I type: setenv auto-boot? true I get: Failed to transfer any blocks seek failed in translate-params Failed to transfer any blocks Flushbuf error auto-boot? = true
'.partition a' doesn't give any reply, besides the header.
Is there another option that will have to be enabled or what have I done wrong?
//Br Christian
openfirmware mailing list openfirmware@openfirmware.info https://openfirmware.info/mailman/listinfo/openfirmware