Skip to contentSkip to conversation

PREFERRED_VERSION not being populated onto the rootfs image

DISCUSSION John 2 participants 9 messages Feb 12, 2025 – Feb 19, 2025

lore
Share & tools
lore

John

author
#0 lore raw

In the latest stable version of Yocto, I've been building an image for a raspberry Pi board which has a wifi i/f on it. While trying to bring up the wifi connection I need to roll back the version of wpa_supplicant that it is using.

In the raspberrypi configure file I've put in "PREFERRED_VERSION_wpa-supplicant = "2.9". The version that is being used currently is 2.11.

I've then created a recipe file for that version and made sure that it compiles using bitbake. (Had some patching issues, all fixed).

I then run the command "bitbake core-image-minimal" and boot with the subsequent image. When I query the version of wpa-supplicant I get 2.11.

I'm unable to find any "PRIORITY" variable of any kind. Why is it grabbing the incorrect version? What have I forgotten to do?

Cheers!!

#1 lore raw

You're not saying what the configure file is and where is it. Can you show that?

Help arrives quicker if we can reproduce the problem or at least see your setup exactly.

Does log.do_rootfs for your image say which version of wpa supplicant gets installed?

Alex

Quoted 21 lines · John via lists.yoctoproject.org

In the latest stable version of Yocto, I've been building an image for a raspberry Pi board which has a wifi i/f on it. While trying to bring up the wifi connection I need to roll back the version of wpa_supplicant that it is using.

In the raspberrypi configure file I've put in "PREFERRED_VERSION_wpa-supplicant = "2.9". The version that is being used currently is 2.11.

I've then created a recipe file for that version and made sure that it compiles using bitbake. (Had some patching issues, all fixed).

I then run the command "bitbake core-image-minimal" and boot with the subsequent image. When I query the version of wpa-supplicant I get 2.11.

I'm unable to find any "PRIORITY" variable of any kind. Why is it grabbing the incorrect version? What have I forgotten to do?

Cheers!!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64787): https://lists.yoctoproject.org/g/yocto/message/64787
Mute This Topic: https://lists.yoctoproject.org/mt/111149982/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw

Alexander,

Thanks for your reply.

I've attached my new configure file that lives in: poky/meta-raspberrypi/conf/machine

Mea Culpa: I created this configure file and am using the MACHINE ??= "raspberrypi0-64-wf.conf" in my local.conf file.

Since the raspberrypi Zero support does not work out of the box. There is an issue in that it has to build as a 64 bit image or Raspberry Pi's boot loader won't load it. And then, the kernel modules are missing... and then the WIFI isn't installed completely and doesn't work anyways... etc... I created my own machine configuration file.

My current state has the image booting, I have a serial connection and through it I can try to bring up wifi by hand but the wpa-supplicant won't connect. My searches have found some information that it is a recent patch that has a side effect of not letting wpa-supplicant work with some raspberry Pi's. I gather an older version (2.9) does work so that's why I'm doing this.

I have no idea where the log file you referred to is or how to make bitbake generate it.

I did do a:

Quoted 3 lines
$ bitbake -c cleanall wpa-supplicant

I can see that the correct version is referenced.

Cheers!!

author
#3 lore raw

And I'm now adding the recipe file that I created (sorry, should have been in the previous message). I just copied the original recipe file. Pretty sure that isn't how it's supposed to be done but I'm going backwards in version, not forwards. Not sure how that would be handled.

And for good measure I included my local.conf file.

Cheers!!

#4 lore raw

Sure, but do you still have a problem? I'm not certain after reading your messages.

Alex

Quoted 15 lines · John via lists.yoctoproject.org

And I'm now adding the recipe file that I created (sorry, should have been in the previous message). I just copied the original recipe file. Pretty sure that isn't how it's supposed to be done but I'm going backwards in version, not forwards. Not sure how that would be handled.

And for good measure I included my local.conf file.

Cheers!!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64801): https://lists.yoctoproject.org/g/yocto/message/64801
Mute This Topic: https://lists.yoctoproject.org/mt/111149982/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#6 lore raw

So, I added "dhcpcd" to this line in my local.conf file:

Quoted 4 lines

IMAGE_INSTALL:append = " linux-firmware-bcm43430 bluez5 i2c-tools wpa-supplicant dhcpcd"

and voila, I have my wpa_supplicant v2.9 installed.... so any ideas why this worked?

And with that, I ran the wpa_supplicant and I now have wifi working on a raspberry Pi Zero 2 W running a Yocto 64-bit image.

The negative is that wpa-supplicant 2.9 doesn't take a passphrase that's encoded so I have a clear text PSK in the file. That will need to be fixed. I guess the patch that causes the issues with 2.11 needs to be identified and removed. I'm sure that will be tedious.

Any tests or information about my build that is requested will certainly be done if you think it will be constructive and helpful to the cause.

Cheers!!

author
#7 lore raw

And now I have a working raspberrypi Zero 2 W with wifi (comes up automatically) and probably a working Bluetooth (not of importance to me right now but there appears to be an interface for it).

With the addition of the dhcpcd s/w shown above I had a working wpa-supplicant as it replaced the 2.11 version with the 2.9 version. My next problem was to get the wifi to start automatically. This was done by creating my own "interfaces" file under "init-updown" in the recipes-connectivity right here:

Quoted 4 lines

./recipes-core/init-ifupdown/init-ifupdown-1.0/raspberrypi0-64-wf/interfaces

This file will be installed to /etc/network.

Somewhere I ran across this setup in which you can just override a generic file by placing the same file in a sub-directory prefixed with the machine name you are using. This will prioritise this version of the file. In that file I removed some of the references to "eth0" and "eth1" and made sure "wlan0" was set to auto.

So I consider my issue all closed and then some.

Cheers!!

author
#8 lore raw
In reply to John

Last bit of cleanup, of course the ".conf" file takes the encoded passphrase. I had a fat-finger moment.

Cheers!!