首先cjktty的下载地址在此,大家根据自己的linux内核去选择:
https://github.com/zhmars/cjktty-patches
下载好了补丁文件之后 需要下载完整的linux内核,是的完整的
https://github.com/raspberrypi/linux
光这两步 我就搞了好久才明白,linux纯小白 没办法呀
然后就是打补丁了,注意必须在linux内核源码的目录下打:
patch -Np1 -i < xxx.patch
然后就是设置menuconfig
为啥选2709,因为我是zero2w,且用32位系统, 跟3一样 官方有说明
https://www.raspberrypi.com/documentation/computers/linux_kernel.html
For Raspberry Pi 1, Zero and Zero W, and Raspberry Pi Compute Module 1 default (32-bit only) build configuration
cd linux
KERNEL=kernel
make bcmrpi_defconfig
For Raspberry Pi 2, 3, 3+ and Zero 2 W, and Raspberry Pi Compute Modules 3 and 3+ default 32-bit build configuration
cd linux
KERNEL=kernel7
make bcm2709_defconfig
For Raspberry Pi 4 and 400, and Raspberry Pi Compute Module 4 default 32-bit build configuration
cd linux
KERNEL=kernel7l
make bcm2711_defconfig
For Raspberry Pi 3, 3+, 4, 400 and Zero 2 W, and Raspberry Pi Compute Modules 3, 3+ and 4 default 64-bit build configuration
cd linux
KERNEL=kernel7
make bcm2709_defconfig
make menuconfig
以下模块编链到内核:
Device drivers —>
Graphics support —>
Framebuffer device support —>
[]Vesa VGA graphics support
Library routines —>
[]Select compiled-in fonts
[]Vga 8x16 font #非必需
-- console 16x16 CJK font (cover BMP)
并不理解,为啥塞个字体文件,需要费这么大劲儿,选中那两个cjk字体,保存配置文件到默认位置
然后就作死编译把
sudo make -j2
由于是直接在树莓派zero2上编译的,速度慢到没朋友,而且也并不知道最后能不能用。。。
经过几个世界和八百个能在网上一搜就解决的坑:
sudo make modules_install -j2
sudo make install -j2
反正是没有报错 编译完了咋用呢 我再研究研究