[okl4-developer] Debugging tips for a new platform

Joshua Root jmr at cse.unsw.edu.au
Thu Jun 19 19:33:39 EST 2008


Geoffrey Lee wrote:
> On Thu, Jun 19, 2008 at 04:04:36PM +1000, Joshua Root wrote:
>> Not so good I'm afraid. The binary 1.2.1n runs a gumstix image fine, but  
>> fails on the big-endian nslu2 image. With the same gumstix image,  
>> vanilla 1.2.1 and 1.2.2 output this and nothing more:
>>
> 
> Hey Josh - 
> 
> // snip
> 
>> 1.2.3 through 1.2.5 do this:
>>
>> % skyeye-1.2.5 -c tools/sim_config/gumstix.skyeye -e build/images/image.sim
>> Your elf file is little endian.
>> arch: arm
>> cpu info: xscale, pxa25x, 69052100, fffffff0, 2
>> mach info: name pxa_lubbock, mach_init addr 0x8066730
>> log_info: Error logon value 2
>> log_info: log is off.
>> log_info:log file is /tmp/sk1.cw.log, fd is 0x80f8248
>> log_info: log start clock 0
>> log_info: log end clock 18446744073709551615
>> uart_mod:0, desc_in:, desc_out:, converter:
>> SKYEYE: use xscale mmu ops
>> exec file "build/images/image.sim"'s format is elf32-little.
>> load section kernel.text: lma = 0xa0000000 (vma = 0xf0000000)  size =  
>> 0x00012af0.
>> SKYEYE:NumInstrs 0, mem_write_byte addr = f0000000 no bank
>>
> 
> 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.

> 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-")

> 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.

- Josh



More information about the Developer mailing list