Skip to contentSkip to conversation

U-Boot + libtomcrypt

U-Boot André Schaller 2 participants 2 messages Jul 8, 2013

lore
Share & tools
lore
#0 lore raw

Hi there,

I want to add some Random Number Generation functions / Hashing Functions to u-boot. I implemented the functionality and now I need to include it to the upstream source code of u-boot (inside hwinit-common.c). I was wondering if these even works? Is this lib small enough to fit in the MLO? Can I adjust the size of the MLO if it is too large? Did anyone tried to do this before and could share experiences? Right now I am including all the missing header-files to the source code (which are needed by libtomcrypt).

Thanks in adaance,
Andr?

#1 lore raw

Hi Andr?,

Quoted 7 lines · Andr? Schaller

Hi there,

I want to add some Random Number Generation functions / Hashing Functions to u-boot. I implemented the functionality and now I need to include it to the upstream source code of u-boot (inside hwinit-common.c). I was wondering if these even works? Is this lib small enough to fit in the MLO?

dunno ...

Quoted 2 lines

Can I adjust the size of the MLO if it is too
large?

Yes you can, but have to respect physical limits ;) The SPL needs to fit into the SRAM!
There is a pre-defined border for build-time checks (at least on ARM -> CONFIG_SPL_MAX_SIZE) and some tools to investigate runtime behavior (*.su files -> read README.SPL 'estimating stack usage').

Quoted 1 line

Did anyone tried to do this before and could share experiences?

I pulled the software implementation of BCH in SPL to have second NAND sector secured by BCH8 on OMAP3 devices (which have no ELM). It worked on board tricorder and devkit8000 but I had to increase the CONFIG_SPL_MAX_SIZE (AFAIR).

Regards,

Andreas