Forum

Building Hiawatha 8.x for Low Power CPUs

Ralph Hempel
22 March 2012, 04:29
I have built Hiawatha 8.x for my little Soekris 4501 running Voyage Linux (Debian based minimal distro)

Hiawatha version: 8.x
Operating System: Debian Linux

The Soekris 4501 uses an Elan 520 (486 class) CPU, and if I build the stock source code, then an Illegal Instruction stops Hiawatha dead in its tracks shortly after bootup.

I tracked the issue down to PolarSSL's config.h file, where POLARSSL_HAVE_ASM is defined by default. This causes some inline assembler code to be generated which uses instructions not available on the Elan 520.

Commenting out POLARSSL_HAVE_ASM and rebuilding and I get a package that works just great! Next step, build cgit for the Soekris 4501 (I've already built it on my host machine) and share the URL rewrite rules that make it work.

Loving Hiawatha so far!

Ralph
Hugo Leisink
22 March 2012, 17:51
Since this is a PolarSSL issue and not a Hiawatha issue, I'll pass it on to the PolarSSL author.
Paul Bakker
27 March 2012, 16:44
Here the PolarSSL maintainer

Sounds like the assembly code selects some code that seems appropriate but is not on a Elan 520..

The only assembly code selected is in bn_mult.h and timing.c. It is selected based on compiler defines (mostly based on platform and CPU).

Are you able to dig up for me which 'branch' of the assembly is used for both files?

If so, I might be able to tighten down the defines to not be selected on these chips..

You can also contact me directly if that makes it easier: paul at polarssl dot org
Regards,
Paul
This topic has been closed.