[okl4-developer] Debugging tips for a new platform
Geoffrey Lee
glee at ok-labs.com
Thu Jun 19 20:35:14 EST 2008
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.
>
>> 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.
Please try to do a file(1) on your binary to ensure that it is indeed
a MSB executable. You should see something like this:
$ file build_ixp4xx/images/image.boot
build_ixp4xx/images/image.boot: ELF 32-bit MSB executable, ARM, version
1 (ARM), statically linked, not stripped
$
>> 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?
>
> - Josh
-gl
>
--
More information about the Developer
mailing list