robotrokers / rokers-yocto-distro

A Yocto Distro for robot enabler embedded Linux!
MIT License
0 stars 1 forks source link

dev-rokers: Add Wi-Fi support #19

Closed gmacario closed 7 years ago

gmacario commented 7 years ago

Tracking what's left from #5:

Check how this has been done on upstream https://github.com/GENIVI/genivi-dev-platform

gmacario commented 7 years ago

Rebuilt image genivi-dev-platform from branch master (commit eca9f5b9c838dee8e6bc1399aef532f2111a4379) and tested it on a RPi3.

With this image the built-in Wi-Fi adapter is correctly recognized:

root@raspberrypi3:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr B8:27:EB:21:3F:76
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:12343 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:889218 (868.3 KiB)  TX bytes:889218 (868.3 KiB)

wlan0     Link encap:Ethernet  HWaddr B8:27:EB:74:6A:23
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@raspberrypi3:~#

The following kernel modules are loaded:

root@raspberrypi3:~# lsmod
Module                  Size  Used by
rfcomm                 34553  2
bnep                   10890  2
hci_uart               17905  1
btbcm                   5891  1 hci_uart
bluetooth             330587  27 bnep,btbcm,hci_uart,rfcomm
ecryptfs               75798  0
brcmfmac              193568  0
brcmutil                5981  1 brcmfmac
cfg80211              451240  1 brcmfmac
rfkill                 18246  5 cfg80211,bluetooth
i2c_bcm2708             4834  0
bcm2835_wdt             3225  0
bcm2835_gpiomem         2972  0
uio_pdrv_genirq         3164  0
uio                     8128  1 uio_pdrv_genirq
sch_fq_codel            8781  2
snd_bcm2835            21867  0
snd_pcm                76286  1 snd_bcm2835
snd_timer              19348  1 snd_pcm
snd                    52842  3 snd_bcm2835,snd_timer,snd_pcm
hid_multitouch         10037  0
fuse                   89538  1
ipv6                  354479  30
root@raspberrypi3:~#

Additionally the image includes ALL kernel modules (through the kernel-modules meta package)

root@raspberrypi3:~# rpm -qa | grep kernel-module- | wc -l
1527
root@raspberrypi3:~# rpm -qil kernel-modules
Name        : kernel-modules               Relocations: (not relocatable)
Version     : 4.4.50+git0+04c8e47067            Vendor: (none)
Release     : r0                            Build Date: Mon Jul 10 10:20:10 2017
Install Date: Mon Jul 10 13:36:17 2017      Build Host: 0fb7e9de3727
Group       : kernel                        Source RPM: linux-raspberrypi-4.4.50+git0+04c8e47067-r0.src.rpm
Size        : 0                                License: GPLv2
Signature   : DSA/SHA1, Mon Jul 10 10:20:14 2017, Key ID ceaff6cf4670334d
Packager    : meta-ivi <genivi-meta-ivi@lists.genivi.org>
Summary     : Linux kernel
Architecture: raspberrypi3
Description :
Kernel modules meta package
(contains no files)
root@raspberrypi3:~#

NOTE: kernel-modules is included because of https://github.com/GENIVI/meta-ivi/blob/df824ccfb821a38f2e83b1d1ac75a4601a5b738b/meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-specific-component-p1.bb#L14

The image also includes packages wireless-tools and wpa-supplicant:

root@raspberrypi3:~# rpm -qil wireless-tools
Name        : wireless-tools               Relocations: (not relocatable)
Version     : 30.pre9                           Vendor: (none)
Release     : r0                            Build Date: Mon Jul 10 11:54:41 2017
Install Date: Mon Jul 10 13:34:08 2017      Build Host: 0fb7e9de3727
Group       : base                          Source RPM: wireless-tools-30.pre9-r0.src.rpm
Size        : 66372                            License: GPLv2 & (LGPLv2.1 | MPL-1.1 | BSD)
Signature   : DSA/SHA1, Mon Jul 10 11:54:42 2017, Key ID 56eed567c00f44b6
Packager    : meta-ivi <genivi-meta-ivi@lists.genivi.org>
URL         : http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
Summary     : Tools for the Linux Standard Wireless Extension Subsystem
Architecture: cortexa7hf_neon_vfpv4
Description :
Tools for the Linux Standard Wireless Extension Subsystem.
/sbin
/sbin/iwconfig
/sbin/iwgetid
/sbin/iwlist
/sbin/iwpriv
/sbin/iwspy
root@raspberrypi3:~# rpm -qil wpa-supplicant
Name        : wpa-supplicant               Relocations: (not relocatable)
Version     : 2.5                               Vendor: (none)
Release     : r0                            Build Date: Mon Jul 10 11:42:41 2017
Install Date: Mon Jul 10 13:35:42 2017      Build Host: 0fb7e9de3727
Group       : network                       Source RPM: wpa-supplicant-2.5-r0.src.rpm
Size        : 956033                           License: BSD
Signature   : DSA/SHA1, Mon Jul 10 11:42:41 2017, Key ID 3fba281d8cd9a2b4
Packager    : meta-ivi <genivi-meta-ivi@lists.genivi.org>
URL         : http://w1.fi/wpa_supplicant/
Summary     : Client for Wi-Fi Protected Access (WPA)
Architecture: cortexa7hf_neon_vfpv4
Description :
Client for Wi-Fi Protected Access (WPA).
/etc
/etc/dbus-1
/etc/dbus-1/system.d
/etc/dbus-1/system.d/dbus-wpa_supplicant.conf
/etc/default
/etc/default/volatiles
/etc/default/volatiles/99_wpa_supplicant
/etc/network
/etc/network/if-down.d
/etc/network/if-post-down.d
/etc/network/if-post-down.d/wpa-supplicant
/etc/network/if-pre-up.d
/etc/network/if-pre-up.d/wpa-supplicant
/etc/wpa_supplicant.conf
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/wpa_supplicant-nl80211@.service
/lib/systemd/system/wpa_supplicant-wired@.service
/lib/systemd/system/wpa_supplicant.service
/lib/systemd/system/wpa_supplicant@.service
/usr
/usr/sbin
/usr/sbin/wpa_supplicant
/usr/share
/usr/share/dbus-1
/usr/share/dbus-1/system-services
/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service
root@raspberrypi3:~#

Package wpa-supplicant is included because of https://github.com/GENIVI/meta-ivi/blob/df824ccfb821a38f2e83b1d1ac75a4601a5b738b/meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-specific-component-p1.bb#L31

gmacario commented 7 years ago

With image rokers-image-base only kernel module ipv6 is deployed to the root filesystem:

root@raspberrypi3:~# rpm -qa | grep kernel-module
kernel-module-ipv6-4.4.50+git0+04c8e47067-r0.raspberrypi3
root@raspberrypi3:~#