This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: mk_romfs fix for 64bit architectures
>>>>> "Andrew" == Andrew Lunn <andrew@lunn.ch> writes:
Andrew> Hi Peter
Andrew> Please could you test this...
Certainly..
// define SHORT to be a two byte unsigned integer on the host
-#define SHORT unsigned short
+#define SHORT uint8_t
This should ofcause be uint16_t. With that change it generates
bit-identical romfs images with the old version, except for some of
the undefined padding bytes, E.G.:
romfs_disk header;
int wnodes;
outputlong( (char*) &header.magic, ROMFS_MAGIC );
outputlong( (char*) &header.nodecount, nodes );
outputlong( (char*) &header.disksize, coffset );
outputlong( (char*) &header.dev_id, 0x01020304 );
strcpy( header.name, "ROMFS v1.0" );
Where header.name is 32 bytes big.
--
Bye, Peter Korsgaard