Getting Started =============== This section covers the initial setup and steps to build your first image for the otto device. Prerequisites ------------- Ensure you have a Linux host with the following tools installed: - Git (for retrieving the project and layer repositories) - Python 3.6+ - `kas `_ - Git - Docker (optional, for container-based builds) Using KAS --------- To build your image using the provided configurations, you can either: **1. Combine files directly in the command:** Use the kas checkout command to fetch each layer separately: .. code-block:: bash kas checkout kas_otto/KAS/layers/poky.yml kas checkout kas_otto/KAS/layers/meta-arm.yml kas checkout kas_otto/KAS/layers/meta-openembedded.yml kas checkout kas_otto/KAS/layers/meta-otto-bsp.yml kas checkout kas_otto/KAS/layers/meta-swupdate.yml kas checkout kas_otto/KAS/layers/meta-virtualization.yml This will clone the repositories specified in each YAML file into their respective directories. After fetching all the layers, set up the build environment by running: .. code-block:: bash kas shell kas_otto/KAS/machine/bashroosh.yml This command will configure the environment as specified in the bashroosh.yml file. Finally, initiate the build process: .. code-block:: bash kas shell kas_otto/KAS/machine/bashroosh.yml This will start the build using the configuration defined in the distro-tulipe.yml file. Note: Ensure that the repos section in each YAML file specifies the correct paths for the layers. The kas shell and kas build commands should be run after all the necessary layers have been fetched. This approach allows you to fetch and build each layer separately, providing flexibility in managing your layers. **2. Create a top-level `kas.yml` (requires KAS 5+) :** If you prefer to manage all configurations in a single file, you can create a top-level kas.yml that includes all your layer configurations: .. code-block:: yaml header: version: 11 includes: - machine/bashroosh.yml - distro/distro-tulipe.yml - layers/poky.yml - layers/meta-openembedded.yml - layers/meta-arm.yml - layers/meta-otto-bsp.yml - layers/meta-swupdate.yml - layers/meta-virtualization.yml Then build using: .. code-block:: bash kas build kas.yml - You can also run the build using KAS inside a Docker container: .. code-block:: bash git clone https://github.com/siemens/kas.git git clone $PROJECT_URL meta-project ./kas/kas-docker build meta-project/kas.yml Additional Commands ------------------- - To fetch and prepare sources only: .. code-block:: bash kas checkout kas.yml - To start a shell in the build environment: .. code-block:: bash kas shell kas.yml The `kas shell` command sets up the Yocto build environment and launches a shell. Inside this shell, you can use `bitbake` directly. For example: .. code-block:: bash $ bitbake otto-image Replace `otto-image` with the target image recipe defined in the configuration. - To clean the build environment: .. code-block:: bash kas build kas.yml -- --clean Deployment to Device -------------------- The build artifacts are located under: .. code-block:: none build/tmp-glibc/deploy/images// You will get an SD-card image (`.wic`). To deploy, copy the appropriate image to a storage medium: - For SD cards, use a tool like `dd` to write the `.wic` file to an SD card. - For flashing onboard storage, follow the Otto hardware documentation.