This article applies to all TeamViewer IoT users.
General
The Yocto Project enables the creation of custom Linux-based systems for embedded devices.
The TeamViewer IoT Agent will run on Yocto Linux devices given minimum requirements and configurations are met.
This article is an example how to build Yocto Image with TeamViewer IoT Agent for Raspberry using the layer provided in GitHub. Information about this here
Requirements
You need some dependencies to develop projects in the Yocto Project. Please check here for more information.
How to setup
- Install dependencies based on OS version (use verified OS for building image). Check here
- Open Terminal on Host Machine and run the commands below:
- Clone poky project's zeus branch
git clone --branch=zeus git://git.yoctoproject.org/poky.git && cd poky
- Clone raspberryPi and TeamViewer IoT agent meta-packages
git clone --branch=zeus git://git.yoctoproject.org/meta-raspberrypi git clone --branch=zeus https://github.com/teamviewer/meta-teamviewer-iot-agent
- Configure Environment
source oe-init-build-env
- Add Layers to bitbake
bitbake-layers add-layer ../meta-raspberrypi bitbake-layers add-layer ../meta-teamviewer-iot-agent
- Change the target Machine on the configuration file and set init manager to systemd
echo 'MACHINE = "raspberrypi3"' >> conf/local.conf echo 'DL_DIR = "${TOPDIR}/downloads"' >> conf/local.conf echo 'CONNECTIVITY_CHECK_URIS = "https://www.google.com/"' >> conf/local.conf echo '#Set Systemd to Init Manager' >> conf/local.conf echo 'DISTRO_FEATURES_append = " systemd"' >> conf/local.conf echo 'DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"' >> conf/local.conf echo 'VIRTUAL-RUNTIME_init_manager = "systemd"' >> conf/local.conf
- Append ssh and TeamViewer IoT agent layer, 50MB extra space, and set default password for root user
echo '#Append TeamViewer IoT agent layer' >> conf/local.conf echo 'IMAGE_INSTALL_append += " teamviewer-iot-agent"' >> conf/local.conf echo 'IMAGE_ROOTFS_EXTRA_SPACE ?= "50000"' >> conf/local.conf echo 'CORE_IMAGE_EXTRA_INSTALL += "openssh"' >> conf/local.conf echo 'INHERIT += "extrausers"' >> conf/local.conf echo 'EXTRA_USERS_PARAMS = "usermod -P raspberry root;"' >> conf/local.conf echo 'VOLATILE_LOG_DIR = "no"' >> conf/local.conf
- OPTIONAL - For installing Xvfb server in the target device to be able to use X11 features
echo '#X11' >> conf/local.conf echo 'DISTRO_FEATURES_append += " X11"' >> conf/local.conf
- OPTIONAL - For enable edge management with Docker in the target device
git clone --branch=zeus git://git.openembedded.org/meta-openembedded ../meta-openembedded git clone --branch=zeus git://git.yoctoproject.org/meta-virtualization ../meta-virtualization sed -i '$d' conf/bblayers.conf echo ' ${TOPDIR}/../meta-openembedded/meta-oe \' >> conf/bblayers.conf echo ' ${TOPDIR}/../meta-openembedded/meta-multimedia \' >> conf/bblayers.conf echo ' ${TOPDIR}/../meta-openembedded/meta-networking \' >> conf/bblayers.conf echo ' ${TOPDIR}/../meta-openembedded/meta-python \' >> conf/bblayers.conf echo ' ${TOPDIR}/../meta-openembedded/meta-filesystems \' >> conf/bblayers.conf echo ' ${TOPDIR}/../meta-virtualization \' >> conf/bblayers.conf echo ' "' >> conf/bblayers.conf bitbake-layers show-layers echo '#Docker layer for supporting Edge services' >> conf/local.conf echo 'DISTRO_FEATURES_append += " virtualization"' >> conf/local.conf echo 'IMAGE_ROOTFS_EXTRA_SPACE = "400000"' >> conf/local.conf
- Run the command below to start the build
bitbake core-image-minimal
Notes: You can find target image tmp/deploy/images/raspberrypi3/ here with core-image-minimal-raspberrypi3 prefix. In case of failure or new bash ( terminal ) creation, after all steps executed you need to go to Project's directory and start again from Configure Environment. When using 'ssh' with the built image, the username is 'root' and the password is 'raspberry'.