IoTGateway/IoTSuite
Basically, we refer to How to certify IoT devices running Linux with Azure IoT SDK for IoTSuite test. Here we assume you have done Step 1 already.
Contents
Device Explorer
Follow the Step 2-1, you can download the DeviceExplorer on Windows.
Note: The Device Explorer utility only runs on Windows. On other platforms use the iothub explorer tool.
Our IoT Hub Connection String for Device Explorer:
HostName=RISCIoTSuite.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=h2zpoAztFD4JGUpV/Z0Laue1+3RigDUreb5abaM9qDQ=
Setup Yocto Environment
In Step 3-1, we know we need the following packages, and it requires cmake version 3.0 or higher & gcc version 4.9 or higher.
sudo apt-get install -y curl libcurl4-openssl-dev uuid-dev uuid g++ make cmake git unzip openjdk-7-jre
To install these packages on Yocto, we choose fsl-yocto-3.14.28_1.0.0 (Yocto BSP 1.7) as our base image, because the default gcc version is 4.9.1.
cmake
Because the cmake version in Yocto BSP 1.7 is 2.8.12.2, we have to add a latest one.
1. Get new poky source code from master branch.
git clone git://git.yoctoproject.org/poky
2. Copy the cmake folder to Yocto BSP.
poky/meta/recipes-devtools/cmake
Java
If you do not try to pass IoTSuite test for Java, you can skip this step.
1. Get new meta-java layer from master branch.
git clone git://git.yoctoproject.org/meta-java
2. libstdc++ static is needed on your host to compile icedtea7-native. [1]
3. Modify conf/bblayers.conf (Add meta-java after meta-advantech)
BBLAYERS += " ${BSPDIR}/sources/meta-java "
4. Modify conf/local.conf
# [JDK] # Possible provider: cacao-initial-native and jamvm-initial-native PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" # Possible provider: cacao-native and jamvm-native PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" # Optional since there is only one provider for now PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
5. Modify meta-advantech/recipes-fsl/images/fsl-image-adv.inc
IMAGE_INSTALL += "openjdk-7-jre"
6. If you cannot fetch rhino correctly, do this.
$ vim sources/meta-java/recipes-core/rhino/rhino_1.7r4.bb SRC_URI = "\ https://github.com/mozilla/rhino/archive/Rhino1_7R4_RELEASE.zip S = "${WORKDIR}/rhino-Rhino1_7R4_RELEASE" SRC_URI[md5sum] = "1f893577269631703d31e4de9d5dc1f4" SRC_URI[sha256sum] = "860965fc611764745b3a4fc5bd4baac07356a9fedd2ce6642e7bb0bd7ef58d07"
Others
For other packages, we can modify meta-advantech/recipes-fsl/images/fsl-image-adv.inc
IMAGE_INSTALL += " curl curl-dev openssl openssl-dev ossp-uuid ossp-uuid-dev cmake git unzip " IMAGE_INSTALL += " packagegroup-sdk-target ca-certificates-native python-html libssp libssp-dev "
Finally, you can build a new Yotco image for IoTSuite development environment!
$ bitbake fsl-image-qt5