public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Czypek <peter.czypek@escrypt.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Compiling polarssl lib in uboot
Date: Thu, 18 Oct 2012 13:50:18 +0200	[thread overview]
Message-ID: <507FECFA.4070705@escrypt.com> (raw)

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

             reply	other threads:[~2012-10-18 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 11:50 Peter Czypek [this message]
2012-10-18 17:45 ` [U-Boot] Compiling polarssl lib in uboot Tom Rini
2012-10-19  7:41   ` Peter Czypek
2012-10-19 22:37     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507FECFA.4070705@escrypt.com \
    --to=peter.czypek@escrypt.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox