I want to replace the /etc/network/interfaces file on the resulting image root file system, so I added a bbappend recipe in my meta-rpilinux directory.
The bbappend file looks like this:
And the interfaces file in that directory looks like this:
After I build my image and look in the work build directory for the init-ifupdown package, I see the correct interfaces file :
However, after I burn the image to the SD card with this :
I see the "wrong/original" file in etc/network:
I am fairly new to Yocto and poky, is it possible that another layer/recipe is overriding the interfaces file ?
Note that in my local.conf, I am adding openssh recipe with this :
Code:
maminej@server:~/Yocto/meta-rpilinux/recipes-core/init-ifupdown$ tree.├── init-ifupdown-1.0│ └── raspberrypi4-64│ └── interfaces└── init-ifupdown_1.0.bbappend2 directories, 2 files
Code:
maminej@server:~/Yocto/meta-rpilinux/recipes-core/init-ifupdown$ cat init-ifupdown_1.0.bbappend FILESEXTRAPATHS_prepend := "${THISDIR}/init-ifupdown_1.0/${MACHINE}:"
Code:
maminej@server:~/Yocto/meta-rpilinux/recipes-core/init-ifupdown/init-ifupdown-1.0/raspberrypi4-64$ cat interfaces # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interfaceauto loiface lo inet loopback# Wireless interfacesiface wlan0 inet dhcpwireless_mode managedwireless_essid anywpa-driver wextwpa-conf /etc/wpa_supplicant.confiface atml0 inet dhcp# Wired or wireless interfacesauto eth0iface eth0 inet static address 169.254.1.100 netmask 255.255.255.0iface eth1 inet dhcp
After I build my image and look in the work build directory for the init-ifupdown package, I see the correct interfaces file :
Code:
maminej@server:~/Yocto/poky/build$ cat /home/maminej/Yocto/poky/build/tmp/work/aarch64-poky-linux/init-ifupdown/1.0-r7/image/etc/network/interfaces# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interfaceauto loiface lo inet loopback# Wireless interfacesiface wlan0 inet dhcpwireless_mode managedwireless_essid anywpa-driver wextwpa-conf /etc/wpa_supplicant.confiface atml0 inet dhcp# Wired or wireless interfacesauto eth0iface eth0 inet static address 169.254.1.100 netmask 255.255.255.0iface eth1 inet dhcp
However, after I burn the image to the SD card with this :
Code:
maminej@server:~/Image$ sudo dd bs=4M if=rpilinux-image-raspberrypi4-64-20231225065644.rootfs.wic of=/dev/sdb status=progress conv=fsync26+1 records in26+1 records out110503936 bytes (111 MB, 105 MiB) copied, 4.52635 s, 24.4 MB/s
Code:
maminej@server:/media/ROOT/etc/network$ cat interfaces # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interfaceauto loiface lo inet loopback# Wireless interfacesiface wlan0 inet dhcpwireless_mode managedwireless_essid anywpa-driver wextwpa-conf /etc/wpa_supplicant.confiface atml0 inet dhcp# Wired or wireless interfacesauto eth0iface eth0 inet dhcpiface eth1 inet dhcp
Note that in my local.conf, I am adding openssh recipe with this :
Code:
CORE_IMAGE_EXTRA_INSTALL += "openssh"
Statistics: Posted by maminej — Mon Dec 25, 2023 7:17 am