本文主要是介绍ARM64 FT2000+ openEuler release 22.03 LTS 手动编译自带的内核 linux-5.10.0-60.18.0.50.oe2203.aarch64,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
安装内核源码
yum install kernel-source
源码复制到内存盘,提高构建速度
rsync -avr -P /usr/src/linux-5.10.0-60.18.0.50.oe2203.aarch64 /tmp/
复制原始config文件
cp /boot/config-5.10.0-60.18.0.50.oe2203.aarch64 /tmp/linux-5.10.0-60.18.0.50.oe2203.aarch64/.config
安装编译工具、库
yum install -y gcc make elfutils-libelf-devel dwarves
开始编译
cd /tmp/linux-5.10.0-60.18.0.50.oe2203.aarch64/
make oldconfig
make -j64
完成
编译内核模块
make modules -j64
安装新内核
make modules_install
make install
重启不能引导。。。
20221220更新
EF860 S2500 openEuler 20.03 LTS SP3 重新做了一次,重启成功了
故障
pahole (pahole) is not available Failed to generate BTF for vmlinux
BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
make: *** [Makefile:1179:vmlinux] 错误 1
解决
yum install dwarves
ERROR: could not open directory /lib/modules/5.10.0: No such file or directory
[root@localhost linux-5.10.0-60.18.0.50.oe2203.aarch64]# make install
sh ./arch/arm64/boot/install.sh 5.10.0 \
arch/arm64/boot/Image System.map "/boot"
depmod: ERROR: could not open directory /lib/modules/5.10.0: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
dracut: Cannot find module directory /lib/modules/5.10.0/
dracut: and --no-kernel was not specified
mkinitrd failed
Error! echo
Your kernel headers for kernel 5.10.0 cannot be found at
/lib/modules/5.10.0/build or /lib/modules/5.10.0/source.
解决:编译安装内核模块
make modules
make modules_install
Error! Bad return status for module build on kernel: 5.10.0 (aarch64)
DKMS make.log for kmod-kvdo-8.1.0.316-1 for kernel 5.10.0 (aarch64)
2022年 11月 28日 星期一 16:40:13 CST
Makefile:682: arch/aarch64/Makefile: 没有那个文件或目录
make[2]: *** 没有规则可制作目标“arch/aarch64/Makefile”。 停止。
/var/lib/dkms/kmod-kvdo/8.1.0.316-1/build/make.log (END)
解决:
cd /tmp/linux-5.10.0-60.18.0.50.oe2203.aarch64/arch/
ln -s arm64 aarch64
这篇关于ARM64 FT2000+ openEuler release 22.03 LTS 手动编译自带的内核 linux-5.10.0-60.18.0.50.oe2203.aarch64的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!