From patchwork Wed Nov 18 22:51:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 546238 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id AB097141498 for ; Thu, 19 Nov 2015 09:52:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Sf/ff+Mv; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3566E94B05; Wed, 18 Nov 2015 22:52:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UFvJd-wcSVoH; Wed, 18 Nov 2015 22:52:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 67E0294AE9; Wed, 18 Nov 2015 22:52:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D6B741C10F5 for ; Wed, 18 Nov 2015 22:52:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D13C094AEC for ; Wed, 18 Nov 2015 22:52:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TTUHIizoibvb for ; Wed, 18 Nov 2015 22:52:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9B3A794AE9 for ; Wed, 18 Nov 2015 22:52:00 +0000 (UTC) Received: by wmvv187 with SMTP id v187so301540744wmv.1 for ; Wed, 18 Nov 2015 14:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=NPA0AOXQp2GhRAIRMxvhDA5JoeVFSgF6fX2kUZtLiTw=; b=Sf/ff+MvTJzc8+IMZnRdyYQQP1QcuYTedJWe0/YdkO4MLGRviVacSuOqMtTwJ8YmKo s4VBZQlcMsngCb02xGxW9I1Fx03p/s8L1plg09hWTNzpZc4AwEE3xfZ/3N+10LNqPPfC ZOtG6sWDU+fdakicN4BozTYPDoDls0JGuZvETZwfye2gBry0e2lnQAhReNIjiW4PSjb/ mGZY1JU/cVYF7oBsWoIHiRp3yzc7q+5fxdG10GCVqX9nu1zIvGmOS+VFxNgWVXgFKKBn AOadaGZaHVJkO/zvBn0pHsFM4G++qlUiInoZp2HtJS3CnDJwY7VdOVqydApdnKTazKXE V/4Q== X-Received: by 10.194.19.163 with SMTP id g3mr4515844wje.166.1447887119310; Wed, 18 Nov 2015 14:51:59 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id l20sm25718858wmd.20.2015.11.18.14.51.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Nov 2015 14:51:58 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 18 Nov 2015 23:51:35 +0100 Message-Id: <1447887095-16773-1-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH v3] support/misc: Adding Vagrant file for provisioning X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch adds a Vagrant file to buildroot. With this file you can provision a complete buildroot developing environment in minutes on all major platforms (Linux/Mac/Windows). Signed-off-by: Angelo Compagnucci --- Changelog v2 -> v3: * Better handling of virtualbox provider options v1 -> v2: * Scraping latest version number from website (suggested by Arnout Vandecappelle) * Added libc i386 dependency for precompiled toolchains (suggested by Arnout Vandecappelle) docs/manual/getting.txt | 14 +++++++++++ docs/website/download.html | 17 +++++++++++++ support/misc/Vagrantfile | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 support/misc/Vagrantfile diff --git a/docs/manual/getting.txt b/docs/manual/getting.txt index 3437f93..84e1f54 100644 --- a/docs/manual/getting.txt +++ b/docs/manual/getting.txt @@ -10,6 +10,20 @@ November. Release numbers are in the format YYYY.MM, so for example Release tarballs are available at http://buildroot.org/downloads/[]. +An official https://www.vagrantup.com/[Vagrantfile] is distributed within buildroot for your needs. +If you want to setup an isolated buildroot environment on Linux or +Mac Os X, paste this line onto your terminal: + +-------------------- +curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up +-------------------- + +If you are on Windows, paste this into your powershell: + +-------------------- +(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up +-------------------- + If you want to follow development, you can use the daily snapshots or make a clone of the Git repository. Refer to the http://buildroot.org/download[Download page] of the Buildroot website diff --git a/docs/website/download.html b/docs/website/download.html index a6c2ac0..00e24bc 100644 --- a/docs/website/download.html +++ b/docs/website/download.html @@ -32,6 +32,23 @@ This and earlier releases (and their PGP signatures) can always be downloaded fr

+

+An official Vagrantfile +is distributed within buildroot for your needs. +If you want to setup an isolated buildroot environment on Linux or +Mac Os X, paste this line onto your terminal: + +

+curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
+
+ +If you are on Windows, paste this into your powershell: + +
+(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up
+
+

+ You can also obtain daily snapshots of the latest Buildroot source tree if you want to follow development, but cannot or do not wish to use Git. diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile new file mode 100644 index 0000000..93a7cf8 --- /dev/null +++ b/support/misc/Vagrantfile @@ -0,0 +1,59 @@ +################################################################################ +# +# Vagrantfile +# +################################################################################ + +### Change here for more memory/cores ### +VM_MEMORY=1024 +VM_CORES=1 + +Vagrant.configure('2') do |config| + config.vm.box = 'ubuntu/trusty64' + + config.vm.provider :vmware_fusion do |v, override| + v.vmx['memsize'] = VM_MEMORY + v.vmx['numvcpus'] = VM_CORES + end + + config.vm.provider :virtualbox do |v, override| + v.memory = VM_MEMORY + v.cpus = VM_CORES + + required_plugins = %w( vagrant-vbguest ) + required_plugins.each do |plugin| + system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin + end + end + + config.vm.provision 'shell' do |s| + s.inline = 'echo Setting up machine name' + + require 'open-uri' + open('http://buildroot.org/download.html') do |f| + $buildroot_version = f.read.lines.grep(/The latest stable release/)[0] + .split('')[1].split('')[0] + end + + config.vm.provider :vmware_fusion do |v, override| + v.vmx['displayname'] = "Buildroot #{$buildroot_version}" + end + + config.vm.provider :virtualbox do |v, override| + v.name = "Buildroot #{$buildroot_version}" + end + end + + config.vm.provision 'shell', inline: + "sudo dpkg --add-architecture i386 + sudo apt-get -q update + sudo apt-get -q -y install build-essential libncurses5-dev \ + git bzr cvs mercurial subversion libc6:i386 + sudo apt-get -q -y autoremove + sudo apt-get -q -y clean" + + config.vm.provision 'shell', privileged: false, inline: + "echo 'Downloading and extracting buildroot #{$buildroot_version}' + wget -q -c http://buildroot.org/downloads/buildroot-#{$buildroot_version}.tar.gz + tar axf buildroot-#{$buildroot_version}.tar.gz" +end