petalinux-image-common.inc: Add haveged by default for all images
petalinux-image-common.inc: Add haveged by default for all images

Entropy is randomness collected by an operating system or an application
for use in cryptography or other uses that require random data. This
randomness is collected from hardware sources such as keyboard
timings, mouse movements and passes to other processes through
/dev/random or /dev/urandom. Every linux system during boot should have
entropy, if not it will have negative impact on performance and
security.

For zynqmp machines when booting the network snmp initscript is started
and waits for entropy to complete its services. However the system
doesnt have sufficient entropy for snmp to finish, so the snmpd daemon
keeps waiting for entropy. As a result the system doesnt reach login
prompt.

To fix this, haveged (hardware volatile entropy gathering and expansion)
tool is used to generate random numbers and feed the linux random
device. This ensures that initscripts have sufficient entropy during
boot time.

The haveged recipe in meta-openembedded layer inherits systemd.
Petalinux distro uses initscripts. This bbappend file wires in the
haveged initscript for the distro so that sufficient entropy is
present before snmpd and other initscripts run.

Signed-off-by: Alejandro Enedino Hernandez Samaniego <4808ec59fcf4a28be6636a23df6180bf66dbebe1@xilinx.com>
Signed-off-by: Sai Hari Chandana Kalluri <dcd6f85a7bffd89d026445db0f5113d6d436d06a@xilinx.com>
Signed-off-by: Manjukumar Matha <4c64a17569570cb9f1048973bce031c402b55312@xilinx.com>

Xilinx/meta-petalinux,Xilinx/meta-petalinux,Xilinx/meta-petalinux,Xilinx/meta-petalinux,Xilinx/meta-petalinux,Xilinx/meta-petalinux