Bug 14971 - dunfell: fitImage initramfs failed to be installed
Summary: dunfell: fitImage initramfs failed to be installed
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 3.1.25
Hardware: x86 arm64
: Medium+ major
Target Milestone: 3.1.22
Assignee: Steve Sakoman
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-11-19 07:59 UTC by Frédéric Martinsons
Modified: 2022-12-08 15:17 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Martinsons 2022-11-19 07:59:41 UTC
Hello,


Preconditions/Environment
-------------------------
I currently build an arm64 target KERNEL_IMAGETYPE=fitImage.
I use yocto dunfell version and I build inside an ubuntu 20.04 docker container.

Triggering Action/Cause
-----------------------
Successful building/shipping of the kernel fitImage

Expectation
-----------
do_deploy step find correctly the initramfs file and install it

Actual Result
-------------
I got an error during kernel do_deploy about not founding the initramfs to ship:
```   
    | lib/modules/4.19.255-rt113-sigfox/kernel/drivers/usb/serial/usb_wwan.ko
    | lib/modules/4.19.255-rt113-sigfox/kernel/drivers/usb/serial/option.ko
    | lib/modules/4.19.255-rt113-sigfox/kernel/drivers/usb/class/
    | lib/modules/4.19.255-rt113-sigfox/kernel/drivers/usb/class/cdc-wdm.ko
    | lib/modules/4.19.255-rt113-sigfox/modules.order
    | lib/modules/4.19.255-rt113-sigfox/modules.builtin
    | install: cannot stat 'arch/arm64/boot/Image.initramfs': No such file or directory
    | WARNING: exit code 1 from a shell command.
    | ERROR: Execution of '/home/fmartinsons/TAPOS_build_for_dunfell/build-tapos/tmp/work/a3700-tapos-linux/linux-sbs/4.19.255+gitAUTOINC+5c7ccbe1aa-r4.17.1.1/temp/run.do_deploy.1460182' failed with exit code 1
    ERROR: Task (/home/fmartinsons/TAPOS_build_for_dunfell/tapos/meta-sigfox/meta-sfx-sbs/recipes-kernel/linux/linux-sbs_4.19.255.bb:do_deploy) failed with exit code '1'
```

Reproducibility
---------------
always


I talked about this problem in https://lists.yoctoproject.org/g/yocto/topic/94774777 so to sum up, in kernel.bbclass , I have KERNEL_IMAGETYPES=fitImage and KERNEL_IMAGETYPE_FOR_MAKE=Image

I did some search and found this https://git.openembedded.org/openembedded-core/commit/?id=526bdd88ccd758204452579333ba188e29270bde which seems to be the origin of the problem and another commit (introduced in kirkstone) which revert the previous (and add other things): https://git.openembedded.org/openembedded-core/commit/?id=10a4a132e87e835726bf5da81a60f6f509b90765

To make my setup work , I simply revert 526bdd88ccd758204452579333ba188e29270bde but I open the bug to see if the revert can be done in dunfell branch.

Thanks in advance.
Comment 1 Steve Sakoman 2022-11-25 15:42:28 UTC
If possible I'd like to cherry-pick the same fix for this issue that we have in master and kirkstone.  Could you try the version of "kernel: improve transformation from KERNEL_IMAGETYPE_FOR_MAKE" that I have queued?

https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/dunfell-nut&id=c6b1e3572a94727fd848c5176f38a24ec3978d35
Comment 2 Frédéric Martinsons 2022-11-28 07:58:51 UTC
(In reply to comment #1)
> If possible I'd like to cherry-pick the same fix for this issue that we have
> in master and kirkstone.  Could you try the version of "kernel: improve
> transformation from KERNEL_IMAGETYPE_FOR_MAKE" that I have queued?
> 
> https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/
> dunfell-nut&id=c6b1e3572a94727fd848c5176f38a24ec3978d35

Hello, I just test this commit on my arm64 target and it looks good. I also test the same with another KERNEL_IMAGETYPE (bzImage) for an x86 target and it is ok too.

So for me, you can cherry pick this commit.

Thank you
Comment 4 Frédéric Martinsons 2022-12-08 15:17:26 UTC
Great, thanks !