Urandom / systemd issues when booting from flash


#1

Hi, I have our custom Cyclone V hardware running Angstrom v2017.06 and in general things work except for when I am booting from flash. The hardware has 128MB of Parallel NOR flash that has a CFI driver configured in the kernel which appears to work fine. I can erase and write a jffs2 root filesystem to the flash without problems. If I boot using flash for the rootfs the board comes up but I get problems with urandom. It seems as if random takes a long time to initialize so services are starting (including systemd) without being able to read urandom which then cascades to all sorts of issues. From the boot log you can see where things start failing - very early on. Any ideas on how to resolve, we need to be able to boot these boards standalone and I only have Parallel NOR flash to work with. Note, if I boot the same file system over the network via NFS it works fine, however in that instance I see “random: fast init done” very early in the boot log, just after the file system is mounted. When booting from flash this occurs much later in the boot, after things start complaining about reading urandom!

VFS: Mounted root (jffs2 filesystem) on device 31:0.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
systemd[1]: System time before build time, advancing clock.
random: systemd: uninitialized urandom read (16 bytes read)
systemd[1]: systemd 232 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL -XZ +LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD +IDN)
systemd[1]: Detected architecture arm.

Welcome to The Angstrom Distribution v2017.06!

systemd[1]: Set hostname to .
random: systemd: uninitialized urandom read (16 bytes read)
random: systemd-sysv-ge: uninitialized urandom read (16 bytes read)
random: systemd-gpt-aut: uninitialized urandom read (16 bytes read)
random: systemd-gpt-aut: uninitialized urandom read (16 bytes read)
random: systemd: uninitialized urandom read (16 bytes read)
random: systemd: uninitialized urandom read (16 bytes read)
random: systemd: uninitialized urandom read (16 bytes read)
random: systemd: uninitialized urandom read (16 bytes read)
random: systemd: uninitialized urandom read (16 bytes read)