SoMLabs / meta-somlabs

MIT License
1 stars 5 forks source link

Random number generator hangs for a long time #7

Open loki-amorf opened 4 years ago

loki-amorf commented 4 years ago

Hi, I've built a yocto (warrior) (console-image) using meta-somlabs layers. The kernel was used: 5.0.7

All layers comes from the warrior branches. My problem is that when I boot, the boot time is long.

[ 9.120451] rtc rtc0: Timeout trying to get valid LPSRT Counter read hwclock: settimeofday() failed: Invalid argument Wed May 27 12:52:26 UTC 2020 [ 11.569532] urandom_read: 1 callbacks suppressed [ 11.569551] random: dd: uninitialized urandom read (512 bytes read) ALSA: Restoring mixer settings... INIT: Entering runlevel: 5 /usr/sbin/alsactl: load_state:1735: No soundcards found... Configuring network interfaces... [ 12.142003] Micrel KSZ8081 or KSZ8091 2188000.ethernet-1:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet-1:01, irq=POLL) done. Starting random number generator daemon Initalizing available sources

Failed to init entropy source hwrng

Enabling JITTER rng support

Initalizing entropy source jitter

[ 35.018506] random: crng init done

I guess, I have problem with hwrng and this problem seems happen often.

After that I've found solution for similair board: MLK-13074 dts: mx6ull: enable hardware RNG for i.mx6ull https://git.isee.biz/linux-kernel/linux-imx/commit/d427888bd72d94485c2590f22250d5d23721d380#b3b659238db87e67a85890cd6e461b0caf558f9d

I've changed .dtsi file but it didnt help.

            rngb: rngb@02284000 {
                compatible = "fsl,imx6sl-rng", "fsl,imx-rng", "imx-rng";
                reg = <0x02284000 0x4000>;
                interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                clocks =  <&clks IMX6UL_CLK_DUMMY>;
            };

Do you guys have any idea how to resolve this problem?

marcinbis commented 4 years ago

Hi, I'll investigate this problem further. Meanwhile, make sure, you have rng-tools included in your image. This will build rngd which initilaizes random seed at boot.

loki-amorf commented 4 years ago

On Thu, 28 May 2020 at 15:41, Marcin Bis notifications@github.com wrote:

Hi, I'll investigate this problem further. Meanwhile, make sure, you have rng-tools included in your image. This will build rngd which initilaizes random seed at boot.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SoMLabs/meta-somlabs/issues/7#issuecomment-635325384, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXOLE2KNGCD2JUTWO5RS43RTZLWFANCNFSM4NNBGFDA .

Yes. rng-tools has already included.