LoginSignup
5
5

More than 5 years have passed since last update.

Raspberry Pi 3 を64bitモードで動かすイメージをBuildrootで作る

Posted at

Buildrootの準備

今回はbuildrootをgitでとってきて、2018.02のタグをcheckoutしました。

git clone git://git.buildroot.net/buildroot
cd buildroot/
git checkout -b work3 2018.02

Raspberry Pi 3の64bit用のコンフィグ

既に用意されているものがあるので、それをベースにします。

make raspberrypi3_64_defconfig
make menuconfig

Buildrootでルートファイルシステムを構築するときに必ずすることを参考にして、dhcpcd, dropbear(ssh), avahi-daemon を入れます。

ビルド

時間がかかるので、nohupをつけてバックグランドでビルドします。

nohup make &
tail -f nohup.out

output/images/sdcard.img ができるので、それをddコマンドでmicro SDカードに書きます。

$ ls -lh output/images/sdcard.img
-rw-r--r-- 1 koba koba 153M Mar 10 10:16 output/images/sdcard.img

rootfsはaarch64でビルドされています。

$ file output/target/bin/busybox 
output/target/bin/busybox: setuid ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, stripped

起動

# cat /proc/version
Linux version 4.9.79-v8 (koba@instance-3) (gcc version 6.4.0 (Buildroot 2018.02) ) #1 SMP PREEMPT Sat Mar 10 08:50:08 UTC 2018
# cat /proc/cpuinfo 
processor   : 0
BogoMIPS    : 38.40
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 1
BogoMIPS    : 38.40
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 2
BogoMIPS    : 38.40
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 3
BogoMIPS    : 38.40
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

ブートログはgistに貼りました。
https://gist.github.com/tetsu-koba/d7f47cfcd7136bac017343d55f4a7fa0

5
5
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
5
5