Skip to content

Latest commit

 

History

History
128 lines (93 loc) · 4.87 KB

README.md

File metadata and controls

128 lines (93 loc) · 4.87 KB

ModalAI Voxl2

This configuration package series configures Buildroot to produce a BSP image for the ModalAI Voxl2 model number MDK-M0054.

References:

Getting Started

To initialize the Voxl2 partition layout and other firmware files correctly, first flash the latest BSP package from ModalAI:

  1. Navigate to https://developer.modalai.com/categories
  2. Select "Voxl 2 Platform Releases"
  3. Click "download" on the entry voxl2_platform_1.3.1-0.8.tar.gz
  4. Extract the file: tar -zxf voxl2_platform_1.3.1-0.8.tar.gz
  5. Enter the directory: cd voxl2_platform_1.3.1-0.8
  6. Unplug the voxl2 from power and USBC.
  7. Using something soft, hold down the SW1 button on the board.
  8. While holding the button, connect the power to the board.
  9. After about 5 seconds, release button SW1.
  10. Run the install script: ./install.sh

After following these steps, your system should be in factory-reset state.

To compile SkiffOS, set the comma-separated SKIFF_CONFIG variable:

$ export SKIFF_CONFIG=modalai/voxl2,skiff/core
$ make configure                   # configure the system
$ make compile                     # build the system

Once the build is complete, we will use Fastboot to flash the system to a device. This will flash apq8096-sysfs.ext4 to the sysfs partition and apq8096-boot.img to the boot partition.

$ sudo bash
$ make cmd/modalai/voxl/flashusb  # tell skiff to use fastboot to flash

SkiffOS will use the existing userdata partition as its persist partition. The flash script will not overwrite this partition, and can be used to update the system later without clearing user data.

Partitions

SkiffOS produces unsigned images for the sysfs and boot partitions, and uses existing aboot, cache, persist, userdata, recoveryfs from the factory.

SkiffOS will use the userdata partition as its persist partition. It will not overwrite this partition during the flash script, so the flash script can be run multiple times without overwriting any container data.

To update the bootloader and other partitions, download & flash the system image according to the vendor docs, then run the SkiffOS flash script.

Skiff Core: Default Ubuntu-based Image

The default configuration, skiff-core-voxl2, uses Ubuntu as the base image, and installs the voxl2 platform debs from the ModalAI packages server.

This is done with a Dockerfile on the target device on first boot. None of the packages are downloaded during the SkiffOS build process.

Skiff Core: Importing Vendor-provided Image

The vendor-provided system image can be imported to a skiff-core container. The drivers provided in the container will then provide all proprietary features:

# Copy the modalai files to the device.
# Replace "root@voxl2" with your voxl2 ip address.
rsync --progress voxl2_platform_1.3.1-0.8.tar.gz root@voxl2:/mnt/persist/voxl2_platform.tar.gz

# Run the importer script to import the image.
ssh root@voxl2
voxl2-import-core.sh /mnt/persist/voxl2_platform.tar.gz

# The Docker image is imported at skiffos/skiff-core-voxl2:latest
# Force skiff-core to load the new image.
# NOTE: this will delete your existing core container!
docker rm -f core
systemctl restart skiff-core

# You may also want to cleanup some disk space:
docker system prune

OTA Update

The push_image script can OTA update the device:

./scripts/push_image.sh root@voxl2

The kernel and device tree file are written to a partition on the device, so the push_image script will not be able to upgrade them. If you need to upgrade the kernel, use the flashing process described above. The persist partition will not be modified during the upgrade.

Licenses

The ModelAI packages are provided under various licenses. SkiffOS does not redistribute these packages, but will download them from the upstream sources as part of the apt install steps in the Dockerfile. It is the responsibility of the end user to follow all applicable licenses' terms.