Introduction¶
Kuksa is a wrapper project around AGL. From its side, AGL uses Yocto/Bitbake building system to build an automotive domain specific Linux distribution. Therefore, this projects provides a building system that adds Kuksa’s specific bitbake layers on top of the original AGL.
Layers Definition¶
To follow Yocto/Bitbake building system’s architecture, further modifications to the AGL Image/SDK are done using Bitbake layers on top. Kuksa related layers have lower priority than AGL’s to guarantee that Kuksa’s layers are in fact added on top of AGL’s.
Note
For more information regarding Bitbake Layers priorities please review the usage of BBFILE_PRIORITY in the Bitbake User Manual
meta-kuksa layer¶
The meta-kuksa layer shall contain all packages needed for the APPSTACLE project that aren’t already included in AGL. Furthermore, here is were the APPSTACLE project’s code base could be added into the Image/SDK.
meta-kuksa-dev layer¶
The meta-kuksa-dev layer contains all extra packages that are useful for the development process but aren’t required in the production Image.
meta-rover layer¶
This layer holds all the needed packages to enable the development for the Rover. Basically, it provides rover-app, rover-web and all their dependencies.
Note
For more information regarding the Rover’s internal please review the APP4MC-Rover Documentation.
Developers Guide¶
Yocto-based build system generates the;
- Image: is the Linux distribution image to be set deployed to the target system.
- SDK: is a set of libraries, binaries, headers and scripts to enable development of applications to be deployed on the Linux distribution running on the target.
Pre-built Images/SDK¶
Pre-build images and SDK are provided here.
Note
AGL-kuksa provides two sets of image/SDK one for the Rover and one for the plain board, which is Raspberry Pi 3 by default.
Build an Image/SDK¶
To build the Image/SDK, run;
cd <agl-kuksa-root>
mkdir build
cd build
cmake ..
make <agl-kuksa-target>
Where <agl-kuksa-target> can be;
- agl-kuksa-image: AGL kuksa image
- agl-kuksa-sdk: AGL kuksa SDK
- agl-kuksa: AGL kuksa image and SDK
- agl-rover-image: AGL Rover image
- agl-rover-sdk: AGL Rover SDK
- agl-rover: AGL Rover image and SDK
Note
The output images can be seen at <agl-kuksa-root>/build/images and the SDKs at <agl-kuksa-root>/build/sdk.
Booting the Image¶
To boot the image we recommend to use Etcher. You can directly download it from https://etcher.io/.
Etcher is a cross platform and straightforward tool for burning Images into SD cards. First you’ll need to select the image you want to burn by clicking on Select Image. This will open a file browser where you can choose your recently dowloaded or builded *.rpi-sdimg.xz.
If you have your SD card already inserted in your PC and it’s the only SD card inserted it will automatically detect it and skip till the last step. If not just click on Select Drive and select your SD card.
After selecting the SD card to be used just click on Flash! to start the burning process. This could take several minutes. Onces it finishes a message will pop-up saying the image was successfully burned.
Using the SDK¶
To use the SDK you need first to install it by running;
chmod u+x <target>-glibc-x86_64-agl-demo-platform-crosssdk-armv7vehf-neon-vfpv4-toolchain-<version>.sh
./<target>-glibc-x86_64-agl-demo-platform-crosssdk-armv7vehf-neon-vfpv4-toolchain-<version>.sh
Note
The installation script will ask for instalation directory. It’s a good idea to use the default installation path (/opt/<target>/<version>).
Command Line¶
Now to cross-compile an application using the command line first need to source the development environment by running;
source /opt/<target>/<version>/environment-setup-armv7vehf-neon-vfpv4-rover-linux-gnueabi
Now you can normally compile your code using the sourced environment.
Note
If your are compiling a cmake project you’ll need to re-run cmake command in order to properly use the sourced environment.
Eclipse Che¶
To be Written