public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Compiling polarssl lib in uboot
@ 2012-10-18 11:50 Peter Czypek
  2012-10-18 17:45 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Czypek @ 2012-10-18 11:50 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Compiling polarssl lib in uboot
  2012-10-18 11:50 [U-Boot] Compiling polarssl lib in uboot Peter Czypek
@ 2012-10-18 17:45 ` Tom Rini
  2012-10-19  7:41   ` Peter Czypek
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2012-10-18 17:45 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 18, 2012 at 01:50:18PM +0200, Peter Czypek wrote:

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

What are you trying to accomplish exactly?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121018/35bf7c8a/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Compiling polarssl lib in uboot
  2012-10-18 17:45 ` Tom Rini
@ 2012-10-19  7:41   ` Peter Czypek
  2012-10-19 22:37     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Czypek @ 2012-10-19  7:41 UTC (permalink / raw)
  To: u-boot

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

I want to verify signed data in a "nice" and "proper" way. Which would
be using a lib, in my opinion.

Am 18.10.2012 19:45, schrieb Tom Rini:
> On Thu, Oct 18, 2012 at 01:50:18PM +0200, Peter Czypek wrote:
> 
>> 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.
> 
> What are you trying to accomplish exactly?
> 

- -- 
Dipl.-Ing. Peter Czypek
Security Engineer
ESCRYPT GmbH - Embedded Security

Email:       peter.czypek at escrypt.com
PGP key:   www.escrypt.com/keyserver/peter.czypek
PGP Fingerprint: ED4B 1129 31F0 A93A 2307  9C90 5D14 02C6 1D41 DE63
Phone:     +49 234 43870-222
Mobil:      +49 151 402390-22
Address:   Lise-Meitner-Allee 4, 44801 Bochum, Germany
Internet:    www.escrypt.com

Managing directors: Dr.-Ing. Jan Pelzl, Dr.-Ing. Andr? Weimerskirch,
Dr.-Ing. Thomas Wollinger
Registered office and court of registry: Bochum, Germany, HRB 7877
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQgQQiAAoJEF0UAsYdQd5jL1wH/RFzXfN+uGmMvw5QzcefMgmh
NvtQpLMNDdM5Es3G8ch+895IBUVzdWBNPJ2avGzbK/K7W9dLlQvupQc4b2B9+ppY
qtTKrypTdyuFDFT0uht6kb8x9xpw3hsv94WRD65zeB2evSkguloVH8MSrlqr8ZD/
qxjx/sfdfYXrRFHbIuAIQz3cp+af2anfaqxbBF4mpmkvfGTQURFpcYGFzZR5R/Lf
BXeczYe2NSLz4RchvFBIGl368FZsvhLs9zZuABQyce6DzL6JnhZQ2zmXQu4NUGTE
M+ATvRsYStmtXU/YQEjMAcrrZVaQqesQvliXcgzXjFx4EDTnK0xxvbDxXiI78Jc=
=VI8y
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Compiling polarssl lib in uboot
  2012-10-19  7:41   ` Peter Czypek
@ 2012-10-19 22:37     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2012-10-19 22:37 UTC (permalink / raw)
  To: u-boot

On Fri, Oct 19, 2012 at 09:41:22AM +0200, Peter Czypek wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I want to verify signed data in a "nice" and "proper" way. Which would
> be using a lib, in my opinion.

So you want to add a command that uses it, OK.  I would see lib/zlib or
lib/lzma for examples of how other libraries have been imported.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121019/4007a666/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-19 22:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 11:50 [U-Boot] Compiling polarssl lib in uboot Peter Czypek
2012-10-18 17:45 ` Tom Rini
2012-10-19  7:41   ` Peter Czypek
2012-10-19 22:37     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox