Raspberry Pi 3 の Kernelをビルド
Raspberry Pi 3でローカルビルド
Kernelのもっとも簡単なビルド方法はRaspberry Piの環境でのmake。
時間はかかるが、手順通りにやれば確実にビルドできる。
所要時間は85分。
Kernel Building - Raspberry Pi Documentation
sudo apt-get install bc git clone --depth=1 https://github.com/raspberrypi/linux KERNEL=kernel7 make bcm2709_defconfig time make -j4 zImage modules dtbs ... ... IHEX2FW firmware/keyspan_pda/xircom_pgs.fw real 85m25.273s user 230m6.130s sys 10m58.340s
Ubuntuでのクロスビルド
Ubuntuでのビルドも簡単。ツールチェインを入れる手間があるだけで、手順通りにやればできる。
さくらVPSの環境でビルドしてみた。およそ20分で完了。
sudo apt-get install build-essentials sudo apt-get install git sudo apt-get install bc git clone https://github.com/raspberrypi/tools git clone --depth=1 https://github.com/raspberrypi/linux KERNEL=kernel7 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig time make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dibs ... real 19m40.302s user 34m15.342s sys 4m39.830s