Yocto Ssh Server



I'm building my custom distribution for RPi using Yocto. My distro includes ssh server (dropbear, but the question is valid for openssh also) One of the annoying things that I notices is that every time I flash a newly-built image to the board, I get a new SSH host key. As OE/Yocto Project still has a steep learning-curve, a better way would be to share resources with the community. Commands All hints for CLIs like bitbake, bitbake-layers, devtool etc. Used within common Yocto Project development. Per the Yocto Mega Manual, section 5.2.2, the correct image should be 'core-image-full-cmdline', since: - Galileo does not have video output, and is therefore a Command Line Interface (CLI) bound device via serial/sshd/telnet. 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: $ sudo systemctl start ssh. I have a question regarding wired ssh configuration on beaglebone using Yocto. I have an image ready with: packagegroup-core-ssh-openssh openssh-sftp-server (and bunch of others but i dont this they are relevant in this situation). Everything boots fine, but when i do ifconfig there is no usb0.

Please read the Yocto tutorial before you proceed with building Qt5. The following instruction were tested on our DHCOM i.MX6 computer on module with Yocto stable branch Dizzy

Configure Sources

Clone meta-qt5

Clone the stable branch dizzy of meta-qt5 inside the yocto/sources directory:

Yocto

Be sure to clone the same branch for meta-qt5 as you are using for the other layers!

Ssh

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

Yocto Start Ssh Server

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

Yocto

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 and remove cairo because of X11 dependencies:

Bug in meta-fsl-demos: packagegroup-fsl-tools-testapps

Solution is already available:

  • If packagegroup-fsl-tools-testapps is not required please remove it from IMAGE_INSTALL_append in local.conf

Bitbake!

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

Note: If bitbake fails with an error regarding cmake or drm recipes, locate their directories, delete them and try again. We discoverd this several times. There is no clean solution available at the moment.

Test your image

Boot your image and run some Qt5 examples:

Yocto ssh server ip

Cross compile Qt5 for QtCreator

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

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

Yocto Ssh Server Status

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

Configure Qt creator

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.

go to Tools > Options > Build & Run and:

Yocto Ssh Server Download

  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 board for the device.

External References

  • The content of this tutorial heavily borrowed from 'Building Qt5 using yocto on Wandboard'

Yocto Ssh-server-dropbear

Yocto

Yocto Ssh Server Ip

Retrieved from 'https://wiki.dh-electronics.com/index.php?title=Building_Qt5_for_i.MX6_using_Yocto_Dizzy&oldid=2897'