1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[メモ] Volumio2のイメージを作成(Virtualbox+Vagrant使用)

Posted at

概要

  • VirtualBox+Vagrantで、ラズパイ向けの Volumio のイメージをビルドする
  • 参考:: github volumio/Build

環境

  • Vagrant環境
    • ホスト機: Windows 10 64bit
    • Virtualbox 5.1.22r115126
    • vagrant 1.9.2
    • ゲストOS: bento/ubuntu-16.04

手順

  1. Vagrant 環境を作る

  2. 適当なフォルダを作って、以下の内容で、Vagrantfileを生成

    Vagrantfile
    VB_NAME="Ubuntu16.04-Volumio2-Image-build"
    VM_MEMORY=2048
    VM_CORES=2
    
    Vagrant.configure("2") do |config|
      config.vm.box = "bento/ubuntu-16.04"
    	config.vm.provider "virtualbox" do |vb|
    		#   vb.gui = true
    		vb.name   = VB_NAME
    		vb.memory = VM_MEMORY
    		vb.cpus   = VM_CORES
    	end
    
    	config.vm.provision "shell", inline: <<-SHELL
    		#whoami # => root
    		
    		# APTキャッシュサーバがあれば。
    		# echo 'Acquire::http::Proxy "http://apt-cache-server:3142";' | tee /etc/apt/apt.conf.d/02proxy
    		#
    		apt-get -q update -q
    		#DEBIAN_FRONTEND=noninteractive apt-get -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
    		apt install -y git squashfs-tools kpartx multistrap qemu-user-static samba debootstrap parted dosfstools qemu binfmt-support qemu-utils
    	SHELL
    
    	config.vm.provision "shell", privileged: false, inline: <<-SHELL
    		#whoami # => vagrant 
    		cd ${HOME}
    		git clone https://github.com/volumio/Build.git ./Build
    		cd ./Build
    		time sudo ./build.sh -b arm -d pi
    		time bzip2 -9v ./Volumio*.img
    		cp -fv *.bz2 /vagrant
    	SHELL
    end
    

3. git bashを開いて、`vagrant up`する
4. 待つ

	```shell-session
	...
	...
	==> default: Squash file system created
	==> default: Cleaning squash environment
	==> default: Unmounting Temp Devices
	==> default:
	==> default: real       13m16.552s
	==> default: user       8m57.140s
	==> default: sys        0m36.632s
	==> default:   ./Volumio-2017-07-24-pi.img:
	==> default:  9.865:1,  0.811 bits/byte, 89.86% saved, 2936012800 in, 297607150 out.
	==> default:
	==> default: real       0m54.987s
	==> default: user       0m53.608s
	==> default: sys        0m1.040s
	==> default: 'Volumio-2017-07-24-pi.img.bz2' -> '/vagrant/Volumio-2017-07-24-pi.img.bz2'
	real    16m39.332s
	user    0m0.000s
	sys     0m0.000s
  1. Vagrantfileのフォルダに、Volumio-2017-MM-DD-pi.img.bz2みたいのができているはず。EtcherとかでmicroSDにやく。

その他

  • time sudo ./build.sh -b arm -d pi のとこで、-v 2.0(例)と追加すると、バージョンがつけられる。

  • nano /volumio/app/plugins/system_controller/i2s_dacs/dacs.json にうまくデバイス追加で、メニューに出てくる

  • 安いI2Sデバイスを買ったんだけど、Volumio現バージョン2.201(13-06-2017)のカーネルv4.4.xでは未対応のため... これで作成すると、Kernel v4.9.31が使用される。

volumio@volumio:~$ uname -a
Linux volumio 4.9.31+ #1005 Thu Jun 8 12:55:36 BST 2017 armv6l GNU/Linux


1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?