Yocto Openssh



4.0 Enabling SSH and Connecting Via Ethernet

Linux-yocto/5.4: update to v5.4.65 linux-yocto/5.4: update to v5.4.64 linux-yocto/config: netfilter: Enable nat for ipv4 and ipv6 kernel-yocto: add KBUILDDEFCONFIG search location to failure message sstate.bbclass: Check file ownership before doing 'touch -a' openssh: Allow enable/disable of rng-tools recommendation on sshd. The Yocto Project ships with two SSH servers you can use in your images: Dropbear and OpenSSH. Dropbear is a minimal SSH server appropriate for resource-constrained environments, while OpenSSH is a well-known standard SSH server implementation.

Now that we've got a console up and running, we've got a way to enter commands, read and write files, and do a bunch of great stuff. However, there are certain advantages to using ssh to connect to the board, so I want to cover that real quickly before we get into Yocto.

4.1 Enabling SSH

By default, ssh is not enabled in Raspbian, but it is installed. To start up the sshd server, all we have to do is type:

You won't see any response to this command, but if you do a ps -ef | grep ssh, you should see the sshd process listed like so: Asana desktop app for mac.


4.2 Manually Setting an IP Address

Typically when doing embedded development work, I like to connect directly from my computer to my boards over Ethernet instead of going through a router. This means that they're not being assigned an IP address since there is no router to provide DHCP services. We'll set the ip address of the board manually using the ip command like so:

This will set up a subnet mask of 255.255.255.0 and assign the IP address of 169.254.1.100 to the Ethernet port, which is mapped to /dev/eth0.

4.3 Connecting an Ethernet Cable and SSH'ing In

On the host computer, set the IP address to something like:


IPV4 Address : 169.254.1.10
Subnet Mask : 255.255.255.0
Gateway : 169.254.1.1


Dropbear

After connecting an Ethernet cable from your host computer to the Raspberry Pi, you should be able to open a terminal and type:

With any luck, the connection will work and you'll see the following message:


A word of warning: if you are connected to your home router, I'd definitely recommend changing the password right away!


← Previous .. Next →

Table of Contents

Chapters


Assuming you have started with Yocto and Wandboard (see Getting_started_with_Yocto_on_Wandboard if not)..

These instructions where tested with Yocto Dizzy

  • 5Cross compile Qt5 for QtCreator
Openssh
Clone meta-qt5

Grab the latest stable meta-qt5 inside the yocto/sources directory:

Password

Yocto Openssh-sshd

Be sure to clone the same branch for meta-qt5 as you are using for the other layers! (here we are using dizzy, so replace 'dizzy' with your preferred branch.)

Edit your yocto configuration files

1. Edit yocto/build/conf/bblayers.conf to add the meta-qt5 layer at the end:

2. Edit yocto/build/conf/local.conf and add:

We include ssh-server-openssh in EXTRA_IMAGE_FEATURES and the openssh-sftp-server in IMAGE_INSTALL_append for rapid deploying using QtCreator

  • Note: qtquickcontrols-qmlplugins fails in master branch

If you plan on using the 'core-image-minimal' image, then you must add 'dbus' to the IMAGE_INSTALL_append list.

If you plan to use Qt5 eglfs plugin for accelerated graphics using the framebuffer, you need to discard X11 and wayland so the proper graphics drivers get included:

  • The Wandboard Linux Kernel 3.10.17 comes configured with 24 bit depth for HDMI and LCD displays in the device tree. If you experience problems running Qt5 applications with the eglfs platform, change the bit depth to 32 bits in your own kernel fork or use the fbset (fbset [w] [h] [w] [h] 32) BEFORE running any egl application.
Bitbake!

Bitbake an image like core-image-minimal (you need to be in your yocto/build directory):

Yocto Openssh Server

Note: If bitbake fails with an error regarding cmake or drm recipes, locate their directories, delete them and try again.

Test your image

Boot your image and test your Qt5 installation with the CinematicExperience (these parameters if using eglfs and a touchscreen):

Cross compile Qt5 for QtCreator

Yocto Openssh Password

It is now very easy to build an environment for cross compilation using QtCreator. Version 1.7 in paths refers to Yocto Dizzy branch, if you are using different branch please use corresponding paths.

bitbake a meta-toolchain-qt5

Bitbake a poky toolchain (you need to be in your yocto/build directory):

Install your new toolchain
Yocto Openssh

Run the new installer that has been generated in yocto/build/tmp/deploy/sdk

This will install a cross compiler and its needed environment including the Qt5 arm libraries.

Yocto Openssh Instead Of Dropbear

Configure Qt creator
Yocto openssh server

Run qtcreator from the terminal after running the setup environment script located in /opt/poky/1.7

In QtCreator go to Tools > Options > Devices and add your Wandboard as a generic linux device.

Yocto Openssh

go to Tools > Options > Build & Run and:

Yocto Openssh Config

  1. Add a new compiler. Select your poky compiler: /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-cpp
  2. Add your new cross compiled Qt version by selecting the qmake located in /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/qt5
  3. Add a new kit selecting your new Qt5 version and compiler and setting the sysroot to /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi and leave the Qt mkspec empty. Finally select your wandboard for the device.

Yocto Openssh Systemd

Retrieved from 'http://wiki.wandboard.org/index.php?title=Building_Qt5_using_yocto_on_Wandboard&oldid=6'