[okl4-developer] Debugging tips for a new platform
Joshua Root
jmr at cse.unsw.edu.au
Thu Jun 19 20:58:49 EST 2008
Geoffrey Lee wrote:
> On Thu, Jun 19, 2008 at 07:33:39PM +1000, Joshua Root wrote:
>
> /* snip */
>
>>> I got a fresh 2.1 tarball and skyeye 1.2.5 off skyeye.org and did
>>> ./configure; make, built OKL4 with gumstix and ran that and worked fine.
>>> To take a step back, can you at least confirm that it works on skyeye
>>> 1.2.5 for gumstix?
>> No, that's what I'm saying. I can't get a gumstix image to work in
>> anything other than the 1.2.1n build linked from the wiki. Same result
>> with 2.1 and 2.1.1-fix.7.
>
>
> Ah, I noticed that you are using image.sim. Please re-try with
> image.boot.
Gumstix doesn't seem to build an image.boot.
>>> There are several issues that I have identified with your patch.
>>> First, your toolchain setup appears to be incorrect. Please add
>>> the following to the ixp class:
>>>
>>> c_flags = arm.c_flags + ["-mbig-endian"]
>>> as_flags = ["-mbig-endian"]
>>> link_flags = ["-EB"]
>>>
>>> As well, the default toolchain is gnu_arm_toolchain, which uses the
>>> libgcc included in libgcc. If you are using the pre-built toolchain,
>>> it uses the gcc provided libgcc. Since that is little endian it will
>>> not link. You can use the OKL4 provided libgcc instead.
>> The ixp4xx platform is set up to use a toolchain that targets big-endian
>> by default:
>> gnu_armv5b_toolchain = generic_gcc("armv5b-softfloat-linux-")
>>
>
>
> I don't think your toolchain is getting called, as the resulting
> binary is little endian, as printed out by the skyeye output. You
> can see whether your toolchain is getting called by specifying
> verbose_str=True on the build command line.
The little-endian binary is for gumstix. I'm trying it first because I
know it's a working image. If I can't get gumstix to work in the
simulator, nslu2 has no chance.
Building with machine=nslu2 definitely uses the correct toolchain and
produces a big-endian binary.
>>> Finally, the trace log will be of use in determining where you are
>>> stalling. After those fixes I tried to boot it on Skyeye 1.2.5 and
>>> found that it was spinning on trying to write out to the serial.
>> Thanks! That's very helpful to know.
>
> Just to ensure that we are on the same page, can you confirm that booting
> image.boot when compiled in MSB mode will yield a binary that spins
> on trying to write out via serial?
I haven't yet been able to boot a big-endian image in the simulator.
- Josh
More information about the Developer
mailing list