Skip to contentSkip to conversation

Solution for AVR32 kernel link problem

DISCUSSION Alex 2 participants 2 messages Feb 1, 2008 – Feb 4, 2008

lore
Share & tools
lore

Alex

author
#0 lore raw

Hi

I played around with OE for AVR32.

I think I found a solution for the kernel linking problem. A known workaround was to use an external linker. I tried both, the one from Atmel's toolchain package and the one created by Atmel's buildroot. The one created by buildroot should be the same version as the one created by OE.

I copied binutils patches from builtroot to OE. Even though, they have the same "patch number" (500, 501) they are different from those OE will download during build.

I changed binutils_2.17.bb receipt to use the files from buildroot:

--- snipp ---
#patches from http://svn.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/binutils/2.17/

SRC_URI += "\
file://100-uclibc-conf.patch;patch=1 \
file://300-006_better_file_error.patch;patch=1 \
file://702-binutils-skip-comments.patch;patch=1 \
file://110-arm-eabi-conf.patch;patch=1 \
file://300-012_check_ldrunpath_length.patch;patch=1 \
file://300-001_ld_makefile_patch.patch;patch=1 \

   file://400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \
       file://500-avr32-atmel.1.3.0.patch;patch=1 \
     file://501-avr32-fix-pool-alignment.patch;patch=1 \

"
# http://avr32linux.org/twiki/pub/Main/DevelopmentTools/502-avr32-bfd-dont-allow-direct-refs-to-bss.patch.gz;patch=1 \
# file://503-avr32-fix-got-offset-init.patch;patch=1 \
---- snapp ------

Like this kernel will compile and link.

I don't have enough knowledge about OE to say this fix works. I don't know why and how the patches are different?
I will try to include the other two patches which are currently commented out. The above receipt applies exactly the same patches as the buildroot.

Finally, I couldn't test it, as I can't boot the kernel. Something is wrong with my load address and entry point. It is set to 0x20008000. I tried to add UBOOT_ENTRYPOINT = "90000000" to atngw100.conf and just recompile the kernel by "bitbake virtual/kernel -c clean" and "bitbake virtual/kernel". This didn't change the entry point, but maybe I have to recompile everything..

Hope this helps
Alex
-

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex schreef:

| Hi
|
| I played around with OE for AVR32.
|
| I think I found a solution for the kernel linking problem.

<snip>

Great catch! This also fixes the build of alsa, it is applied in OE now.

|
| Finally, I couldn't test it, as I can't boot the kernel. Something is
| wrong with my load address and entry point. It is set to 0x20008000. I
| tried to
| add UBOOT_ENTRYPOINT = "90000000" to atngw100.conf and just recompile
| the kernel by "bitbake virtual/kernel -c clean" and "bitbake
| virtual/kernel".
| This didn't change the entry point, but maybe I have to recompile
| everything..

For my ngw with uboot from git (3 week old) the following works:

mkimage -A avr32 -O linux -T kernel -C none -a 0x10000000 -e 0x90000000
- -n 'koen 24rcgit' -d arch/avr32/boot/images/vmlinux.bin uImage

I changed linux.inc and atngw100.conf to allow the loadadress to be different from the entry point.

regards,

Koen

- --
[email protected] will go go away in december 2007, please use [email protected] instead.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHpwGVMkyGM64RGpERAtxkAKCnqnup+rV12sisqk8oMO7hkxYfogCdGTFG zlIWKrqpDk8Tx8kQeoCvzE4=
=eIAw
-----END PGP SIGNATURE-----