1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/packer/riot.json
Alexandre Abadie 562cc9007c
tools/packer: adapt for Ubuntu 18.04
This change is also a complete refactoring of the generation of the vagrant image
2020-02-19 19:23:07 +01:00

123 lines
5.8 KiB
JSON

{
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz<wait>",
" auto<wait>",
" console-setup/ask_detect=false<wait>",
" console-setup/layoutcode=us<wait>",
" console-setup/modelcode=pc105<wait>",
" debconf/frontend=noninteractive<wait>",
" debian-installer=en_US<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" locale=en_US<wait>",
" netcfg/get_domain=vm<wait>",
" netcfg/get_hostname={{ user `hostname` }}<wait>",
" grub-installer/bootdev=/dev/sda<wait>",
" noapic<wait>",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
" -- <wait>",
"<enter><wait>"
],
"boot_wait": "10s",
"disk_size": "{{ user `disk_size` }}",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "{{ user `virtualbox_guest_os_type` }}",
"headless": "{{ user `headless` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_urls": [ "{{ user `iso_path` }}/{{ user `iso_name` }}", "{{ user `iso_url` }}" ],
"output_directory": "output-{{ user `vm_name` }}-virtualbox-iso",
"http_directory": "http",
"shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}" ],
[ "modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus` }}" ],
[ "modifyvm", "{{.Name}}", "--usb", "on" ],
[ "modifyvm", "{{.Name}}", "--audio", "none"],
[ "modifyvm", "{{.Name}}", "--ioapic", "on"],
[ "modifyvm", "{{.Name}}", "--rtcuseutc", "on"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "FTDI USB-TTL", "--vendorid", "0x0403", "--productid", "0x6001"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "CP2102 USB to UART", "--vendorid", "0x10c4", "--productid", "0xea60"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "STM32 STLink", "--vendorid", "0x0483", "--productid", "0x3748"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "STM32 STLink", "--vendorid", "0x0483", "--productid", "0x374b"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "USBasp", "--vendorid", "0x16c0", "--productid", "0x05dc"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "iotlab-m3", "--vendorid", "0x0403", "--productid", "0x6010"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "iotlab-m3-cn", "--vendorid", "0x0403", "--productid", "0x6011"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "CMSIS-DAP", "--vendorid", "0x03eb", "--productid", "0x2111"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino UNO", "--vendorid", "0x2341", "--productid", "0x0042"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino Mega 2560", "--vendorid", "0x2a03", "--productid", "0x0042"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Phytec phyWAVE KW22", "--vendorid", "0x0d28", "--productid", "0x0204"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Bluepill", "--vendorid", "0x1d50", "--productid", "0x6017"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Bluepill", "--vendorid", "0x1d50", "--productid", "0x6018"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "JLink", "--vendorid", "0x1366", "--productid", "0x1015"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino Zero", "--vendorid", "0x03eb", "--productid", "0x2157"],
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "DAPLink", "--vendorid", "0x0d28", "--productid", "0x0204"]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{user `vm_name`}}"
}
],
"post-processors": [
[
{
"type": "vagrant",
"keep_input_artifact": false,
"output": "{{user `vm_name`}}_{{.Provider}}.box",
"vagrantfile_template": "{{ user `vagrantfile_template` }}"
}
]
],
"provisioners": [
{
"type": "shell",
"environment_vars": [
"SSH_USERNAME={{ user `ssh_username` }}"
],
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"override": {
"virtualbox-iso": {
"scripts": [
"scripts/base.sh",
"scripts/vagrant.sh",
"scripts/riot.sh",
"scripts/toolchains.sh",
"scripts/udev_rules.sh",
"scripts/virtualbox.sh",
"scripts/cleanup.sh"
]
}
}
}
],
"variables": {
"cpus": "2",
"disk_size": "10240",
"headless": "true",
"iso_checksum": "e2ecdace33c939527cbc9e8d23576381c493b071107207d2040af72595f8990b",
"iso_checksum_type": "sha256",
"iso_name": "ubuntu-18.04.4-server-amd64.iso",
"iso_path": "iso",
"iso_url": "http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/ubuntu-18.04.4-server-amd64.iso",
"memory": "1024",
"hostname": "riot-vm",
"ssh_username": "user",
"ssh_password": "user",
"vagrantfile_template": "vagrantfile.tpl",
"virtualbox_guest_os_type": "Ubuntu_64",
"vm_name": "RIOT-VM"
}
}