申威平台内核源码编译

准备源码包

linux-stable-sw.tar.gz

开始编译

[root@host158 local]# cd linux-stable-sw/

[root@host158 linux-stable-sw]# make xuelang_defconfig

[root@host158 linux-stable-sw]# make -j64

编译大概需要几分钟,然后在同级目录生成vmlinux

[root@host158 linux-stable-sw]# mkdir _install

[root@host158 linux-stable-sw]# make modules_install INSTALL_MOD_PATH=./_install

[root@host158 linux-stable-sw]# ls _install/lib/modules/
4.19.90-xuelang
[root@host158 linux-stable-sw]#

[root@host158 linux-stable-sw]# cd _install/lib/modules/

[root@host158 modules]# dracut --kver 4.19.90-xuelang --force
dracut-install: Failed to find module 'virtio_gpu'
dracut: FAILED:  /usr/lib/dracut/dracut-install -D /var/tmp/dracut.5xcJRO/initramfs --kerneldir /lib/modules/4.19.90-xuelang/ -m virtio_gpu
dracut-install: ERROR: installing '/usr/lib64/plymouth/label.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/details.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/script.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/two-step.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/tribar.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/fade-throbber.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/text.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/renderers/frame-buffer.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/renderers/drm.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/space-flares.so'
dracut-install: ERROR: installing '/usr/lib64/plymouth/throbgress.so'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.5xcJRO/initramfs -a /usr/share/fonts/kingsoft/FZKTK.TTF /etc/fonts/fonts.conf /usr/lib64/plymouth/label.so /usr/lib64/plymouth/details.so /usr/lib64/plymouth/script.so /usr/lib64/plymouth/two-step.so /usr/lib64/plymouth/tribar.so /usr/lib64/plymouth/fade-throbber.so /usr/lib64/plymouth/text.so /usr/lib64/plymouth/renderers/frame-buffer.so /usr/lib64/plymouth/renderers/drm.so /usr/lib64/plymouth/space-flares.so /usr/lib64/plymouth/throbgress.so

[root@host158 modules]#

boot目录下生成initramfs-4.19.90-xuelang.img文件,为了使用方便,拷贝相关文件至指定目录,上面的error无关紧要,是dracut这个包的问题

[root@host158 kernel]# ls
4.19.90-xuelang  initramfs-4.19.90-xuelang.img   vmlinux-xuelang

开始使用

[root@host158 kernel]# cp 4.19.90-xuelang/   /lib/modules/ -r 

[root@host158 kernel]# cp vmlinux-xuelang   /boot/

[root@host158 kernel]# cp initramfs-4.19.90-xuelang.img /boot/

[root@host158 kernel]# dracut --kver 4.19.90-xuelang --force

[root@host158 kernel]# vim /boot/boot/grub/grub.cfg

[root@host158 kernel]# reboot

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值