What does this message mean?



  • There are lots of "interesting" messages on the serial console or in a dmesg / logread output - so this is a general question.

    About "random: nonblocking pool is initialized" message @Burton-Strauss wrote here.

    This another one appears at the beginning of the boot process:
    *** Warning - bad CRC, using default environment

    I simply ignore this warning but I'm afraid this is not the best behaviour. Should I do something with it?



  • i have 3 of the Omega2+ modules and each one has that line. my guess was it is related to a component used in the manufacturing being somewhat "defective" but good enough to use. like maybe a memory chip not having a specific register set or uninitialized.



  • @György-Farkas It's no immediate problem, but something not entirely clean either.

    The environment here means the u-boot environment variables (configuration of the bootloader and the linux boot process), which are stored in a flash partition u-boot-env of their own:

    root@xyz:~# cat /proc/mtd 
    dev:    size   erasesize  name
    mtd0: 00030000 00010000 "u-boot"
    mtd1: 00010000 00010000 "u-boot-env"
    mtd2: 00010000 00010000 "factory"
    mtd3: 00fb0000 00010000 "firmware"
    mtd4: 001393d6 00010000 "kernel"
    mtd5: 00e76c2a 00010000 "rootfs"
    mtd6: 00a00000 00010000 "rootfs_data"
    

    There is a utility called fw_printenv which is supposed to display the environment, and fw_setenv to change these variables. These tools need /etc/fw_env.config to be present. For some strange reason, this file sometimes does not exist on a fresh Omega2. You can create one manually with

     echo "/dev/mtd1 0x0 0x1000 0x10000" >/etc/fw_env.config
    

    After that, fw_printenv works, but shows the same CRC error message you see in dmesg, because the data it tries to access is not valid.

    However, when you start your Omega into u-boot command line (connect console, hold button and then switch on power and quickly press 1), you can see what really is in the uboot environment:

    U-Boot 1.1.3 (Oct 18 2016 - 17:30:55)
    Omega2 # printenv
    bootcmd=tftp
    bootdelay=5
    baudrate=115200
    ethaddr="00:AA:BB:CC:DD:10"
    ipaddr=192.168.8.8
    serverip=192.168.8.1
    stdin=serial
    stdout=serial
    stderr=serial
    

    From here, the uboot-env is writable, like:

    setenv myvarname myvalue
    saveenv
    

    When you now boot the Omega again normally, and then use fw_printenv, there's no CRC error any more, and you see the same info as from the uboot command line.

    Conclusion: something is wrong in the way the u-boot env is initialized on the Omega2, such that no correct CRC value is written.

    To track down this entirely, we'll have to wait until Onion also publishes their modified u-boot - soon, I hope, now that they finally published their LEDE tree)!



  • György -

    Most Linux boots have a bunch of semi-scary messages. It's a function of trying to support as much hardware as possible, so that many things can "fail" w/o being catastrophic. A lot of the time they go away with a custom kernel that has the right drivers. But the hardware works fine because the required module is loaded ahead of time anyway.



  • @Burton-Strauss generally speaking, true - but in this particular case an important part of the bootloader configuration mechanism seems to be broken. That's not something that Onion should just ignore…



  • @luz Many thanks. Your post is very helpful.
    Now there is no *** Warning - bad CRC, using default environment among serial console messages :-)

    However I should Read That Fine U-Boot Manual (how to set the uboot environment ;-) because of

    root@Omega-5BE1:~# fw_printenv
    Warning: Bad CRC, using default environment
    bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
    bootdelay=5
    baudrate=115200
    


  • @luz This is the community board, I haven't seen a lot of official presence here. Pretty much users helping each other.

    Good info on the uboot. Thanks!



  • MT7688 systems generally do not use the U-Boot "environment". I'm sure someone who wanted it to could get it working, but Mediatek didn't and apparently no one downstream has thought it worthy of effort either.

    The other message appears to be about the startup of a random number generator service.



  • @Chris-Stratton Ah, that explains a lot - didn't know that.

    Fortunately, the uboot env as such works on the Omega2. I use it to provision some information for my targets that must survive even when completely re-flashing the LEDE firmware. This works fine after the environment is saved once in uboot or (luckily) on a brand new Omega2 with the bootstrap firmware (the one that asks for WiFi and then updates to the real FW).

    Actually, knowing that MT7688 systems do not make use of uboot env relieves me a bit - I was still a bit anxious I might have not understood all details and possibly causing problems using the env as I do.



  • @luz Maybe your system does use the environment; I've never seen it anything but blank and recall that trying to set things there didn't work for me, but I'm running a patched mediatek u-boot not an onion one.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.