Hi,
I use pre-built version of linaro toolchain (got from http://people.linaro.org/~michaelh/incoming/binaries/) to build a uImage. The build succeeded, but the uImage couldn't start. The console hangs at:
Using FEC0 device TFTP from server 10.193.100.158; our IP address is 10.193.102.233 Filename 'uImage_linaro'. Load address: 0x70800000 Loading: ################################################################# ################################################################# ################################################################# ####################### done Bytes transferred = 3193292 (30b9cc hex) ## Booting kernel from Legacy Image at 70800000 ... Image Name: Linux-2.6.38-01026-gc9c8ead Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3193228 Bytes = 3 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Does anyone meet this before?
How can I fix it?
Thanks~~
Yours Terry
On 01/10/2012 04:58 AM, Lv Terry-R65388 wrote:
Hi,
I use pre-built version of linaro toolchain (got from http://people.linaro.org/~michaelh/incoming/binaries/) to build a uImage. The build succeeded, but the uImage couldn't start. The console hangs at:
Using FEC0 device TFTP from server 10.193.100.158; our IP address is 10.193.102.233 Filename 'uImage_linaro'. Load address: 0x70800000 Loading: ################################################################# ################################################################# ################################################################# ####################### done Bytes transferred = 3193292 (30b9cc hex) ## Booting kernel from Legacy Image at 70800000 ... Image Name: Linux-2.6.38-01026-gc9c8ead Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3193228 Bytes = 3 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Does anyone meet this before?
How can I fix it?
Thanks~~
Its hard to say without more details like where you got your kernel, what config you built with, and what platform you are running on. However, the two most common errors I've encountered when people see the message you pasted are:
1) you don't have your "console" variable set properly in u-boot. For example, my OMAP devices default to "console=ttyS2,115200n8". However, it needs to be "console=ttyO2,115200n8"
2) you built your kernel with/without device tree and u-boot is launching your kernel without/with device tree.
-andy
Hi Andy,
Really sorry for that.
Actually, I'm doing a bench marking with gcc-linaro toolchain with our old toolchain. The kernel version is 2.6.38, our board is CortexA9 and we're using armv7 option for building. With the old toolchain, which is based on gcc 4.4.4, glibc 2.11 and multilib 1.0 supported, we can start the kernel normally. But when using the new toolchain, I find that kernel can't start and hang there.
That's why I didn't think it as a problem of u-boot and console.
I'll try Michael's suggestion first and give the result later.
If you have some other suggestions, that's really thankful.
Thanks~~
Yours Terry
-----Original Message----- From: Andy Doan [mailto:andy.doan@linaro.org] Sent: 2012年1月11日 0:00 To: Lv Terry-R65388 Cc: linaro-toolchain@lists.linaro.org Subject: Re: uImage built with pre-built linaro toolchain failed to start
On 01/10/2012 04:58 AM, Lv Terry-R65388 wrote:
Hi,
I use pre-built version of linaro toolchain (got from http://people.linaro.org/~michaelh/incoming/binaries/) to build a uImage. The build succeeded, but the uImage couldn't start. The console hangs at:
Using FEC0 device TFTP from server 10.193.100.158; our IP address is 10.193.102.233 Filename 'uImage_linaro'. Load address: 0x70800000 Loading: ################################################################# ################################################################# ################################################################# ####################### done Bytes transferred = 3193292 (30b9cc hex) ## Booting kernel from Legacy Image at 70800000 ... Image Name: Linux-2.6.38-01026-gc9c8ead Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3193228 Bytes = 3 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Does anyone meet this before?
How can I fix it?
Thanks~~
Its hard to say without more details like where you got your kernel, what config you built with, and what platform you are running on. However, the two most common errors I've encountered when people see the message you pasted are:
1) you don't have your "console" variable set properly in u-boot. For example, my OMAP devices default to "console=ttyS2,115200n8". However, it needs to be "console=ttyO2,115200n8"
2) you built your kernel with/without device tree and u-boot is launching your kernel without/with device tree.
-andy
On Tue, Jan 10, 2012 at 11:58 PM, Lv Terry-R65388 r65388@freescale.com wrote:
Hi,
I use pre-built version of linaro toolchain (got from http://people.linaro.org/~michaelh/incoming/binaries/) to build a uImage. The build succeeded, but the uImage couldn't start. The console hangs at:
Using FEC0 device TFTP from server 10.193.100.158; our IP address is 10.193.102.233 Filename 'uImage_linaro'. Load address: 0x70800000 Loading: ################################################################# ################################################################# ################################################################# ####################### done Bytes transferred = 3193292 (30b9cc hex) ## Booting kernel from Legacy Image at 70800000 ... Image Name: Linux-2.6.38-01026-gc9c8ead Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3193228 Bytes = 3 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Does anyone meet this before?
How can I fix it?
Thanks~~
Hi Terry. Andy's covered the most likely causes. One thing to watch for is that Linaro GCC 2011.11 added unaligned access support for armv6k and later. This is fine for userspace but the kernel runs with the hardware unaligned access fault turned and this might cause the crash.
Try adding -mno-unaligned-access to your CFLAGS and see if that helps. See: http://lists.linaro.org/pipermail/linaro-android/2011-December/000030.html
and: http://comments.gmane.org/gmane.linux.ports.arm.kernel/138900
for more.
-- Michael
Hi Michael,
By adding -mno-unaligned-access, kernel can start now.
I've another question, Does this option have some impact on performance?
Thanks~~
Yours Terry
-----Original Message----- From: Michael Hope [mailto:michael.hope@linaro.org] Sent: 2012年1月11日 9:16 To: Lv Terry-R65388 Cc: linaro-toolchain@lists.linaro.org Subject: Re: uImage built with pre-built linaro toolchain failed to start
On Tue, Jan 10, 2012 at 11:58 PM, Lv Terry-R65388 r65388@freescale.com wrote:
Hi,
I use pre-built version of linaro toolchain (got from http://people.linaro.org/~michaelh/incoming/binaries/) to build a uImage. The build succeeded, but the uImage couldn't start. The console hangs at:
Using FEC0 device TFTP from server 10.193.100.158; our IP address is 10.193.102.233 Filename 'uImage_linaro'. Load address: 0x70800000 Loading: ################################################################# ################################################################# ################################################################# ####################### done Bytes transferred = 3193292 (30b9cc hex) ## Booting kernel from Legacy Image at 70800000 ... Image Name: Linux-2.6.38-01026-gc9c8ead Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3193228 Bytes = 3 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Does anyone meet this before?
How can I fix it?
Thanks~~
Hi Terry. Andy's covered the most likely causes. One thing to watch for is that Linaro GCC 2011.11 added unaligned access support for armv6k and later. This is fine for userspace but the kernel runs with the hardware unaligned access fault turned and this might cause the crash.
Try adding -mno-unaligned-access to your CFLAGS and see if that helps. See: http://lists.linaro.org/pipermail/linaro-android/2011-December/000030.html
and: http://comments.gmane.org/gmane.linux.ports.arm.kernel/138900
for more.
-- Michael
On Wed, Jan 11, 2012 at 10:27 PM, Lv Terry-R65388 r65388@freescale.com wrote:
Hi Michael,
By adding -mno-unaligned-access, kernel can start now.
I've another question, Does this option have some impact on performance?
Hi Terry. It should improve things. Before this patch the compiler would emit the instructions to do a byte-by-byte load and recombine these into the final word. With this patch it does a single load and lets the hardware sort it out.
-- Michael
linaro-toolchain@lists.linaro.org