-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
31 lines (28 loc) · 1.38 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
config.vm.provider "virtualbox" do |v|
v.name = "patchOS_build_env"
v.memory = 2048
v.cpus = 2
end
config.vm.provision "shell", inline: <<-SHELL
sudo echo "Server = http://mirror.archlinux.no/\\$repo/os/\\$arch" > /etc/pacman.d/mirrorlist
sudo pacman -Syu --noconfirm
sudo pacman -S base-devel aarch64-linux-gnu-gcc xmlto kmod inetutils libelf bc bison flex ncurses parted dosfstools gcc-libs wget rsync git python2 --noconfirm
sudo echo 'MAKEFLAGS="-j$(($(nproc) + 1))"' >> /etc/makepkg.conf
su vagrant -c "git clone https://aur.archlinux.org/yay-git.git"
cd yay-git
su vagrant -c "makepkg -si --skipchecksums --noconfirm"
su vagrant -c "yay -Syu --noconfirm"
su vagrant -c "gpg --keyserver keys.gnupg.net --recv-key 45F68D54BBE23FB3039B46E59766E084FB0F43D8"
su vagrant -c "gpg --keyserver keys.gnupg.net --recv-key CEACC9E15534EBABB82D3FA03353C9CEF108B584"
su vagrant -c "yay -S binfmt-qemu-static-all-arch qemu-user-static --noconfirm"
su vagrant -c "yay -S binfmt-qemu-static-all-arch qemu-user-static --noconfirm"
sudo systemctl restart systemd-binfmt.service
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin
SHELL
end