[linux-raspberrypi4] mkinitcpio hook misses kernel8.img

Problems with packages? Post here, using [tags] of the package name.

[linux-raspberrypi4] mkinitcpio hook misses kernel8.img

Postby julemand101 » Sun Jan 31, 2021 4:21 pm

Hi,

If I am using the linux-raspberrypi4 package on aarch64 I can see the kernel is named /boot/kernel8.img which is also stated in the PKGBUILD:
$this->bbcode_second_pass_code('', '
# setup vars
[[ $CARCH == "armv7h" ]] && _kernel=kernel7.img KARCH=arm _image=zImage _config=config _bconfig=config.txt
[[ $CARCH == "aarch64" ]] && _kernel=kernel8.img KARCH=arm64 _image=Image _config=config8 _bconfig=config8.txt
')

But it does not seem that kernel updates triggers mkinitcpio to rebuild the /boot/initramfs-linux.img file. This behavior can be explained by looking inside the hook /usr/share/libalpm/hooks/90-linux-raspberrypi4.hook which is installed as part of linux-raspberrypi4:
$this->bbcode_second_pass_code('', '
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/kernel.img
Target = boot/kernel7.img
Target = usr/lib/initcpio/*

[Action]
Description = Updating linux-raspberrypi4 initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p linux-raspberrypi4
')

It does seem /boot/kernel8.img are missing from the hook which results in mkinitcpio not being triggered when upgradring the kernel on aarch64.
julemand101
 
Posts: 2
Joined: Sun Jan 31, 2021 4:08 pm

Re: [linux-raspberrypi4] mkinitcpio hook misses kernel8.img

Postby graysky » Sun Jan 31, 2021 4:55 pm

Good catch, fixed in a65d1f1, thank you for reporting. I expect upstream to bump their code to 5.10.12 anytime so no need to rebuild for this/it can wait for the next build.
graysky
Developer
 
Posts: 1893
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [linux-raspberrypi4] mkinitcpio hook misses kernel8.img

Postby julemand101 » Sun Jan 31, 2021 5:42 pm

Thanks for the fast response! :)

Yes, it can properly wait to next kernel release if it is not too far away. I got the problem nearly a week ago where my Raspberry Pi 4 could no longer boot after a kernel update (could not recognize my f2fs root file system). It was first today I got the time to debug the issue and found the mismatch between initramfs-linux.img and kernel8.img and could see in the pacman.log that mkinitcpio has not been executed with the latest update.
julemand101
 
Posts: 2
Joined: Sun Jan 31, 2021 4:08 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 14 guests