Table of Contents
This guide covers setting up your development environment for building BeagleV-Fire Space-ROS images.
Fully Tested:
- Ubuntu 22.04 LTS (Jammy Jellyfish)
- Ubuntu 24.04 LTS (Noble Numbat)
- Fedora 40, 41
Should Work:
- Ubuntu 20.04 LTS
- Debian 12 (Bookworm)
- RHEL/CentOS/Rocky/Alma 8+
- openSUSE Leap 15.4+
- Arch Linux (rolling)
Not Supported:
- Windows (use WSL2 with Ubuntu)
- macOS (use Linux VM)
Minimum Configuration:
| Component | Requirement |
|---|---|
| Disk Space | 100 GB free |
| RAM | 16 GB |
| CPU Cores | 4 |
| Network | Broadband |
Recommended Configuration:
| Component | Requirement |
|---|---|
| Disk Space | 200 GB free |
| RAM | 32 GB |
| CPU Cores | 8+ |
| Storage Type | NVMe SSD |
| Network | Fiber/Cable |
Performance Impact:
- More RAM: Enables parallel builds (faster)
- More CPU cores: Faster compilation
- SSD: Much faster than HDD
- Fast network: Reduces download time
Docker is required to run the KAS container build environment. This provides a consistent, isolated build environment regardless of your host system.
- Consistent build environment
- No host system contamination
- Easy updates
- Works across distributions
Official Documentation:
https://docs.docker.com/engine/install/ubuntu/
Quick Install:
# Update package index
sudo apt-get update
# Install dependencies
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
# Add Docker's official GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Set up repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker Engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Add your user to docker group (avoid sudo)
sudo usermod -aG docker $USER
# IMPORTANT: Log out and back in for group changesVerify Installation:
# After logging back in
docker --version
docker run hello-worldOfficial Documentation:
https://docs.docker.com/engine/install/fedora/
Quick Install:
# Remove old versions
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
# Install dnf-plugins-core
sudo dnf -y install dnf-plugins-core
# Add Docker repository
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
# Install Docker Engine
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Start Docker
sudo systemctl start docker
sudo systemctl enable docker
# Add user to docker group
sudo usermod -aG docker $USER
# Log out and back inVerify Installation:
docker --version
docker run hello-worldPodman is a daemonless Docker alternative that works with KAS.
Ubuntu:
sudo apt-get install -y podmanFedora:
sudo dnf install -y podmanUsage:
Podman commands are compatible with Docker. Simply alias:
alias docker=podmanGit is required to clone the repository.
Ubuntu/Debian:
sudo apt-get install -y gitFedora:
sudo dnf install -y gitVerify:
git --versionThe Yocto build system requires substantial disk space. Here's what to expect:
| Directory | Size |
|---|---|
| downloads/ | ~50 GB |
| sstate-cache/ | ~30-40 GB |
| build/tmp/ | ~60-80 GB |
| Total (after build) | ~150-170 GB |
Growth over time:
- Multiple builds: sstate-cache grows
- Different configurations: tmp/ grows
- Source updates: downloads/ grows
Recommended:
- Dedicated partition or disk
- Fast SSD for best performance
- Exclude from backups (optional)
Check Available Space:
df -h /path/to/build/locationExample Setup:
# Create dedicated build directory
sudo mkdir /build
sudo chown $USER:$USER /build
cd /build
git clone https://github.com/yassine-cherni/beaglev-fire-space-ros.gitSafe to delete:
build/tmp/- Rebuild will be slowerbuild/- Complete rebuild required
Keep for performance:
downloads/- Avoid re-downloading sourcessstate-cache/- Speeds up rebuilds significantly
Maintenance:
# Remove old build artifacts (automated in config)
# rm_work is enabled in kas/common.yml
# Manually clean specific package
./kas-container shell kas/beaglev-fire-space-ros.yml
bitbake -c cleansstate package-nameIf behind a corporate proxy:
Docker Proxy:
Create /etc/systemd/system/docker.service.d/http-proxy.conf:
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8080"
Environment="HTTPS_PROXY=http://proxy.example.com:8080"
Environment="NO_PROXY=localhost,127.0.0.1"Reload and restart Docker:
sudo systemctl daemon-reload
sudo systemctl restart dockerBitBake Proxy:
Add to kas/common.yml:
local_conf_header:
proxy: |
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
export NO_PROXY="localhost,127.0.0.1"Ports Used:
- Outbound HTTPS (443): Source downloads
- Outbound HTTP (80): Some source repositories
- Outbound Git (9418): Git protocol (if used)
Whitelist domains:
- github.com
- githubusercontent.com
- yoctoproject.org
- kernel.org
- And various source repositories
git clone https://github.com/yassine-cherni/beaglev-fire-space-ros.git
cd beaglev-fire-space-rosgit clone -b branch-name https://github.com/yassine-cherni/beaglev-fire-space-ros.git
cd beaglev-fire-space-rosFor faster initial clone (not recommended for development):
git clone --depth 1 https://github.com/yassine-cherni/beaglev-fire-space-ros.git
cd beaglev-fire-space-rosThe setup script initializes your build environment.
# Make executable
chmod +x setup.sh
# Run setup
./setup.sh- Downloads KAS Container
- Version 5.1
- Docker-based build orchestration
- ~50 MB download
- Creates Directory Structure
downloads/- Source code cachesstate-cache/- Build artifacts cache- Persists across builds
- Validates Environment
- Checks Docker availability
- Verifies permissions
- Reports any issues
kas-container (version 5.1) downloaded and made executable.
Persistent directories created: downloads and sstate-cache.
Setup complete! Use ./kas-container shell kas/beaglev-fire-space-ros.yml to enter the build shell.
If you see this, setup was successful.
"Docker not found"
Install Docker and ensure it's running:
sudo systemctl status docker
docker ps"Permission denied"
Add user to docker group and log out/in:
sudo usermod -aG docker $USER
# Log out and back in"Cannot download kas-container"
Check network connectivity and proxy settings.
Enter the build environment without building:
./kas-container shell kas/beaglev-fire-space-ros.ymlYou should see a bash prompt inside the container:
(kas) user@hostname:/work$
Inside the container:
# Check BitBake
bitbake --version
# Check layers
bitbake-layers show-layers
# Exit
exitValidate KAS configuration without building:
./kas-container shell kas/beaglev-fire-space-ros.yml --cmd "bitbake -e core-image-minimal | grep ^MACHINE="Should output:
MACHINE="beaglev-fire"
Configure based on your hardware:
Edit ``kas/limit-pressure.yml``:
local_conf_header:
bb_limit_pressure: |
BB_NUMBER_THREADS = "8" # Number of parallel tasks
PARALLEL_MAKE = "-j 8" # Parallel compilation jobsGuidelines:
- BB_NUMBER_THREADS: Number of CPU cores
- PARALLEL_MAKE: Number of CPU cores or cores + 2
- With 16GB RAM: Up to 8 threads
- With 32GB RAM: Up to 16 threads
Prevent build from starving other processes:
BB_NICE_LEVEL = "11" # Already set in limit-pressure.ymlHigher values (up to 19) make builds lower priority.
For SSDs, consider:
# Check current scheduler
cat /sys/block/sda/queue/scheduler
# For SSD, use none or mq-deadline
echo none | sudo tee /sys/block/sda/queue/schedulerCurrent configuration (kas/limit-pressure.yml):
BB_PRESSURE_MAX_CPU = "1000000" # CPU pressure limit
BB_PRESSURE_MAX_IO = "50000" # I/O pressure limit
BB_PRESSURE_MAX_MEMORY = "10000" # Memory pressure limitThese prevent build from overwhelming the system.
Now that your environment is set up:
- Proceed to Building Images
- Learn about Architecture
- Start with Customization
For issues during installation:
- Check Troubleshooting Guide
- Open an issue on GitHub
- Ask in project discussions
---
Next: Building Images