summaryrefslogtreecommitdiffstats
path: root/tools/vagrant
diff options
context:
space:
mode:
authorVencislav Atanasov <user890104@freemyipod.org>2017-05-01 22:57:01 +0300
committerFranklin Wei <git@fwei.tk>2019-07-26 20:20:07 -0400
commit321de68b216400d3542e34d9c64c4aa261e60341 (patch)
treeeb56fac2d60ee1e3b2ddd7a1b32f0a9e94be5807 /tools/vagrant
parent4e357167b5b92bbdf152c9c04e2620c134165bc5 (diff)
downloadrockbox-321de68b216400d3542e34d9c64c4aa261e60341.tar.gz
rockbox-321de68b216400d3542e34d9c64c4aa261e60341.tar.bz2
rockbox-321de68b216400d3542e34d9c64c4aa261e60341.zip
Add Vagrant configuration for creating a development VM
Vagrant is an application that automates creation and provisioning of a virtual machine for development. The config here creates an Ubuntu 16.04 LTS machine, updates it, downloads and installs the toolchains for sh, m68k and arm, mingw-w64, SDL (for Windows simulators) and other packages needed for building Rockbox. It works fine for building a Windows simulator and compiling iPod classic binaries. It should be possible to make the other build types, too. MIPS toolchain fails to build, ARM-APP is not tested because the files download very slow on my connection. Please test if it works for you, and let me know. Quick start: download and install Vagrant and VirtualBox for your operating system, make sure VT-x / AMD-V is enabled in your BIOS/EFI setup, open a shell in rockbox/tools and input the command "vagrant up" Change-Id: Ief5476ab066663a4db7e85404b25d2d781d90532
Diffstat (limited to 'tools/vagrant')
-rwxr-xr-xtools/vagrant/provision-nonprivileged.sh21
-rwxr-xr-xtools/vagrant/provision.sh6
-rwxr-xr-xtools/vagrant/startup.sh3
3 files changed, 30 insertions, 0 deletions
diff --git a/tools/vagrant/provision-nonprivileged.sh b/tools/vagrant/provision-nonprivileged.sh
new file mode 100755
index 0000000000..715ac7b16f
--- /dev/null
+++ b/tools/vagrant/provision-nonprivileged.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+
+# Compile and install the Rockbox toolchain
+# s - sh (Archos models)
+# m - m68k (iriver h1x0/h3x0, iaudio m3/m5/x5 and mpio hd200)
+# a - arm (ipods, iriver H10, Sansa, D2, Gigabeat, etc)
+# i - mips (Jz4740 and ATJ-based players)
+# r - arm-app (Samsung ypr0)
+
+# MIPS toolchain fails at installation: https://pastebin.com/raw/8SBhN58q
+# ARM-APP toolchain is not tested
+echo s m a | RBDEV_PREFIX="${HOME}/rbdev-toolchain" /rockbox/tools/rockboxdev.sh
+echo 'PATH="$HOME/rbdev-toolchain/bin:$PATH"' >> "${HOME}/.profile"
+
+# Download SDL-1.2.5 and compile it using MinGW32
+cd "${HOME}"
+wget --progress=bar:force http://www.libsdl.org/release/SDL-1.2.15.tar.gz
+tar -zxvf SDL-1.2.15.tar.gz
+cd SDL-1.2.15
+./configure --host=x86_64-w64-mingw32 --prefix="${HOME}/mingw32-sdl"
+make install
diff --git a/tools/vagrant/provision.sh b/tools/vagrant/provision.sh
new file mode 100755
index 0000000000..cba1bfefaa
--- /dev/null
+++ b/tools/vagrant/provision.sh
@@ -0,0 +1,6 @@
+#!/bin/bash -e
+
+# Update the OS and install all required packages
+apt-get update
+apt-get dist-upgrade -y
+apt-get install -y zip build-essential gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 texinfo automake libtool-bin flex bison libncurses-dev
diff --git a/tools/vagrant/startup.sh b/tools/vagrant/startup.sh
new file mode 100755
index 0000000000..927cad725d
--- /dev/null
+++ b/tools/vagrant/startup.sh
@@ -0,0 +1,3 @@
+#!/bin/bash -e
+
+# This script runs on every boot