This project contains scripts and templates to automatically create the Bitcraze VM with Packer. It's also used for tracking issues and improvements.
The Bitcraze VM contains everything you need for running the Bitcraze projects and doing development for them. It's a great way to quickly get started without having the hassle of installing dependencies and setting up the development environment.
Here is a list of what's included:
- Xubuntu 14.04.4 pre-configured
- VirtualBox guest additions pre-installed
- UDEV rules and pre-configured USB filtering for the Crazyradio and it's bootloader (NRF BOOT)
- Most of our projects pre-cloned
- gnu-arm-none-eabi toolchain and build tools
- pyusb, pygame and pyqt
- PyQtGraph
- PyCharm IDE
- Oracle Java JRE (for PyCharm)
- KDE Marble built with Python-bindings
- Qt4 and QtDesigner
- KiCad
- Eclipse for compiling/debugging/flashing (pre-configured for BusBlaster)
- gedit
- SDCC 3.2 for compiling of Crazyradio firmware
- EmbSys RegView for Eclipse
For more info see our wiki.
- This script has only been tested on a Linux machine, therefore it's recommended to use Linux to build the Bitcraze VM
- VirtualBox must be installed (tested with version 5.0.14)
- Run
createBitcrazeVM.sh
- Wait 40-60 minutes depending on machine and internet connection speed
- Download the ISO file (currently Xubuntu-14.04.4-desktop-i386.iso) if it does not already exist.
- Download the following files if they do not already exist:
gcc-arm-none-eabi-<version>-linux.tar.bz2
eclipse-cpp-<version>-linux-gtk.tar.gz
pycharm-community-<version>.tar.gz
- Install Packer if it is not already installed.
- Run the two Packer templates
- Create the VM and run a preseeded installation (
bitcrazeVM_xubuntu-14.04.4-desktop_createVM.json
) - Provision the VM (
bitcrazeVM_xubuntu-14.04.4-desktop_provisionVM.json
)
- Create the VM and run a preseeded installation (
To separate the VM creation and installation from the provisioning. If there is a problem during provisioning, the whole process does not have to start from scratch again. This saves a lot of time.
- Create a VirtualBox image
- Start the so-called "preseeding", which automatically runs the Ubuntu installer
- Export VM image to OVA file
- Copy the following files into the VirtualBox image:
- Desktop shortcuts and readme file
- Desktop background image and Crazyflie client icon
- Update script (
update_all_projects.sh
) - GCC ARM toolchain (
gcc-arm-none-eabi-<version>-linux.tar.bz2
) - Eclipse (
eclipse-cpp-<version>-linux-gtk.tar.gz
) - PyCharm (
pycharm-community-<version>.tar.gz
)
- Provision the image (
provision.sh
)- Install packages
- Install VirtualBoxGuestAdditions
- Add udev rules for Crazyradio and Crazyflie
- Clone the Bitcraze Git repositories
- Setup GCC ARM toolchain
- Extract PyCharm and Eclipse
- Setup update script
- Set desktop background image
- Clean up VM image
- Export VM image to OVA file
Some steps still have to be done manually:
- Import the generated OVA file (e.g.
output-virtualbox-ovf/BitcrazeVM_0.9.ova
) into VirtualBox (File -> Import appliance...) - Start the Bitcraze VM
- Open a terminal
- Setting up PyCharm
- Run
pycharm.sh
to set up PyCharm (installs start menu entry and desktop shortcut?)
- Run
- Setting up Eclipse (Work in progress)
- See the Bitcraze VM wiki for more information
Please take a look at the log files packerlog_create.txt
and packerlog_provision.txt
.
The Bitcraze VM can either be downloaded via torrent or via direct download.
The virtual appliance can be imported into the virtual machine manager of your choice:
After importing just run the machine. It logs in automatically but use the following credentials if needed:
User: bitcraze
Pass: crazyflie
For more information on debugging, building, flashing and updating to the latest version have a look at the Bitcraze VM Wiki