重新编译内核失败

重新编译内核失败

以下是我遵循的步骤:

sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev libssl-dev ccache bison flex libelf-dev dwarves kernel-wedge zstd

cd ~
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/linux-hwe-5.17/5.17.0-8.8~22.04.2/linux-hwe-5.17_5.17.0.orig.tar.gz --no-check-certificate
tar -xzvf linux-hwe-5.17_5.17.0.orig.tar.gz

cd ~/linux-5.17
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
make localmodconfig
make menuconfig

General setup --> Kernel .config support (enable)
General setup --> Enable access to .config through /proc/config.gz (enable)
General setup --> Control Group Support ─> CPU controller ─> Group scheduling for SCHED_RR/FIFO (enable)
Binary Emulation s--> IA32 Emulation (disable)
Binary Emulation s--> x32 ABI for 64-bit mode (disable)
Kernel hacking --> Compile-time checks and compiler options --> Compile kernel with debug info (disable)

vi .config
CONFIG_MODULE_SIG_KEY=""
CONFIG_SYSTEM_REVOCATION_KEYS=""


scripts/config --disable DEBUG_INFO
scripts/config --disable SYSTEM_TRUSTED_KEYS
scripts/config --disable SYSTEM_REVOCATION_KEYS

make -j4 deb-pkg

Additional X.509 keys for default system keyring (SYSTEM_TRUSTED_KEYS) [] (NEW) ~/x509.genkey

错误:

Kernel: arch/x86/boot/bzImage is ready  (#1)
make KERNELRELEASE=5.17.0 ARCH=x86  KBUILD_BUILD_VERSION=1 -f ./Makefile intdeb-pkg
sh ./scripts/package/builddeb
  INSTALL debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/aesni-intel.ko
  INSTALL debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crc32-pclmul.ko
  INSTALL debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crct10dif-pclmul.ko
  INSTALL debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/ghash-clmulni-intel.ko
  SIGN    debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/aesni-intel.ko
  SIGN    debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crc32-pclmul.ko
  SIGN    debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crct10dif-pclmul.ko
  SIGN    debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/ghash-clmulni-intel.ko
At main.c:163:
- SSL error:0909006C:PEM routines:get_name:no start line: ../crypto/pem/pem_lib.c:745
sign-file: ./: Is a directory
At main.c:163:
- SSL error:0909006C:PEM routines:get_name:no start line: ../crypto/pem/pem_lib.c:745
sign-file: ./: Is a directory
At main.c:163:
- SSL error:0909006C:PEM routines:get_name:no start line: ../crypto/pem/pem_lib.c:745
sign-file: ./: Is a directory
At main.c:163:
- SSL error:0909006C:PEM routines:get_name:no start line: ../crypto/pem/pem_lib.c:745
sign-file: ./: Is a directory
make[6]: *** [scripts/Makefile.modinst:83: debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/ghash-clmulni-intel.ko] Error 1
make[6]: *** Deleting file 'debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/ghash-clmulni-intel.ko'
make[6]: *** Waiting for unfinished jobs....
make[6]: *** [scripts/Makefile.modinst:83: debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/aesni-intel.ko] Error 1
make[6]: *** Deleting file 'debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/aesni-intel.ko'
make[6]: *** [scripts/Makefile.modinst:83: debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crc32-pclmul.ko] Error 1
make[6]: *** Deleting file 'debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crc32-pclmul.ko'
make[6]: *** [scripts/Makefile.modinst:83: debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crct10dif-pclmul.ko] Error 1
make[6]: *** Deleting file 'debian/linux-image/lib/modules/5.17.0/kernel/arch/x86/crypto/crct10dif-pclmul.ko'
make[5]: *** [Makefile:1757: modules_install] Error 2
make[4]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 2
make[3]: *** [Makefile:1539: intdeb-pkg] Error 2
make[2]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Error 2
make: *** [Makefile:1539: deb-pkg] Error 2

相关内容