├── http ├── meta-data └── user-data ├── .gitignore ├── contentForVM ├── Pictures │ ├── vm_background.jpg │ ├── vm_background.png │ └── vm_client_logo.png ├── Desktop │ ├── Update all projects.desktop │ ├── Crazyflie client.desktop │ ├── code.desktop │ ├── org.gnome.Terminal.desktop │ ├── README.txt │ └── firefox.desktop └── update_all_projects.sh ├── createBitcrazeVM.sh ├── provision.sh ├── LICENSE.txt ├── bitcrazeVM_provisionVM.json ├── bitcrazeVM_createVM.json ├── README.md └── provision-sudo.sh /http/meta-data: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.iso 2 | /packerlog*.txt 3 | /output-virtualbox-iso/ 4 | /output-virtualbox-ovf/ 5 | /.project 6 | /packer_cache/ 7 | -------------------------------------------------------------------------------- /contentForVM/Pictures/vm_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitcraze/bitcraze-vm/HEAD/contentForVM/Pictures/vm_background.jpg -------------------------------------------------------------------------------- /contentForVM/Pictures/vm_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitcraze/bitcraze-vm/HEAD/contentForVM/Pictures/vm_background.png -------------------------------------------------------------------------------- /contentForVM/Pictures/vm_client_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitcraze/bitcraze-vm/HEAD/contentForVM/Pictures/vm_client_logo.png -------------------------------------------------------------------------------- /contentForVM/Desktop/Update all projects.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=Update all projects 5 | Comment=Blindly updates all the project repos 6 | Exec=/home/bitcraze/update_all_projects.sh 7 | Icon= 8 | Path= 9 | Terminal=true 10 | StartupNotify=false 11 | -------------------------------------------------------------------------------- /contentForVM/Desktop/Crazyflie client.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=Crazyflie client 5 | Comment= 6 | Exec=python3 -m cfclient.gui 7 | Icon=/home/bitcraze/projects/crazyflie-clients-python/icon-256.icns 8 | Path=/home/bitcraze/projects/crazyflie-clients-python/ 9 | Terminal=true 10 | StartupNotify=false 11 | -------------------------------------------------------------------------------- /contentForVM/Desktop/code.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Visual Studio Code 3 | Comment=Code Editing. Redefined. 4 | GenericName=Text Editor 5 | Exec=code --force-user-env --unity-launch %F 6 | Icon=/snap/code/current/meta/gui/vscode.png 7 | Type=Application 8 | StartupNotify=false 9 | StartupWMClass=Code 10 | Categories=TextEditor;Development;IDE; 11 | MimeType=text/plain;inode/directory;application/x-code-workspace; 12 | Actions=new-empty-window; 13 | Keywords=vscode; 14 | 15 | [Desktop Action new-empty-window] 16 | Name=New Empty Window 17 | Exec=code --force-user-env --new-window %F 18 | Icon=/snap/code/current/meta/gui/vscode.png 19 | -------------------------------------------------------------------------------- /contentForVM/Desktop/org.gnome.Terminal.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Terminal 3 | Comment=Use the command line 4 | Keywords=shell;prompt;command;commandline;cmd; 5 | TryExec=gnome-terminal 6 | Exec=gnome-terminal 7 | Icon=org.gnome.Terminal 8 | Type=Application 9 | Categories=GNOME;GTK;System;TerminalEmulator; 10 | StartupNotify=true 11 | StartupWMClass=Gnome-terminal 12 | SingleMainWindow=false 13 | OnlyShowIn=GNOME;Unity; 14 | Actions=new-window;preferences; 15 | X-ExecArg=-- 16 | X-Ubuntu-Gettext-Domain=gnome-terminal 17 | 18 | [Desktop Action new-window] 19 | Name=New Window 20 | Exec=gnome-terminal --window 21 | 22 | [Desktop Action preferences] 23 | Name=Preferences 24 | Exec=gnome-terminal --preferences 25 | -------------------------------------------------------------------------------- /createBitcrazeVM.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PACKER_FILE1=bitcrazeVM_createVM.json 4 | PACKER_FILE2=bitcrazeVM_provisionVM.json 5 | 6 | CONTENT_DIR="contentForVM/" 7 | 8 | OVA_FILE=BitcrazeVM.ova 9 | 10 | #Run packer 11 | echo "Running packer..." 12 | export PACKER_LOG=1 13 | 14 | #If OVA already exists, skip VM creation step 15 | if [ -f "output-virtualbox-iso/$OVA_FILE" ] 16 | then 17 | echo "OVA file found. Skipping VM creation..." 18 | else 19 | echo "OVA file not found. Starting VM creation..." 20 | export PACKER_LOG_PATH="packerlog_create.txt" 21 | packer build $PACKER_FILE1 22 | fi 23 | echo "Starting VM provisioning..." 24 | export PACKER_LOG_PATH="packerlog_provision.txt" 25 | packer build $PACKER_FILE2 26 | -------------------------------------------------------------------------------- /provision.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # This script must not run as root since this will not change the settings for the "bitcraze" user 4 | 5 | # Set background image 6 | gsettings set org.gnome.desktop.background picture-uri "file:///home/bitcraze/Pictures/vm_background.jpg" 7 | 8 | # Disable screen saver 9 | gsettings set org.gnome.desktop.screensaver lock-enabled false 10 | 11 | # Disable welcome screen 12 | systemctl --user --now mask gnome-initial-setup-first-login.service 13 | 14 | # Allow launching of all shortcuts on the Desktop 15 | find Desktop/ -type f -exec gio set {} metadata::trusted true \; 16 | find Desktop/ -type f -exec chmod +x {} \; 17 | 18 | # Make executable 19 | chmod +x ~/update_all_projects.sh 20 | -------------------------------------------------------------------------------- /http/user-data: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | autoinstall: 3 | version: 1 4 | early-commands: 5 | # Workaround for ssh timeout bug 6 | - 'sudo systemctl stop ssh' 7 | locale: en_US 8 | # debconf-selections: 9 | # "gdm3 shared/default-x-display-manager select lightdm 10 | # lightdm shared/default-x-display-manager select lightdm" 11 | packages: 12 | - ubuntu-desktop 13 | network: 14 | network: 15 | version: 2 16 | ethernets: 17 | enp0s3: 18 | dhcp4: true 19 | identity: 20 | hostname: bitcraze-vm 21 | username: bitcraze 22 | # password: crazyflie 23 | password: "$y$j9T$NM5S7YplkhjkJRF.Am0jl1$JoT/aJt3MzfXNV3cV0rPr14DbeAQ3C8qjUyQVLr1WR/" 24 | ssh: 25 | install-server: true 26 | allow-pw: yes 27 | -------------------------------------------------------------------------------- /contentForVM/update_all_projects.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Simple script to update all the repos to the latest version. 4 | 5 | for f in /home/bitcraze/projects/* 6 | do 7 | if [ -d "$f" ]; then 8 | echo "Updating $f" 9 | cd $f 10 | git pull 11 | git submodule init 12 | git submodule update --recursive 13 | 14 | cd .. 15 | fi 16 | done 17 | 18 | # 19 | # In order to make sure the user has an up-to-date install of the 20 | # python lib and client, with all deps, we make sure to re-install it 21 | # from the source in git. 22 | # 23 | pip3 install --upgrade pip 24 | pip3 install --user --force-reinstall -e /home/bitcraze/projects/crazyflie-lib-python 25 | pip3 install --user --force-reinstall -e /home/bitcraze/projects/crazyflie-clients-python 26 | 27 | read -p "Press any key to exit" -n1 -s 28 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2015 Bitcraze AB 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. -------------------------------------------------------------------------------- /contentForVM/Desktop/README.txt: -------------------------------------------------------------------------------- 1 | Welcome to the Bitcraze VM 2 | ========================== 3 | 4 | The purpose of this virtual machine is to quickly get started with development 5 | and usage of various Bitcraze projects. It has all of the requirements for 6 | running and developing pre-installed as well as some other useful tools. 7 | 8 | For more information about how to get Started with the Crazyflie and other 9 | Bitcraze project, you can look at https://bitcraze.io/start. 10 | 11 | The virtual machine 12 | ------------------- 13 | 14 | * The username is: bitcraze 15 | * The password is: crazyflie 16 | * The virtual machine has 30GB drive and 2 GB of RAM 17 | * The virtual machine is using Ubuntu Live Server 22.04 LTS install. 18 | 19 | Installed software 20 | ------------------ 21 | Here is a non-exhaustive list of what's included: 22 | * Ubuntu 22.04 pre-configured 23 | * VirtualBox guest additions pre-installed 24 | * udev rules and pre-configured USB filtering for the Crazyradio and it's bootloader (NRF BOOT) 25 | * Most of our projects pre-cloned 26 | * QTCreator 27 | * Firefox 28 | * vscode prepared for compiling/debugging/flashing the Crazyflie firmware 29 | * SDCC 3.2 for compiling of Crazyradio firmware 30 | 31 | For a more detailed description of what is being installed on top of an Xubuntu 32 | core install, you can look at the provision.sh script in the Bitcraze VM git 33 | repos: https://github.com/bitcraze/bitcraze-vm/tree/master/provision.sh 34 | 35 | Projects 36 | -------- 37 | The following projects have been pre-cloned into the /home/bitcraze/projects 38 | directory: 39 | * crazyflie-pc-client 40 | * crazyflie-firmware 41 | * crazyflie-bootloader 42 | * crazyradio-firmware 43 | * crazyradio-electronics 44 | * crazyflie2-nrf-firmware 45 | * crazyflie2-stm-firmware 46 | * crazyflie2-stm-bootloader 47 | 48 | How to run the Crazyflie PC client 49 | ---------------------------------- 50 | The Crazyflie PC client can be run by using the following command: 51 | 52 | python3 -m cfclient.gui 53 | 54 | Or by using the shortcut on the desktop. 55 | 56 | How to update to the latest versions of the repositories 57 | -------------------------------------------------------- 58 | Updating to the latest versions of all the repositories can be done 59 | by using the following command: 60 | 61 | /home/bitcraze/bin/update_all_projects.sh 62 | 63 | Or using the shortcut on the desktop. 64 | -------------------------------------------------------------------------------- /bitcrazeVM_provisionVM.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_wait": "30s", 5 | "format": "ova", 6 | "import_opts": "importtovdi", 7 | "shutdown_command": "echo '{{user `password`}}' | sudo -S shutdown -P now", 8 | "source_path": "output-virtualbox-iso/{{user `vm-name`}}.ova", 9 | "ssh_password": "{{user `password`}}", 10 | "ssh_timeout": "10000s", 11 | "ssh_username": "{{user `user`}}", 12 | "type": "virtualbox-ovf", 13 | "vboxmanage": [ 14 | ["modifyvm", "{{.Name}}", "--audio", "pulse"], 15 | ["modifyvm", "{{.Name}}", "--audiocodec", "ad1980"], 16 | ["modifyvm", "{{.Name}}", "--usb", "on"], 17 | ["modifyvm", "{{.Name}}", "--usb-xhci", "on"], 18 | ["modifyvm", "{{.Name}}", "--vrde", "off"], 19 | ["modifyvm", "{{.Name}}", "--nictype1", "virtio"], 20 | ["modifyvm", "{{.Name}}", "--memory", "2048"], 21 | ["modifyvm", "{{.Name}}", "--cpus", "2"], 22 | ["modifyvm", "{{.Name}}", "--vram", "64"], 23 | ["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"], 24 | ["modifyvm", "{{.Name}}", "--mouse", "usbtablet"], 25 | ["modifyvm", "{{.Name}}", "--nestedpaging", "off"], 26 | ["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"], 27 | [ 28 | "storageattach", 29 | "{{.Name}}", 30 | "--storagectl", 31 | "SATA Controller", 32 | "--port", 33 | "0", 34 | "--nonrotational", 35 | "on", 36 | "--discard", 37 | "on" 38 | ] 39 | ], 40 | "virtualbox_version_file": ".vbox_version", 41 | "vm_name": "{{user `vm-name`}}" 42 | } 43 | ], 44 | "provisioners": [ 45 | { 46 | "source": "{{user `contentDir`}}/update_all_projects.sh", 47 | "destination": "/home/bitcraze/update_all_projects.sh", 48 | "type": "file" 49 | }, 50 | { 51 | "source": "{{user `contentDir`}}/Desktop", 52 | "destination": "/home/bitcraze", 53 | "type": "file" 54 | }, 55 | { 56 | "source": "{{user `contentDir`}}/Pictures", 57 | "destination": "/home/bitcraze", 58 | "type": "file" 59 | }, 60 | { 61 | "execute_command": "echo '{{user `password`}}' | {{ .Vars }} sh '{{ .Path }}'", 62 | "script": "provision.sh", 63 | "type": "shell" 64 | }, 65 | { 66 | "execute_command": "echo '{{user `password`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'", 67 | "script": "provision-sudo.sh", 68 | "type": "shell" 69 | } 70 | ], 71 | "variables": { 72 | "contentDir": "contentForVM", 73 | "password": "crazyflie", 74 | "user": "bitcraze", 75 | "vm-name": "BitcrazeVM" 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /bitcrazeVM_createVM.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_command": [ 5 | "e", 6 | "", 7 | "", 8 | "", 9 | "", 10 | "", 11 | "", 12 | "", 13 | "", 14 | "", 15 | "", 16 | "", 17 | "", 18 | "", 19 | "", 20 | "", 21 | "linux /casper/vmlinuz --- autoinstall ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"", 22 | "initrd /casper/initrd", 23 | "boot", 24 | "" 25 | ], 26 | "boot_wait": "4s", 27 | "memory": "2048", 28 | "cpus": "2", 29 | "disk_size": "40000", 30 | "format": "ova", 31 | "guest_additions_mode": "disable", 32 | "guest_os_type": "Ubuntu_64", 33 | "hard_drive_interface": "sata", 34 | "http_directory": "http", 35 | "iso_checksum": "sha256:a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd", 36 | "iso_url": "https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.iso", 37 | "shutdown_command": "echo {{user `password`}} | sudo -S shutdown -P now", 38 | "ssh_password": "{{user `password`}}", 39 | "ssh_username": "{{user `user`}}", 40 | "ssh_timeout": "1h", 41 | "ssh_handshake_attempts": 420, 42 | "type": "virtualbox-iso", 43 | "virtualbox_version_file": ".vbox_version", 44 | "vboxmanage": [ 45 | ["modifyvm", "{{.Name}}", "--audio", "pulse"], 46 | ["modifyvm", "{{.Name}}", "--audiocodec", "ad1980"], 47 | ["modifyvm", "{{.Name}}", "--usb", "on"], 48 | ["modifyvm", "{{.Name}}", "--usb-xhci", "on"], 49 | ["modifyvm", "{{.Name}}", "--vrde", "off"], 50 | ["modifyvm", "{{.Name}}", "--nictype1", "virtio"], 51 | ["modifyvm", "{{.Name}}", "--memory", "2048"], 52 | ["modifyvm", "{{.Name}}", "--cpus", "2"], 53 | ["modifyvm", "{{.Name}}", "--vram", "64"], 54 | ["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"], 55 | ["modifyvm", "{{.Name}}", "--mouse", "usbtablet"], 56 | ["modifyvm", "{{.Name}}", "--nestedpaging", "off"], 57 | ["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"], 58 | [ 59 | "storageattach", 60 | "{{.Name}}", 61 | "--storagectl", 62 | "SATA Controller", 63 | "--port", 64 | "0", 65 | "--nonrotational", 66 | "on", 67 | "--discard", 68 | "on" 69 | ] 70 | ], 71 | "vboxmanage_post": [ 72 | [ 73 | "modifyhd", 74 | "output-virtualbox-iso/{{.Name}}.vdi", 75 | "--compact" 76 | ] 77 | ], 78 | "vm_name": "{{user `vm-name`}}" 79 | } 80 | ], 81 | "variables": { 82 | "password": "crazyflie", 83 | "user": "bitcraze", 84 | "vm-name": "BitcrazeVM" 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bitcraze Virtual Machine 2 | 3 | This project contains scripts and templates to automatically create the Bitcraze VM with [Packer](https://www.packer.io). 4 | It's also used for tracking issues and improvements. 5 | 6 | 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. 7 | 8 | Here is a non-exhaustive list of what's included: 9 | 10 | * Ubuntu live server 22.04 pre-configured 11 | * VirtualBox guest additions pre-installed 12 | * udev rules and pre-configured USB filtering for the Crazyradio and it's bootloader (NRF BOOT) 13 | * Most of our projects pre-cloned 14 | * QTCreator 15 | * Firefox 16 | * vscode prepared for compiling/debugging/flashing the Crazyflie firmware 17 | * SDCC 3.2 for compiling of Crazyradio firmware 18 | 19 | 20 | ## Downloading 21 | 22 | The Bitcraze VM can be downloaded via the [Github Release Page](https://github.com/bitcraze/bitcraze-vm/releases) 23 | 24 | ## Installing 25 | 26 | **Note**: Since the VM is an AMD64 install of Linux, it *does not work* on Apple-silicon Mac (M1/2/... processors). 27 | On an apple silicon mac you need to install the tools natively. 28 | 29 | The virtual appliance can be imported into [VirtualBox](https://www.virtualbox.org/ "VirtualBox"). You will need the 30 | extention package of virtual box to be able to use the USB device. Go to 31 | [Oracles download page](https://www.oracle.com/virtualization/technologies/vm/downloads/virtualbox-downloads.html?msclkid=be59f68fcf9f11ec801dcf4ea944dd1d) 32 | to install both virtual box and the expansion pack. 33 | 34 | It can be used with other virtual machine managers, however setting up the guest addition might be required. The 35 | following have been tested 36 | 37 | * [Gnome Boxes](https://wiki.gnome.org/Apps/Boxes) 38 | * [VM Player](http://www.vmware.com/products/player/ "WM Player") 39 | 40 | ## Using the virtual machine 41 | 42 | After importing just run the machine. Log in with the following credentials: 43 | ``` 44 | User: bitcraze 45 | Pass: crazyflie 46 | ``` 47 | 48 | In the virtual machine double click the **“update all projects”** icon on the desktop. This pulls down the latest source 49 | code from GitHub for all projects. 50 | 51 | ## install hardware 52 | 53 | Insert Crazyradio PA in a USB port. 54 | Insert game controller in a USB port. 55 | 56 | ## Optimizing for Use 57 | 58 | For faster USB connection with the Crazyradio PA it is advised to filter the USB device at startup of the VM. Go to 59 | *settings->USB*, make sure that USB 3.0 is enabled and add a USB device filter for the Crazyflie PA, which should be 60 | called 'Bitcraze Crazyradio PA USB Dongle [9955]'. 61 | 62 | For the rest of the performance of your VM, you can try to increase the base memory (Settings/System/Motherboard), the 63 | CPU's available (Settings/System/Processor), enable hardware acceleration and select Hyper-V (Settings/System/Acceleration) 64 | or increase the video memory with 3D acceleration enabled (Settings/Display/Screen). This requires some adjusting as 65 | this could be different per system you are running the VM from. 66 | 67 | # How to build the Bitcraze VM image 68 | 69 | ## Pre-requisites 70 | 71 | * This script has only been tested on a Linux machine, therefore it's recommended to use Linux to build the Bitcraze VM 72 | * VirtualBox must be installed as well as the VirtualBox Extension Pack 73 | * Virtual box guest additions 74 | * [Packer](https://www.packer.io) (can be installed with `apt install packer`) 75 | 76 | ## Local build 77 | 78 | 1. Run ```createBitcrazeVM.sh``` 79 | 2. Wait 40-60 minutes depending on machine and internet connection speed 80 | 81 | The resulting .ova can be found in `output-virtualbox-ovf/BitcrazeVM.ova`. 82 | 83 | ### What does createBitcrazeVM.sh do? 84 | Run the two [Packer](https://www.packer.io) templates 85 | * Create the VM and run a preseeded installation (```bitcrazeVM_createVM.json```) 86 | * Provision the VM (```bitcrazeVM_provisionVM.json```) 87 | 88 | ### Why are there two packer templates? 89 | 90 | To separate the VM creation and installation from the provisioning. 91 | If there is a problem during provisioning, the whole process does not have to start from scratch again. 92 | This saves a lot of time. 93 | 94 | ### What do the packer templates do? 95 | 96 | #### bitcrazeVM_createVM.json 97 | 98 | 1. Download an ISO and create a VirtualBox image 99 | 2. Start the so-called "preseeding", which automatically runs the Ubuntu installer 100 | 3. Export VM image to OVA file 101 | 102 | #### bitcrazeVM_provisionVM.json 103 | Copy the files specified in the JSON template to the VM and run the `provision.sh` script so setup the image. 104 | 105 | ### Help! Something does not work. 106 | 107 | Please take a look at the log files ```packerlog_create.txt``` and ```packerlog_provision.txt```. 108 | 109 | 110 | ## Contribute 111 | Go to the [contribute page](https://www.bitcraze.io/contribute/) on our website to learn more. 112 | -------------------------------------------------------------------------------- /provision-sudo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # Remove unused packages to keep the size down 4 | apt remove -y \ 5 | thunderbird \ 6 | transmission-gtk \ 7 | gnome-todo \ 8 | baobab \ 9 | rhythmbox \ 10 | cheese \ 11 | vino \ 12 | shotwell \ 13 | totem \ 14 | usb-creator-gtk \ 15 | deja-dup \ 16 | gnome-calendar \ 17 | remmina \ 18 | simple-scan \ 19 | thunderbird-gnome-support \ 20 | aisleriot \ 21 | gnome-mahjongg \ 22 | gnome-mines \ 23 | gnome-sudoku \ 24 | branding-ubuntu \ 25 | libreoffice-style-breeze \ 26 | libreoffice-gnome \ 27 | libreoffice-writer \ 28 | libreoffice-calc \ 29 | libreoffice-impress \ 30 | libreoffice-math \ 31 | libreoffice-ogltrans \ 32 | libreoffice-pdfimport \ 33 | example-content \ 34 | libreoffice-l10n-en-gb \ 35 | libreoffice-l10n-es \ 36 | libreoffice-l10n-zh-cn \ 37 | libreoffice-l10n-zh-tw \ 38 | libreoffice-l10n-pt \ 39 | libreoffice-l10n-pt-br \ 40 | libreoffice-l10n-de \ 41 | libreoffice-l10n-fr \ 42 | libreoffice-l10n-it \ 43 | libreoffice-l10n-ru \ 44 | libreoffice-l10n-en-za \ 45 | libreoffice-help-en-gb \ 46 | libreoffice-help-es \ 47 | libreoffice-help-zh-cn \ 48 | libreoffice-help-zh-tw \ 49 | libreoffice-help-pt \ 50 | libreoffice-help-pt-br \ 51 | libreoffice-help-de \ 52 | libreoffice-help-fr \ 53 | libreoffice-help-it \ 54 | libreoffice-help-ru \ 55 | libreoffice-help-en-us \ 56 | thunderbird-locale-en \ 57 | thunderbird-locale-en-gb \ 58 | thunderbird-locale-en-us \ 59 | thunderbird-locale-es \ 60 | thunderbird-locale-es-ar \ 61 | thunderbird-locale-es-es \ 62 | thunderbird-locale-zh-cn \ 63 | thunderbird-locale-zh-hans \ 64 | thunderbird-locale-zh-hant \ 65 | thunderbird-locale-zh-tw \ 66 | thunderbird-locale-pt \ 67 | thunderbird-locale-pt-br \ 68 | thunderbird-locale-pt-pt \ 69 | thunderbird-locale-de \ 70 | thunderbird-locale-fr \ 71 | thunderbird-locale-it \ 72 | thunderbird-locale-ru \ 73 | gir1.2-rb-3.0 \ 74 | gir1.2-totem-1.0 \ 75 | gir1.2-totemplparser-1.0 \ 76 | libabw-0.1-1 \ 77 | libavahi-ui-gtk3-0 \ 78 | libdmapsharing-3.0-2 \ 79 | libexttextcat-2.0-0 \ 80 | libexttextcat-data \ 81 | libfreehand-0.1-1 \ 82 | libgnome-games-support-1-3 \ 83 | libgnome-games-support-common \ 84 | libgom-1.0-0 \ 85 | libgrilo-0.3-0 \ 86 | liblangtag-common \ 87 | liblangtag1 \ 88 | libmessaging-menu0 \ 89 | libmhash2 \ 90 | libminiupnpc10 \ 91 | libmwaw-0.3-3 \ 92 | libmythes-1.2-0 \ 93 | libnatpmp1 \ 94 | libneon27-gnutls \ 95 | libpagemaker-0.0-0 \ 96 | librdf0 \ 97 | libreoffice-avmedia-backend-gstreamer \ 98 | libreoffice-base-core \ 99 | libreoffice-common \ 100 | libreoffice-core \ 101 | libreoffice-draw \ 102 | libreoffice-gtk3 \ 103 | libreoffice-style-elementary \ 104 | libreoffice-style-galaxy \ 105 | libreoffice-style-tango \ 106 | libraptor2-0 \ 107 | librasqal3 \ 108 | librevenge-0.0-0 \ 109 | librhythmbox-core10 \ 110 | libtotem0 \ 111 | libvisio-0.1-1 \ 112 | libwpd-0.10-10 \ 113 | libwpg-0.3-3 \ 114 | libwps-0.4-4 \ 115 | libyajl2 \ 116 | python3-uno \ 117 | rhythmbox-data \ 118 | rhythmbox-plugin-alternative-toolbar \ 119 | rhythmbox-plugins \ 120 | remmina-common \ 121 | remmina-plugin-rdp \ 122 | remmina-plugin-secret \ 123 | remmina-plugin-vnc \ 124 | duplicity \ 125 | seahorse-daemon \ 126 | shotwell-common \ 127 | totem-common \ 128 | totem-plugins \ 129 | transmission-common \ 130 | cheese-common \ 131 | gnome-todo-common \ 132 | libgnome-todo \ 133 | gnome-video-effects \ 134 | libcheese-gtk25 \ 135 | libcheese8 \ 136 | uno-libs3 \ 137 | ure \ 138 | zeitgeist-core \ 139 | hunspell-de-at-frami \ 140 | hunspell-de-ch-frami \ 141 | hunspell-de-de-frami \ 142 | hunspell-en-au \ 143 | hunspell-en-ca \ 144 | hunspell-en-gb \ 145 | hunspell-en-za \ 146 | hunspell-es \ 147 | hunspell-fr \ 148 | hunspell-fr-classical \ 149 | hunspell-it \ 150 | hunspell-pt-br \ 151 | hunspell-pt-pt \ 152 | hunspell-ru \ 153 | hyphen-de \ 154 | hyphen-en-ca \ 155 | hyphen-en-gb \ 156 | hyphen-en-us \ 157 | hyphen-fr \ 158 | hyphen-hr \ 159 | hyphen-it \ 160 | hyphen-pl \ 161 | hyphen-pt-br \ 162 | hyphen-pt-pt \ 163 | hyphen-ru \ 164 | mythes-de \ 165 | mythes-de-ch \ 166 | mythes-en-au \ 167 | mythes-en-us \ 168 | mythes-fr \ 169 | mythes-it \ 170 | mythes-pt-pt \ 171 | mythes-ru 172 | 173 | 174 | # Installing VirtualBox GuestAdditions 175 | VBOX_ISO=VBoxGuestAdditions.iso 176 | mkdir /tmp/isomount 177 | mount -o loop ~/$VBOX_ISO /tmp/isomount 178 | sh /tmp/isomount/VBoxLinuxAdditions.run 179 | umount /tmp/isomount 180 | rm -rf isomount ~/$VBOX_ISO 181 | 182 | # Update keys and repos 183 | apt-key update 184 | apt-get update 185 | 186 | Install packages 187 | apt-get -y install build-essential git sdcc python3-dev python3-pip qtcreator \ 188 | dfu-util openocd gcc-arm-none-eabi gdb-multiarch docker.io || { echo 'apt-get install failed' ; exit 1; } 189 | 190 | snap install firefox 191 | 192 | # Required for the VSCode embedded debug to work 193 | ln -s /usr/bin/gdb-multiarch /usr/local/bin/arm-none-eabi-gdb 194 | 195 | # Adding udev rules for Crazyradio and Crazyflie 196 | usermod -a -G plugdev bitcraze 197 | sh -c 'echo SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"1915\", ATTRS{idProduct}==\"7777\", MODE=\"0664\", GROUP=\"plugdev\" > /etc/udev/rules.d/99-crazyradio.rules' 198 | sh -c 'echo SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"1915\", ATTRS{idProduct}==\"0101\", MODE=\"0664\", GROUP=\"plugdev\" >> /etc/udev/rules.d/99-crazyradio.rules' 199 | sh -c 'echo SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"5740\", MODE=\"0664\", GROUP=\"plugdev\" >> /etc/udev/rules.d/99-crazyflie.rules' 200 | 201 | # Add user to dialout group, to give access to serial ports 202 | usermod -a -G dialout bitcraze 203 | 204 | # Add user to docker group 205 | usermod -a -G docker bitcraze 206 | 207 | # Clone the git repos 208 | mkdir ~/projects 209 | cd ~/projects 210 | git clone https://github.com/bitcraze/crazyflie-clients-python.git 211 | git clone https://github.com/bitcraze/crazyflie-lib-python.git 212 | git clone https://github.com/bitcraze/crazyflie-firmware.git --recursive 213 | git clone https://github.com/bitcraze/crazyflie-bootloader.git 214 | git clone https://github.com/bitcraze/crazyradio-firmware.git 215 | git clone https://github.com/bitcraze/crazyflie-android-client.git 216 | git clone https://github.com/bitcraze/crazyflie2-exp-template-electronics.git 217 | git clone https://github.com/bitcraze/crazyflie2-stm-bootloader.git 218 | git clone https://github.com/bitcraze/crazyflie2-nrf-bootloader.git 219 | git clone https://github.com/bitcraze/crazyflie2-nrf-firmware.git 220 | git clone https://github.com/bitcraze/lps-node-firmware.git --recursive 221 | cd ~/ 222 | chown bitcraze:bitcraze -R projects 223 | ln -s ~/projects ~/Desktop/projects 224 | 225 | # Install VSCode 226 | snap install --classic code 227 | 228 | # Install VSCode extensions 229 | sudo -H -u bitcraze code --install-exteman nsion ms-python.python 230 | sudo -H -u bitcraze code --install-extension ms-python.vscode-pylance 231 | sudo -H -u bitcraze code --install-extension ms-vscode.cpptools 232 | sudo -H -u bitcraze code --install-extension seanwu.vscode-qt-for-python 233 | sudo -H -u bitcraze code --install-extension marus25.cortex-debug 234 | 235 | # Add user to vboxsf group so shares with host can be used 236 | usermod -a -G vboxsf bitcraze 237 | 238 | # Set up crazyflie-clients-python to use crazyflie-lib-python from source 239 | sudo -H -u bitcraze bash -c 'pip3 install --user -e ~/projects/crazyflie-lib-python' 240 | sudo -H -u bitcraze bash -c 'pip3 install --user -e ~/projects/crazyflie-clients-python' 241 | 242 | # Clean up VM to minimize image size 243 | apt-get -y autoremove 244 | apt-get -y autoclean 245 | apt-get -y clean 246 | e4defrag / 247 | fstrim -v / 248 | -------------------------------------------------------------------------------- /contentForVM/Desktop/firefox.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Firefox Web Browser 4 | Name[ar]=متصفح الويب فَيَرفُكْس 5 | Name[ast]=Restolador web Firefox 6 | Name[bn]=ফায়ারফক্স ওয়েব ব্রাউজার 7 | Name[ca]=Navegador web Firefox 8 | Name[cs]=Firefox Webový prohlížeč 9 | Name[da]=Firefox - internetbrowser 10 | Name[el]=Περιηγητής Firefox 11 | Name[es]=Navegador web Firefox 12 | Name[et]=Firefoxi veebibrauser 13 | Name[fa]=مرورگر اینترنتی Firefox 14 | Name[fi]=Firefox-selain 15 | Name[fr]=Navigateur Web Firefox 16 | Name[gl]=Navegador web Firefox 17 | Name[he]=דפדפן האינטרנט Firefox 18 | Name[hr]=Firefox web preglednik 19 | Name[hu]=Firefox webböngésző 20 | Name[it]=Firefox Browser Web 21 | Name[ja]=Firefox ウェブ・ブラウザ 22 | Name[ko]=Firefox 웹 브라우저 23 | Name[ku]=Geroka torê Firefox 24 | Name[lt]=Firefox interneto naršyklė 25 | Name[nb]=Firefox Nettleser 26 | Name[nl]=Firefox webbrowser 27 | Name[nn]=Firefox Nettlesar 28 | Name[no]=Firefox Nettleser 29 | Name[pl]=Przeglądarka WWW Firefox 30 | Name[pt]=Firefox Navegador Web 31 | Name[pt_BR]=Navegador Web Firefox 32 | Name[ro]=Firefox – Navigator Internet 33 | Name[ru]=Веб-браузер Firefox 34 | Name[sk]=Firefox - internetový prehliadač 35 | Name[sl]=Firefox spletni brskalnik 36 | Name[sv]=Firefox webbläsare 37 | Name[tr]=Firefox Web Tarayıcısı 38 | Name[ug]=Firefox توركۆرگۈ 39 | Name[uk]=Веб-браузер Firefox 40 | Name[vi]=Trình duyệt web Firefox 41 | Name[zh_CN]=Firefox 网络浏览器 42 | Name[zh_TW]=Firefox 網路瀏覽器 43 | Comment=Browse the World Wide Web 44 | Comment[ar]=تصفح الشبكة العنكبوتية العالمية 45 | Comment[ast]=Restola pela Rede 46 | Comment[bn]=ইন্টারনেট ব্রাউজ করুন 47 | Comment[ca]=Navegueu per la web 48 | Comment[cs]=Prohlížení stránek World Wide Webu 49 | Comment[da]=Surf på internettet 50 | Comment[de]=Im Internet surfen 51 | Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) 52 | Comment[es]=Navegue por la web 53 | Comment[et]=Lehitse veebi 54 | Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید 55 | Comment[fi]=Selaa Internetin WWW-sivuja 56 | Comment[fr]=Naviguer sur le Web 57 | Comment[gl]=Navegar pola rede 58 | Comment[he]=גלישה ברחבי האינטרנט 59 | Comment[hr]=Pretražite web 60 | Comment[hu]=A világháló böngészése 61 | Comment[it]=Esplora il web 62 | Comment[ja]=ウェブを閲覧します 63 | Comment[ko]=웹을 돌아 다닙니다 64 | Comment[ku]=Li torê bigere 65 | Comment[lt]=Naršykite internete 66 | Comment[nb]=Surf på nettet 67 | Comment[nl]=Verken het internet 68 | Comment[nn]=Surf på nettet 69 | Comment[no]=Surf på nettet 70 | Comment[pl]=Przeglądanie stron WWW 71 | Comment[pt]=Navegue na Internet 72 | Comment[pt_BR]=Navegue na Internet 73 | Comment[ro]=Navigați pe Internet 74 | Comment[ru]=Доступ в Интернет 75 | Comment[sk]=Prehliadanie internetu 76 | Comment[sl]=Brskajte po spletu 77 | Comment[sv]=Surfa på webben 78 | Comment[tr]=İnternet'te Gezinin 79 | Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ 80 | Comment[uk]=Перегляд сторінок Інтернету 81 | Comment[vi]=Để duyệt các trang web 82 | Comment[zh_CN]=浏览互联网 83 | Comment[zh_TW]=瀏覽網際網路 84 | GenericName=Web Browser 85 | GenericName[ar]=متصفح ويب 86 | GenericName[ast]=Restolador Web 87 | GenericName[bn]=ওয়েব ব্রাউজার 88 | GenericName[ca]=Navegador web 89 | GenericName[cs]=Webový prohlížeč 90 | GenericName[da]=Webbrowser 91 | GenericName[el]=Περιηγητής διαδικτύου 92 | GenericName[es]=Navegador web 93 | GenericName[et]=Veebibrauser 94 | GenericName[fa]=مرورگر اینترنتی 95 | GenericName[fi]=WWW-selain 96 | GenericName[fr]=Navigateur Web 97 | GenericName[gl]=Navegador Web 98 | GenericName[he]=דפדפן אינטרנט 99 | GenericName[hr]=Web preglednik 100 | GenericName[hu]=Webböngésző 101 | GenericName[it]=Browser web 102 | GenericName[ja]=ウェブ・ブラウザ 103 | GenericName[ko]=웹 브라우저 104 | GenericName[ku]=Geroka torê 105 | GenericName[lt]=Interneto naršyklė 106 | GenericName[nb]=Nettleser 107 | GenericName[nl]=Webbrowser 108 | GenericName[nn]=Nettlesar 109 | GenericName[no]=Nettleser 110 | GenericName[pl]=Przeglądarka WWW 111 | GenericName[pt]=Navegador Web 112 | GenericName[pt_BR]=Navegador Web 113 | GenericName[ro]=Navigator Internet 114 | GenericName[ru]=Веб-браузер 115 | GenericName[sk]=Internetový prehliadač 116 | GenericName[sl]=Spletni brskalnik 117 | GenericName[sv]=Webbläsare 118 | GenericName[tr]=Web Tarayıcı 119 | GenericName[ug]=توركۆرگۈ 120 | GenericName[uk]=Веб-браузер 121 | GenericName[vi]=Trình duyệt Web 122 | GenericName[zh_CN]=网络浏览器 123 | GenericName[zh_TW]=網路瀏覽器 124 | Keywords=Internet;WWW;Browser;Web;Explorer 125 | Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب 126 | Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador 127 | Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer 128 | Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer 129 | Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet 130 | Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen 131 | Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;Ιντερνετ 132 | Keywords[es]=Explorador;Internet;WWW 133 | Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa 134 | Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur 135 | Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; 136 | Keywords[hr]=Internet;WWW;preglednik;Web 137 | Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer 138 | Keywords[it]=Internet;WWW;Browser;Web;Navigatore 139 | Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk 140 | Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ 141 | Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside 142 | Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online 143 | Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador 144 | Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador 145 | Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис 146 | Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer 147 | Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet 148 | Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara 149 | Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд 150 | Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web 151 | Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站; 152 | Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐 153 | Exec=firefox %u 154 | Terminal=false 155 | X-MultipleArgs=false 156 | Type=Application 157 | Icon=firefox 158 | Categories=GNOME;GTK;Network;WebBrowser; 159 | MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; 160 | StartupNotify=true 161 | Actions=NewWindow;NewPrivateWindow; 162 | 163 | [Desktop Action NewWindow] 164 | Name=Open a New Window 165 | Name[ar]=افتح نافذة جديدة 166 | Name[ast]=Abrir una ventana nueva 167 | Name[bn]=Abrir una ventana nueva 168 | Name[ca]=Obre una finestra nova 169 | Name[cs]=Otevřít nové okno 170 | Name[da]=Åbn et nyt vindue 171 | Name[de]=Ein neues Fenster öffnen 172 | Name[el]=Άνοιγμα νέου παραθύρου 173 | Name[es]=Abrir una ventana nueva 174 | Name[fi]=Avaa uusi ikkuna 175 | Name[fr]=Ouvrir une nouvelle fenêtre 176 | Name[gl]=Abrir unha nova xanela 177 | Name[he]=פתיחת חלון חדש 178 | Name[hr]=Otvori novi prozor 179 | Name[hu]=Új ablak nyitása 180 | Name[it]=Apri una nuova finestra 181 | Name[ja]=新しいウィンドウを開く 182 | Name[ko]=새 창 열기 183 | Name[ku]=Paceyeke nû veke 184 | Name[lt]=Atverti naują langą 185 | Name[nb]=Åpne et nytt vindu 186 | Name[nl]=Nieuw venster openen 187 | Name[pt]=Abrir nova janela 188 | Name[pt_BR]=Abrir nova janela 189 | Name[ro]=Deschide o fereastră nouă 190 | Name[ru]=Новое окно 191 | Name[sk]=Otvoriť nové okno 192 | Name[sl]=Odpri novo okno 193 | Name[sv]=Öppna ett nytt fönster 194 | Name[tr]=Yeni pencere aç 195 | Name[ug]=يېڭى كۆزنەك ئېچىش 196 | Name[uk]=Відкрити нове вікно 197 | Name[vi]=Mở cửa sổ mới 198 | Name[zh_CN]=新建窗口 199 | Name[zh_TW]=開啟新視窗 200 | Exec=firefox -new-window 201 | OnlyShowIn=Unity; 202 | 203 | [Desktop Action NewPrivateWindow] 204 | Name=Open a New Private Window 205 | Name[ar]=افتح نافذة جديدة للتصفح الخاص 206 | Name[ca]=Obre una finestra nova en mode d'incògnit 207 | Name[de]=Ein neues privates Fenster öffnen 208 | Name[es]=Abrir una ventana privada nueva 209 | Name[fi]=Avaa uusi yksityinen ikkuna 210 | Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée 211 | Name[he]=פתיחת חלון גלישה פרטית חדש 212 | Name[hu]=Új privát ablak nyitása 213 | Name[it]=Apri una nuova finestra anonima 214 | Name[nb]=Åpne et nytt privat vindu 215 | Name[ru]=Новое приватное окно 216 | Name[sl]=Odpri novo okno zasebnega brskanja 217 | Name[tr]=Yeni bir pencere aç 218 | Name[uk]=Відкрити нове вікно у потайливому режимі 219 | Name[zh_TW]=開啟新隱私瀏覽視窗 220 | Exec=firefox -private-window 221 | OnlyShowIn=Unity; 222 | --------------------------------------------------------------------------------