Skip to contentSkip to conversation

Link stage error of porting uboot2011-06

U-Boot larry 2 participants 2 messages Aug 8, 2011 – Sep 4, 2011

lore
Share & tools
lore

larry

author
#0 lore raw
Quoted 28 lines · Albert ARIBAUD

(Cc:ing Andrea Scian, maintainer of B2, about pending board removal)

Hi Larry,

Le 04/08/2011 08:14, larrybizz at aol.com a ?crit :

Quoted 9 lines

After compiling success,i check the file of "u-boot" with arm-linux-readelf.It warns me : Segmentation fault This is the result of readelf.

I have no idea what was wrong with my uboot.

I suppose something wrong
with the link stage of compiling uboot.Any suggestion is really appereciated !

Since you have made modifications to this U-boot in order to support your HW, we can hardly tell without knowing your changes... And then, you're not using the latest U-Boot either, which will be necessary if you want patches accepted to the mainline anyway.

The most I can tell is that there is a board based on s3c44b0, the B2, but it does not build at this point, for lack of relocation support.

(BTW: the fix to B2 should be fairly trivial, and without it in the coming weeks, this board will, as several other tens like it, be removed from U-Boot; copying the board maintainer just to be sure).

Quoted 6 lines

My best suggestion is thus that you upgrade to the latest U-Boot and compare your code with that of the B2 even if it does not currently build; start from bare U-Boot and add features in small, buildable, amounts (which would be needed as well for submission anyway) until you hit the readelf issue.

As your suggestion for me,Albert,I upgrade to
"fa82f871c8dbc9a15e8dc274b3f99dd5fa0da458" by Git.This is the latest version i found on Git .And modified some places to make uboot buildable. Now arm-linux-readelf has no longer warns "segmentation fault", but after i burn u-boot.bin into flash,still nothing happened.I vim readelf.result and i found the file type is "DYN (Shared object file)" not "executeable". I try another cpu config such as smdk2410_config and b2_config,then arm-linux-readelf ,but the results are the same "DYN (Shared object file)". could you help me for explaining this.thx a lot.
I prefer to sending you a patch and readelf details that i
generate with "git diff" and "arm-linux-readelf".
I am a freshman with uboot.I found no book or something else
introduce uboot.Even has DULG,but sometimes it was really helpless for me.Just like the problem i met ,i have no idea how to deal with.I suppose something wrong with linking stage or my cross-compiler.
Because of attachment size limitation,i compress patch with bzip2. Any suggestion is appreciated.Thanks a lot.

Best regards
larry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.patch.tar.bz2
Type: application/x-bzip
Size: 38454 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110808/b7a9a6c6/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readelf.result.tar.bz2
Type: application/x-bzip
Size: 15807 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110808/b7a9a6c6/attachment-0001.bin

#1 lore raw

Hi larry,

Seems this mail of yours slipped through, sorry.

Le 08/08/2011 04:04, larry a ?crit :

Quoted 9 lines

As your suggestion for me,Albert,I upgrade to "fa82f871c8dbc9a15e8dc274b3f99dd5fa0da458" by Git.This is the latest version i found on Git .And modified some places to make uboot buildable. Now arm-linux-readelf has no longer warns "segmentation fault", but after i burn u-boot.bin into flash,still nothing happened.I vim readelf.result and i found the file type is "DYN (Shared object file)" not "executeable". I try another cpu config such as smdk2410_config and b2_config,then arm-linux-readelf ,but the results are the same "DYN (Shared object file)". could you help me for explaining this.thx a lot.

This is probably because the output is a relocatable executable -- nothing to worry about, I'd say.

As for the "nothing happened" part, well, you need to debug the target with a probe and single-step to make sure the u-boot code is executed correctly or find out where it is not.

Quoted 2 lines

Best regards
larry

Amicalement,

Signature · 1 line
Albert.