Quick Start Guide
This section will guide you to building your first image, targeting supported reference hardware. It will also provide the steps for flashing and booting such an image on qemuarm64.
The list of supported hardware can found in the section Hardware Platforms.
Prerequisites
A modern Linux distribution such as Ubuntu or Debian is required and reliable internet access is needed to fetch source code and dependencies. For best compatibility, we currently recommend using Ubuntu version 24.04.
You should have a machine with at least a quad-core 64-bit CPU, 16GB of RAM and a fast SSD with at least 100GB of free space is recommended. An SSD is essential for acceptable build speeds, as the build process relies heavily on disk I/O. More powerful systems with 8 or more CPU cores, 32GB or more of RAM and larger NVMe storage will significantly reduce build times.
Install required host packages. For Ubuntu:
sudo apt-get install -y gawk wget git diffstat unzip texinfo \
gcc-multilib build-essential chrpath socat cpio python3 python3-pip \
python3-pexpect python3-sphinx xz-utils debianutils iputils-ping python3-git \
python3-jinja2 libsdl1.2-dev xterm file \
zstd curl lz4 liblz4-tool
Please refer the official Yocto documentation (reference manual) for host system and package requirements on other supported Linux distributions.
Clone Build System Repositories
git clone https://gitlab.com/LinaroLtd/lightspeed/lightspeed.git
KAS tool
The project uses KAS which provides an easy mechanism to setup & build bitbake based projects. It is a configuration tool that simplifies building with bitbake.
Please refer to KAS official documentation for more details.
It is recommended to use a virtual environment for installing KAS using pip (Python Package Installer). A virtual environment (venv) ensures that KAS does not interfere with system-installed Python packages.
Please note, it is just a recommendation and KAS installation will work without python virtual environment (venv). So you can skip using a virtual environment, but it is not recommended.
sudo apt-get install -y python3 python3-pip python3-venv
Create and activate a virtual environment (inside your workspace):
python3 -m venv kasenv
source kasenv/bin/activate
Install KAS inside the virtual environment:
pip install --upgrade pip
pip install kas
kas --version
The build environment has now been setup. To run a test build and run the image in QEMU, follow the next steps.
Build Image with KAS
Build an image using KAS tool.
kas build
The supported configuration files are in the repository under kas-cfs path.
Default User Credentials
There is a user created as part of the build process, the login details are username root with a blank password.
Build ARM64 QEMU Demo Image
To build the image for qemuarm64:
cd lightspeed
kas build kas-cfgs/qemuarm64.yaml
Please refer Building Lightspeed Source page for the detailed build instructions. Currently by default Lightspeed builds minimal SDK images.
If you wish to run any bitbake commands directly, you need to source the yocto environment as follows.
source openembedded-core/oe-init-build-env
Run ARM64 QEMU Demo Image
If you have not yet installed QEMU, then install as follows:
sudo apt-get install qemu-system-arm qemu-utils
make sure to source the Yocto environment as follows, if not already done.
source openembedded-core/oe-init-build-env
Run QEMU as follows from the build directory.
qemu-system-aarch64 \
-M virt \
-cpu cortex-a57 \
-nographic \
-smp 2 \
-m 1024 \
-kernel tmp/deploy/images/qemuarm64/Image-qemuarm64.bin \
-drive file=tmp/deploy/images/qemuarm64/lightspeed-image-minimal-sdk-qemuarm64.rootfs.ext4,if=virtio,format=raw \
-append "root=/dev/vda rw console=ttyAMA0" \
-netdev user,id=n1,hostfwd=tcp::2223-:22 \
-device virtio-net,netdev=n1