1 Oct 2001 09:00
Re: mkimage fails in ppcboot-1.0.2
Wolfgang Denk <wd <at> denx.de>
2001-10-01 07:00:20 GMT
2001-10-01 07:00:20 GMT
Hi, in message <3BB0D93B.EDCEC477 <at> emc.com> you wrote: > > mkimage works fine on i386/redhat. > even a mkimage compiled on an i386/mandrake works on i386/redhat. > But mkimage failed to put "magic number" in image header on these 2 > machines, > one G4/debian, one i386/mandrake. The dump you included below shows that not only the magic number, but the whole image header was not written. > linux%od -h vmlinux.binary | more > 0000000 0000 0000 0000 0000 0000 0000 0000 0000 > * > 0000100 6000 0000 6000 0000 6000 0000 7c7f 1b78 > > Anybody reported this before ? Yes, this was a problem in older versions of "mkimage", but only when the output file was on a NFS mounted filesystem. The problem was fixed in March, and all PPCBoot versions starting with 0.9.3-pre0 and later work fine. Your subject mentions PPCBoot 1.0.2 - please make sure that you don't have an old version of "mkimage" somewhere in your PATH. Hope this helps,(Continue reading)
enhanced the environment saving
code somewhat, we could invalidate an old environment and append a new
environment to where the old environment was, we could store a whole
lot of changes before having to erase the sector and start over.
My thought is to have the environment storage start at a fixed place,
as it is now, and have one additional variable in the environment
structure: a "next environment" pointer. If the "next environment"
pointer is 0xFFFFFFFF, then this is the active environment. If it is
not 0xFFFFFFFF, it is a pointer to the next environment so you would
have to dereference it and repeat the process.
Since the "next" pointer is 0xFFFFFFFF in the active environment, and
thus is still writable, you can find the end of the current
environment, write the new (changed) environment at the end of the
current environment, and then change the 0xFFFFFFFF to point to the new
one.
typedef struct environment_s {
env_t next; /* Next env area if not
0xFFFFFFFF */
ulong crc; /* CRC32 over data
bytes */
uchar data[ENV_SIZE];
} env_t;
RSS Feed