[U-Boot] Compiling polarssl lib in uboot
Peter Czypek
peter.czypek at escrypt.com
Thu Oct 18 13:50:18 CEST 2012
Hello,
i want to use the crypto functions from polarssl in uboot.
My crypto lib choice is polarssl [http://polarssl.org/] and my target is
an omap4 panda board.
My first attempt was to extract the needed source files and headers from
polarssl and copy them to uboot directories and modify the uboot
makefiles to compile them together with uboot. This works but is not
optimal. I also have had to modify some includes and replace them by
compiler.h for example.
So now i want to compile polarssl as a whole lib and link it in uboot.
But i don't know the "right" way to do this.
First problem:
I can't cross compile the polarssl lib with the same toolchain i use for
uboot.
For compiling uboot i use an arm-linux-androideabi toolchain.
For polarssl compilation i can't use this lib because it contains no std
headers like string.h for example.
So i thought that i can compile this lib inside the uboot directory. As
they are already some projects in the lib directory i hope to be
successfull with this approach.
But i don't know how. My understanding of the uboot makefiles is not 100%.
My imagination tells me it has to be something like:
- copy polarssl into uboot/lib
- modify some uboot makefiles (tell uboot to compile the lib)
- modify some polarssl makefiles (tell polarssl which compiler is used
and where std headers of uboot are)
- modify uboot sources to use polarssl headers for crypto (#include
"polarssl/sha3.h")
- compile like always
- finished - everything works fine
Does someone have any guidelines for me how to achieve this?
Which uboot makefiles do i have to edit?
Is my plan even feasible?
Greetings and thx in advance
Peter
More information about the U-Boot
mailing list