|
1 | 1 | { |
2 | | - "_comment": "Build with `packer build riot.json`", |
3 | 2 | "builders": [ |
4 | 3 | { |
| 4 | + "type": "virtualbox-iso", |
5 | 5 | "boot_command": [ |
6 | | - "{{ user `boot_command_prefix` }}", |
7 | | - "/install/vmlinuz noapic ", |
8 | | - "initrd=/install/initrd.gz ", |
9 | | - "file=/floppy/{{ user `preseed` }} ", |
10 | | - "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", |
11 | | - "hostname={{ user `hostname` }} ", |
12 | | - "fb=false debconf/frontend=noninteractive ", |
13 | | - "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", |
14 | | - "keyboard-configuration/variant=USA console-setup/ask_detect=false ", |
15 | | - "passwd/user-fullname={{ user `ssh_fullname` }} ", |
16 | | - "passwd/user-password={{ user `ssh_password` }} ", |
17 | | - "passwd/user-password-again={{ user `ssh_password` }} ", |
18 | | - "passwd/username={{ user `ssh_username` }} ", |
19 | | - "-- <enter>" |
| 6 | + "<esc><wait>", |
| 7 | + "<esc><wait>", |
| 8 | + "<enter><wait>", |
| 9 | + "/install/vmlinuz<wait>", |
| 10 | + " auto<wait>", |
| 11 | + " console-setup/ask_detect=false<wait>", |
| 12 | + " console-setup/layoutcode=us<wait>", |
| 13 | + " console-setup/modelcode=pc105<wait>", |
| 14 | + " debconf/frontend=noninteractive<wait>", |
| 15 | + " debian-installer=en_US<wait>", |
| 16 | + " fb=false<wait>", |
| 17 | + " initrd=/install/initrd.gz<wait>", |
| 18 | + " kbd-chooser/method=us<wait>", |
| 19 | + " keyboard-configuration/layout=USA<wait>", |
| 20 | + " keyboard-configuration/variant=USA<wait>", |
| 21 | + " locale=en_US<wait>", |
| 22 | + " netcfg/get_domain=vm<wait>", |
| 23 | + " netcfg/get_hostname={{ user `hostname` }}<wait>", |
| 24 | + " grub-installer/bootdev=/dev/sda<wait>", |
| 25 | + " noapic<wait>", |
| 26 | + " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", |
| 27 | + " -- <wait>", |
| 28 | + "<enter><wait>" |
20 | 29 | ], |
| 30 | + "boot_wait": "10s", |
21 | 31 | "disk_size": "{{ user `disk_size` }}", |
22 | | - "floppy_files": [ "{{ user `preseed` }}" ], |
23 | 32 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
24 | 33 | "guest_os_type": "{{ user `virtualbox_guest_os_type` }}", |
25 | 34 | "headless": "{{ user `headless` }}", |
26 | 35 | "iso_checksum": "{{ user `iso_checksum` }}", |
27 | 36 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", |
28 | 37 | "iso_urls": [ "{{ user `iso_path` }}/{{ user `iso_name` }}", "{{ user `iso_url` }}" ], |
29 | 38 | "output_directory": "output-{{ user `vm_name` }}-virtualbox-iso", |
| 39 | + "http_directory": "http", |
30 | 40 | "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now", |
31 | | - "ssh_password": "{{ user `ssh_password` }}", |
32 | 41 | "ssh_username": "{{ user `ssh_username` }}", |
| 42 | + "ssh_password": "{{ user `ssh_password` }}", |
| 43 | + "ssh_port": 22, |
33 | 44 | "ssh_wait_timeout": "10000s", |
34 | | - "type": "virtualbox-iso", |
35 | 45 | "vboxmanage": [ |
36 | 46 | [ "modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}" ], |
37 | 47 | [ "modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus` }}" ], |
38 | 48 | [ "modifyvm", "{{.Name}}", "--usb", "on" ], |
39 | | - [ "modifyvm", "{{.Name}}", "--usbxhci", "on" ], |
40 | 49 | [ "modifyvm", "{{.Name}}", "--audio", "none"], |
41 | 50 | [ "modifyvm", "{{.Name}}", "--ioapic", "on"], |
42 | 51 | [ "modifyvm", "{{.Name}}", "--rtcuseutc", "on"], |
43 | | - [ "modifyvm", "{{.Name}}", "--clipboard", "bidirectional"], |
44 | 52 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "FTDI USB-TTL", "--vendorid", "0x0403", "--productid", "0x6001"], |
45 | 53 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "CP2102 USB to UART", "--vendorid", "0x10c4", "--productid", "0xea60"], |
46 | 54 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "STM32 STLink", "--vendorid", "0x0483", "--productid", "0x3748"], |
| 55 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "STM32 STLink", "--vendorid", "0x0483", "--productid", "0x374b"], |
47 | 56 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "USBasp", "--vendorid", "0x16c0", "--productid", "0x05dc"], |
48 | 57 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "iotlab-m3", "--vendorid", "0x0403", "--productid", "0x6010"], |
49 | | - ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "samr21-xpro", "--vendorid", "0x03eb", "--productid", "0x2111"], |
50 | | - ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino Mega 2560", "--vendorid", "0x2341", "--productid", "0x0042"], |
| 58 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "iotlab-m3-cn", "--vendorid", "0x0403", "--productid", "0x6011"], |
| 59 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "CMSIS-DAP", "--vendorid", "0x03eb", "--productid", "0x2111"], |
| 60 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino UNO", "--vendorid", "0x2341", "--productid", "0x0042"], |
| 61 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino Mega 2560", "--vendorid", "0x2a03", "--productid", "0x0042"], |
51 | 62 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Phytec phyWAVE KW22", "--vendorid", "0x0d28", "--productid", "0x0204"], |
52 | 63 | ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Bluepill", "--vendorid", "0x1d50", "--productid", "0x6017"], |
53 | | - ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Bluepill", "--vendorid", "0x1d50", "--productid", "0x6018"] |
| 64 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Bluepill", "--vendorid", "0x1d50", "--productid", "0x6018"], |
| 65 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "JLink", "--vendorid", "0x1366", "--productid", "0x1015"], |
| 66 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "Arduino Zero", "--vendorid", "0x03eb", "--productid", "0x2157"], |
| 67 | + ["usbfilter", "add", "0", "--target", "{{.Name}}", "--name", "DAPLink", "--vendorid", "0x0d28", "--productid", "0x0204"] |
54 | 68 | ], |
55 | 69 | "virtualbox_version_file": ".vbox_version", |
56 | 70 | "vm_name": "{{user `vm_name`}}" |
|
68 | 82 | ], |
69 | 83 | "provisioners": [ |
70 | 84 | { |
71 | | - "type": "file", |
72 | | - "source": "./udev_rules", |
73 | | - "destination": "/tmp" |
74 | | - }, |
75 | | - { |
| 85 | + "type": "shell", |
76 | 86 | "environment_vars": [ |
77 | | - "SSH_USERNAME={{user `ssh_username`}}", |
78 | | - "SSH_PASSWORD={{user `ssh_password`}}" |
| 87 | + "SSH_USERNAME={{ user `ssh_username` }}" |
79 | 88 | ], |
80 | | - "execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", |
81 | | - "scripts": [ "setup.sh" ], |
82 | | - "type": "shell" |
| 89 | + "execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -S -E bash '{{.Path}}'", |
| 90 | + "override": { |
| 91 | + "virtualbox-iso": { |
| 92 | + "scripts": [ |
| 93 | + "scripts/base.sh", |
| 94 | + "scripts/vagrant.sh", |
| 95 | + "scripts/riot.sh", |
| 96 | + "scripts/toolchains.sh", |
| 97 | + "scripts/udev_rules.sh", |
| 98 | + "scripts/virtualbox.sh", |
| 99 | + "scripts/cleanup.sh" |
| 100 | + ] |
| 101 | + } |
| 102 | + } |
83 | 103 | } |
84 | 104 | ], |
85 | 105 | "variables": { |
86 | | - "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>", |
87 | | - "cpus": "1", |
88 | | - "disk_size": "65536", |
| 106 | + "cpus": "2", |
| 107 | + "disk_size": "10240", |
89 | 108 | "headless": "true", |
90 | | - "iso_checksum": "a06cd926f5855d4f21fb4bc9978a35312f815fbda0d0ef7fdc846861f4fc4600", |
| 109 | + "iso_checksum": "e2ecdace33c939527cbc9e8d23576381c493b071107207d2040af72595f8990b", |
91 | 110 | "iso_checksum_type": "sha256", |
92 | | - "iso_name": "ubuntu-16.04.3-server-amd64.iso", |
93 | | - "iso_path": "/Volumes/Storage/software/ubuntu", |
94 | | - "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso", |
| 111 | + "iso_name": "ubuntu-18.04.4-server-amd64.iso", |
| 112 | + "iso_path": "iso", |
| 113 | + "iso_url": "http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/ubuntu-18.04.4-server-amd64.iso", |
95 | 114 | "memory": "1024", |
96 | | - "preseed" : "preseed.cfg", |
97 | | - "hostname": "vagrant", |
98 | | - "ssh_fullname": "vagrant", |
99 | | - "ssh_password": "vagrant", |
100 | | - "ssh_username": "vagrant", |
| 115 | + "hostname": "riot-vm", |
| 116 | + "ssh_username": "user", |
| 117 | + "ssh_password": "user", |
101 | 118 | "vagrantfile_template": "vagrantfile.tpl", |
102 | 119 | "virtualbox_guest_os_type": "Ubuntu_64", |
103 | 120 | "vm_name": "RIOT-VM" |
|
0 commit comments