Building mainline kernel in RPi 3

Luis de Bethencourt luisbg at osg.samsung.com
Fri Oct 21 05:04:08 PDT 2016


Hi all,

Sorry if this has been asked before but I couldn't find it in the archive of the
mailing list.

With Raspberry Pi 3 support now in 4.8, I want to run mainline on mine.
All the instructions I've found are old and based on RPi2. [0] I've tried this
with no success and I also tried a simpler method which I use in other embedded
platforms, which ideally should work:

$ ARCH=arm64 CROSS_COMPILE="aarch64-linux-gnu-" make defconfig
$ ./scripts/config --enable CONFIG_ARCH_BCM2835
$ ARCH=arm64 CROSS_COMPILE="aarch64-linux-gnu-" make -j 4

$ cp -rv arch/arm64/boot/Image /media/boot/kernel-new.img
$ cp -rv arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb /media/boot/

$ echo "kernel=kernel-new.img" > /media/luisbg/boot/config.txt
$ echo "device_tree=bcm2837-rpi-3-b.dtb" > /media/luisbg/boot/config.txt


Can anybody recommend me a resource or a list of steps to follow to do this?

It would be really cool to use the RPi3 for "on the road" kernel development, it
is much more convenient to use for this than devices that need to plugged to the
wall like the ODROID XU4 which I currently use.

Thanks,
Luis



[0] http://elinux.org/RPi_Upstream_Kernel_Compilation



More information about the linux-rpi-kernel mailing list