linux 端口complain,#Linux学习笔记#Linux kernel compi

The latest version built is 5.3-rc5, but it is not the target. I download source code from master branch, and compile, install it on Ubuntu18.04.2

install gcc-9.1

$sudo add-apt-repository ppa:jonathonf/gcc-9.1

$sudo apt install gcc-9

$sudo apt install build-essential

$git clone https://github.com/torvalds/linux.git

$make allyesconfig

$make -j6

complain missing flex, bison:

$sudo apt update

$sudo apt-get install flex

$sudo apt-get install bison

$make -j6

scripts/Makefile.host:90: recipe for target 'scripts/extract-cert' failed

scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory

#include

^~~~~~~~~~~~~~~~~~~~

compilation terminated.

scripts/Makefile.host:90: recipe for target 'scripts/sign-file' failed

make[1]: *** [scripts/sign-file] Error 1

make[1]: *** Waiting for unfinished jobs....

scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory

#include

^~~~~~~~~~~~~~~

compilation terminated.

scripts/Makefile.host:90: recipe for target 'scripts/extract-cert' failed

make[1]: *** [scripts/extract-cert] Error 1

Makefile:1097: recipe for target 'scripts' failed

make: *** [scripts] Error 2

make: *** Waiting for unfinished jobs....

$sudo apt-get install libcurl4-openssl-dev

$sudo apt-get install libncurses5-dev

$sudo apt-get install libcurl-openssl1.0-dev (this one works!)

$sudo make install

sh ./arch/x86/boot/install.sh 5.3.0-rc5 arch/x86/boot/bzImage \

System.map "/boot"

run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.3.0-rc5 /boot/vmlinuz-5.3.0-rc5

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.3.0-rc5 /boot/vmlinuz-5.3.0-rc5

update-initramfs: Generating /boot/initrd.img-5.3.0-rc5

WARNING: missing /lib/modules/5.3.0-rc5

Ensure all necessary drivers are built into the linux image!

depmod: ERROR: could not open directory /lib/modules/5.3.0-rc5: No such file or directory

depmod: FATAL: could not search modules: No such file or directory

depmod: WARNING: could not open /var/tmp/mkinitramfs_aeewrk/lib/modules/5.3.0-rc5/modules.order: No such file or directory

depmod: WARNING: could not open /var/tmp/mkinitramfs_aeewrk/lib/modules/5.3.0-rc5/modules.builtin: No such file or directory

run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.3.0-rc5 /boot/vmlinuz-5.3.0-rc5

run-parts: executing /etc/kernel/postinst.d/update-notifier 5.3.0-rc5 /boot/vmlinuz-5.3.0-rc5

run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.3.0-rc5 /boot/vmlinuz-5.3.0-rc5

Sourcing file `/etc/default/grub'

Generating grub configuration file ...

.....

missing /lib/modules/5.3.0-rc5, need to make modules..

$make modules

$sudo make modules_install

$sudo make install

====================================

Modify grub

$sudo vi /etc/default/grub

GRUB_TIMEOUT=20

$sudo reboot

during restarting os, Press ESC, to select the target kenel version

===================================

Modify grub to add the compiled kernel as the default

$

================================

This is how to install the official compiled kernel.

$wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3-rc5/linux-modules-5.3.0-050300rc5-generic_5.3.0-050300rc5.201908182231_amd64.deb

linux-headers-5.3.0-050300rc5_5.3.0-050300rc5.201908182231_all.deb

linux-headers-5.3.0-050300rc5-generic_5.3.0-050300rc5.201908182231_amd64.deb

linux-image-unsigned-5.3.0-050300rc5-generic_5.3.0-050300rc5.201908182231_amd64.deb

linux-modules-5.3.0-050300rc5-generic_5.3.0-050300rc5.201908182231_amd64.deb

$sudo dpkg -i *.deb /install the built kernel

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值