Raspbian build

www.socym.co.jp

この本読んでRaspbianのビルドしてハマった件。

手順

build PCに必要なパッケージをインストール

$ sudo apt-get install build-essential libncurses-dev git git-core

ツリーの取得

$ mkdir ~raspberry
$ cd ~/raspberry
$ git clone https://github.com/raspberrypi/linux
$ git clone https://github.com/raspberrypi/tools

カーネルコンフィグ

$ cd ~/raspberry/linux
$ ARCH=arm make bcmrpi_defconfig

make

$ ARCH=arm CLOSS_COMPILE=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnuebihf- make -j5

ここで下記のエラー。。

make: ../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc

これで解決

$ ARCH=arm CLOSS_COMPILE=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnuebihf- make -j5

ビルドマシンが64bitだったので、それに合わせたパスを指定して解決した。