Compile the Linux kernel of the NanoPi2 Development Board and nanopi2linux
Compile the Linux kernel of the NanoPi2 Development Board.
1. Download The Linux4.4 kernel source code
Git clone https://github.com/friendlyarm/linux.git // these steps need to be used in a linux environment, the download speed is slightly slow
Cd linux
Git checkout nanopi2-v4.4.y
2. Configure the Linux Kernel
Touch. scmversion
Make ARCH = arm nanopi2_linux_defconfig
Cpinclude/* arch/arm/boot/dts/include/
Here we use the official default configuration of the friendly arm. Of course, you can also configure it yourself.
Sudo apt-get install libncurses5-dev
Sudo apt install libssl-dev
Make menuconfig
We copied the files under linux/include to linux/arch/arm/boot/dts/include to ensure that no error is reported when compiling the Device Tree file dtb.
Modify the dtsi file to modify the linux driver.
3. Compile the Linux Kernel
Make ARCH = arm
The generated kernel is the zImage file under the linux/arch/arm/boot directory. The generated Device Tree configuration file is the dtb file under the linux/arch/arm/boot/dts/directory. Copy them all to the boot partition of the Development Board.