mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
106 lines
5.3 KiB
JSON
106 lines
5.3 KiB
JSON
{
|
|
"_comment": "Build with `packer build riot.json`",
|
|
"builders": [
|
|
{
|
|
"boot_command": [
|
|
"{{ user `boot_command_prefix` }}",
|
|
"/install/vmlinuz noapic ",
|
|
"initrd=/install/initrd.gz ",
|
|
"file=/floppy/{{ user `preseed` }} ",
|
|
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
|
|
"hostname={{ user `hostname` }} ",
|
|
"fb=false debconf/frontend=noninteractive ",
|
|
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
|
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
|
"passwd/user-fullname={{ user `ssh_fullname` }} ",
|
|
"passwd/user-password={{ user `ssh_password` }} ",
|
|
"passwd/user-password-again={{ user `ssh_password` }} ",
|
|
"passwd/username={{ user `ssh_username` }} ",
|
|
"-- <enter>"
|
|
],
|
|
"disk_size": "{{ user `disk_size` }}",
|
|
"floppy_files": [ "{{ user `preseed` }}" ],
|
|
"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",
|
|
"shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now",
|
|
"ssh_password": "{{ user `ssh_password` }}",
|
|
"ssh_username": "{{ user `ssh_username` }}",
|
|
"ssh_wait_timeout": "10000s",
|
|
"type": "virtualbox-iso",
|
|
"vboxmanage": [
|
|
[ "modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}" ],
|
|
[ "modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus` }}" ],
|
|
[ "modifyvm", "{{.Name}}", "--usb", "on" ],
|
|
[ "modifyvm", "{{.Name}}", "--usbxhci", "on" ],
|
|
[ "modifyvm", "{{.Name}}", "--audio", "none"],
|
|
[ "modifyvm", "{{.Name}}", "--ioapic", "on"],
|
|
[ "modifyvm", "{{.Name}}", "--rtcuseutc", "on"],
|
|
[ "modifyvm", "{{.Name}}", "--clipboard", "bidirectional"],
|
|
["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", "USBasp", "--vendorid", "0x16c0", "--productid", "0x05dc"],
|
|
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "iotlab-m3", "--vendorid", "0x0403", "--productid", "0x6010"],
|
|
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "samr21-xpro", "--vendorid", "0x03eb", "--productid", "0x2111"],
|
|
["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino Mega 2560", "--vendorid", "0x2341", "--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"]
|
|
],
|
|
"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": "file",
|
|
"source": "./udev_rules",
|
|
"destination": "/tmp"
|
|
},
|
|
{
|
|
"environment_vars": [
|
|
"SSH_USERNAME={{user `ssh_username`}}",
|
|
"SSH_PASSWORD={{user `ssh_password`}}"
|
|
],
|
|
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
|
|
"scripts": [ "setup.sh" ],
|
|
"type": "shell"
|
|
}
|
|
],
|
|
"variables": {
|
|
"boot_command_prefix": "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
|
"cpus": "1",
|
|
"disk_size": "65536",
|
|
"headless": "true",
|
|
"iso_checksum": "a06cd926f5855d4f21fb4bc9978a35312f815fbda0d0ef7fdc846861f4fc4600",
|
|
"iso_checksum_type": "sha256",
|
|
"iso_name": "ubuntu-16.04.3-server-amd64.iso",
|
|
"iso_path": "/Volumes/Storage/software/ubuntu",
|
|
"iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
|
|
"memory": "1024",
|
|
"preseed" : "preseed.cfg",
|
|
"hostname": "vagrant",
|
|
"ssh_fullname": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_username": "vagrant",
|
|
"vagrantfile_template": "vagrantfile.tpl",
|
|
"virtualbox_guest_os_type": "Ubuntu_64",
|
|
"vm_name": "RIOT-VM"
|
|
}
|
|
}
|