1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Merged in filnet/librepilot/LP-442_update_vagrant_to_latest_build_env (pull request #358)

LP-442 update vagrant to latest build env
This commit is contained in:
Philippe Renon 2016-11-21 20:39:02 +00:00
commit bfd4d824b7
4 changed files with 71 additions and 60 deletions

View File

@ -1,35 +1,40 @@
vagrant_openpilot_dev - provides a Vagrant box with everything needed to compile OpenPilot code base.
vagrant_openpilot_dev - provides a Vagrant box with everything needed to compile LibrePilot code base.
username: vagrant
password: vagrant
For details of an OpenPilot development environment please refer to the Development Manual https://wiki.openpilot.org/display/WIKI/OpenPilot+Developer+Manual.
For details of an LibrePilot development environment please refer to the Development Manual https://librepilot.atlassian.net/wiki/display/LPDOC/Linux+-+Building+and+Packaging.
To enable Android Studio and Java, edit file install-tools.sh and set ANDROID_ENV=true. You might also want to adjust for the versions it downloads.
If you would like for VirtualBox window to open, this can be useful for running apps, set 'vb.gui = true' in Vagrantfile.
If you would like for VirtualBox window to open, this can be useful for running apps, set 'vb.gui = true' in Vagrant file. For now the vagrant shell (ssh) will not work when starting in GUI mode.
Starting
Setting up
1) Install vagrant on your host (https://www.vagrantup.com/docs/installation/)
2) Download the files in this folder to a working folder on your host. There is no need to retrieve the full repository.
3) in a command line select the working folder
4) Run the command
$ vagrant up
Once your machine has started up you can ssh into it or log into Xfce (assuming you set vb.gui = true). Any changes you make persist in the Vagrant VM, when you are done run 'vagrant halt', this will turn off the vm and persist your changes.
$ vagrant ssh
To begin with Openpilot base source is checked out into ~/workspace/openpilot/OpenPilot. Run the following command to get the rest of the tools in place (this will take a bit of time):
make all_sdk_install
You are now ready to browse the code.
To begin with LibrePilot base source is checked out into ~/workspace/librepilot. All necessary modules are initialized and SDK's installed.
You are now ready to browse the code. To build the code run the commands:
$ cd ~/workspace/librepilot
$ make all
If you wish to start all over:
$ vagrant halt
$ vagrant destroy
For more information about OpenPilot please visit the forums at http://forums.openpilot.org.
For more information about LibrePilot please visit the forums at https://forum.librepilot.org/.
For more informatin about Vagrant please visit http://docs.vagrantup.com/.
For more information about Vagrant please visit https://www.vagrantup.com/.
Based off https://github.com/steveliles/vagrant-boxes/blob/master/debian-android-studio/install-tools.sh

View File

@ -1,35 +1,33 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
#config.vm.box = "jhartman/xubuntu14.04.1"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
#config.vm.synced_folder "../../projects", "/home/vagrant/projects"
config.vm.provision :shell, :path => "bootstrap.sh"
config.ssh.forward_x11=true
# update definitions
config.vm.provision "shell", inline: "apt-get update"
# just the basic desktop environment. if you want the addons, you can install them later
config.vm.provision "shell", inline: "apt-get install xubuntu-desktop --no-install-recommends --assume-yes"
# otherwise icons don't get loaded
config.vm.provision "shell", inline: "apt-get install xubuntu-icon-theme --assume-yes"
#activate logon with gui and reboot
config.vm.provision "shell", inline: "dpkg-reconfigure lightdm"
config.vm.provision "shell", inline: "reboot"
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
# GUI can be enabled after provisioning. For now SSH and GUI is not compatible
# vb.gui = true
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
config.vm.provision :shell, :path => "bootstrap.sh"
config.ssh.forward_x11=true
# update definitions
config.vm.provision "shell", inline: "apt-get update"
# just the basic desktop environment. if you want the addons, you can install them later
config.vm.provision "shell", inline: "apt-get install xubuntu-desktop --no-install-recommends --assume-yes"
# otherwise icons don't get loaded
config.vm.provision "shell", inline: "apt-get install xubuntu-icon-theme --assume-yes"
#activate logon with gui and reboot
config.vm.provision "shell", inline: "dpkg-reconfigure lightdm"
config.vm.provision "shell", inline: "reboot"
end

View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
apt-get update
apt-get -y upgrade
sudo apt-get update
sudo apt-get --yes --force-yes upgrade
# get ourselves some basic toys
apt-get -y install git-core build-essential openssl libssl-dev
sudo apt-get --yes --force-yes install git-core build-essential openssl libssl-dev
# install some tools for the vagrant user only by executing
# a script AS the vagrant user

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash
ANDROID_ENV=true
echo "
Setup a build environment
"
ANDROID_ENV=false
ANDROID_STUDIO_VERSION=1.1.0
ANDROID_STUDIO_BUILD=135.1740770
ANDROID_STUDIO_FILE=android-studio-ide-$ANDROID_STUDIO_BUILD-linux.zip
@ -11,10 +15,14 @@ ANDROID_SDK_URL=http://dl.google.com/android/${ANDROID_SDK_FILE}
ANDROID_API_LEVELS=android-20,android-21,android-22
ANDROID_BUILD_TOOLS_VERSION=21.1.2
sudo apt-get -y install curl build-essential gdb wget \
debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386
# Setup a build environment
sudo add-apt-repository --yes ppa:librepilot/tools
sudo apt-get --yes --force-yes update
sudo apt-get --yes --force-yes install build-essential ccache debhelper git-core git-doc flex graphviz bison libudev-dev libusb-1.0-0-dev libsdl1.2-dev python libopenscenegraph-dev qt56-meta-minimal qt56svg qt56script qt56serialport qt56multimedia qt56translations qt56tools qt56quickcontrols libosgearth-dev openscenegraph-plugin-osgearth
sudo apt-get --yes --force-yes install libc6-i386
# Do Android stuff
if [ "$ANDROID_ENV" = "true" ]; then
# install java7
@ -25,7 +33,7 @@ if [ "$ANDROID_ENV" = "true" ]; then
# accept the license agreement
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt-get -y install oracle-java7-installer
sudo apt-get --yes --force-yes install oracle-java7-installer
# make a place to install development tools
mkdir -p ~/workspace/tools
@ -63,12 +71,12 @@ if [ "$ANDROID_ENV" = "true" ]; then
fi
# Checkout code
mkdir -p ~/workspace/
cd ~/workspace/
git clone https://bitbucket.org/librepilot/librepilot.git
cd librepilot
git checkout next
mkdir -p ~/workspace/openpilot
cd ~/workspace/openpilot
git clone git://git.openpilot.org/OpenPilot.git
cd OpenPilot
git checkout -b next origin/next
git pull
# Dev Tools Installation
make build_sdk_install