Andrei,
 
In our build, we use a two stage build, the first stage builds the IPKs and packages files, the second stage builds the various images from the feeds created in the first stage.  We've run into a corner case when the kernel repo gets an update that bumps the version, if that happens, the kernel will rebuild during the second stage build (the kernel recipe is on AUTOREV).  Unfortunately, that now creates a new kernel with a newer version that the one in the pre-built feed.  The image recipe is then assembled using the prebuilt feed (and the older kernel), however the wic script picks up the new kernel.  Then when the wic image is booted, the new kernel in the boot portion of the wic image is unable to find the right version of modules and it panics.

This is only an issue during development while the kernel recipe is on autorev, but its causing other teams (and us) some grief and this change allows the wic script to always use a custom kernel path.  In this case it allows the wic script to use the path to the kernel installed in the image recipe.

The patch I'm proposing allows options.kernel_dir to always be used if its provided.  The current code in wic_create_subcommand has a code path where it is presently ignored.

Cheers,
Bill


From: Andrei Gherzan <andrei@gherzan.com>
Sent: Wednesday, March 2, 2022 4:06 PM
To: Bill Pittman <bill.pittman@ni.com>
Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Subject: [EXTERNAL] Re: [OE-core] [PATCH] wic: Use custom kernel path if provided
 

Feb 15, 2022 16:54:28 Bill Pittman <bill.pittman@ni.com>:

> If the custom kernel path is provided in options, then
> use that path instead of the default path.

Just to understand this a bit, what is your usecase here?
--
Andrei Gherzan
gpg: rsa4096/D4D94F67AD0E9640

INTERNAL - NI CONFIDENTIAL