Skip to contentSkip to conversation

USE_HOSTCC in lib/rsa/rsa-verify.c

U-Boot Andre Wolokita 2 participants 2 messages Jun 29, 2015

lore
Share & tools
lore
#0 lore raw

Hi Simon,

Could you please explain the used of #ifndef(USE_HOSTCC) in the rsa_verify_key function in rsa-verify.c? I've written a HW hashing driver and need to use the software mod-exp function as we don't have a hardware driver for this (yet.) I get all kinds of compilation errors if USE_HOSTCC is explicitely defined (say in a config header.) You're advice would be appreciated.

Regards,

Andre.

Signature · 9 lines
Andre Wolokita (andre.wolokita at analog.com)
Design Engineer, Analog Devices Australia Pty Ltd
Unit 3, 97 Lewis Road, Wantirna, Victoria, 3152, AUSTRALIA
Direct: +61 3 9881 9933   Main: +61 3 9881 9999
Fax: +61 3 9881 9988      Web: www.analog.com/au

Embedded & Digital Signal Processing Software.

This communication is proprietary and confidential. 
#1 lore raw

Hi Andre,

Quoted 3 lines · Andre Wolokita

Hi Simon,

Could you please explain the used of #ifndef(USE_HOSTCC) in the rsa_verify_key function in rsa-verify.c? I've written a HW hashing driver and need to use the software mod-exp function as we don't have a hardware driver for this (yet.) I get all kinds of compilation errors if USE_HOSTCC is explicitely defined (say in a config header.) You're advice would be appreciated.

It's there to allow the host compiler to build it - I think it is used by the fit_check_sign tool to check that the signature matches.

You shouldn't define USE_HOSTCC unless you are building host tools. If you are building for a target then it should use the target compiler.

Quoted 12 lines

Regards,

Andre.

--
Andre Wolokita (andre.wolokita at analog.com) Design Engineer, Analog Devices Australia Pty Ltd Unit 3, 97 Lewis Road, Wantirna, Victoria, 3152, AUSTRALIA
Direct: +61 3 9881 9933 Main: +61 3 9881 9999
Fax: +61 3 9881 9988 Web: www.analog.com/au

Quoted 4 lines

Embedded & Digital Signal Processing Software.

This communication is proprietary and confidential.

Probably not!

Regards,
Simon