1

I am working with the yocto project and a Raspberry Pi 0 with wifi. I want to integrate the wpa_supplicant.conf file and copy it to the /etc/ folder. My recipe fails with reason stating that I don't have permission to copy this file at this location.

I am using do_install_append, but it did not work

do_install_append() { install -m 0755 ${S}/wpa_supplicant.conf /etc/ install -m 0755 ${S}/interaces /etc/network/ }

I tried copy -f but it failed also, nevertheless I tried sudo, but no clue.

1

Just put your wpa_supplicant.conf file directly on the root of the /boot partition of your SD-card.

The Pi will move it to the right location and start using it.

This overwrites your old config, so do a backup first.

I usually put the wpa_supplicant.conf there immediately after writing the image to the card. I usually put an empty file named ssh there too, and that enables SSH.

That way it connects to WiFi on first boot with SSH enabled.

The /boot partition is the one formatted as vfat/fat/fat32.

  • 1
    The operating system will use /boot/wpa_supplicant.conf immediately, not only on next boot. – Ingo Feb 9 at 10:37
  • @Ingo Thanks.. Better now? – svin83 Feb 11 at 22:13
  • (^.^)d (very good) – Ingo Feb 11 at 22:25
0

Solved by creating a folder first for the etc and then for the network

using the following install -d ${D}/etc install -d ${D}/etc/network

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.