James Gray wrote:

> $ file ~/Desktop/fvs338-test.img
> ~/Desktop/fvs338-test.img: Linux Compressed ROM File System data, big endian 
> size 7278592 version #2 sorted_dirs CRC 0xd2f82710, edition 0, 3177 blocks, 
> 314 files

Yep, ARM has both big and little endian variants, but for a networking
device it makes sense to do things in big endian (network) byte ofer.

> GREAT! Except my system (Pentium-class Centrino lappy) knows not of "big 
> endian" and refuses to mount the image.

Hardly surprising.

>  Anyone know how (if) it is possible 
> to do the byte-reordering??  I guess I could hack some "C" and flip all the 
> bits, one byte at a time,

Careful!

When comparing big endian to little endian, the bits within the byte 
are always correct. What changes is the order of the bytes in 16 bit
and larger numbers. For instance, the 16 bit (2 byte) number 0x1234
would be stored as a 0x12 byte followed by a 0x34 byte on big endian
systems and as 0x34 followed by 0x12 on a little endian system.

Being able to do big endian to little endian conversion relies on
knowing beforehand whether the value you are looking at is a 16, 24
(used in some file systems I believe), 32 or larger bit number.


Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
Saying Python is easier than C++ is like saying that turning a 
light  switch on or off is easier than operating a nuclear reactor.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to