6
4

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.

[メモ] virtualbox+vagrantで、buildroot環境

Last updated at Posted at 2016-10-27

概要

環境

  • ホストその1:
    • Windows 10 (1607 - 14393.321)
    • virtualbox 5.0.28
    • vagrant 1.8.5
    • git for Windows 2.10.1.windows.1
  • ホストその2:
    • Lubuntu 16.04 (64bit)
    • virtualbox 5.1.8
    • vagrant 1.8.6

手順

  1. Vagrantfileを取得

  2. Vagrantfile編集(メモリとか、CPUコアとか増やす)

    Vagrantfile

...
VM_MEMORY=3072
VM_CORES=3
...

3. `vagrant up; vagrant ssh`
 => ゲストにログインしたら、`buildroot`のビルド環境

4. `buildroot`も取得されているので、すぐビルドできる

    ```bash
cd ~/buildroot-2016.08/
# ベースの設定
make raspberrypi2_defconfig    # らずぱい2
# make qemu_x86_defconfig        # qemu-x86とか。
# 設定など
make menuconfig
make uclibc-menuconfig
make busybox-menuconfig
make linux-menuconfig
#
time make
# -jN(並列)はやってはいけないらしいぞ。

Windows

  1. vagrant, virtualboxのインストール

  2. git bash をひらく

  3. 以下、こぴぺ

    適当なとこでbashをひらいてこぴぺ

DIR_WORK=/c/vagrant/buildroot
VAG_VM_MEMORY=3072
VAG_VM_CORES=3

mkdir -p ${DIR_WORK}
cd ${DIR_WORK}
powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://buildroot.org/downloads/Vagrantfile','Vagrantfile')"
sed -e "s/VM_MEMORY=2048/VM_MEMORY=${VAG_VM_MEMORY}/g" -e "s/VM_CORES=1/VM_CORES=${VAG_VM_CORES}/g" -i Vagrantfile
vagrant up; vagrant ssh



### Linux
1. virtualboxのインストール
https://www.virtualbox.org/wiki/Linux_Downloads

    ```bash
## 
echo 'deb http://download.virtualbox.org/virtualbox/debian xenial contrib' | sudo tee -a /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.1 -y
#
# ExtensionPack
VBOX_VER=5.1.8-111374
wget http://download.virtualbox.org/virtualbox/5.1.6/Oracle_VM_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack
  1. vagrant のインストール

VAGRANT_VER=1.8.6
wget https://releases.hashicorp.com/vagrant/${VAGRANT_VER}/vagrant_${VAGRANT_VER}_x86_64.deb
sudo dpkg --install ./vagrant_${VAGRANT_VER}_x86_64.deb


3. 以下こぴぺ

    ```bash
mkdir -p $HOME/vagrant/buildroot
cd  $HOME/vagrant/buildroot
wget https://buildroot.org/downloads/Vagrantfile
# vi Vagrantfile
sed -e "s/VM_MEMORY=2048/VM_MEMORY=${VAG_VM_MEMORY}/g" -e "s/VM_CORES=1/VM_CORES=${VAG_VM_CORES}/g" -i Vagrantfile
vagrant up ; vagraant ssh 

関連

6
4
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
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?