Skip to contentSkip to conversation

kernel: update rpm failed for the vfat

OE-core Xu, Yanfei 1 participant 1 message Jun 9, 2020

lore
Share & tools
lore

Xu, Yanfei

author
#0 lore raw

Hi Bruce,

I encountered an issue that updating kernel rpm package will fail when the /boot dir was mount with vfat filesystem. The root cause is vfat don't support symlink. --------cut here----------
error: unpacking of archive failed on file /boot/Image;5eda8385: cpio: symlink failed - Resource temporarily unavailable
error: kernel-image-image-5.4.43-yocto-standard-5.4.x+git0+f8c88c4331_9961cc8b79-r0.bcm_2xxx_rpi4: install failed root@bcm-2xxx-rpi4:/boot#

Currently I have two ideas to fix it:
1. we use 'install' cmd instead of 'ln -sf' in kernel_do_install to avoid generating symlink in kernel-image-image*.rpm. And then add an postinstall to this rpm. It will check if the /boot dir is vfat, if not, we remove the copy image* and make a softlink for the image.
2. we specially add an package type which doesn't contain symlink for the vfat filesystem.

For the first idea, I met an problem when I try to add pkg_postinst_packagename function in kernel.bbclass file. Due to there are not package name variables defined for the kernel-image-image.gz kernel-image-image or other type kernel images. So I can not add postinst functions statically why that how many packages and packages' name are not certainly.

Do you have any opinions about these?

Regards,
Yanfei