Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: jeff angielski <jeff@theptrgroup.com>
To: buildroot@busybox.net
Subject: [Buildroot] mksquashfs for big endian
Date: Tue, 03 Feb 2009 21:49:55 -0500	[thread overview]
Message-ID: <1233715795.17973.14.camel@penguin> (raw)


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

             reply	other threads:[~2009-02-04  2:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04  2:49 jeff angielski [this message]
2009-02-04  7:46 ` [Buildroot] mksquashfs for big endian Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233715795.17973.14.camel@penguin \
    --to=jeff@theptrgroup.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox