There's an interaction between Linaro GCC or FSF GCC 4.7 and Linux
kernels before 3.2 which causes the kernel to halt straight after
showing 'Uncompressing Linux'.  The question comes up every couple of
months so I've blogged about it:
 http://seabright.co.nz/2012/06/11/kernel-not-booting-with-linaro-gcc/

"""
Is your ARM Linux kernel not booting when building with Linaro GCC or
FSF GCC 4.7? Does it halt shortly after showing ‘Uncompressing Linux’?
You may have run into an interaction between older kernels and the new
unaligned access support in GCC. This affects Linaro GCC from
4.6-2011.11 onwards, GCC from 4.7.0 on, and kernels earlier than 3.2
including the Galaxy Nexus Icecream Sandwich release.

The work-around is to add -mno-unaligned-access to KBUILD_CFLAGS in
the top level kernel Makefile or to backport
8428e84d42179c2a00f5f6450866e70d802d1d05 from the current kernel tree.

ARMv6K and later processors have hardware support for doing unaligned
loads and stores which is faster than the old byte-by-byte/recombine
that was done in software. Later versions of GCC use this to do
quicker loads when working on known unaligned data, such as when
working on a protocol buffer or a packed structure.

The CPU can be configured to trap on unaligned access. This trap is
off at reset, but pre 3.2 kernels turn this on during the initial
boot. An interaction between -fconserve-stack and -munaligned-access
on a char buffer lead to an unaligned access, which causes a trap,
which causes the kernel to halt.

This does not affect userspace programs as they run with the trap turned off.
"""

-- Michael

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to