I am trying to compile the latest kernel linux-5.12
on my ubuntu 20.04.1. I have installed the necessary dependencies sudo apt install build-essential rsync gcc bc bison libssl-dev libncurses5-dev libelf-dev
and copied the config file cp /boot/config - $(uname -r) ./.config
to my location.
On executing this command make deb-pkg
, I am getting the following error and even I tried online solutions nothing worked for me. Pl help me to solve this.
Thankyou
make clean
CLEAN arch/x86/tools
sh ./scripts/package/mkdebian
TAR linux-5.12.0.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
mv linux-5.12.0.tar.gz ../linux-5.12.0_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -i.git -us -uc
dpkg-buildpackage: info: source package linux-5.12.0
dpkg-buildpackage: info: source version 5.12.0-1
dpkg-buildpackage: info: source distribution focal
dpkg-buildpackage: info: source changed by amulbhatia <amulbhatia@amulbhatia>
dpkg-buildpackage: info: host architecture amd64
dpkg-source -i.git --before-build .
debian/rules clean
rm -rf debian/*tmp debian/files
make clean
dpkg-source -i.git -b .
dpkg-source: info: using source format '1.0'
dpkg-source: warning: source directory 'linux-5.12' is not <sourcepackage>-<upstreamversion> 'linux-5.12.0-5.12.0'
dpkg-source: warning: .orig directory name linux-5.12.orig is not <package>-<upstreamversion> (wanted linux-5.12.0-5.12.0.orig)
dpkg-source: info: building linux-5.12.0 using existing linux-5.12.0_5.12.0.orig.tar.gz
dpkg-source: info: building linux-5.12.0 in linux-5.12.0_5.12.0-1.diff.gz
dpkg-source: warning: ignoring deletion of file .scmversion
dpkg-source: warning: the diff modifies the following upstream files:
.clang-format
.cocciconfig
.config.old
.get_maintainer.ignore
.mailmap
CREDITS
MAINTAINERS
README
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: info: building linux-5.12.0 in linux-5.12.0_5.12.0-1.dsc
dpkg-source: warning: missing information for output field Standards-Version
debian/rules binary
make KERNELRELEASE=5.12.0 ARCH=x86 KBUILD_BUILD_VERSION=1 -f ./Makefile
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_64.h
HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
HOSTCC scripts/basic/fixdep
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
HOSTCC scripts/genksyms/genksyms.o
YACC scripts/genksyms/parse.tab.[ch]
HOSTCC scripts/genksyms/parse.tab.o
LEX scripts/genksyms/lex.lex.c
HOSTCC scripts/genksyms/lex.lex.o
HOSTLD scripts/genksyms/genksyms
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/bin2c
HOSTCC scripts/kallsyms
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/sign-file
HOSTCC scripts/extract-cert
HOSTCC scripts/insert-sys-cert
GEN include/generated/autoksyms.h
ERROR: '/home/amulbhatia/Desktop/linux_kernel/linux-5.12/y' whitelist file not found
make[3]: *** [Makefile:1189: include/generated/autoksyms.h] Error 1
make[2]: *** [debian/rules:7: build-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:1579: deb-pkg] Error 2
I am posting the possible answer of the above issue. Though the answer may not be the direct answer.
I took the stable release
linux-5.11.6
fromkernel.org
and is compiled successfully.linux-5.12
is mainline version, may be is missing some of the files, as the same is not a stable release as on day.You had the right answer but the OS missed something try uninstalling those packages and reinstalling them. I had the same probelm on my system and did "sudo apt install build-essential rsync gcc bc bison libssl-dev libncurses5-dev libelf-dev" and it fixed it so it might be a missing package. Hope that helps.