Hi,
I think there is probably a *formal* way to do this within the
confines of the build system and design of OpenSSL, and there is
probably a brute-force way to do this.
I think just grabbing the crypto subtree and building a "make"
subsystem for this that makes no dependencies on platform is one way
to do this, which may involve source code changes, so you would need
to re-integrate each release of openssl as it comes available.
I anxiously await a response that works within the confines of the
formal (and supported) build system, as I am interested as well...
Randy
On Feb 17, 2009, at 4:08 PM, Guyotte, Greg wrote:
Hi –
I am wondering if it is possible to build openSSL (or actually a
very small portion of it) for use in an embedded ROM on an ARM11-
based system. For my purpose I only need to be able to perform RSA
public key decryption within the ROM. Being a ROM, I have no OS
support whatsoever.
I have compiled openssl using my cross compiler. The steps I used to
accomplish that:
a) ./Configure linux-elf --prefix=/db/nsel/db/avalanche/progs/mv2/
v6_le_uclibc --openssldir=/db/nsel/db/aval
anche/progs/mv2/v6_le_uclibc/openssl no-asm no-shared
b) make CC=arm_v6_le_uclibc-gcc "AR=arm_v6_le_uclibc-ar r"
RANLIB=arm_v6_le_uclibc-ranlib
Just for testing purposes, I put a dummy call to
RSA_public_decrypt() in my ROM code, and linked with libcrypto.a.
What results is a number of undefined symbols relating to OS-type
calls (getpid, socket, etc…):
Linking ...
Error: L6218E: Undefined symbol stderr (referred from cryptlib.o).
Error: L6218E: Undefined symbol getpid (referred from rand_unix.o).
Error: L6218E: Undefined symbol open (referred from rand_unix.o).
Error: L6218E: Undefined symbol fstat (referred from rand_unix.o).
Error: L6218E: Undefined symbol close (referred from rand_unix.o).
Error: L6218E: Undefined symbol getuid (referred from rand_unix.o).
Error: L6218E: Undefined symbol poll (referred from rand_unix.o).
Error: L6218E: Undefined symbol __errno_location (referred from
rand_unix.o).
Error: L6218E: Undefined symbol read (referred from rand_unix.o).
Error: L6218E: Undefined symbol socket (referred from rand_egd.o).
Error: L6218E: Undefined symbol connect (referred from rand_egd.o).
Error: L6218E: Undefined symbol write (referred from rand_egd.o).
Error: L6218E: Undefined symbol __ctype_b (referred from obj_dat.o).
Error: L6218E: Undefined symbol fopen64 (referred from bss_file.o).
Has anyone accomplished a similar task to what I am trying to do?
I’m hoping that perhaps I made a mistake using the Configure script,
and a different set of parameters will solve this problem.
Thanks and regards,
Greg Guyotte