robotrokers / rokers-yocto-distro

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

dev-rokers: Add networking #5

Closed ludusrusso closed 7 years ago

ludusrusso commented 7 years ago

As discussed in pull/#4 The rasp needs ethernet and wifi enabled!

gmacario commented 7 years ago

As of today branch dev-robots (commit acd5a7b30dfee49cda176908afea25cf2ee88d35)

Yocto GENIVI Baseline (Poky/meta-ivi) 12.0.0 raspberrypi3 ttyS0

raspberrypi3 login: root
root@raspberrypi3:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr B8:27:EB:21:3F:76
          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:2720 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:206720 (201.8 KiB)  TX bytes:206720 (201.8 KiB)

root@raspberrypi3:~#

Notice that in order to initialize the interfaces you need to either install and run a DHCP client, or do it manually as in the following example:

root@raspberrypi3:~# ifconfig --help
BusyBox v1.24.1 (2017-06-27 16:37:07 UTC) multi-call binary.

Usage: ifconfig [-a] interface [address]
root@raspberrypi3:~# ifconfig eth0 192.168.64.20
[  605.623680] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[  605.631066] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
root@raspberrypi3:~# p[  607.154817] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  607.162140] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
ing 192.168.64.1
PING 192.168.64.1 (192.168.64.1): 56 data bytes
64 bytes from 192.168.64.1: seq=0 ttl=64 time=0.806 ms
64 bytes from 192.168.64.1: seq=1 ttl=64 time=0.336 ms
^C
--- 192.168.64.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.336/0.571/0.806 ms
root@raspberrypi3:~#

As discussed yesterday I plan to create a new BitBake image (please suggest a meaningful name, i.e. rokers-image-base) and integrate there part of the configuration done in genivi-dev-platform.

Additionally, could you please explain which network services do you want to be installed/started, for instance

Please have a look at genivi-dev-platform-raspberrypi3-20170626164946.rootfs.manifest (or run the corresponding image) to get inspiration of what you may need.

ludusrusso commented 7 years ago

This is the minimum we need (I think):

gmacario commented 7 years ago

OK.

1) Do you like the name rokers-image-base for this image which will extend core-image-minimal? I would follow Yocto naming conventions, i.e. vendor-image-flavour

2) What do you mean "both wlan0/eth0 configured"? Both will get dynamic IP address via DHCP client? If I am not mistaken wlan0 acts as an Access Point instead, so will provide IP addresses, not the other way round

ludusrusso commented 7 years ago

Yes! rokers-image-base or rokers-image-minimal! Your choice! 🗡

gmacario commented 7 years ago

OK, I will first create a new Yocto layer meta-rokers (see PR https://github.com/robotrokers/genivi-dev-platform/pull/6) then add the necessary recipes there.

For what concerns the network configuration let us discuss it in person next time we meet.

ludusrusso commented 7 years ago

Yes! Anyway, regarding the wlan0 stuff: No, in our usecase, the users wants to connect the an external wifi network. But he needs a way to configure the wifi on the robot without connect to them using a monitor. So I'm working on https://github.com/HotBlackRobotics, that basically creates a wifi access points only if the robot cannot connect to a known network at boot!

gmacario commented 7 years ago

Partial fix via (merged) PR #6

gmacario commented 7 years ago

Summarizing status as of 2017-07-06 (genivi-dev-platform branch dev-rokers commit 8c0f0b57773a5ddfcab76b33bac335537727c158):

NOTE: rokers-image-base features the rpm package manager, you can use the following command to list all packages

rpm -qa | sort
gmacario commented 7 years ago

Attaching result of rpm -qa | sort:

root@raspberrypi3:~# rpm -qa | sort | wc -l
126
root@raspberrypi3:~# rpm -qa | sort
base-files-3.0.14-r89.raspberrypi3
base-passwd-3.5.29-r0.cortexa7hf_neon_vfpv4
busybox-1.24.1-r0.cortexa7hf_neon_vfpv4
busybox-udhcpc-1.24.1-r0.cortexa7hf_neon_vfpv4
db-6.0.35-r1.cortexa7hf_neon_vfpv4
dbus-1-1.10.10-r0.cortexa7hf_neon_vfpv4
e2fsprogs-e2fsck-1.43-r1.cortexa7hf_neon_vfpv4
file-5.28-r0.cortexa7hf_neon_vfpv4
kbd-2.0.3-r0.cortexa7hf_neon_vfpv4
kbd-consolefonts-2.0.3-r0.cortexa7hf_neon_vfpv4
kbd-keymaps-2.0.3-r0.cortexa7hf_neon_vfpv4
kernel-4.4.50-4.4.50+git0+04c8e47067-r0.raspberrypi3
kernel-module-ipv6-4.4.50+git0+04c8e47067-r0.raspberrypi3
keymaps-1.0-r31.raspberrypi3
kmod-23+git0+65a885df5f-r0.cortexa7hf_neon_vfpv4
libacl1-2.2.52-r0.cortexa7hf_neon_vfpv4
libattr1-2.4.47-r0.cortexa7hf_neon_vfpv4
libblkid1-2.28.1-r0.cortexa7hf_neon_vfpv4
libbz2-1-1.0.6-r5.cortexa7hf_neon_vfpv4
libc6-2.24-r0.cortexa7hf_neon_vfpv4
libcap2-2.25-r0.cortexa7hf_neon_vfpv4
libcom-err2-1.43-r1.cortexa7hf_neon_vfpv4
libcrypto1.0.0-1.0.2j-r0.cortexa7hf_neon_vfpv4
libdbus-1-3-1.10.10-r0.cortexa7hf_neon_vfpv4
libe2p2-1.43-r1.cortexa7hf_neon_vfpv4
libelf1-0.166-r0.cortexa7hf_neon_vfpv4
libexpat1-2.2.0-r0.cortexa7hf_neon_vfpv4
libext2fs2-1.43-r1.cortexa7hf_neon_vfpv4
libgcc1-6.2.0-r0.cortexa7hf_neon_vfpv4
libitm1-6.2.0-r0.cortexa7hf_neon_vfpv4
libkmod2-23+git0+65a885df5f-r0.cortexa7hf_neon_vfpv4
liblzma5-5.2.2-r0.cortexa7hf_neon_vfpv4
libmount1-2.28.1-r0.cortexa7hf_neon_vfpv4
libossp-uuid16-1.6.2-r2.cortexa7hf_neon_vfpv4
libpam-1.3.0-r5.cortexa7hf_neon_vfpv4
libpam-runtime-1.3.0-r5.cortexa7hf_neon_vfpv4
libpcre1-8.39-r0.cortexa7hf_neon_vfpv4
libpcreposix0-8.39-r0.cortexa7hf_neon_vfpv4
libpopt0-1.16-r3.cortexa7hf_neon_vfpv4
libpython2.7-1.0-2.7.12-r1.cortexa7hf_neon_vfpv4
libreadline6-6.3-r0.cortexa7hf_neon_vfpv4
libssl1.0.0-1.0.2j-r0.cortexa7hf_neon_vfpv4
libstdc++6-6.2.0-r0.cortexa7hf_neon_vfpv4
libsystemd0-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
libtinfo5-6.0+20160625-r0.cortexa7hf_neon_vfpv4
libuuid1-2.28.1-r0.cortexa7hf_neon_vfpv4
libz1-1.2.8-r0.cortexa7hf_neon_vfpv4
ncurses-terminfo-base-6.0+20160625-r0.cortexa7hf_neon_vfpv4
netbase-5.3-r0.cortexa7hf_neon_vfpv4
openssh-7.3p1-r0.cortexa7hf_neon_vfpv4
openssh-keygen-7.3p1-r0.cortexa7hf_neon_vfpv4
openssh-scp-7.3p1-r0.cortexa7hf_neon_vfpv4
openssh-ssh-7.3p1-r0.cortexa7hf_neon_vfpv4
openssh-sshd-7.3p1-r0.cortexa7hf_neon_vfpv4
openssl-1.0.2j-r0.cortexa7hf_neon_vfpv4
openssl-conf-1.0.2j-r0.cortexa7hf_neon_vfpv4
os-release-1.0-r0.all
packagegroup-core-boot-1.0-r17.raspberrypi3
packagegroup-core-ssh-openssh-1.0-r1.all
pam-plugin-deny-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-env-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-faildelay-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-group-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-keyinit-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-lastlog-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-limits-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-loginuid-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-mail-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-motd-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-nologin-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-permit-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-rootok-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-securetty-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-shells-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-unix-1.3.0-r5.cortexa7hf_neon_vfpv4
pam-plugin-warn-1.3.0-r5.cortexa7hf_neon_vfpv4
python-codecs-2.7.12-r1.cortexa7hf_neon_vfpv4
python-compression-2.7.12-r1.cortexa7hf_neon_vfpv4
python-contextlib-2.7.12-r1.cortexa7hf_neon_vfpv4
python-core-2.7.12-r1.cortexa7hf_neon_vfpv4
python-crypt-2.7.12-r1.cortexa7hf_neon_vfpv4
python-datetime-2.7.12-r1.cortexa7hf_neon_vfpv4
python-fcntl-2.7.12-r1.cortexa7hf_neon_vfpv4
python-io-2.7.12-r1.cortexa7hf_neon_vfpv4
python-lang-2.7.12-r1.cortexa7hf_neon_vfpv4
python-logging-2.7.12-r1.cortexa7hf_neon_vfpv4
python-math-2.7.12-r1.cortexa7hf_neon_vfpv4
python-mime-2.7.12-r1.cortexa7hf_neon_vfpv4
python-netclient-2.7.12-r1.cortexa7hf_neon_vfpv4
python-pickle-2.7.12-r1.cortexa7hf_neon_vfpv4
python-pprint-2.7.12-r1.cortexa7hf_neon_vfpv4
python-re-2.7.12-r1.cortexa7hf_neon_vfpv4
python-readline-2.7.12-r1.cortexa7hf_neon_vfpv4
python-resource-2.7.12-r1.cortexa7hf_neon_vfpv4
python-rpm-5.4.16-r0.cortexa7hf_neon_vfpv4
python-shell-2.7.12-r1.cortexa7hf_neon_vfpv4
python-smartpm-1.5+git0+407a7eca76-r0.cortexa7hf_neon_vfpv4
python-smartpm-backend-rpm-1.5+git0+407a7eca76-r0.cortexa7hf_neon_vfpv4
python-stringold-2.7.12-r1.cortexa7hf_neon_vfpv4
python-textutils-2.7.12-r1.cortexa7hf_neon_vfpv4
python-threading-2.7.12-r1.cortexa7hf_neon_vfpv4
python-unixadmin-2.7.12-r1.cortexa7hf_neon_vfpv4
python-xml-2.7.12-r1.cortexa7hf_neon_vfpv4
python-zlib-2.7.12-r1.cortexa7hf_neon_vfpv4
rpm-5.4.16-r0.cortexa7hf_neon_vfpv4
rpm-libs-5.4.16-r0.cortexa7hf_neon_vfpv4
run-postinsts-1.0-r9.all
shadow-4.2.1-r0.cortexa7hf_neon_vfpv4
shadow-base-4.2.1-r0.cortexa7hf_neon_vfpv4
shadow-securetty-4.2.1-r3.raspberrypi3
smartpm-1.5+git0+407a7eca76-r0.cortexa7hf_neon_vfpv4
systemd-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
systemd-compat-units-1.0-r29.cortexa7hf_neon_vfpv4
systemd-container-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
systemd-extra-utils-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
systemd-serialgetty-1.0-r5.raspberrypi3
systemd-vconsole-setup-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
udev-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
udev-hwdb-230+git0+3a74d4fc90-r0.cortexa7hf_neon_vfpv4
update-alternatives-opkg-0.3.2+git0+3ffece9bf1-r0.cortexa7hf_neon_vfpv4
update-rc.d-0.7-r5.all
util-linux-agetty-2.28.1-r0.cortexa7hf_neon_vfpv4
util-linux-fsck-2.28.1-r0.cortexa7hf_neon_vfpv4
util-linux-mount-2.28.1-r0.cortexa7hf_neon_vfpv4
util-linux-sulogin-2.28.1-r0.cortexa7hf_neon_vfpv4
volatile-binds-1.0-r0.all
root@raspberrypi3:~#
gmacario commented 7 years ago

We agreed with @ludusrusso today that wpa_supplicant is not required. @ludusrusso what else should I install instead?

ludusrusso commented 7 years ago

I need those two packages installed:

And then, we need to install those two modules we are developing with HBR: