Skip to content

Yaquod/meta-autoware-edge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yocto: Jetson Orin container-host image (meta-autoware-edge)

Builds a minimal, systemd-based Jetson Orin Nano / NX OS (JetPack 6 / L4T r36) that boots straight into running the Autoware + vehicle_autoware_agent stack — by pulling the container images you already built and published to GHCR. Autoware is not recompiled natively; the Yocto rootfs is just a hardened container host.

What the image gives you

  • docker-ce + compose plugin, nvidia-container-toolkit / nvidia-docker so containers get the Orin iGPU/CUDA.
  • /etc/docker/daemon.json with default-runtime: nvidia and explicit DNS (the same systemd-resolved DNS gotcha we hit while building).
  • autoware-edge-stack.service — on boot: logs in to GHCR (if creds set), pulls, then ups the compose project in /opt/autoware-edge. systemd restarts it on failure.
  • /opt/autoware_map — empty mount point; drop a real lanelet2 + pcd map there.

1. Host prerequisites

Yocto builds the Jetson rootfs; the build host does not need to be arm64 (unlike the Autoware image build). You need ~150 GB free and the standard Yocto build deps.

mkdir -p ~/oe4t && cd ~/oe4t
git clone -b scarthgap git://git.yoctoproject.org/poky
git clone -b scarthgap https://github.com/openembedded/meta-openembedded
git clone -b scarthgap https://github.com/meta-virtualization/meta-virtualization  # or the mirror below
git clone -b scarthgap-l4t-r36.4 https://github.com/OE4T/meta-tegra
# this repo (for the meta-autoware-edge layer):
git clone -b edge-deployment https://github.com/Yaquod/autoware-agent

Branch note: use the OE4T meta-tegra branch that matches your JetPack 6 / L4T r36.x (e.g. scarthgap-l4t-r36.4). If you're on kirkstone instead, check out the kirkstone-l4t-r36.x branches of poky/meta-oe/meta-virtualization/meta-tegra — layer.conf already declares compat with both.

2. Configure the build

source poky/oe-init-build-env build     # creates/enters build/

bitbake-layers add-layer \
  ../meta-openembedded/meta-oe \
  ../meta-openembedded/meta-python \
  ../meta-openembedded/meta-networking \
  ../meta-virtualization \
  ../meta-tegra \
  ../meta-autoware-edge

Add to build/conf/local.conf:

MACHINE = "jetson-orin-nano-devkit"        # or p3768-orin-nx-devkit for Orin NX
# Container support:
DISTRO_FEATURES:append = " virtualization"
# meta-tegra flashing/runtime bits:
IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash"
# Accept the NVIDIA L4T license (required by meta-tegra):
LICENSE_FLAGS_ACCEPTED += "commercial"

3. Build

bitbake autoware-edge-image

Output lands in build/tmp/deploy/images/jetson-orin-nano-devkit/ including the .tegraflash.tar.gz used to flash.

4. Flash the Jetson

Put the Orin in recovery mode (hold FC REC, tap power), connect USB, then:

cd build/tmp/deploy/images/jetson-orin-nano-devkit
tar xf autoware-edge-image-*.tegraflash.tar.gz
sudo ./doflash.sh

5. First boot on the device

# 1) Map — the AWSIM Shinjuku map is BAKED IN at /opt/autoware_map by the
#    awsim-shinjuku-map recipe, so Autoware launches out of the box.
#    To use a different map, drop that recipe from the image and instead:
#      scp -r my_lanelet2_map/  autoware@<jetson-ip>:/opt/autoware_map/
#    (or run this repo's scripts/fetch-awsim-map.sh on the device)

# 2) Configure the stack
sudo vi /opt/autoware-edge/.env
#    - set GHCR_USER / GHCR_TOKEN if the images are private
#    - set VEHICLE_MODEL / SENSOR_MODEL, MAP_PATH, GATEWAY_ADDR
#    - first bring-up without the vehicle: AUTOWARE_LAUNCH=planning_simulator.launch.xml

# 3) Start (it's enabled to auto-start on boot; this triggers it now)
sudo systemctl restart autoware-edge-stack.service
journalctl -u autoware-edge-stack.service -f

Verify:

docker ps                                   # autoware + autoware_agent Up
docker exec -it autoware_agent bash -lc \
  'source /opt/ros/humble/setup.bash && ros2 node list'
docker logs -f autoware_agent               # TF "map" warnings stop once Autoware is up

Notes / gotchas

  • GPU in containers: with default-runtime: nvidia every container gets the iGPU. Confirm with docker run --rm ghcr.io/yaquod/autoware:universe-cuda ls -d /dev/nvidia*. On some L4T r36 stacks you must generate a CDI spec once: nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml (nvidia-container-toolkit is already installed) — add it to a boot oneshot if your toolkit version needs it.
  • Storage / rootfs auto-expand: the built image is kept small; on first boot the rootfs-expand service grows the root partition + ext4 filesystem to fill the whole SD card (e.g. 128 GB) before Docker starts, so /var/lib/docker gets the full card for the (many-GB) Autoware CUDA images. No partition sizing at build time. It runs once (guarded by /var/lib/.rootfs-expanded); check it with systemctl status expand-rootfs and df -h / after first boot.

    Tegra caveat: this assumes the APP/root partition is the last partition on the device (the normal case for an SD-card image). If your tegraflash layout places partitions after APP, growpart can't extend it — reorder so APP is last.

  • Maps are not in the image. /opt/autoware_map ships empty by design; populate it per-vehicle.
  • Don't auto-start before configuring if you prefer: set SYSTEMD_AUTO_ENABLE = "disable" in autoware-agent-stack.bb and start manually.
  • meta-virtualization source: if git.yoctoproject.org is preferred, use git://git.yoctoproject.org/meta-virtualization at the matching release branch.

About

Builds a minimal, systemd-based **Jetson Orin Nano / NX** OS (JetPack 6 / L4T r36) that boots straight into running the Autoware + `vehicle_autoware_agent` stack, by pulling the container images you already built and published to GHCR. Autoware is not recompiled natively; the Yocto rootfs is just a hardened container host.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors