Re: [PATCH 1/3] xen-tools: Load xen related kernel modules during system boot


Christopher Clark
 

On Wed, Dec 8, 2021 at 6:35 PM Khem Raj <raj.khem@...> wrote:

On Wed, Dec 8, 2021 at 6:24 PM Christopher Clark <christopher.w.clark@...> wrote:
On Wed, Dec 8, 2021 at 5:10 AM Bertrand Marquis <bertrand.marquis@...> wrote:
Hi Kamil,

> On 8 Dec 2021, at 10:44, Kamil Dziezyk via lists.yoctoproject.org <kamil.dziezyk=arm.com@...> wrote:
>
> This patch changes the location of xen.conf file, that contains list of kernel
> modules to be loaded during system boot, to "${nonarch_libdir}". This is done
> by removing '--with-systemd-modules-load=' flag from EXTRA_OECONF variable.
>
> Previous path based on "${systemd_unitdir}" was not considered by default by
> systemd-modules-load.service.

ok, it does look like there's a fix that should be made here, thanks. It took a bit of following to see what's involved, so:

There are two recipes in meta-openembedded that do use ${nonarch_libdir} for this, but the systemd package itself doesn't: the recipe has ${exec_prefix}/lib/modules-load.d instead, and there's a systemd patch that applies ${exec_prefix}/lib/modules-load.d too; but then in oe-core, bitbake.conf defines: nonarch_libdir = "${exec_prefix}/lib"
so the end result should work in the default configuration.

Khem: should the OE Core systemd recipe and patch be using ${nonarch_libdir} too? Or should the recipes that package modules.d config files place them via ${exec_prefix}/lib ?

I think nonarch_libdir is right option here 

Thanks, Khem.

Kamil: Is there any reason that you chose to drop specifying the install directory via the flags passed to EXTRA_OECONF?
ie. An alternative would be: rather than remove the "--with-systemd-modules-load" flag, you could update it to use the correct location:
    ${nonarch_libdir}/modules-load.d
so that if exec_prefix or nonarch_libdir are ever overridden to a non-default value, the config file will still be placed correctly.

Christopher


 

thanks

Christopher

 
>
> Signed-off-by: Kamil Dziezyk <kamil.dziezyk@...>
Reviewed-by: Bertrand Marquis <bertrand.marquis@...>

Cheers
Bertrand

> ---
> recipes-extended/xen/xen-tools.inc | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc
> index d831941..6b99040 100644
> --- a/recipes-extended/xen/xen-tools.inc
> +++ b/recipes-extended/xen/xen-tools.inc
> @@ -653,10 +653,10 @@ FILES:${PN}-xm = "\
>     "
>
> FILES:${PN}-xencommons += "\
> +    ${nonarch_libdir}/modules-load.d/xen.conf \
>     ${sysconfdir}/default/xencommons \
>     ${sysconfdir}/init.d/xencommons \
>     ${sysconfdir}/xen/scripts/launch-xenstore \
> -    ${systemd_unitdir}/modules-load.d/xen.conf \
>     ${systemd_unitdir}/system/proc-xen.mount \
>     ${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service \
>     ${systemd_unitdir}/system/xenconsoled.service \
> @@ -744,7 +744,6 @@ SYSTEMD_SERVICE:${PN}-xendomains = "xendomains.service"
>
> EXTRA_OECONF += " \
>     --with-systemd=${systemd_unitdir}/system \
> -    --with-systemd-modules-load=${systemd_unitdir}/modules-load.d \
>     --with-initddir=${INIT_D_DIR} \
>     --with-sysconfig-leaf-dir=default \
>     --with-system-qemu=${bindir}/qemu-system-i386 \
> --
> 2.17.1
>
>
>
>




Join meta-virtualization@lists.yoctoproject.org to automatically receive all group messages.