* [Buildroot] mksquashfs for big endian
@ 2009-02-04 2:49 jeff angielski
2009-02-04 7:46 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: jeff angielski @ 2009-02-04 2:49 UTC (permalink / raw)
To: buildroot
Has anybody been able to get a big endian squashfs filesystem built on a
x86 host (little endian) to run on a powerpc target (big endian)?
When I build the rootfs as big endian, the kernel always fails when it
tries to find the magic number because the bytes are swapped incorrectly
in flash.
If you look in super.c for the squashfs driver in the kernel, it would
seem that Linux always assumes the rootfs is little endian.
sb->s_magic = le32_to_cpu(sblk->s_magic);
if (sb->s_magic != SQUASHFS_MAGIC) {\
<fail>
}
How can this ever work?
I recall seeing patches proposed for supporting big endian but alas,
they do not appear to have been accepted.
I was just looking for a sanity check to see if somebody else has it
working.
BTW, I am using the DENX 2.6 kernel.
TIA,
--
Jeff Angielski
The PTR Group
www.theptrgroup.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] mksquashfs for big endian
2009-02-04 2:49 [Buildroot] mksquashfs for big endian jeff angielski
@ 2009-02-04 7:46 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2009-02-04 7:46 UTC (permalink / raw)
To: buildroot
>>>>> "jeff" == jeff angielski <jeff@theptrgroup.com> writes:
Hi,
jeff> Has anybody been able to get a big endian squashfs filesystem built on a
jeff> x86 host (little endian) to run on a powerpc target (big endian)?
Yes, several times a week ;)
jeff> When I build the rootfs as big endian, the kernel always fails when it
jeff> tries to find the magic number because the bytes are swapped incorrectly
jeff> in flash.
jeff> If you look in super.c for the squashfs driver in the kernel, it would
jeff> seem that Linux always assumes the rootfs is little endian.
sb-> s_magic = le32_to_cpu(sblk->s_magic);
jeff> if (sb->s_magic != SQUASHFS_MAGIC) {\
jeff> <fail>
jeff> }
jeff> How can this ever work?
jeff> I recall seeing patches proposed for supporting big endian but alas,
jeff> they do not appear to have been accepted.
To buildroot?
jeff> I was just looking for a sanity check to see if somebody else has it
jeff> working.
jeff> BTW, I am using the DENX 2.6 kernel.
I think you are getting confused about the different squashfs versions
in existence. The squashfs version supported in BR is 3.4 (the latest
released version), which supports big AND little endian file
systems. The thing that got merged into the mainline kernel after
2.6.28 is squashfs 4, which is a different filesystem format and
purely little endian. You'll need an updated mksquashfs to create a
version 4 filesystem, but that's sadly not released yet (available in
cvs though).
I'll add v4 support to BR when there's a new mksquashfs release
supporting it, until then I suggest you stay with 2.6.28.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-04 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 2:49 [Buildroot] mksquashfs for big endian jeff angielski
2009-02-04 7:46 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox