forked from andy-shev/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathVagrantfile
62 lines (48 loc) · 1.58 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
################################################################################
#
# Vagrantfile
#
################################################################################
### Change here for more memory/cores ###
VM_MEMORY=4096
VM_CORES=8
Vagrant.configure('2') do |config|
config.vm.box = 'bento/ubuntu-20.04'
config.vm.synced_folder ".", "/vagrant", type:"virtualbox"
config.vm.provider :virtualbox do |v, override|
v.memory = VM_MEMORY
v.cpus = VM_CORES
required_plugins = %w( vagrant-vbguest )
end
config.vm.provision 'shell' do |s|
s.inline = 'echo Setting up machine name'
config.vm.provider :virtualbox do |v, override|
v.name = "Buildroot"
end
end
config.vm.provision 'shell', privileged: true, inline:
"
apt-get -q update
apt-get purge -q -y snapd lxcfs lxd ubuntu-core-launcher snap-confine
apt-get -q -y install build-essential libncurses5-dev \
git bzr cvs mercurial subversion unzip bc zstd
apt-get -q -y autoremove
apt-get -q -y clean
update-locale LC_ALL=C
"
config.vm.provision 'shell', privileged: false, inline:
"
rsync --links -r /vagrant/ src
cd src
make galileo_defconfig
BOARD_INTEL_DISK_IMAGE=yes make
sudo bash -e inject-alpine.sh
sudo bash -e inject-arch.sh
cp output/images/sdcard.img /vagrant
cp output/images/sdcard-arch.img /vagrant
cp output/images/sdcard-alpine.img /vagrant
echo Built buildroot image ready at sdcard.img
echo Built alpine image ready at sdcard-alpine.img
echo Built arch image ready at sdcard-arch.img
"
end