Yocto thud missing libcrypt breaks wpa_supplicant

I am trying to upgrade from sumo to thud but I got something wrong.

After I boot the Raspberry Pi and the wpa_supplicant status always shows inactive (dead), and I found some message from /var/log/user.log

Jan  1 00:00:48 raspberrypi3 wpa_supplicant: Libgcrypt warning: missing initialization - please fix the application

Does anyone have the same problem as me?


Update:

The errors message is shown after I manual run systemctl start wpa_supplicant-nl80211@wlan0

But I cannot auto start correctly when rpi boot.

I seem to have seen this at some point, but do not actually recall what it was and how I fixed it.

I suspect that it is not a problem with libgcrypt, and you can probably check your filesystem and see that it is present.

It is just a confusing error message, I would check the wpa_supplication logs (maybe increase verbosity), and I suspect that that there is something else going wrong before this is shown.

I create a new environment to compile thud and libcrypt.so is not found. But in sumo it can be found.

And I am not sure is related to this:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=27dca7d2e955370166042c05aef1524fe1fbc70b


Update:

The errors message is shown after I manual run systemctl start wpa_supplicant-nl80211@wlan0

But I cannot auto start correctly when rpi boot.

I gave it a go on thud as well. I could not reproduce your problem unfortunately.

Might be something environment specific.

I follow this post to create a new environment but still missing libcrypt.
https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/21

I use the CentOS7 to compile this project, will this break anything?

This will not install the necessary parts you need for WiFi out-of-the-box, as this is a minimalist environment (offered by Yocto Project).

I would recommend you try adding the following to your local.conf:

DISTRO_FEATURES_append = " wifi"

You can also take a look at https://github.com/mendersoftware/meta-mender/tree/master/meta-mender-raspberrypi-demo, which contains some bits on getting WiFi running on a Raspberry Pi

The problem is happen when I use meta-mender-raspberrypi-demo and my version copy from it are got this error.

I am not sure what is wrong. It is work correctly when I use sumo, I didn’t change anything and switch to thud branch and it break.

I just ran this from scratch using the exact instructions in the hub post. The only change I made was to add the meta-mender-raspberrypi-demo layer.

I don’t have a /var/log/user.log file. I’m not sure what would be creating that. Do you have any extra software installed?

I do see the “dead” status of the wpa_supplicant service but wpa_supplicant-nl80211@wlan0 shows as live. And as far as I know this is expected when using systemd-networkd.

root@raspberrypi3:~# systemctl status wpa_supplicant | cat
● wpa_supplicant.service - WPA supplicant
   Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
root@raspberrypi3:~# systemctl status wpa_supplicant-nl80211@wlan0 | cat
● wpa_supplicant-nl80211@wlan0.service - WPA supplicant daemon (interface- and nl80211 driver-specific version)
   Loaded: loaded (/lib/systemd/system/wpa_supplicant-nl80211@.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-09-30 17:02:08 UTC; 2min 36s ago
 Main PID: 294 (wpa_supplicant)
   CGroup: /system.slice/system-wpa_supplicant\x2dnl80211.slice/wpa_supplicant-nl80211@wlan0.service
           └─294 /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf -Dnl80211 -iwlan0

Sep 30 17:03:29 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:03:37 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:03:45 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:03:53 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:01 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:09 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:16 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:24 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:32 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:40 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
root@raspberrypi3:~# 

The /var/log/user.log will generated when use core-image-full-cmdline, but I found the problem seems not related this error message.

My wpa_supplicant-nl80211@wlan0 is dead and unable to connect the network even I just add mender-mender-raspberrypi-demo-layer with their dependencies.