On Fri, 2005-04-22 at 18:41 +0200, Michael Schmitz wrote: > > Hi, > > > > Here is the output of lsprop /proc/device-tree > > ---------------------------------------------------- > > name "device-tree" > > model "Power Macintosh" > > compatible "AAPL,e407" > > "MacRISC" > > > > /proc/device-tree/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]: > > name "nvram" > > device_type "nvram" > > reg 00060000 00020000 > > existing 00000000 00002000 > > linux,phandle ff8376c0 > > That's more or less what I have ... the nvram hangs off mac-io or ohare on > the oldworld macs. On newworld macs it appears as a node in the device > tree directly. > > > and the output of the modified nvsetvol : > > -------------------------------------------------------------- > > mac:~# ./nvsetvol > > offset 3839 rc 16 buf.sig 0 buf.len 237 buf.name >Šboot /AAP< > > offset: 7631 1dcf > > no PRAM found: Success > > > > mac:~# ./nvsetvol 4 > > offset 3839 rc 16 buf.sig 0 buf.len 237 buf.name >Šboot /AAP< > > offset: 7631 1dcf > > no PRAM found: Success > > -------------------------------------------------------------- > > BenH: the above debug output prints some of the fields of the nvram header > struct: > > typedef struct { > unsigned char sig; > unsigned char cksum; > unsigned short len; > char name[12]; > } header; > > which, on oldworld, doesn't seem to work at all. Hence, the search for a > header holding the string "APL,MacOS75" fails. On my Powerbook, the output > is: > > offset 0 rc 16 buf.sig 90 buf.len 2 buf.name >nvram< > offset 32 rc 16 buf.sig 95 buf.len 62 buf.name >system< > offset 1024 rc 16 buf.sig 112 buf.len 193 buf.name >common< > offset 4112 rc 16 buf.sig 160 buf.len 82 buf.name >APL,MacOS75< > PRAM found at offset: 4112 1010 > > How is the startup volume encoded in the oldworld nvram?
Hrm.. I don't remember at the top of my head, have you tried using the ioctl to request the kernel to tell you where the pram here ? on old world, the startup volume can either be the OF boot device, which is a normal OF partition (nvsetenv works on oldworld afaik), or you can try to encode the "MacOS" boot volume but that's a very complicated story... Ben.