This metalayer provides the recipes for ankaios packages needed to build and integrate its binary in yocto project environment.
If you already setup a yocto environment do the following if not start here Yocto Project Quick Build
-
Clone the recipes
meta-anakios/recipes-ankaios
to your yocto environent -
Add the following dependencies if not yet available
-
Add the following on your
local.conf
file, This prevents bitbake from fetchingrust
andcargo
from poky rather, it gets the recent version frommeta-rust
layerBBMASK += "poky/meta/recipes-devtools/rust" BBMASK += "poky/meta/recipes-devtools/cargo"
-
Add the following binaries and then build your image
IMAGE_INSTALL:append = " \ ank \ ank-server \ ank-agent \ "
This layer depends on
-
poky
- URI: https://git.yoctoproject.org/git/poky
- Branch: kirkstone
-
meta-rust
- URI: https://github.com/meta-rust/meta-rust
- Branch:
-
meta-openembedded:
- URI: https://git.openembedded.org/meta-openembedded
- Branch: kirkstone
- Layers:
- meta-oe
This project is tested and maintains the following source:
Before starting, ensure you have the following:
- Build system: I used Linux Host PC (Ubuntu 22.04 LTS (64 bit) operating system).
- Yocto Build Essential
- Necessary Yocto Project setup, including poky, bitbake, and meta layers
- cargo installed in you build PC
To generate a Yocto recipe for the Ankaios Rust-based project:
- Install
cargo bitbake
- Clone the project locally
- Navigate to the directory containing the
Cargo.toml
file to runcargo bitbake
.
cargo-bitbake
is a subcommand of Cargo. Its primary function is to generate a Yocto recipe that uses meta-rust to build Cargo-based projects for Yocto. It mainly uses the data in your Cargo.toml
file.
cargo install --locked cargo-bitbake
cd ${yocto-directory}/
git clone https://github.com/mrogonna/ankaios
- Navigate to the Ankaios directory
- Run the Bash script to automatically generate the recipe for all the packages
cd ankaios/
./cargo_bitbake.sh
# Generate the MD5 values, navigate to the LICENSE directory
cd ${HOME}/yocto/ankaios
md5sum LICENSE
# Copy the value and input it in the recipe file as follows:
# FIXME: update generateme with the real MD5 of the license file
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
"
- Copy the recipes to the appropriate directories
- Go back to Quick Start to build your image