* [Buildroot] ext-toolchain-wrapper issues
@ 2012-08-03 17:21 Dallas Clement
2012-08-04 9:19 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Dallas Clement @ 2012-08-03 17:21 UTC (permalink / raw)
To: buildroot
Hello,
I have been having trouble booting a uImage on my armada-xp
development board. I am building with an external toolchain. When
building the linux kernel via buildroot, the supported machine types
were all garbled, and the kernel would not boot.
--------------
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-3.0.6
Created: 2012-08-03 15:34:47 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3303244 Bytes = 3.2 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Using machid 0xbdc from environment
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x00000bdc).
Available machine support:
ID (hex) NAME
00000000 (null)
c000e150 (null)
???0?-??L???M?M?P1? ??
c000e234 ???
???0?-??L?
Please check your kernel config and/or bootloader.
--------------
I discovered that if I built the kernel manually outside the buildroot
tree, it would boot just fine. In an attempt to narrow down the
problem, I simply modified the symlink in output/host/usr/bin which
was pointing to ext-toolchain-wrapper instead of the actual cross gcc.
# ls -l output/host/usr/bin
lrwxrwxrwx 1 dallasc dallasc 21 Aug 2 15:53
arm-marvell-linux-gnueabi-gcc -> ext-toolchain-wrapper
# rm arm-marvell-linux-gnueabi-gcc
# ln -s /opt/armada-sdk-5.0/armv7-marvell-linux-gnueabi-softfp/bin/arm-marvell-linux-gnueabi-gcc
arm-marvell-linux-gnueabi-gcc
Lo and behold, after rebuilding the kernel, it booted just fine.
Clearly there is some difference in the compiler options when relying
on ext-toolchain-wrapper that is leading to trouble.
Apart from tweaking the links as I have done, is there a way to
disable the use of ext-toolchain-wrapper? I think I'll be fine
without it.
Thanks,
Dallas
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ext-toolchain-wrapper issues
2012-08-03 17:21 [Buildroot] ext-toolchain-wrapper issues Dallas Clement
@ 2012-08-04 9:19 ` Thomas Petazzoni
2012-08-04 16:25 ` Dallas Clement
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2012-08-04 9:19 UTC (permalink / raw)
To: buildroot
Hello,
Le Fri, 3 Aug 2012 12:21:06 -0500,
Dallas Clement <dallas.a.clement@gmail.com> a ?crit :
> I have been having trouble booting a uImage on my armada-xp
> development board.
Interesting, I'm also working around the Armada 370 and Armada XP. What
are you doing with this platform?
> I am building with an external toolchain. When
> building the linux kernel via buildroot, the supported machine types
> were all garbled, and the kernel would not boot.
The Armada XP support in mainline doesn't need machine type, it uses
the device tree.
> # ls -l output/host/usr/bin
> lrwxrwxrwx 1 dallasc dallasc 21 Aug 2 15:53
> arm-marvell-linux-gnueabi-gcc -> ext-toolchain-wrapper
>
> # rm arm-marvell-linux-gnueabi-gcc
>
> # ln
> -s /opt/armada-sdk-5.0/armv7-marvell-linux-gnueabi-softfp/bin/arm-marvell-linux-gnueabi-gcc
> arm-marvell-linux-gnueabi-gcc
Is this Marvell toolchain available somewhere so I can try to reproduce
the problem?
> Lo and behold, after rebuilding the kernel, it booted just fine.
> Clearly there is some difference in the compiler options when relying
> on ext-toolchain-wrapper that is leading to trouble.
>
> Apart from tweaking the links as I have done, is there a way to
> disable the use of ext-toolchain-wrapper? I think I'll be fine
> without it.
No, the correct way is to use the ext-toolchain-wrapper, because it
ensures that the right --sysroot option is passed, as well as a few
other important compiler options. The right solution is to find out
which option is causing problem, and understand why.
You can modify ext-toolchain-wrapper.c to progressively remove some
option that it passes to the compiler to see which one is problematic.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ext-toolchain-wrapper issues
2012-08-04 9:19 ` Thomas Petazzoni
@ 2012-08-04 16:25 ` Dallas Clement
2012-08-04 16:58 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Dallas Clement @ 2012-08-04 16:25 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Thanks for the help.
> Interesting, I'm also working around the Armada 370 and Armada XP. What
> are you doing with this platform?
Building a NAS product.
> The Armada XP support in mainline doesn't need machine type, it uses
> the device tree.
Marvell provides a patch to the 3.0.6 kernel, which definitely
provides machine types. They have 3 or 4 defconfigs for the Armada
XP.
> Is this Marvell toolchain available somewhere so I can try to reproduce the problem?
You have to get it from Marvell's extranet. Need to register first.
Pls contact Erez who is the FAE if you need help getting in
(ereza at marvell.com).
> You can modify ext-toolchain-wrapper.c to progressively remove some
> option that it passes to the compiler to see which one is problematic.
I'll do that. It would be nice to get it figured out. Will let you
know what I find.
Regards,
Dallas
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ext-toolchain-wrapper issues
2012-08-04 16:25 ` Dallas Clement
@ 2012-08-04 16:58 ` Thomas Petazzoni
2012-08-08 16:12 ` Dallas Clement
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2012-08-04 16:58 UTC (permalink / raw)
To: buildroot
Hello,
Le Sat, 4 Aug 2012 11:25:40 -0500,
Dallas Clement <dallas.a.clement@gmail.com> a ?crit :
> > Interesting, I'm also working around the Armada 370 and Armada XP.
> > What are you doing with this platform?
>
> Building a NAS product.
>
> > The Armada XP support in mainline doesn't need machine type, it uses
> > the device tree.
>
> Marvell provides a patch to the 3.0.6 kernel, which definitely
> provides machine types. They have 3 or 4 defconfigs for the Armada
> XP.
Ok. We are currently mainlining support for the Armada XP, but it's far
from being complete enough to build a NAS product right now.
> > Is this Marvell toolchain available somewhere so I can try to
> > reproduce the problem?
>
> You have to get it from Marvell's extranet. Need to register first.
> Pls contact Erez who is the FAE if you need help getting in
> (ereza at marvell.com).
Ok, then I will not be able to do this right now. I am behind a 3G
connection during my holidays, so I will not do a full toolchain
download.
> I'll do that. It would be nice to get it figured out. Will let you
> know what I find.
Yes, that would be good, thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ext-toolchain-wrapper issues
2012-08-04 16:58 ` Thomas Petazzoni
@ 2012-08-08 16:12 ` Dallas Clement
2012-08-08 19:07 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Dallas Clement @ 2012-08-08 16:12 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Just wanted to get back with you on this and let you know that I
narrowed this down further. There is no fault with the
ext-toolchain-wrapper code. It does the right thing. The problem
with my Linux kernel not booting was caused by the use of an incorrect
gcc tune parameter. This came from a buildroot config file I got from
Marvell. I simply changed it as follows, and everything is fine now.
#BR2_GCC_TARGET_TUNE="marvell-fv7"
BR2_GCC_TARGET_TUNE="cortex-a9"
Regards,
Dallas
On Sat, Aug 4, 2012 at 11:58 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> Le Sat, 4 Aug 2012 11:25:40 -0500,
> Dallas Clement <dallas.a.clement@gmail.com> a ?crit :
>
>> > Interesting, I'm also working around the Armada 370 and Armada XP.
>> > What are you doing with this platform?
>>
>> Building a NAS product.
>>
>> > The Armada XP support in mainline doesn't need machine type, it uses
>> > the device tree.
>>
>> Marvell provides a patch to the 3.0.6 kernel, which definitely
>> provides machine types. They have 3 or 4 defconfigs for the Armada
>> XP.
>
> Ok. We are currently mainlining support for the Armada XP, but it's far
> from being complete enough to build a NAS product right now.
>
>> > Is this Marvell toolchain available somewhere so I can try to
>> > reproduce the problem?
>>
>> You have to get it from Marvell's extranet. Need to register first.
>> Pls contact Erez who is the FAE if you need help getting in
>> (ereza at marvell.com).
>
> Ok, then I will not be able to do this right now. I am behind a 3G
> connection during my holidays, so I will not do a full toolchain
> download.
>
>> I'll do that. It would be nice to get it figured out. Will let you
>> know what I find.
>
> Yes, that would be good, thanks!
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ext-toolchain-wrapper issues
2012-08-08 16:12 ` Dallas Clement
@ 2012-08-08 19:07 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2012-08-08 19:07 UTC (permalink / raw)
To: buildroot
Hello,
Le Wed, 8 Aug 2012 11:12:59 -0500,
Dallas Clement <dallas.a.clement@gmail.com> a ?crit :
> Just wanted to get back with you on this and let you know that I
> narrowed this down further. There is no fault with the
> ext-toolchain-wrapper code. It does the right thing. The problem
> with my Linux kernel not booting was caused by the use of an incorrect
> gcc tune parameter. This came from a buildroot config file I got from
> Marvell. I simply changed it as follows, and everything is fine now.
>
> #BR2_GCC_TARGET_TUNE="marvell-fv7"
> BR2_GCC_TARGET_TUNE="cortex-a9"
Ok, thanks for the investigation. I guess -mtune=marvell-fv7 argument
is specific to the Marvell gcc compiler, I haven't heard of it before.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-08 19:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 17:21 [Buildroot] ext-toolchain-wrapper issues Dallas Clement
2012-08-04 9:19 ` Thomas Petazzoni
2012-08-04 16:25 ` Dallas Clement
2012-08-04 16:58 ` Thomas Petazzoni
2012-08-08 16:12 ` Dallas Clement
2012-08-08 19:07 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox