Big endian working?

Victor Kamensky victor.kamensky at
Tue Apr 8 21:46:05 PDT 2014

On 8 April 2014 20:44, Nicolas Pitre <nicolas.pitre at> wrote:
> On Tue, 8 Apr 2014, Arnd Bergmann wrote:
>> On Tuesday 08 April 2014 12:14:22 Taras Kondratiuk wrote:
>> > On 04/08/2014 10:54 AM, Thomas Petazzoni wrote:
>> > > Hello Taras,
>> > >
>> > > I'm currently trying to get ARM BE to work on Armada XP. I'm pretty
>> > > sure it used to work on 3.13, but now I'm testing 3.13 and 3.14 and it
>> > > doesn't boot here (it hangs even before "Uncompressing kernel...",
>> > > apparently while relocating the kernel image before decompression).
>> > >
>> > > Ben Dooks told me that the ARM BE kernel works for you. Can you confirm
>> > > which kernel version you're using, and if you've applied any patch?
>> > > Also, can you confirm which toolchain and toolchain version you're
>> > > using?
>> >
>> > Hi Tom
>> >
>> > To boot BE kernel from LE u-boot I'm using a few patches on top of
>> > upstream kernel.
>> >
>> > git:// arm-be-boot-le
>> >
>> > ----------------------------------------------------------------
>> > Ben Dooks (1):
>> >        ARM: add CPU_BE8_BOOT_LE configuration
>> >
>> > Nico Pitre (1):
>> >        ARM: ensure loader information in LE format for BE kernels
>> Sorry for lacking the history on this patch set, but why would
>> you ever want to have this as a compile-time conditional?
>> Did anyone really put a u-boot on shipping hardware that expects
>> the headers in big-endian format?
> If I remember correctly, those are for booting a BE kernel on hardware
> that initializes in LE mode and expects a LE kernel.  Since the zImage
> header values are defined to be words, those must be swapped so they
> read as LE even if the kernel is BE.  Of course the kernel is then
> responsible for switching the endian mode when entered.

My understanding is that CPU_BE8_BOOT_LE was needed only for
atags boot case. Since now practically nobody uses atags, but rather
fdt those patches were not pushed into main stream.

Please look at
git:// baserock/311-rc7/be/atags-v2

Thomas, does your Armada XP uboot still uses atags? I would think

I can confirm that in main line TC2 works in BE mode without any
changes. In linaro kernel tree we have Arandle and Pandaboard with
additional, drivers only changes, and they work OK. However I don't
think we are testing zImage, in all cases I use it, it is uImage.

Maybe Nico's zImage change was under atags umbrella by mistake and
it really addresses general zImage issue. In this case we need to add
this commit to main line. However, I don't think we need to carry
CPU_BE8_BOOT_LE option forward, why we just use
CONFIG_CPU_BIG_ENDIAN instead. Note in all cases when BE
image used loader is always in LE mode. Never seen case

As toolchain concerned any recent 4.7 and 4.8 should work. Note
toolchain should may not be configured as BE by default. LE toolchain
should compile BE kernel just fine.


> Nicolas
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at

More information about the linux-arm-kernel mailing list