forked from Xilinx/PYNQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
executable file
·64 lines (56 loc) · 1.86 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Based on Ubuntu Bionic 18.04; this is the default VM
# run `vagrant up bionic`
config.vm.define "bionic", primary: true do |bionic|
bionic.vm.box = "ubuntu/bionic64"
bionic.vm.synced_folder ".", "/pynq",
owner: "vagrant", group: "vagrant"
bionic.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.name = "pynq_ubuntu_18_04"
vb.memory = "8192"
vb.customize ["modifyvm", :id, "--vram", "128"]
vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
disk_image = File.join(File.dirname(File.expand_path(__FILE__)),
'ubuntu_18_04.vdi')
unless File.exist?(disk_image)
vb.customize ['createhd',
'--filename', disk_image,
'--size', 160 * 1024]
end
vb.customize ['storageattach', :id,
'--storagectl', 'SCSI',
'--port', 2, '--device', 0,
'--type', 'hdd',
'--medium', disk_image]
vb.customize ['storageattach', :id,
'--storagectl', 'IDE',
'--port', '0', '--device', '1',
'--type', 'dvddrive',
'--medium', 'emptydrive']
end
bionic.vm.provision "shell", inline: <<-SHELL
parted /dev/sdc mklabel msdos
parted /dev/sdc mkpart primary 100 100%
partprobe
mkfs.xfs /dev/sdc1
mkdir /workspace
echo `blkid /dev/sdc1 | awk '{print$2}' | sed -e 's/"//g'` \
/workspace xfs noatime,nobarrier 0 0 >> /etc/fstab
mount /workspace
chown -R vagrant:vagrant /workspace
chmod 777 -R /workspace
SHELL
bionic.vm.provision "shell",
inline: "apt-get update"
bionic.vm.provision "shell",
inline: "/bin/bash /pynq/sdbuild/scripts/setup_host.sh"
bionic.vm.provision "shell",
inline: "apt-get install -y --force-yes ubuntu-desktop"
bionic.vm.provision "shell", inline: <<-SHELL
cat /root/.profile | grep PATH >> /home/vagrant/.profile
SHELL
end
end