f93c8089b9
After removal of the network drivers as an entropy source in Linux kernels a while ago, some routers e.g. in ar71xx family experience lack of hardware entropy for /dev/random. The device /dev/random can hang due to that. There are pseudo random numbers available in /dev/urandom, but they do not end up in /dev/random. E.g. tickets #9631 and #9999 are related to this problematics. One tool for adding entropy data from an arbitrary source to the kernel entropy pool is rngd daemon included in the rng-tools package from http://sourceforge.net/projects/gkernel/ Manual page: http://linux.die.net/man/8/rngd The tool can be used to add entropy to the kernel's entropy pool either from some genuine hardware-based entropy source, or as a quick&dirty patch also from /dev/urandom. Using urandom isn't a perfect solution, but it will satisfy those applications looking for input from /dev/random. As far as I found out, nobody has complied the rngd daemon package for Openwrt, so far. I made a try out of it, and succeeded both for Backfire and trunk. I defined a package that downloads the sources from SF. (This is my first package definition, so the dependencies and conventions might not be quite correct, but the package seems to compile and work both in Backfire and trunk.) Hopefully somebody can figure out a way to connect some real entropy source in ar71xxx devices through this daemon. The package could be used with real hardware entropy sources (like the Entropy key), if they provide a suitable interface for the daemon to the entropy data from them. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> git-svn-id: svn://svn.openwrt.org/openwrt/packages@28332 3c298f89-4303-0410-b956-a3cf2f4a3e73