Skip to content

meta-layer and recipes for ankaios in yocto project

License

Notifications You must be signed in to change notification settings

mrogonna/meta-ankaios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ankaios metalayer.

This metalayer provides the recipes for ankaios packages needed to build and integrate its binary in yocto project environment.

Quick start

If you already setup a yocto environment do the following if not start here Yocto Project Quick Build

  1. Clone the recipes meta-anakios/recipes-ankaios to your yocto environent

  2. Add the following dependencies if not yet available

  3. Add the following on your local.conf file, This prevents bitbake from fetching rust and cargo from poky rather, it gets the recent version from meta-rust layer

    BBMASK += "poky/meta/recipes-devtools/rust"
    BBMASK += "poky/meta/recipes-devtools/cargo"
    
  4. Add the following binaries and then build your image

    IMAGE_INSTALL:append = " \
    	ank \
    	ank-server \
    	ank-agent \
    "
    

Dependencies

This layer depends on

Source Code

This project is tested and maintains the following source:

ankaios-recipes from source

Prerequisites:

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

Generate recipes for Rust based projects

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 run cargo bitbake.

Install cargo-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

Clone Ankaios Source File

cd ${yocto-directory}/
git clone https://github.com/mrogonna/ankaios

Generate Recipe

  • Navigate to the Ankaios directory
  • Run the Bash script to automatically generate the recipe for all the packages
cd ankaios/
./cargo_bitbake.sh

Generate MD5 and Replace It in the LIC_FILES_CHKSUM Area

# 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 .bb files

  • Copy the recipes to the appropriate directories
  • Go back to Quick Start to build your image

About

meta-layer and recipes for ankaios in yocto project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published