logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.

kernel 2.6.37, alignment exception at boot

posted in Uncategorized
Wednesday, January 25 2012, 11:14 PM
0
Hi, I cross-compiled the 2.6.37 (igep) kernel with the CodeSourcery toolchain (2011.03-41). When I try booting the kernel image from SD card, it hangs. Enabling earlyprintk shows an alignment exception error (see below). Any pointers to what is going on would be much appreciated. Best Regards, Ute IGEP-X-Loader 2.3.0-1 (Jan 12 2012 - 20:08:18) XLoader: Processor DM3730 - ES1.2 XLoader: IGEPv2 : kernel boot ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Linux version 2.6.37+ (me@mypc) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41) ) #3 Wed Jan 25 21:26:32 GMT 2012 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f [ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: IGEP0020 board [ 0.000000] bootconsole [earlycon0] enabled [ 0.000000] Reserving 41943040 bytes SDRAM for VRAM [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk ) [ 0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000 [ 0.000000] Unhandled fault: alignment exception (0x001) at 0xc051cf4e [ 0.000000] Internal error: : 1 [#1] [ 0.000000] last sysfs file: [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 Not tainted (2.6.37+ #3) [ 0.000000] PC is at pcpu_dump_alloc_info+0xc/0x200 [ 0.000000] LR is at pcpu_setup_first_chunk+0x36c/0x6d0 [ 0.000000] pc : [] lr : [] psr: 000001d3 [ 0.000000] sp : c05bbf48 ip : 00000001 fp : 00000001 [ 0.000000] r10: c0a4a000 r9 : c0a4a0c0 r8 : c0a4a080 [ 0.000000] r7 : c0623e40 r6 : c0a42000 r5 : 00008000 r4 : c0a40280 [ 0.000000] r3 : c051cf4e r2 : 00000001 r1 : c0a40280 r0 : c051d212 [ 0.000000] Flags: nzcv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel [ 0.000000] Control: 10c5387f Table: 80004019 DAC: 00000017 [ 0.000000] Process swapper (pid: 0, stack limit = 0xc05ba2f0) [ 0.000000] Stack: (0xc05bbf48 to 0xc05bc000) [ 0.000000] bf40: 00000000 00000000 00000004 00000000 00000040 00000000 [ 0.000000] bf60: 00000000 c0018280 00000000 00000040 bfffffff 00000004 00008000 c0a40280 [ 0.000000] bf80: 00008000 c0a42000 c0623e40 c0a4a080 c0a4a0c0 c0a4a000 00000001 c00195bc [ 0.000000] bfa0: c0a40280 c0a4a040 00000000 c0a40280 c00307d8 c0a40180 c05be0ac 8002ed5c [ 0.000000] bfc0: 413fc082 0000001f 00000000 c001998c c05fd280 c000898c 10c53c7f 00000928 [ 0.000000] bfe0: 80000100 c00307d8 10c53c7d c05fd434 c00307d4 80008034 00000000 00000000 [ 0.000000] [] (pcpu_dump_alloc_info+0xc/0x200) from [] (pcpu_setup_first_chunk+0x36c/0x6d0) [ 0.000000] [] (pcpu_setup_first_chunk+0x36c/0x6d0) from [] (setup_per_cpu_areas+0x6c/0x84) [ 0.000000] [] (setup_per_cpu_areas+0x6c/0x84) from [] (start_kernel+0xb4/0x29c) [ 0.000000] [] (start_kernel+0xb4/0x29c) from [<80008034>] (0x80008034) [ 0.000000] Code: c051cef5 e59f31d8 e92d4ff0 e24dd034 (e5932000)
Responses (2)
  • Accepted Answer

    Thursday, January 26 2012, 09:50 AM - #permalink
    0
    There is a known issue with version of CodeSourcery 2011.03-41 for ARM GNU/Linux with alignment optimisation. From CodeSourcery Getting Started Guide page 38: Unaligned access support. The compiler now generates more efficient code for accessing packed data structures and for copying small blocks of unaligned data when targeting architectures that permit unaligned word/halfword accesses. This feature can be controlled by the -munaligned-access and -mno-unaligned-access options, and is enabled by default for ARMv6 processors and above, except for ARMv6-M. So, as a workaround you can compile kernel with additional EXTRA_CFLAGS=-mno-unaligned-access parameter, for example: [code] make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm EXTRA_CFLAGS=-mno-unaligned-access uImage [/code] More details at: [url=http://blog.galemin.com/tag/codesourcery/]http://blog.galemin.com/tag/codesourcery/[/url]
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 26 2012, 11:01 PM - #permalink
    0
    Hi, Thanks for the quick reply. Looks like I should have done the obvious, RTFM... Anyway, I tried EXTRA_CFLAGS=-mno-unaligned-access, unfortunately I got a compile error: In file included from drivers/media/common/tuners/tuner-xc2028.c:21:0: drivers/media/common/tuners/tuner-xc2028.h:10:26: fatal error: dvb_frontend.h: No such file or directory compilation terminated. make[4]: *** [drivers/media/common/tuners/tuner-xc2028.o] Error 1 make[3]: *** [drivers/media/common/tuners] Error 2 make[2]: *** [drivers/media/common] Error 2 make[1]: *** [drivers/media] Error 2 make: *** [drivers] Error 2 I\\\'m not too worried about it at this stage because the next thing I tried was switching off ALIGNMENT_TRAP as suggested in the blog you pointed me to. The kernel compiled and booted beautifully! The blog warned that this workaround could cause \\\'unpredictable behavior in some network protocols\\\'. I guess I will soon find out what that means. Thank you very much for helping me get one step further. Best Regards, Ute
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat