From patchwork Thu Sep 17 06:26:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 518727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id C4C9F14027C for ; Thu, 17 Sep 2015 16:27:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=SwHc63+Y; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CC2F5A3764; Thu, 17 Sep 2015 06:27:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kjoGZlwwfszq; Thu, 17 Sep 2015 06:27:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D620EA3716; Thu, 17 Sep 2015 06:27:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DA4931C1055 for ; Thu, 17 Sep 2015 06:27:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B5FC833208 for ; Thu, 17 Sep 2015 06:27:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dfT7vSl4+s+w for ; Thu, 17 Sep 2015 06:27:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by silver.osuosl.org (Postfix) with ESMTPS id 2E69B331D8 for ; Thu, 17 Sep 2015 06:27:11 +0000 (UTC) Received: by wicfx3 with SMTP id fx3so9331686wic.1 for ; Wed, 16 Sep 2015 23:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=FooA9IaSg095YxGI4qsaUgakF7N9Kb6Qq7C0uEiiqSM=; b=SwHc63+YIwZGq0Zg24smezz6aRGhI2Ff5oFMbjhb1SfgOFTr9hPRRxzsUyt5zgzoUC jjXR41NEvMqVl713y2ttQI2lJiHvoqss3c0uvcfu6BUazGPrDWzd9GKl9R6abO+aVXbh pyuMlHq8ePggUdotb6NAnSJH/SX2aPf9MWLazojcJ/+Qo4CR1QcGy0elhZV1rK10BwkS yt1qXWh909LCYTDCbFnEBzZhJr/xMmN7HQynFVqtQ5G/Q9AQ+YRxWlIVHGWdI/CTfOGq iKuPWQmEOfJbABUUJW7uPY/AgaAFEFvWAL3FVeuVVFIkkWuugcMn9C0QwPA/j5nFjgac kiPQ== X-Received: by 10.194.179.137 with SMTP id dg9mr29775804wjc.55.1442471229581; Wed, 16 Sep 2015 23:27:09 -0700 (PDT) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id s9sm1546125wjy.16.2015.09.16.23.27.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Sep 2015 23:27:08 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Thu, 17 Sep 2015 08:26:44 +0200 Message-Id: <1442471204-8305-1-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH] 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: * Upgraded windows one liner to be compatible with all powershell versions * Added a link to Vagrant homepage in doc and website RFC v2->v3: * Downloading latest buildroot version only on first run * Better handling of machine name and options v1->v2: * Autodetecting of latest buildroot version from CHANGES file. * Better documentation docs/manual/getting.txt | 14 +++++++++++++ docs/website/download.html | 17 ++++++++++++++++ support/misc/Vagrantfile | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 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 534fc7e..8075aca 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..2d9151b --- /dev/null +++ b/support/misc/Vagrantfile @@ -0,0 +1,51 @@ +################################################################################ +# +# 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.customize ['modifyvm', :id, '--memory', VM_MEMORY] + v.customize ['modifyvm', :id, '--cpus', VM_CORES] + end + + config.vm.provision 'shell' do |s| + s.inline = 'echo Setting up machine name' + + require 'open-uri' + open('http://git.buildroot.net/buildroot/plain/CHANGES') do |f| + $buildroot_version=f.read.lines.first.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.customize ['modifyvm', :id, '--name', "Buildroot #{$buildroot_version}"] + end + end + + config.vm.provision 'shell', inline: + "sudo apt-get -q update + sudo apt-get -q -y install build-essential libncurses5-dev \ + git bzr cvs mercurial subversion + sudo apt-get -q -y autoremove" + + 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