Message ID | 20250403074552.971291-1-Qi.Chen@windriver.com |
---|---|
State | New |
Headers | show |
Series | qemu.bbclass: move to classes/ directory so that INHERIT can use it | expand |
On Thu, 3 Apr 2025 at 09:46, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote: > The functions in this bbclass is useful. Move it to classes/ directory > so that it could both inherited by individual recipes and via INHERIT. If the functions are useful, they should be moved into meta/lib/oe. It would also be good to explain what is specifically useful and why. Alex
On 4/3/25 16:32, Alexander Kanavin wrote: > On Thu, 3 Apr 2025 at 09:46, Chen Qi via lists.openembedded.org > <Qi.Chen=windriver.com@lists.openembedded.org> wrote: >> The functions in this bbclass is useful. Move it to classes/ directory >> so that it could both inherited by individual recipes and via INHERIT. > If the functions are useful, they should be moved into meta/lib/oe. It > would also be good to explain what is specifically useful and why. > > Alex The qemu_wrapper_cmdline function is useful to run binaries via qemu user mode. I'm not sure if we should move this function and the one it invokes (qemu_target_binary) to meta/lib/oe, because it also depends on QEMU_OPTIONS which is set in this bbclass. """ QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS:tune-%s" % d.getVar('TUNE_PKGARCH')) or ""}" QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS:tune-${TUNE_PKGARCH}" """ Moving qemu.bbclass to be under classes/ has the benefit of enabling other bbclass that could be used via "INHERIT" to make use of it. Regards, Qi
On Mon, 7 Apr 2025 at 08:31, ChenQi <Qi.Chen@windriver.com> wrote: > Moving qemu.bbclass to be under classes/ has the benefit of enabling > other bbclass that could be used via "INHERIT" to make use of it. Please be specific. Is this to support the version checker that runs executables through qemu usermode? I'd still say 'running a target executable through qemu usermode' should be a function accessible via meta/lib/oe. Is it possible to refactor the functions, so that they take things like QEMU_OPTIONS as function arguments, and not from the datastore? Alex
Yes. It is to support the version checker. I'll refactor the functions and send out V3. Regards, Qi -----Original Message----- From: Alexander Kanavin <alex.kanavin@gmail.com> Sent: Monday, April 7, 2025 6:13 PM To: Chen, Qi <Qi.Chen@windriver.com> Cc: openembedded-core@lists.openembedded.org Subject: Re: [OE-core][PATCH] qemu.bbclass: move to classes/ directory so that INHERIT can use it On Mon, 7 Apr 2025 at 08:31, ChenQi <Qi.Chen@windriver.com> wrote: > Moving qemu.bbclass to be under classes/ has the benefit of enabling > other bbclass that could be used via "INHERIT" to make use of it. Please be specific. Is this to support the version checker that runs executables through qemu usermode? I'd still say 'running a target executable through qemu usermode' should be a function accessible via meta/lib/oe. Is it possible to refactor the functions, so that they take things like QEMU_OPTIONS as function arguments, and not from the datastore? Alex
diff --git a/meta/classes-recipe/qemu.bbclass b/meta/classes/qemu.bbclass
similarity index 100%
rename from meta/classes-recipe/qemu.bbclass
rename to meta/classes/qemu.bbclass