下载
git clone --depth=1 https://github.com/raspberrypi/linux
配置
make menuconfig
记得在 file system 里打开 ext4支持。
为了更好的扩展性,开启内核模块支持。
Loadable module support --->
[*] Enable loadable module support
若不开启,在 make modules_install 时会出现如下错误:
root@raspberrypi:~/data/download/linux# make modules_install
The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.
Makefile:1283: recipe for target 'modules_install' failed
make: *** [modules_install] Error 1
编译
make
make modules_install
安装
#!/usr/bin/env bash
# install kernel
KERNEL=kernel7
cp arch/arm/boot/dts/*.dts /boot/
cp arch/arm/boot/dts/overlays/*.dts* /boot/overlays/
cp arch/arm/boot/dts/overlays/README /boot/overlays/
cp arch/arm/boot/zImage /boot/$KERNEL.img
结束
内核已安装完成,重启就可以了。
问题
内核版本号并没有改变,
pi@raspberrypi:~$ uname -r
4.14.79+
待续~~~