[Pkg-raspi-maintainers] Bug#979213: raspi-firmware: Please add option to pin kernel/initramfs version

Diederik de Haas didi.debian at cknow.org
Thu Jan 7 00:06:03 GMT 2021


Hi Gunnar,

On woensdag 6 januari 2021 20:53:57 CET Gunnar Wolf wrote:
> I understand the need for specifying a given kernel version. First of
> all, let me suggest looking into a more complete solution, like using
> u-boot as a second stage bootloader; IIRC, you can install the uboot
> package, and load it instead of jumping straight into Linux, allowing
> for much greater boot-time flexibility.

I have to learn more about u-boot myself as I do get the impression it's quite 
powerful.
I also think what I want should be doable without u-boot ...
 
> But, I think the bug should be trivially fixable as it is -- Or maybe
> I'm not understanding something right? /etc/default/raspi-firmware
> includes a KERNEL configuration key:
> ...
>     #KERNEL="auto"
> 
> If you change it to any other filename existing under /boot/firmware,
> the generated config.txt file will specify it as the kernel instead of
> the latest Debian-packaged kernel.

I either overlooked that option or I didn't (really) understand it.
A quick test did indicate that it is what I was looking for, thanks!

But, the execution didn't go correctly or I don't understand how to use it 
correctly.

$ sudo vim /etc/default/raspi-firmware
<specify KERNEL parameter>
$ sudo update-initramfs -u 
update-initramfs: Generating /boot/initrd.img-5.10.0-1-arm64
latest_kernel: '/boot/vmlinuz-5.10.0-1-arm64'
latest_initrd: '/boot/initrd.img-5.10.0-1-arm64'
DPKG_MAINTSCRIPT_ARCH: ''
arch: 'arm64'
$ cat /boot/firmware/config.txt 
# Switch the CPU from ARMv7 into ARMv8 (aarch64) mode
arm_64bit=1

enable_uart=1
upstream_kernel=1

kernel=vmlinuz-5.9.0-5-arm64
# For details on the initramfs directive, see
# https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=10532
initramfs

Hmm initramfs parameter is specified, but has an empty value
/me finds out there's also and INITRAMFS parameter
$ sudo vim /etc/default/raspi-firmware
<specify INITRAMFS parameter>
$ sudo update-initramfs -u 
update-initramfs: Generating /boot/initrd.img-5.10.0-1-arm64
latest_kernel: '/boot/vmlinuz-5.10.0-1-arm64'
latest_initrd: '/boot/initrd.img-5.10.0-1-arm64'
DPKG_MAINTSCRIPT_ARCH: ''
arch: 'arm64'
diederik at rpi-mpd:~$ grep 5.9.0-5-arm64 /etc/default/raspi-firmware 
KERNEL="vmlinuz-5.9.0-5-arm64"
INITRAMFS="initrd.img-5.9.0-5-arm64"
diederik at rpi-mpd:~$ cat /boot/firmware/config.txt 
# Switch the CPU from ARMv7 into ARMv8 (aarch64) mode
arm_64bit=1

enable_uart=1
upstream_kernel=1

kernel=vmlinuz-5.9.0-5-arm64
# For details on the initramfs directive, see
# https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=10532
initramfs

initramfs parameter is still empty.
So either I didn't do it correctly, or there is a bug in its implementation

> I am tagging this bug as closed, as I believe this is a solution for
> your needs, but of course, feel free to reopen (just explain why! ;-) )
> in case you don't agree with my assessment.

It looks like the functionality is there, so your assessment seems correct.
But either the implementation of the 'INITRAMFS' parameter is incorrect or the 
help text/comments aren't clear enough. It may be helpful to also mention/
point to this parameter in the comments of the KERNEL parameter as I'm 
guessing 'my' use case would be the most used/obvious use case.

I haven't rebooted, but I'm guessing that booting would fail.

I'm not sure what to do with the bug status (reopen?/clone?/retitle?), so I'll 
leave it up to you to do what you think is best.

Cheers,
  Diederik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-raspi-maintainers/attachments/20210107/61c2a685/attachment.sig>


More information about the Pkg-raspi-maintainers mailing list