下载镜像
在这个链接下载镜像
版本自选,点下载ZIP就行
解压
unzip kernel-kernel-4.19.zip
拷贝config文件
寻找相对应kernel_config
看清架构和版本号!
点原始数据,弹到一个新页面,直接右键另存为 config_openeuler_xxxx_xxxx.txt
改名
拷贝 config_openeuler_xxxx_xxxx.txt到之前的解压后目录
mv config_openeuler_4.19_x86_64.txt .config
make
以防权限不够,先到root模式
su
make menuconfig
缺什么包就安装一下
成功运行的时候弹出如下界面
按下移键到1位置,按右移键到2位置,然后回车,到下边界面
继续回车
继续回车回到make menuconfig的第一个界面,两次ESC键回到命令行
输入下边命令
make -j 4 bzImage
漫长等待看到
Kernel: arch/x86/boot/bzImage is ready (#1)
不同的架构arch/XX/…这个XX有所不同
这个bzImage 就可以用于stratovirt的standard_vm的kernel ${kernel_path}
若make -j bzImage 命令行卡死&&电脑重启
参考这里
其中排名第一的答案是
Running make -j 8 runs lots of process which use more memory.
…
If this is the case, you are running out of memory. So run perhaps make -j 4 instead. This will mean fewer parallel jobs and will mean the compilation will take longer but hopefully will not exhaust your system memory.
因此,前边也用了 -j 4 的参数