Cross compiling openssl for an old ARM environment - howto?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Cross compiling openssl for an old ARM environment - howto?

Sean Graham
Hello everyone,

I'm trying to do my research, and not sure if this should go into the -dev or -user mailing list...

I have an embedded device which runs an ARM7T armv4t 16-bit thumb platform.

I'm not finding much info other than the compile guide telling me to modify $cflags and $ldflags.

The IDE for development is typically done in GUI mode - and I have no clue how I could compile OpenSSL in this manner. I could try just adding all the files in proper directory format, but I suspect that there may be problems down the road.

I'm hopeful that I can just link in the library, it seems to have a built in arm-elf compiler/linker and has its own internal library files as .elf

I noticed that there are linux-armv4 and linux-elf compilation targets in ./Configure, so I'm hopeful that I can go in this direction, but I'm struggling to find documentation on how to approach it in this manner. On windows I can build for windows, but the cygwin environment doesn't appear to include any compile tools which support linux-armv4.

Alternately is it possible to direct-compile with an IDE? I assume it's not just as simple as adding all the .c files in...

I'm normally a windows guy :)

Thanks in advance!

----------
Sean Graham


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Salz, Rich

> I have an embedded device which runs an ARM7T armv4t 16-bit thumb platform.

I don't think openssl ever really ran on 16bit.
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Sean Graham
Hi!

Thanks for the reply - I didn't think it actually made the mailing list.

The thumb platform supports all 32-bit operations and even 64-bit numbers, so I wouldn't expect it to be a problem.

The ./Configure does explicitly talk about thumb mode compiling, so I imagine there must be support for it.




----------
Sean Graham


On Mon, Dec 19, 2016 at 1:22 PM, Salz, Rich <[hidden email]> wrote:

> I have an embedded device which runs an ARM7T armv4t 16-bit thumb platform.

I don't think openssl ever really ran on 16bit.
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Richard Levitte - VMS Whacker-2
In reply to this post by Salz, Rich
In message <[hidden email]> on Mon, 19 Dec 2016 18:22:30 +0000, "Salz, Rich" <[hidden email]> said:

rsalz>
rsalz> > I have an embedded device which runs an ARM7T armv4t 16-bit thumb platform.
rsalz>
rsalz> I don't think openssl ever really ran on 16bit.

It certainly doesn't any more.  It did, though, a looooong time ago.

--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Sean Graham
Are we saying that it absolutely will not support ARM7 thumb mode anymore?

Wouldn't the generic C-only version (no ASM) support pretty much any platform?


----------
Sean Graham


On Mon, Dec 19, 2016 at 1:39 PM, Richard Levitte <[hidden email]> wrote:
In message <[hidden email]> on Mon, 19 Dec 2016 18:22:30 +0000, "Salz, Rich" <[hidden email]> said:

rsalz>
rsalz> > I have an embedded device which runs an ARM7T armv4t 16-bit thumb platform.
rsalz>
rsalz> I don't think openssl ever really ran on 16bit.

It certainly doesn't any more.  It did, though, a looooong time ago.

--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Richard Levitte - VMS Whacker-2
We are saying that we don't support 16-bit platforms and haven't
really done so for a long time.  The C-only version is no exception.

However, the response was that 32- and 64-bit operations and numbers
are supported on that device, so it should still be possible to play
with.

Cheers,
Richard

In message <CALsbA4=S3kHESYQ64dqb5MxGgaNJvQbyf26ky=[hidden email]> on Mon, 19 Dec 2016 13:50:58 -0500, Sean Graham <[hidden email]> said:

sgraham> Are we saying that it absolutely will not support ARM7 thumb mode
sgraham> anymore?
sgraham>
sgraham> Wouldn't the generic C-only version (no ASM) support pretty much any
sgraham> platform?
sgraham>
sgraham> ----------
sgraham> Sean Graham
sgraham>
sgraham> On Mon, Dec 19, 2016 at 1:39 PM, Richard Levitte <[hidden email]>
sgraham> wrote:
sgraham>
sgraham>     In message
sgraham>     <[hidden email]
sgraham>    > on Mon, 19 Dec 2016 18:22:30 +0000, "Salz, Rich"
sgraham>     <[hidden email]> said:
sgraham>
sgraham>     rsalz>
sgraham>     rsalz> > I have an embedded device which runs an ARM7T armv4t
sgraham>     16-bit thumb platform.
sgraham>     rsalz>
sgraham>     rsalz> I don't think openssl ever really ran on 16bit.
sgraham>
sgraham>     It certainly doesn't any more. It did, though, a looooong time
sgraham>     ago.
sgraham>
sgraham>     --
sgraham>     Richard Levitte [hidden email]
sgraham>     OpenSSL Project http://www.openssl.org/~levitte/
sgraham>
sgraham>
sgraham>     --
sgraham>     openssl-dev mailing list
sgraham>     To unsubscribe:
sgraham>     https://mta.openssl.org/mailman/listinfo/openssl-dev
sgraham>
sgraham>
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Salz, Rich
In reply to this post by Sean Graham
> Are we saying that it absolutely will not support ARM7 thumb mode anymore?

Nobody is saying that.  We're saying that if the address-space is 16bit, openssl will not work.

> Wouldn't the generic C-only version (no ASM) support pretty much any platform?

Probably.


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Viktor Dukhovni

> On Dec 19, 2016, at 2:07 PM, Salz, Rich <[hidden email]> wrote:
>
>> Are we saying that it absolutely will not support ARM7 thumb mode anymore?
>
> Nobody is saying that.  We're saying that if the address-space is 16bit, openssl will not work.
>
>> Wouldn't the generic C-only version (no ASM) support pretty much any platform?
>
> Probably.

For ARM platforms, especially on resource-constrainted variants, the OP is
most likelyh better of with mbedTLS:

https://tls.mbed.org/

--
        Viktor.

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Sean Graham
In reply to this post by Salz, Rich
Hi Guys,

My apologies for the blunt reply -- merely trying to be clear -- and thank you for your answers!

Would anyone happen to have any reference material that I could look at which would help me along this line?  I apologize for the newb questions.

Specifically I already have a gcc toolchain with makefile support for this processor and environment. Is it possible to configure to use this toolchain in "C only" mode for initial testing?  OpenSSL's custom make environment is a bit confusing.




----------
Sean Graham


On Mon, Dec 19, 2016 at 2:07 PM, Salz, Rich <[hidden email]> wrote:
> Are we saying that it absolutely will not support ARM7 thumb mode anymore?

Nobody is saying that.  We're saying that if the address-space is 16bit, openssl will not work.

> Wouldn't the generic C-only version (no ASM) support pretty much any platform?

Probably.


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Sean Graham
In reply to this post by Viktor Dukhovni
Viktor,

Thank you so very much for that - I will definitely look into that.


----------
Sean Graham


On Mon, Dec 19, 2016 at 2:16 PM, Viktor Dukhovni <[hidden email]> wrote:

> On Dec 19, 2016, at 2:07 PM, Salz, Rich <[hidden email]> wrote:
>
>> Are we saying that it absolutely will not support ARM7 thumb mode anymore?
>
> Nobody is saying that.  We're saying that if the address-space is 16bit, openssl will not work.
>
>> Wouldn't the generic C-only version (no ASM) support pretty much any platform?
>
> Probably.

For ARM platforms, especially on resource-constrainted variants, the OP is
most likelyh better of with mbedTLS:

https://tls.mbed.org/

--
        Viktor.

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling openssl for an old ARM environment - howto?

Andy Polyakov-2
In reply to this post by Salz, Rich
>> Are we saying that it absolutely will not support ARM7 thumb mode anymore?
>
> Nobody is saying that.  We're saying that if the address-space is 16bit, openssl will not work.

16-bit in original request refers to instructions' size, not address
space. But it's actually a misnomer, as Thumb, or at least its ARMv7
flavour, is a *mixture* of 16- and 32-bit instructions. Again, 16- and
32-bit *sized* instructions, not address space. OpenSSL fully supports
AVMv7 Thumb, a.k.a. Thumb2, all the way down to assembly pack. If
compiler doesn't generate Thumb2 code by default, then it might be
necessary to pass additional arch-specific flag[s] as additional
argument to ./Configure. This is discussed in commentary around
linux-armv4 config-line in Configurations/10-main.cf in master/1.1.0 or
Configre in 1.0.2.

As for cross compilation, it's discussed in INSTALL, look for
--cross-compile-prefix.

Well, to be completely accurate, everything said above implies that
compiler is gcc. ARM's compiler was never tested, but nobody complained
so far...

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev