[Bug 2012750] Re: flash-kernel breaks when locally built RPI kernels are installed.
satmandu
2012750 at bugs.launchpad.net
Fri Apr 14 15:41:26 UTC 2023
The problem is I suspect this change to the functions file between
flash-kernel_3.106ubuntu8.1 and flash-kernel_3.106ubuntu14, as this is
where the "dpkg-query: no packages found matching" error comes from.
+get_kernel_status() {
+ # get_kernel_status(query_ver)
+ # return the dpkg package status of kernel version $query_ver
+ local query_ver="$1"
+ local ver path pkg
+ linux-version list --paths | while read -r ver path; do
+ if linux-version compare "$ver" eq "$query_ver"; then
+ pkg=$(
+ LANG=C.UTF-8 dpkg-query --search "$path" 2>/dev/null |
+ awk -F ": " -v path="$path" '$2==path { print $1; }'
+ )
+ LANG=C.UTF-8 dpkg-query --show --showformat '${db:Status-Status}' "$pkg"
+ break
+ fi
+ done
+}
+
I will debug more, but this is what I see:
linux-version list --paths | while read -r ver path; do echo $ver $path ; done
6.1.12-v8+ /boot/vmlinuz-6.1.12-v8+
6.1.13-v8+ /boot/vmlinuz-6.1.13-v8+
6.1.14-v8+ /boot/vmlinuz-6.1.14-v8+
6.1.16-v8+ /boot/vmlinuz-6.1.16-v8+
6.1.19-v8+ /boot/vmlinuz-6.1.19-v8+
6.1.20-v8+ /boot/vmlinuz-6.1.20-v8+
6.1.21-v8+ /boot/vmlinuz-6.1.21-v8+
6.1.23-v8+ /boot/vmlinuz-6.1.23-v8+
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to flash-kernel in Ubuntu.
https://bugs.launchpad.net/bugs/2012750
Title:
flash-kernel breaks when locally built RPI kernels are installed.
Status in flash-kernel package in Ubuntu:
Incomplete
Bug description:
I have been repackaging the Raspberry Pi Foundation's official kernels
for some time with this script:
https://gist.github.com/satmandu/a507c59d84737f6d29ff353395819d51
I could always install these kernels before and have flash-kernel not
break.
The updates to flash-kernel in lunar cause it to fail, with a "dpkg-
query: no packages found matching" message.
What's the best way to handle this? The kernel packages always end up
built with naming such as linux-headers-6.1.20-v8+_all.deb and linux-
image-6.1.20-v8+_arm64.deb.
I use this in /etc/flash-kernel/db:
# To override fields include the Machine field and the fields you wish to
# override.
#
# e.g. to override Boot-Device on the Dreamplug to sdb rather than sda
#
#Machine: Globalscale Technologies Dreamplug
#Boot-Device: /dev/sdb1
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
Machine: Raspberry Pi Compute Module 4 Rev 1.0
Machine: Raspberry Pi 400 Rev 1.0
Machine: Raspberry Pi 400 Rev 1.1
Machine: Raspberry Pi *
Kernel-Flavors: any
#Method: pi
#DTB-Id: bcm2711-rpi-4-b.dtb
#U-Boot-Script-Name: bootscr.rpi
#Required-Packages: u-boot-tools
ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: flash-kernel 3.106ubuntu14
Uname: Linux 6.1.20-v8+ aarch64
ApportVersion: 2.26.0-0ubuntu2
Architecture: arm64
CasperMD5CheckResult: unknown
Date: Fri Mar 24 11:55:21 2023
ImageMediaBuild: 20211013
ProcEnviron:
LANG=C.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=screen.xterm-256color
XDG_RUNTIME_DIR=<set>
SourcePackage: flash-kernel
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.flash-kernel.db: 2022-03-29T10:53:48.654542
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2012750/+subscriptions
More information about the foundations-bugs
mailing list