[U-Boot] Random number generator - why I need it

Stanislav Vlasic svlasic at gmail.com
Fri Jul 18 16:41:23 CEST 2014


Hi,

I'm using customized U-Boot 2011.03 (for Amlogic platform).

What I need is solution for getting random number (on first boot) which
will be written to ubootenv. Let's say I have 100 strings stored in string
array of board file.

On first boot I have to pick one random string from list and write it to
ubootenv (range 0..99). Writing to ubootenv is not problem, problem is
randomization. My current tries ended up in getting same number each time
(2 different algorithms). Does anyone have solution for this?

Keep in mind that my PCB does not have RTC battery and does not store time,
so on each power on clock is back to default (1970).

Thanx and best regards,
Stanislav Vlasic


More information about the U-Boot mailing list