3

I need to install a RealTime Kernel for working with ROS2 and I have followed this guide very carefully. But I get always the same error:

make[2]: *** [debian/rules:6: build] Errore 2
dpkg-buildpackage: Errore: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Errore 2
make: *** [Makefile:1464: deb-pkg] Errore 2

For instance the passages that I have used on the terminal are the following:

  • Create a new folder and enter in the folder: mkdir kernel && cd kernel
  • Download the kernel and the patch: wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.78.tar.gz and wget http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patch-5.4.78-rt44.patch.gz
  • Unpack and Unzip the two archives: tar -xzf linux-5.4.78.tar.gz and gunzip patch-5.4.78-rt44.patch.gz
  • Enter in the kernel folder: cd linux-5.4.78
  • Patching the file: patch -p1 < ../patch-5.4.78-rt44.patch
  • Using the old configure, in this case I had 2 configs so I have used: cp /boot/config-$(uname -r) .config for my case $(uname -r) is 5.4.0-70-generic
  • Added in the settings of Updates the source code as source and installed other dependencies as written in the guide
  • Enable configurations: yes '' | make oldconfig
  • Enable the different settings in the menu after: make menuconfig
  • The error happen during the making with: make -j nproc deb-pkg

How can I solve?

Part of the output (warnings and errors are here):


scripts/kconfig/conf  --syncconfig Kconfig
make clean
  CLEAN   arch/x86/purgatory
  CLEAN   arch/x86/realmode/rm
  CLEAN   arch/x86/kernel/cpu
  CLEAN   arch/x86/kernel
  CLEAN   arch/x86/entry/vdso
  CLEAN   kernel/debug/kdb
  CLEAN   kernel
  CLEAN   usr
  CLEAN   fs/unicode
  CLEAN   arch/x86/tools
sh ./scripts/package/mkdebian
  TAR     linux-5.4.78-rt44.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
    mv linux-5.4.78-rt44.tar.gz ../linux-5.4.78-rt44_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch)  -i.git -us -uc
dpkg-buildpackage: Informazioni: Pacchetto sorgente linux-5.4.78-rt44
dpkg-buildpackage: Informazioni: Versione sorgente 5.4.78-rt44-1
dpkg-buildpackage: Informazioni: Distribuzione sorgente focal
dpkg-buildpackage: Informazioni: Sorgente modificata da kappa95 <kappa95@kappa95-asus-laptop-x505za>
dpkg-buildpackage: Informazioni: Architettura host amd64
 dpkg-source -i.git --before-build .
 fakeroot -u debian/rules clean
rm -rf debian/*tmp debian/files
make clean
 dpkg-source -i.git -b .
dpkg-source: Informazioni: using source format '1.0'
dpkg-source: Avviso: source directory 'linux-5.4.78' is not <sourcepackage>-<upstreamversion> 'linux-5.4.78-rt44-5.4.78-rt44'
dpkg-source: Avviso: .orig directory name linux-5.4.78.orig is not <package>-<upstreamversion> (wanted linux-5.4.78-rt44-5.4.78-rt44.orig)
dpkg-source: Informazioni: building linux-5.4.78-rt44 using existing linux-5.4.78-rt44_5.4.78-rt44.orig.tar.gz
dpkg-source: Informazioni: building linux-5.4.78-rt44 in linux-5.4.78-rt44_5.4.78-rt44-1.diff.gz
dpkg-source: Avviso: ignoring deletion of file .scmversion
dpkg-source: Avviso: the diff modifies the following upstream files: 
 .clang-format
 .cocciconfig
 .config.old
 .get_maintainer.ignore
 .mailmap
 CREDITS
 MAINTAINERS
 README
dpkg-source: Informazioni: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: Informazioni: building linux-5.4.78-rt44 in linux-5.4.78-rt44_5.4.78-rt44-1.dsc
dpkg-source: Avviso: missing information for output field Standards-Version
 debian/rules build
make KERNELRELEASE=5.4.78-rt44 ARCH=x86     KBUILD_BUILD_VERSION=1 -f ./Makefile
make[4]: ***  Nessuna regola per generare l'obiettivo «debian/canonical-certs.pem», necessario per «certs/x509_certificate_list».  Arresto.
make[4]: *** Attesa per i processi non terminati....
make[3]: *** [Makefile:1729: certs] Errore 2
make[3]: *** Attesa per i processi non terminati....
arch/x86/hyperv/hv_apic.c: In function ‘__send_ipi_one’:
arch/x86/hyperv/hv_apic.c:201:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  201 | }
      | ^
arch/x86/hyperv/hv_apic.c: In function ‘hv_send_ipi_mask_allbutself’:
arch/x86/hyperv/hv_apic.c:226:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  226 | }
      | ^
arch/x86/kernel/cpu/mce/core.o: warning: objtool: mce_panic()+0x123: unreachable instruction
kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x18: unreachable instruction
fs/btrfs/extent_io.o: warning: objtool: __set_extent_bit.cold()+0xc: unreachable instruction
fs/btrfs/relocation.o: warning: objtool: update_backref_node.cold()+0xb: unreachable instruction
arch/x86/xen/enlighten_pv.o: warning: objtool: xen_cpuid()+0x20: can't find jump dest instruction at .text+0x97
arch/x86/kernel/smpboot.o: warning: objtool: native_play_dead()+0x131: unreachable instruction
arch/x86/kernel/kvm.c: In function ‘kvm_send_ipi_mask_allbutself’:
arch/x86/kernel/kvm.c:503:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  503 | }
      | ^
  
fs/jffs2/xattr.c: In function ‘jffs2_build_xattr_subsystem’:
fs/jffs2/xattr.c:887:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  887 | }
      | ^

make[2]: *** [debian/rules:6: build] Errore 2
dpkg-buildpackage: Errore: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Errore 2
make: *** [Makefile:1464: deb-pkg] Errore 2

0

5 Answers 5

2

I followed this guide https://unix.stackexchange.com/a/294116/419660

sudo gedit .config

Add a # in front of the lines CONFIG_SYSTEM_TRUSTED_KEY and CONFIG_MODULE_SIG_KEY to comment them out. Select all defaults when prompted after running make -j numproc deb-pkg

I also needed to turn off secure boot in the bios https://github.com/jakeday/linux-surface/issues/575

2

I had this error several times when installing a real-time kernel, and the issue seems to be with compiling to a debian package. Every tutorial I followed that did not compile to a debian package has worked. Here are 2 simple tutorials that I have tried and have worked (you also need to install flex and bison for these): https://hmenn.github.io/pages/UbuntuRT_patch.html https://stackoverflow.com/a/51709420

On a side note, are you using a Dell computer? Every person I've found so far that's had this issue has been using a Dell computer.

1
  • Can confirm that I'm using a Dell computer and ran to this issue.
    – Alqio
    Aug 18, 2022 at 13:34
2

This looks like the same error that I got and the solution was removing this feature of the Kernel.

SYSTEM_BLACKLIST_KEYRING = N

2

You can change your config file .config

CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"

to

CONFIG_SYSTEM_TRUSTED_KEYS=""

0

You can try this

scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS=""
scripts/config --set-str CONFIG_SYSTEM_REVOCATION_KEYS=""

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.