1

I have installed Lubuntu on Ubuntu 64-bit server. I compiled a kernel and created a deb file for image. I got a weird error when I used gdebi to install the deb file with sudo gdebi -n linux-image-4.19.71-custom-rt24+_4.19.71-custom-rt24+-10.00.Custom_arm64.deb.

ubuntu@ubuntu:~$ sudo gdebi -n linux-image-4.19.71-custom-rt24+_4.19.71-custom-rt24+-10.00.Custom_arm64.deb
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
Selecting previously unselected package linux-image-4.19.71-custom-rt24+.
(Reading database ... 315908 files and directories currently installed.)
Preparing to unpack linux-image-4.19.71-custom-rt24+_4.19.71-custom-rt24+-10.00.Custom_arm64.deb ...
Done.
Unpacking linux-image-4.19.71-custom-rt24+ (4.19.71-custom-rt24+-10.00.Custom) ...
Setting up linux-image-4.19.71-custom-rt24+ (4.19.71-custom-rt24+-10.00.Custom) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.19.71-custom-rt24+ /boot/vmlinuz-4.19.71-custom-rt24+
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.19.71-custom-rt24+ /boot/vmlinuz-4.19.71-custom-rt24+
update-initramfs: Generating /boot/initrd.img-4.19.71-custom-rt24+
Using DTB: bcm2711-rpi-4-b.dtb
Installing /usr/lib/linux-image-4.19.71-custom-rt24+/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/4.19.71-custom-rt24+/./bcm2711-rpi-4-b.dtb
Installing new bcm2711-rpi-4-b.dtb.
Ignoring old or unknown version 4.19.71-custom-rt24+ (latest is 5.3.0-1014-raspi2)
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.19.71-custom-rt24+ /boot/vmlinuz-4.19.71-custom-rt24+
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.19.71-custom-rt24+ /boot/vmlinuz-4.19.71-custom-rt24+
run-parts: executing /etc/kernel/postinst.d/zz-flash-kernel 4.19.71-custom-rt24+ /boot/vmlinuz-4.19.71-custom-rt24+
Using DTB: bcm2711-rpi-4-b.dtb
Installing /usr/lib/linux-image-4.19.71-custom-rt24+/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/4.19.71-custom-rt24+/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
Ignoring old or unknown version 4.19.71-custom-rt24+ (latest is 5.3.0-1014-raspi2`

It looks like it installs, but claims to be unknown version. How can I correct this so I can finish by installing modules and dtbs files?

2

I think the install, specifically the "flash-kernel" (see the man page) tool that copies kernel images into the right place, gets upset if the kernel name doesn't end with -raspi or -raspi2

You have to use something like make deb-pkg LOCALVERSION=-raspi KDEB_PKGVERSION=$(make kernelversion)-1 when compiling.

If you look at /usr/share/flash-kernel/db/all.db (raspi devices start at around line 1565)

you find

Machine: Raspberry Pi 4 Model B
Machine: Raspberry Pi 4 Model B Rev 1.1
Machine: Raspberry Pi 4 Model B Rev 1.2
Machine: Raspberry Pi 4 Model B Rev 1.4
Method: pi
Kernel-Flavors: raspi raspi2
DTB-Id: bcm2711-rpi-4-b.dtb
U-Boot-Script-Name: bootscr.rpi
Required-Packages: u-boot-tools

can see "Kernel-Flavors: raspi raspi2" if not matched here is viewed as unknown

So you can either compile as "-raspi" or "-raspi2" or add/edit a machine definition which should probably go in /etc/flash-kernel/db

flash-kernel seems to get called at the end of update-initramfs to copy the new kernel image into the correct place.

3
  • have edited with further information, – fireblade Sep 9 '20 at 19:57
  • initially got the tool name wrong, is flash-kernel and have fixed the raspi2 typo – fireblade Sep 9 '20 at 20:05
  • Excellent work, thank you very much – Zanna Sep 10 '20 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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