Re: [oe-core] [RFC] meson.bbclass: pkg-config vs pkgconf

2024-06-03 Thread Randolph Sapp via lists.openembedded.org
On Mon Jun 3, 2024 at 4:22 PM CDT, Richard Purdie wrote:
> On Mon, 2024-06-03 at 13:02 -0500, Randolph Sapp wrote:
> > Forgive my ignorance, but is there any particular reason why pkg-
> > config is preferred over pkgconf for meson related recipes?
>
> Yes, as to try and mix both pkg-config and pkgconf would be a path to
> madness.

Fair enough.

> > It seems the two treat the usage of the PKG_CONFIG_SYSROOT_DIR
> > variable differently, resulting in issues when build scripts
> > attempting to use package config variables directly.
>
> Right, this is basically the problem. We have a long history of using
> pkg-config, we worked with upstream to merge sysroot support and it is
> the standard we built around.
>
> pkgconf then came along and decided it would be a great idea to have
> some slightly different behaviour. We did originally plan to have a
> switchable virtual/ provider but due to the differences in behaviour it
> doesn't work.
>
> Things are bad enough that there are two standards. Saying "if building
> with meson, it behaves differently again" would be a nightmare.
>
> I have been asked to switch everything to pkgconf however I suspect
> that would also involve carrying patches and would end up as ton of
> work to be incompatible with a different set of software. I'm therefore
> not keen on that either.

Also fair, I can understand not wanting to switch to a newer tool after spending
time to get sysroots accepted upstream. The virtual provider thing is doable
though.

Both pkg-config providers can be passed --define-prefix to yield something
usable to Yocto. It makes both assume the value of "prefix" based on the path to
the current package config file, which will work with current sysroot structure
Yocto uses. If that structure ever changes, though, this will no longer work. A
wrapper would be able to ensure both follow the standard.

> > If there's not an explicit reason we're preferring pkg-config, would 
> > anyone be opposed to switching it out for pkgconf for meson related 
> > packages? Of course, with a note about this behavior discrepancy. It 
> > would reduce these Yocto specific patches and align meson behavior
> > with distros that currently default to pkgconf.
>
> Personally, I think it would just confuse things even more. xcb-proto
> might get used by meson or non-meson software. Mesa might get used by
> either too. Keeping it simple and saying "pkg-config behaviour"
> everywhere is simpler IMO.
>
> Cheers,
>
> Richard

Fair enough. Would the wrapper be a useful solution (if applied globally), or
would this be too much of a deviation from expected default behavior as well...

- Randolph

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200286): 
https://lists.openembedded.org/g/openembedded-core/message/200286
Mute This Topic: https://lists.openembedded.org/mt/106467265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core] [RFC] meson.bbclass: pkg-config vs pkgconf

2024-06-03 Thread Randolph Sapp via lists.openembedded.org
On Mon Jun 3, 2024 at 4:37 PM CDT, Richard Purdie wrote:
> On Tue, 2024-06-04 at 00:32 +0300, Marko Lindqvist wrote:
> > On Tue, 4 Jun 2024 at 00:22, Richard Purdie via
> > lists.openembedded.org
> >  wrote:
> > > 
> > > Keeping it simple and saying "pkg-config behaviour"
> > > everywhere is simpler IMO.
> > 
> >  Do you think that pkg-config will still gain livelihood? I've
> > considered it a dead project for some time now. I was about to check
> > how many years it's since the latest commit to their repository, but
> > the repo URL from freedesktop site now gave 404.
>
> It hasn't really needed to change to be honest. I do agree the 404 is
> worrying and it has been a long time since there was a release.
>
> The trouble is, who wants to take on chasing down all the bugs and
> pushing changes to all the upstreams that will need patching? In
> general people fix a small corner of the problem then get
> bored/frustrated/distracted/whatever and move on to something else, not
> that I blame them. This isn't a conversion we can half do, it will end
> up as another flag day :/.
>
> Cheers,
>
> Richard

Don't worry about the 404. The freedesktop gitlab in in the middle of a
migration. The project is still alive :)

- Randolph

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200285): 
https://lists.openembedded.org/g/openembedded-core/message/200285
Mute This Topic: https://lists.openembedded.org/mt/106467265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core] [RFC] meson.bbclass: pkg-config vs pkgconf

2024-06-03 Thread Randolph Sapp via lists.openembedded.org

Hello,

Forgive my ignorance, but is there any particular reason why pkg-config 
is preferred over pkgconf for meson related recipes? It seems the two 
treat the usage of the PKG_CONFIG_SYSROOT_DIR variable differently, 
resulting in issues when build scripts attempting to use package config 
variables directly.


It seems that pkgconf respects PKG_CONFIG_SYSROOT_DIR by prepending that 
path to all variables queried, where as pkg-config just populates an 
internal global variable that the *.pc file must then use (pc_sysrootdir).


The global variable method would work, if any package config generating 
scripts used it by default. Unfortunately the only use I've been able to 
find comes from Yocto related patches specifically added to work around 
this difference in behavior.


You can see some of the attempts to work around this discrepancy here:
recipes-graphics/xorg-proto/xcb-proto/0001-xcb-proto.pc.in-reinstate-libdir.patch
recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch
meta-openembedded/meta-oe/recipes-extended/flatpak/flatpak_1.15.6.bb

If there's not an explicit reason we're preferring pkg-config, would 
anyone be opposed to switching it out for pkgconf for meson related 
packages? Of course, with a note about this behavior discrepancy. It 
would reduce these Yocto specific patches and align meson behavior with 
distros that currently default to pkgconf.


Regards,
Randolph

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200276): 
https://lists.openembedded.org/g/openembedded-core/message/200276
Mute This Topic: https://lists.openembedded.org/mt/106467265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCH v3] mesa: enable imagination powervr support

2024-03-19 Thread Randolph Sapp via lists.openembedded.org
On Tue Mar 19, 2024 at 2:58 PM CDT, Randolph Sapp via lists.openembedded.org 
wrote:
> On Tue Mar 19, 2024 at 10:26 AM CDT, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler 
> >
> > Allows mesa to be build with Imagination PowerVR support.
> >
> > Signed-off-by: Marcel Ziswiler 
> >
> > ---
> >
> > Changes in v3:
> > - Add a negative condition to the imagination PACKAGECONFIG as well,
> >   otherwise upstream defaults may result in an incorrect configuration
> >   (option being quietly enabled without it being present in
> >   PACKAGECONFIG) as pointed out by Alex.
> >
> > Changes in v2:
> > - Define imagination as a standard PACKAGECONFIG setting as suggested by
> >   Alex.
> >
> >  meta/recipes-graphics/mesa/mesa.inc | 6 +-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc 
> > b/meta/recipes-graphics/mesa/mesa.inc
> > index 12d7a18eb8..0d4a37c34a 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -113,6 +113,7 @@ VULKAN_DRIVERS:append:i686 = ",intel,amd"
> >  VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', 
> > ',freedreno', '', d)}"
> >  VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', 
> > ',broadcom', '', d)}"
> >  VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 
> > 'gallium-llvm', ',swrast', '', d)}"
> > +VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 
> > 'imagination', ',imagination-experimental', '', d)}"
> >  PACKAGECONFIG[vulkan] = 
> > "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, 
> > -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
> >
> >  # mesa development and testing tools support, per driver
> > @@ -122,6 +123,7 @@ TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 
> > 'etnaviv', ',etnaviv', '',
> >  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', 
> > ',freedreno', '', d)}"
> >  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', 
> > d)}"
> >  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', 
> > ',panfrost', '', d)}"
> > +TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', 
> > ',imagination', '', d)}"
> >
> >  # dependencies for tools.
> >  TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' 
> > ncurses libxml2 ', '', d)}"
> > @@ -189,6 +191,8 @@ PACKAGECONFIG[xa]  = "-Dgallium-xa=enabled, 
> > -Dgallium-xa=disabled"
> >  PACKAGECONFIG[va] = 
> > "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
> >  PACKAGECONFIG[vdpau] = 
> > "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
> >
> > +PACKAGECONFIG[imagination] = 
> > "-Dimagination-srv=true,-Dimagination-srv=false"
> > +
> >  PACKAGECONFIG[lima] = ""
> >  GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', 
> > ',lima', '', d)}"
> >
> > @@ -327,7 +331,7 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*"
> >  PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
> >
> >  FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
> > -FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
> > +FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so 
> > ${libdir}/libpowervr_rogue.so ${datadir}/vulkan"
> >  FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
> >  FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
> >  FILES:libgbm = "${libdir}/libgbm.so.*"
> > --
> > 2.44.0
>
> Looks good. Thanks Marcel! Running a test build now to verify things. Will
> respond with Tested-By whenever that finishes.
>
> Reviewed-by: Randolph Sapp 

Sets thing's up as well as they can be right now!

General question for the mailing list, though: for drivers that only provide
Vulkan, should zink automatically get appended to them PACKAGECONFIG string if
the opengl distro feature is selected? I don't expect this patch to do it now as
this version of the driver is still not fully Vulkan compliant, but later it'll
be relevant.

Tested-by: Randolph Sapp 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197346): 
https://lists.openembedded.org/g/openembedded-core/message/197346
Mute This Topic: https://lists.openembedded.org/mt/105025990/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCH v3] mesa: enable imagination powervr support

2024-03-19 Thread Randolph Sapp via lists.openembedded.org
On Tue Mar 19, 2024 at 10:26 AM CDT, Marcel Ziswiler wrote:
> From: Marcel Ziswiler 
>
> Allows mesa to be build with Imagination PowerVR support.
>
> Signed-off-by: Marcel Ziswiler 
>
> ---
>
> Changes in v3:
> - Add a negative condition to the imagination PACKAGECONFIG as well,
>   otherwise upstream defaults may result in an incorrect configuration
>   (option being quietly enabled without it being present in
>   PACKAGECONFIG) as pointed out by Alex.
>
> Changes in v2:
> - Define imagination as a standard PACKAGECONFIG setting as suggested by
>   Alex.
>
>  meta/recipes-graphics/mesa/mesa.inc | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa.inc 
> b/meta/recipes-graphics/mesa/mesa.inc
> index 12d7a18eb8..0d4a37c34a 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -113,6 +113,7 @@ VULKAN_DRIVERS:append:i686 = ",intel,amd"
>  VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', 
> ',freedreno', '', d)}"
>  VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', 
> ',broadcom', '', d)}"
>  VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 
> 'gallium-llvm', ',swrast', '', d)}"
> +VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'imagination', 
> ',imagination-experimental', '', d)}"
>  PACKAGECONFIG[vulkan] = 
> "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, 
> -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
>
>  # mesa development and testing tools support, per driver
> @@ -122,6 +123,7 @@ TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 
> 'etnaviv', ',etnaviv', '',
>  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', 
> ',freedreno', '', d)}"
>  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', 
> d)}"
>  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', 
> ',panfrost', '', d)}"
> +TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', 
> ',imagination', '', d)}"
>
>  # dependencies for tools.
>  TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' 
> ncurses libxml2 ', '', d)}"
> @@ -189,6 +191,8 @@ PACKAGECONFIG[xa]  = "-Dgallium-xa=enabled, 
> -Dgallium-xa=disabled"
>  PACKAGECONFIG[va] = 
> "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
>  PACKAGECONFIG[vdpau] = 
> "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
>
> +PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
> +
>  PACKAGECONFIG[lima] = ""
>  GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', 
> ',lima', '', d)}"
>
> @@ -327,7 +331,7 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*"
>  PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
>
>  FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
> -FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
> +FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so 
> ${libdir}/libpowervr_rogue.so ${datadir}/vulkan"
>  FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
>  FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
>  FILES:libgbm = "${libdir}/libgbm.so.*"
> --
> 2.44.0

Looks good. Thanks Marcel! Running a test build now to verify things. Will
respond with Tested-By whenever that finishes.

Reviewed-by: Randolph Sapp 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197331): 
https://lists.openembedded.org/g/openembedded-core/message/197331
Mute This Topic: https://lists.openembedded.org/mt/105025990/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCH] bzip2: add libbz2.so.1.0 link for compat

2024-03-18 Thread Randolph Sapp via lists.openembedded.org
On Sat Mar 16, 2024 at 11:52 AM CDT, Alexander Kanavin wrote:
> It's better to backport the upstream patch, as nobody's going to
> remember why do_install snippet is there, or to remove it when there's
> a new release (if it doesn't cause installation conflicts).
>
> Alex

I would backport the upstream patch, if it wasn't dependant on a migration to
Cmake. I feel like that's a bit much.

Randolph

> On Sat, 16 Mar 2024 at 01:19, Randolph Sapp via lists.openembedded.org
>  wrote:
> >
> > From: Randolph Sapp 
> >
> > Add a link from libbz2.so.1.0 to libbz2.so.${PV} for compatibility with
> > other distributions.
> >
> > A handfull of distributions are still using the "Makefile-libbz2_so" to
> > generate libbz2 and bzip2-shared. This creates a library with a soname
> > of "libbz2.so.1.0". This library link is not provide by default in
> > autotools builds so add one here as Gentoo does now [1].
> >
> > This has been addressed upstream already, but there hasn't been a stable
> > release since then [2].
> >
> > [1] https://bugs.gentoo.org/338321
> > [2] https://gitlab.com/bzip2/bzip2/-/merge_requests/42
> >
> > Signed-off-by: Randolph Sapp 
> > ---
> >  meta/recipes-extended/bzip2/bzip2_1.0.8.bb | 5 +
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb 
> > b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
> > index 4e3a06f240..4453171701 100644
> > --- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
> > +++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
> > @@ -62,6 +62,11 @@ do_install_ptest () {
> > sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
> >  }
> >
> > +# add the following link for cross-distro compatibility
> > +do_install:append () {
> > +   ln -s libbz2.so.${PV} "${D}${libdir}/libbz2.so.1.0"
> > +}
> > +
> >  FILES:libbz2 = "${libdir}/lib*${SOLIBS}"
> >
> >  RDEPENDS:${PN}-ptest += "make bash"
> > --
> > 2.44.0
> >
> >
> > 
> >


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197314): 
https://lists.openembedded.org/g/openembedded-core/message/197314
Mute This Topic: https://lists.openembedded.org/mt/104959821/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCH] bzip2: add libbz2.so.1.0 link for compat

2024-03-18 Thread Randolph Sapp via lists.openembedded.org
On Sun Mar 17, 2024 at 4:28 AM CDT, Richard Purdie wrote:
> On Fri, 2024-03-15 at 19:19 -0500, r...@ti.com wrote:
> > From: Randolph Sapp 
> > 
> > Add a link from libbz2.so.1.0 to libbz2.so.${PV} for compatibility
> > with
> > other distributions.
> > 
> > A handfull of distributions are still using the "Makefile-libbz2_so" to
> > generate libbz2 and bzip2-shared. This creates a library with a soname
> > of "libbz2.so.1.0". This library link is not provide by default in
> > autotools builds so add one here as Gentoo does now [1].
> > 
> > This has been addressed upstream already, but there hasn't been a stable
> > release since then [2].
> > 
> > [1] https://bugs.gentoo.org/338321
> > [2] https://gitlab.com/bzip2/bzip2/-/merge_requests/42
> > 
> > Signed-off-by: Randolph Sapp 
> > ---
> >  meta/recipes-extended/bzip2/bzip2_1.0.8.bb | 5 +
> >  1 file changed, 5 insertions(+)
>
> I guess by "cross distro", you mean that you have some binaries which
> need to run on multiple distros, some of which have this naming and
> some of which do not?
>
> I am a bit worried about this as it is the kind of thing we add, then
> totally forget about removing so it gets carried even after it no
> longer makes sense (and the library name/version changes again for
> example).
>
> Ugly as it may be, I'm wondering if there should be a separate recipe
> to handle this link which the binaries could depend upon. Even a
> separate package for it and an error if the target lib doesn't exist
> might be better.
>
> Cheers,
>
> Richard

Yeah, anything compiled on Debian/Arch will run into issues looking up that so
name when running under Yocto.

Oddly enough though, both Fedora and Gentoo seem to be using the new soname. I'm
not entirely sure if this is actually that common now. Maybe this should be
ignored.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197313): 
https://lists.openembedded.org/g/openembedded-core/message/197313
Mute This Topic: https://lists.openembedded.org/mt/104959821/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][PATCH] bzip2: add libbz2.so.1.0 link for compat

2024-03-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add a link from libbz2.so.1.0 to libbz2.so.${PV} for compatibility with
other distributions.

A handfull of distributions are still using the "Makefile-libbz2_so" to
generate libbz2 and bzip2-shared. This creates a library with a soname
of "libbz2.so.1.0". This library link is not provide by default in
autotools builds so add one here as Gentoo does now [1].

This has been addressed upstream already, but there hasn't been a stable
release since then [2].

[1] https://bugs.gentoo.org/338321
[2] https://gitlab.com/bzip2/bzip2/-/merge_requests/42

Signed-off-by: Randolph Sapp 
---
 meta/recipes-extended/bzip2/bzip2_1.0.8.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb 
b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
index 4e3a06f240..4453171701 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
@@ -62,6 +62,11 @@ do_install_ptest () {
sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
 }
 
+# add the following link for cross-distro compatibility
+do_install:append () {
+   ln -s libbz2.so.${PV} "${D}${libdir}/libbz2.so.1.0"
+}
+
 FILES:libbz2 = "${libdir}/lib*${SOLIBS}"
 
 RDEPENDS:${PN}-ptest += "make bash"
-- 
2.44.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197252): 
https://lists.openembedded.org/g/openembedded-core/message/197252
Mute This Topic: https://lists.openembedded.org/mt/104959821/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe][OE-core][Patch 0/1] Revert "bin_package.bbclass: Inhibit the default dependencies"

2023-08-28 Thread Randolph Sapp via lists.openembedded.org

On 8/28/23 14:45, Randolph Sapp wrote:

On 8/28/23 11:22, Randolph Sapp wrote:

On 8/28/23 10:09, Max Krummenacher wrote:

On Mon, Aug 28, 2023 at 5:01 PM Max Krummenacher via
lists.openembedded.org 
wrote:


On Sun, Aug 27, 2023 at 11:23 PM Peter Kjellerstedt
 wrote:



-Original Message-
From: Max Krummenacher 
Sent: den 27 augusti 2023 10:10
To: openembedded-core@lists.openembedded.org; Peter Kjellerstedt

Cc: Max Krummenacher ; Randolph Sapp

Subject: [oe][OE-core][Patch 0/1] Revert "bin_package.bbclass: 
Inhibit the

default dependencies"

From: Max Krummenacher 

Hi

With commit d1d09bd4d7 ("bin_package.bbclass: Inhibit the default
dependencies") applied I'm getting a lot of these errors, i.e. qa
does miss libc and compiler provided libs:

ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libusc.so.23.1.6404501 contained in package 
ti-img-rogue-umlibs
requires ld-linux-aarch64.so.1(GLIBC_2.17)(64bit), but no 
providers found

in RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]
ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libusc.so.23.1.6404501 contained in package 
ti-img-rogue-umlibs

requires libc.so.6(GLIBC_2.17)(64bit), but no providers found in
RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]
ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libufwriter.so.23.1.6404501 contained in package 
ti-img-rogue-
umlibs requires libstdc++.so.6(GLIBCXX_3.4.14)(64bit), but no 
providers

found in RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]

Reverting the commit makes the build pass, alternatively adding
to depends in the recipe which is using the bin_package class
fixes it too:

DEPENDS += " virtual/${TARGET_PREFIX}compilerlibs virtual/libc"

I'd prefer reverting removing the default dependencies over fixing
each of the recipes which do use the bin_package class to actually
install binaries running in the target user space.

Any opinions?


Bummer. I guess we will have to update our recipes individually
instead. :(


 From the bugzilla entry [1] which added the feature and from the 
commit
adding the class [2] it looks to me that the class should simplify 
adding

binaries externally built for the target.
Having the users of the class having to add the used libc / compiler
shared objects to not trigger a qa warning seems really wrong to me.

Additionally I don't see the advantage in not installing the base
dependencies. Doing anything usefull in a build would need to build
them anyway for some other recipe, so one would save creating a few
hard links. Do I miss something here?

So IMHO a recipe which inherits the class and really does not like the
default dependencies should add the `INHIBIT_DEFAULT_DEPS = "1"`.


Adding the missing links, sorry about that:
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=1592
[2] 
https://www.openembedded.org/pipermail/openembedded-core/2012-September/067782.html


Thanks for bringing this to light Max. I have no opinion in this. I 
understand not wanting to implicitly depending on anything. After all, 
explicit is always nice for those that don't want to navigate the full 
include chain to figure out recipe dependencies. It's also nicer for a 
minimal build (though arguably not in this case because these are core 
packages we're depending on).


If this is going to be the standard moving forward please let me know 
so I can update this recipe accordingly.


Scratch that, I have an opinion now. Removing hidden base package 
dependencies that QA steps explicitly rely is a bad idea. Please revert 
this.


Or at least have the insane.bbclass class introduce it's required 
dependencies itself, as that seems more logical than having a generic 
base group anyway.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186846): 
https://lists.openembedded.org/g/openembedded-core/message/186846
Mute This Topic: https://lists.openembedded.org/mt/100987453/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe][OE-core][Patch 0/1] Revert "bin_package.bbclass: Inhibit the default dependencies"

2023-08-28 Thread Randolph Sapp via lists.openembedded.org

On 8/28/23 11:22, Randolph Sapp wrote:

On 8/28/23 10:09, Max Krummenacher wrote:

On Mon, Aug 28, 2023 at 5:01 PM Max Krummenacher via
lists.openembedded.org 
wrote:


On Sun, Aug 27, 2023 at 11:23 PM Peter Kjellerstedt
 wrote:



-Original Message-
From: Max Krummenacher 
Sent: den 27 augusti 2023 10:10
To: openembedded-core@lists.openembedded.org; Peter Kjellerstedt

Cc: Max Krummenacher ; Randolph Sapp

Subject: [oe][OE-core][Patch 0/1] Revert "bin_package.bbclass: 
Inhibit the

default dependencies"

From: Max Krummenacher 

Hi

With commit d1d09bd4d7 ("bin_package.bbclass: Inhibit the default
dependencies") applied I'm getting a lot of these errors, i.e. qa
does miss libc and compiler provided libs:

ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libusc.so.23.1.6404501 contained in package 
ti-img-rogue-umlibs
requires ld-linux-aarch64.so.1(GLIBC_2.17)(64bit), but no providers 
found

in RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]
ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libusc.so.23.1.6404501 contained in package 
ti-img-rogue-umlibs

requires libc.so.6(GLIBC_2.17)(64bit), but no providers found in
RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]
ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libufwriter.so.23.1.6404501 contained in package 
ti-img-rogue-
umlibs requires libstdc++.so.6(GLIBCXX_3.4.14)(64bit), but no 
providers

found in RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]

Reverting the commit makes the build pass, alternatively adding
to depends in the recipe which is using the bin_package class
fixes it too:

DEPENDS += " virtual/${TARGET_PREFIX}compilerlibs virtual/libc"

I'd prefer reverting removing the default dependencies over fixing
each of the recipes which do use the bin_package class to actually
install binaries running in the target user space.

Any opinions?


Bummer. I guess we will have to update our recipes individually
instead. :(


 From the bugzilla entry [1] which added the feature and from the commit
adding the class [2] it looks to me that the class should simplify 
adding

binaries externally built for the target.
Having the users of the class having to add the used libc / compiler
shared objects to not trigger a qa warning seems really wrong to me.

Additionally I don't see the advantage in not installing the base
dependencies. Doing anything usefull in a build would need to build
them anyway for some other recipe, so one would save creating a few
hard links. Do I miss something here?

So IMHO a recipe which inherits the class and really does not like the
default dependencies should add the `INHIBIT_DEFAULT_DEPS = "1"`.


Adding the missing links, sorry about that:
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=1592
[2] 
https://www.openembedded.org/pipermail/openembedded-core/2012-September/067782.html


Thanks for bringing this to light Max. I have no opinion in this. I 
understand not wanting to implicitly depending on anything. After all, 
explicit is always nice for those that don't want to navigate the full 
include chain to figure out recipe dependencies. It's also nicer for a 
minimal build (though arguably not in this case because these are core 
packages we're depending on).


If this is going to be the standard moving forward please let me know so 
I can update this recipe accordingly.


Scratch that, I have an opinion now. Removing hidden base package 
dependencies that QA steps explicitly rely is a bad idea. Please revert 
this.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186845): 
https://lists.openembedded.org/g/openembedded-core/message/186845
Mute This Topic: https://lists.openembedded.org/mt/100987453/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe][OE-core][Patch 0/1] Revert "bin_package.bbclass: Inhibit the default dependencies"

2023-08-28 Thread Randolph Sapp via lists.openembedded.org

On 8/28/23 10:09, Max Krummenacher wrote:

On Mon, Aug 28, 2023 at 5:01 PM Max Krummenacher via
lists.openembedded.org 
wrote:


On Sun, Aug 27, 2023 at 11:23 PM Peter Kjellerstedt
 wrote:



-Original Message-
From: Max Krummenacher 
Sent: den 27 augusti 2023 10:10
To: openembedded-core@lists.openembedded.org; Peter Kjellerstedt

Cc: Max Krummenacher ; Randolph Sapp

Subject: [oe][OE-core][Patch 0/1] Revert "bin_package.bbclass: Inhibit the
default dependencies"

From: Max Krummenacher 

Hi

With commit d1d09bd4d7 ("bin_package.bbclass: Inhibit the default
dependencies") applied I'm getting a lot of these errors, i.e. qa
does miss libc and compiler provided libs:

ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libusc.so.23.1.6404501 contained in package ti-img-rogue-umlibs
requires ld-linux-aarch64.so.1(GLIBC_2.17)(64bit), but no providers found
in RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]
ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libusc.so.23.1.6404501 contained in package ti-img-rogue-umlibs
requires libc.so.6(GLIBC_2.17)(64bit), but no providers found in
RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]
ERROR: ti-img-rogue-umlibs-23.1.6404501-r2 do_package_qa: QA Issue:
/usr/lib/libufwriter.so.23.1.6404501 contained in package ti-img-rogue-
umlibs requires libstdc++.so.6(GLIBCXX_3.4.14)(64bit), but no providers
found in RDEPENDS:ti-img-rogue-umlibs? [file-rdeps]

Reverting the commit makes the build pass, alternatively adding
to depends in the recipe which is using the bin_package class
fixes it too:

DEPENDS += " virtual/${TARGET_PREFIX}compilerlibs virtual/libc"

I'd prefer reverting removing the default dependencies over fixing
each of the recipes which do use the bin_package class to actually
install binaries running in the target user space.

Any opinions?


Bummer. I guess we will have to update our recipes individually
instead. :(


 From the bugzilla entry [1] which added the feature and from the commit
adding the class [2] it looks to me that the class should simplify adding
binaries externally built for the target.
Having the users of the class having to add the used libc / compiler
shared objects to not trigger a qa warning seems really wrong to me.

Additionally I don't see the advantage in not installing the base
dependencies. Doing anything usefull in a build would need to build
them anyway for some other recipe, so one would save creating a few
hard links. Do I miss something here?

So IMHO a recipe which inherits the class and really does not like the
default dependencies should add the `INHIBIT_DEFAULT_DEPS = "1"`.


Adding the missing links, sorry about that:
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=1592
[2] 
https://www.openembedded.org/pipermail/openembedded-core/2012-September/067782.html


Thanks for bringing this to light Max. I have no opinion in this. I 
understand not wanting to implicitly depending on anything. After all, 
explicit is always nice for those that don't want to navigate the full 
include chain to figure out recipe dependencies. It's also nicer for a 
minimal build (though arguably not in this case because these are core 
packages we're depending on).


If this is going to be the standard moving forward please let me know so 
I can update this recipe accordingly.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186837): 
https://lists.openembedded.org/g/openembedded-core/message/186837
Mute This Topic: https://lists.openembedded.org/mt/100987453/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][kirkstone][PATCHv2 0/8] Backport all weston-init qol updates

2023-06-27 Thread Randolph Sapp via lists.openembedded.org

On 6/27/23 11:00, Steve Sakoman wrote:

Hi Randolph,

Unfortunately this patch series results in oe-selftest failures on the
autobuilder, three examples below:

https://errors.yoctoproject.org/Errors/Details/710122/
https://errors.yoctoproject.org/Errors/Details/710127/
https://errors.yoctoproject.org/Errors/Details/710125/

Note in particular:

AssertionError: 1 != 0 : Log:
/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-1203856/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0-r0/target_logs/dmesg_output.log
---
Central error: [2.392519] weston[373]: segfault at 28 ip
7fad628102aa sp 75bf2410 error 4 in
libwayland-server.so.0.20.0[7fad6280c000+8000]
***
[1.742836]   with environment:
[1.742837] HOME=/
[1.742838] TERM=linux
[1.800627] udevd[167]: starting version 3.2.10
[1.806665] udevd[168]: starting eudev-3.2.10
[1.964586] EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled.
[2.020081] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[2.223651] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[2.224563] Bluetooth: BNEP filters: protocol multicast
[2.225490] Bluetooth: BNEP socket layer initialized
[2.392519] weston[373]: segfault at 28 ip 7fad628102aa sp
75bf2410 error 4 in
libwayland-server.so.0.20.0[7fad6280c000+8000]
[2.394037] Code: 48 8b 47 08 48 8d 77 10 48 8b 78 08 e9 1f c3 ff
ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 41 54 55 48 89 fd 48
83 ec 08 <8b> 57 28 4c 8b 67 08 85 d2 79 3b 48 8d 05 64 b0 00 00 48 39
07 0f

***
1 errors found in logs.

Steve


Rats. I'm concerned what could have caused a segfault in 
libwayland-server in this series. This only tweaked Weston launch 
parameters and the only time I've seen that result in instability is 
when you ask Weston to load a module that isn't present. Even that only 
results in a safely handled runtime failure.


I hate to bother you with this, but where is the source code for this 
test? I'd like to poke around a bit more...


Randolph

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183496): 
https://lists.openembedded.org/g/openembedded-core/message/183496
Mute This Topic: https://lists.openembedded.org/mt/99721734/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 2/8] weston-init: introduce xwayland PACKAGECONFIG

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Ming Liu 

Some BSPs dont support xwayland in weston, this is easier for them to
control that.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 77dda03cf55..a7adce7fda8 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -14,10 +14,11 @@ SRC_URI = "file://init \
 
 S = "${WORKDIR}"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', 
'', d)}"
 PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
 PACKAGECONFIG:append:qemuppc64 = " use-pixman"
 
+PACKAGECONFIG[xwayland] = ",,"
 PACKAGECONFIG[no-idle-timeout] = ",,"
 PACKAGECONFIG[use-pixman] = ",,"
 
@@ -50,7 +51,7 @@ do_install() {
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-   if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" 
= "yes" ]; then
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
d)}" = "yes" ]; then
sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183344): 
https://lists.openembedded.org/g/openembedded-core/message/183344
Mute This Topic: https://lists.openembedded.org/mt/99721740/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 4/8] weston-init: add weston user to the render group

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

The weston user must be in the render group in order to access render
device nodes for standard user-space graphics.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index b637fa6a4a5..6d62993d7da 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -93,6 +93,6 @@ FILES:${PN} += "\
 CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input weston"
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render weston"
 GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183343): 
https://lists.openembedded.org/g/openembedded-core/message/183343
Mute This Topic: https://lists.openembedded.org/mt/99721739/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 1/8] weston.init: enabled xwayland

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: ssuesens 

set xwayland support in weston.init file to true

Signed-off-by: ssuesens 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 497d8602038..77dda03cf55 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -50,6 +50,10 @@ do_install() {
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
+   if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" 
= "yes" ]; then
+   sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
+   fi
+
if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 
'no', d)}" = "yes" ]; then
sed -i -e "/^\[core\]/a idle-time=0" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183345): 
https://lists.openembedded.org/g/openembedded-core/message/183345
Mute This Topic: https://lists.openembedded.org/mt/99721741/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 6/8] weston-init: fix the mixed indentation

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

I know my text editor is going to get angry at me if this continues.

Signed-off-by: Randolph Sapp 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 4fa302c8333..e538469a58b 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,19 +26,19 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
-if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+   if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
-fi
+   fi
install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
# Install Weston systemd service and accompanying udev rule
install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
-if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+   if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
-fi
+   fi
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -47,7 +47,7 @@ do_install() {
install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
-if [ -n "${DEFAULTBACKEND}" ]; then
+   if [ -n "${DEFAULTBACKEND}" ]; then
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183337): 
https://lists.openembedded.org/g/openembedded-core/message/183337
Mute This Topic: https://lists.openembedded.org/mt/99721733/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 7/8] weston-init: guard against systemd configs

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Just as sysvinit scripts shouldn't be present in a distro using systemd,
systemd scripts shouldn't be present in a system not using systemd.

Signed-off-by: Randolph Sapp 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 29 
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index e538469a58b..9d892d58f2f 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,27 +26,32 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
+   # Install weston-start script
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+   install -Dm755 ${WORKDIR}/weston-start 
${D}${bindir}/weston-start
+   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' 
${D}${bindir}/weston-start
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
fi
-   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
-   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
# Install Weston systemd service and accompanying udev rule
-   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   sed -i -e s:/etc:${sysconfdir}:g \
+   -e s:/usr/bin:${bindir}:g \
+   -e s:/var:${localstatedir}:g \
+   ${D}${systemd_system_unitdir}/weston.service
+   fi
+
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
fi
-   sed -i -e s:/etc:${sysconfdir}:g \
-   -e s:/usr/bin:${bindir}:g \
-   -e s:/var:${localstatedir}:g \
-   ${D}${systemd_system_unitdir}/weston.service
-   # Install weston-start script
-   install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
-   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
-   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+
+   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
+
if [ -n "${DEFAULTBACKEND}" ]; then
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183340): 
https://lists.openembedded.org/g/openembedded-core/message/183340
Mute This Topic: https://lists.openembedded.org/mt/99721736/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 8/8] weston-init: add profile to point users to global socket

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add profile script to point users capable of interacting with the global
socket to it by default.

Signed-off-by: Randolph Sapp 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb  |  3 +++
 .../wayland/weston-init/weston-socket.sh  | 20 +++
 2 files changed, 23 insertions(+)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 9d892d58f2f..1884b5d4401 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -9,6 +9,7 @@ SRC_URI = "file://init \
file://weston.ini \
file://weston.service \
file://weston.socket \
+   file://weston-socket.sh \
file://weston-autologin \
file://weston-start"
 
@@ -39,6 +40,7 @@ do_install() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   install -D -p -m0644 ${WORKDIR}/weston-socket.sh 
${D}${sysconfdir}/profile.d/weston-socket.sh
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -88,6 +90,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 
 FILES:${PN} += "\
 ${sysconfdir}/xdg/weston/weston.ini \
+${sysconfdir}/profile.d/weston-socket.sh \
 ${systemd_system_unitdir}/weston.service \
 ${systemd_system_unitdir}/weston.socket \
 ${sysconfdir}/default/weston \
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-socket.sh 
b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
new file mode 100755
index 000..86389d63a3b
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# set weston variables for use with global weston socket
+global_socket="/run/wayland-0"
+if [ -e "$global_socket" ]; then
+   weston_group=$(stat -c "%G" "$global_socket")
+   if [ "$(id -u)" = "0" ]; then
+   export WAYLAND_DISPLAY="$global_socket"
+   else
+   case "$(groups "$USER")" in
+   *"$weston_group"*)
+   export WAYLAND_DISPLAY="$global_socket"
+   ;;
+   *)
+   ;;
+   esac
+   fi
+   unset weston_group
+fi
+unset global_socket
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183341): 
https://lists.openembedded.org/g/openembedded-core/message/183341
Mute This Topic: https://lists.openembedded.org/mt/99721737/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 0/8] Backport all weston-init qol updates

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Backport all the weston-init QOL updates. Getting closer to the point
where we can actually drop our distro specific weston-init bbappend. May
submit a few more QOL patches sooner or later to completely drop it.

Resubmitting this because I forgot to CC Steve and myself on this
series.

Ming Liu (1):
  weston-init: introduce xwayland PACKAGECONFIG

Randolph Sapp (6):
  weston-init: make sure the render group exists
  weston-init: add weston user to the render group
  weston-init: add the weston user to the wayland group
  weston-init: fix the mixed indentation
  weston-init: guard against systemd configs
  weston-init: add profile to point users to global socket

ssuesens (1):
  weston.init: enabled xwayland

 meta/recipes-graphics/wayland/weston-init.bb  | 53 ---
 .../wayland/weston-init/weston-socket.sh  | 20 +++
 2 files changed, 53 insertions(+), 20 deletions(-)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183338): 
https://lists.openembedded.org/g/openembedded-core/message/183338
Mute This Topic: https://lists.openembedded.org/mt/99721734/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 5/8] weston-init: add the weston user to the wayland group

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add the weston user to the wayland group so all users accessing the
global weston socket in /run all share a group.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 6d62993d7da..4fa302c8333 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -93,6 +93,6 @@ FILES:${PN} += "\
 CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render weston"
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render,wayland weston"
 GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183339): 
https://lists.openembedded.org/g/openembedded-core/message/183339
Mute This Topic: https://lists.openembedded.org/mt/99721735/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCHv2 3/8] weston-init: make sure the render group exists

2023-06-23 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add the render group explicitly here to make sure it exists for the
useradd command.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index a7adce7fda8..b637fa6a4a5 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -94,5 +94,5 @@ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/we
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
 USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input weston"
-GROUPADD_PARAM:${PN} = "-r wayland"
+GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183342): 
https://lists.openembedded.org/g/openembedded-core/message/183342
Mute This Topic: https://lists.openembedded.org/mt/99721738/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][kirkstone][PATCH 0/8] Backport all weston-init qol updates

2023-06-22 Thread Randolph Sapp via lists.openembedded.org

On 6/15/23 16:04, r...@ti.com wrote:

From: Randolph Sapp 

Backport all the weston-init QOL updates. Getting closer to the point
where we can actually drop our distro specific weston-init bbappend. May
submit a few more QOL patches sooner or later to completely drop it.

Ming Liu (1):
   weston-init: introduce xwayland PACKAGECONFIG

Randolph Sapp (6):
   weston-init: make sure the render group exists
   weston-init: add weston user to the render group
   weston-init: add the weston user to the wayland group
   weston-init: fix the mixed indentation
   weston-init: guard against systemd configs
   weston-init: add profile to point users to global socket

ssuesens (1):
   weston.init: enabled xwayland

  meta/recipes-graphics/wayland/weston-init.bb  | 53 ---
  .../wayland/weston-init/weston-socket.sh  | 20 +++
  2 files changed, 53 insertions(+), 20 deletions(-)
  create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh



Rats. Sorry Steve, forgot to CC you on this series. Need me to resubmit it?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183262): 
https://lists.openembedded.org/g/openembedded-core/message/183262
Mute This Topic: https://lists.openembedded.org/mt/99558035/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 5/8] weston-init: add the weston user to the wayland group

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add the weston user to the wayland group so all users accessing the
global weston socket in /run all share a group.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 6d62993d7d..4fa302c833 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -93,6 +93,6 @@ FILES:${PN} += "\
 CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render weston"
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render,wayland weston"
 GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182881): 
https://lists.openembedded.org/g/openembedded-core/message/182881
Mute This Topic: https://lists.openembedded.org/mt/99558040/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 1/8] weston.init: enabled xwayland

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: ssuesens 

set xwayland support in weston.init file to true

Signed-off-by: ssuesens 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 497d860203..77dda03cf5 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -50,6 +50,10 @@ do_install() {
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
+   if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" 
= "yes" ]; then
+   sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
+   fi
+
if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 
'no', d)}" = "yes" ]; then
sed -i -e "/^\[core\]/a idle-time=0" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182884): 
https://lists.openembedded.org/g/openembedded-core/message/182884
Mute This Topic: https://lists.openembedded.org/mt/99558043/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 4/8] weston-init: add weston user to the render group

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

The weston user must be in the render group in order to access render
device nodes for standard user-space graphics.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index b637fa6a4a..6d62993d7d 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -93,6 +93,6 @@ FILES:${PN} += "\
 CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input weston"
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render weston"
 GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182883): 
https://lists.openembedded.org/g/openembedded-core/message/182883
Mute This Topic: https://lists.openembedded.org/mt/99558042/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 2/8] weston-init: introduce xwayland PACKAGECONFIG

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Ming Liu 

Some BSPs dont support xwayland in weston, this is easier for them to
control that.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 77dda03cf5..a7adce7fda 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -14,10 +14,11 @@ SRC_URI = "file://init \
 
 S = "${WORKDIR}"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', 
'', d)}"
 PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
 PACKAGECONFIG:append:qemuppc64 = " use-pixman"
 
+PACKAGECONFIG[xwayland] = ",,"
 PACKAGECONFIG[no-idle-timeout] = ",,"
 PACKAGECONFIG[use-pixman] = ",,"
 
@@ -50,7 +51,7 @@ do_install() {
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-   if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" 
= "yes" ]; then
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
d)}" = "yes" ]; then
sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182880): 
https://lists.openembedded.org/g/openembedded-core/message/182880
Mute This Topic: https://lists.openembedded.org/mt/99558039/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 3/8] weston-init: make sure the render group exists

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add the render group explicitly here to make sure it exists for the
useradd command.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index a7adce7fda..b637fa6a4a 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -94,5 +94,5 @@ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/we
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
 USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input weston"
-GROUPADD_PARAM:${PN} = "-r wayland"
+GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182882): 
https://lists.openembedded.org/g/openembedded-core/message/182882
Mute This Topic: https://lists.openembedded.org/mt/99558041/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 8/8] weston-init: add profile to point users to global socket

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add profile script to point users capable of interacting with the global
socket to it by default.

Signed-off-by: Randolph Sapp 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb  |  3 +++
 .../wayland/weston-init/weston-socket.sh  | 20 +++
 2 files changed, 23 insertions(+)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 9d892d58f2..1884b5d440 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -9,6 +9,7 @@ SRC_URI = "file://init \
file://weston.ini \
file://weston.service \
file://weston.socket \
+   file://weston-socket.sh \
file://weston-autologin \
file://weston-start"
 
@@ -39,6 +40,7 @@ do_install() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   install -D -p -m0644 ${WORKDIR}/weston-socket.sh 
${D}${sysconfdir}/profile.d/weston-socket.sh
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -88,6 +90,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 
 FILES:${PN} += "\
 ${sysconfdir}/xdg/weston/weston.ini \
+${sysconfdir}/profile.d/weston-socket.sh \
 ${systemd_system_unitdir}/weston.service \
 ${systemd_system_unitdir}/weston.socket \
 ${sysconfdir}/default/weston \
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-socket.sh 
b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
new file mode 100755
index 00..86389d63a3
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# set weston variables for use with global weston socket
+global_socket="/run/wayland-0"
+if [ -e "$global_socket" ]; then
+   weston_group=$(stat -c "%G" "$global_socket")
+   if [ "$(id -u)" = "0" ]; then
+   export WAYLAND_DISPLAY="$global_socket"
+   else
+   case "$(groups "$USER")" in
+   *"$weston_group"*)
+   export WAYLAND_DISPLAY="$global_socket"
+   ;;
+   *)
+   ;;
+   esac
+   fi
+   unset weston_group
+fi
+unset global_socket
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182879): 
https://lists.openembedded.org/g/openembedded-core/message/182879
Mute This Topic: https://lists.openembedded.org/mt/99558038/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 7/8] weston-init: guard against systemd configs

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Just as sysvinit scripts shouldn't be present in a distro using systemd,
systemd scripts shouldn't be present in a system not using systemd.

Signed-off-by: Randolph Sapp 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 29 
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index e538469a58..9d892d58f2 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,27 +26,32 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
+   # Install weston-start script
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+   install -Dm755 ${WORKDIR}/weston-start 
${D}${bindir}/weston-start
+   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' 
${D}${bindir}/weston-start
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
fi
-   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
-   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
# Install Weston systemd service and accompanying udev rule
-   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   sed -i -e s:/etc:${sysconfdir}:g \
+   -e s:/usr/bin:${bindir}:g \
+   -e s:/var:${localstatedir}:g \
+   ${D}${systemd_system_unitdir}/weston.service
+   fi
+
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
fi
-   sed -i -e s:/etc:${sysconfdir}:g \
-   -e s:/usr/bin:${bindir}:g \
-   -e s:/var:${localstatedir}:g \
-   ${D}${systemd_system_unitdir}/weston.service
-   # Install weston-start script
-   install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
-   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
-   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+
+   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
+
if [ -n "${DEFAULTBACKEND}" ]; then
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182878): 
https://lists.openembedded.org/g/openembedded-core/message/182878
Mute This Topic: https://lists.openembedded.org/mt/99558037/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 0/8] Backport all weston-init qol updates

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Backport all the weston-init QOL updates. Getting closer to the point
where we can actually drop our distro specific weston-init bbappend. May
submit a few more QOL patches sooner or later to completely drop it.

Ming Liu (1):
  weston-init: introduce xwayland PACKAGECONFIG

Randolph Sapp (6):
  weston-init: make sure the render group exists
  weston-init: add weston user to the render group
  weston-init: add the weston user to the wayland group
  weston-init: fix the mixed indentation
  weston-init: guard against systemd configs
  weston-init: add profile to point users to global socket

ssuesens (1):
  weston.init: enabled xwayland

 meta/recipes-graphics/wayland/weston-init.bb  | 53 ---
 .../wayland/weston-init/weston-socket.sh  | 20 +++
 2 files changed, 53 insertions(+), 20 deletions(-)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182876): 
https://lists.openembedded.org/g/openembedded-core/message/182876
Mute This Topic: https://lists.openembedded.org/mt/99558035/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][kirkstone][PATCH 6/8] weston-init: fix the mixed indentation

2023-06-15 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

I know my text editor is going to get angry at me if this continues.

Signed-off-by: Randolph Sapp 
Signed-off-by: Richard Purdie 
---
 meta/recipes-graphics/wayland/weston-init.bb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 4fa302c833..e538469a58 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,19 +26,19 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
-if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+   if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
-fi
+   fi
install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
# Install Weston systemd service and accompanying udev rule
install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
-if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+   if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
-fi
+   fi
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -47,7 +47,7 @@ do_install() {
install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
-if [ -n "${DEFAULTBACKEND}" ]; then
+   if [ -n "${DEFAULTBACKEND}" ]; then
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182877): 
https://lists.openembedded.org/g/openembedded-core/message/182877
Mute This Topic: https://lists.openembedded.org/mt/99558036/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv2 1/3] weston-init: fix the mixed indentation

2023-06-14 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

I know my text editor is going to get angry at me if this continues.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 4fa302c833..e538469a58 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,19 +26,19 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
-if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+   if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
-fi
+   fi
install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
# Install Weston systemd service and accompanying udev rule
install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
-if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+   if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
-fi
+   fi
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -47,7 +47,7 @@ do_install() {
install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
-if [ -n "${DEFAULTBACKEND}" ]; then
+   if [ -n "${DEFAULTBACKEND}" ]; then
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182819): 
https://lists.openembedded.org/g/openembedded-core/message/182819
Mute This Topic: https://lists.openembedded.org/mt/99530144/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv2 2/3] weston-init: guard against systemd configs

2023-06-14 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Just as sysvinit scripts shouldn't be present in a distro using systemd,
systemd scripts shouldn't be present in a system not using systemd.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 29 
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index e538469a58..9d892d58f2 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,27 +26,32 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
+   # Install weston-start script
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+   install -Dm755 ${WORKDIR}/weston-start 
${D}${bindir}/weston-start
+   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' 
${D}${bindir}/weston-start
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
fi
-   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
-   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
# Install Weston systemd service and accompanying udev rule
-   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   sed -i -e s:/etc:${sysconfdir}:g \
+   -e s:/usr/bin:${bindir}:g \
+   -e s:/var:${localstatedir}:g \
+   ${D}${systemd_system_unitdir}/weston.service
+   fi
+
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
fi
-   sed -i -e s:/etc:${sysconfdir}:g \
-   -e s:/usr/bin:${bindir}:g \
-   -e s:/var:${localstatedir}:g \
-   ${D}${systemd_system_unitdir}/weston.service
-   # Install weston-start script
-   install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
-   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
-   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+
+   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
+
if [ -n "${DEFAULTBACKEND}" ]; then
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182818): 
https://lists.openembedded.org/g/openembedded-core/message/182818
Mute This Topic: https://lists.openembedded.org/mt/99530143/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv2 3/3] weston-init: add profile to point users to global socket

2023-06-14 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add profile script to point users capable of interacting with the global
socket to it by default.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb  |  3 +++
 .../wayland/weston-init/weston-socket.sh  | 20 +++
 2 files changed, 23 insertions(+)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 9d892d58f2..1884b5d440 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -9,6 +9,7 @@ SRC_URI = "file://init \
file://weston.ini \
file://weston.service \
file://weston.socket \
+   file://weston-socket.sh \
file://weston-autologin \
file://weston-start"
 
@@ -39,6 +40,7 @@ do_install() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+   install -D -p -m0644 ${WORKDIR}/weston-socket.sh 
${D}${sysconfdir}/profile.d/weston-socket.sh
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -88,6 +90,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 
 FILES:${PN} += "\
 ${sysconfdir}/xdg/weston/weston.ini \
+${sysconfdir}/profile.d/weston-socket.sh \
 ${systemd_system_unitdir}/weston.service \
 ${systemd_system_unitdir}/weston.socket \
 ${sysconfdir}/default/weston \
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-socket.sh 
b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
new file mode 100755
index 00..86389d63a3
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# set weston variables for use with global weston socket
+global_socket="/run/wayland-0"
+if [ -e "$global_socket" ]; then
+   weston_group=$(stat -c "%G" "$global_socket")
+   if [ "$(id -u)" = "0" ]; then
+   export WAYLAND_DISPLAY="$global_socket"
+   else
+   case "$(groups "$USER")" in
+   *"$weston_group"*)
+   export WAYLAND_DISPLAY="$global_socket"
+   ;;
+   *)
+   ;;
+   esac
+   fi
+   unset weston_group
+fi
+unset global_socket
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182817): 
https://lists.openembedded.org/g/openembedded-core/message/182817
Mute This Topic: https://lists.openembedded.org/mt/99530142/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 4/6] weston-init: fix the mixed indentation

2023-06-14 Thread Randolph Sapp via lists.openembedded.org

On 6/14/23 03:08, Richard Purdie wrote:

On Tue, 2023-06-13 at 20:16 -0500, Randolph Sapp wrote:

On 6/12/23 14:46, Randolph Sapp via lists.openembedded.org wrote:

On 6/12/23 05:05, Alexander Kanavin wrote:

On Mon, 12 Jun 2023 at 11:58, Peter Kjellerstedt
 wrote:

Well that is of course an option, but then it may get messy if different
people have different preferences and start changing the indentation
back
and forth...


I suppose changing indentation needs to be justified by for example
achieving consistency in the same code block (as it does here, which
is fine), and it never should be mixed in with functional changes.
What I don't want is lots of empty code churn that doesn't actually
make things more readable than they already were, and is more or less
an exercise in pedantic neat freakery.

Alex


I frankly don't like the concept of mixed indentation in the same file,
let alone the same code block. The only thing really driving me to
change it here was the lack of git attributes to define the project
standard, nvim is attempting to enforce the 4 space standard from python
over the entirety of bitbake recipes (which I think is fairly sane), and
the variance of standard in this code block.

I have no preference. So long as there is a standard, I will bow to it.

Randolph



I noticed master didn't pick up any patches past this one. I take it you
want me to reformat this to the current tab shell block standard?


Yes please. I stopped there since at least at a quick glance it looked
mostly tab indented and this changed it to space which breaks the code
standard for oe-core. Whether we want to change that isn't something I
have the time/energy to get into right now. If I take it, I'm opening
the gates to many more such changes. There are views on both sides and
people get upset about various aspects of it, me included.

Cheers,

Richard



Alright. I'll fix this up and resubmit.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182815): 
https://lists.openembedded.org/g/openembedded-core/message/182815
Mute This Topic: https://lists.openembedded.org/mt/99441452/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 4/6] weston-init: fix the mixed indentation

2023-06-13 Thread Randolph Sapp via lists.openembedded.org

On 6/12/23 14:46, Randolph Sapp via lists.openembedded.org wrote:

On 6/12/23 05:05, Alexander Kanavin wrote:

On Mon, 12 Jun 2023 at 11:58, Peter Kjellerstedt
 wrote:

Well that is of course an option, but then it may get messy if different
people have different preferences and start changing the indentation 
back

and forth...


I suppose changing indentation needs to be justified by for example
achieving consistency in the same code block (as it does here, which
is fine), and it never should be mixed in with functional changes.
What I don't want is lots of empty code churn that doesn't actually
make things more readable than they already were, and is more or less
an exercise in pedantic neat freakery.

Alex


I frankly don't like the concept of mixed indentation in the same file, 
let alone the same code block. The only thing really driving me to 
change it here was the lack of git attributes to define the project 
standard, nvim is attempting to enforce the 4 space standard from python 
over the entirety of bitbake recipes (which I think is fairly sane), and 
the variance of standard in this code block.


I have no preference. So long as there is a standard, I will bow to it.

Randolph



I noticed master didn't pick up any patches past this one. I take it you 
want me to reformat this to the current tab shell block standard?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182728): 
https://lists.openembedded.org/g/openembedded-core/message/182728
Mute This Topic: https://lists.openembedded.org/mt/99441452/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 4/6] weston-init: fix the mixed indentation

2023-06-12 Thread Randolph Sapp via lists.openembedded.org

On 6/12/23 05:05, Alexander Kanavin wrote:

On Mon, 12 Jun 2023 at 11:58, Peter Kjellerstedt
 wrote:

Well that is of course an option, but then it may get messy if different
people have different preferences and start changing the indentation back
and forth...


I suppose changing indentation needs to be justified by for example
achieving consistency in the same code block (as it does here, which
is fine), and it never should be mixed in with functional changes.
What I don't want is lots of empty code churn that doesn't actually
make things more readable than they already were, and is more or less
an exercise in pedantic neat freakery.

Alex


I frankly don't like the concept of mixed indentation in the same file, 
let alone the same code block. The only thing really driving me to 
change it here was the lack of git attributes to define the project 
standard, nvim is attempting to enforce the 4 space standard from python 
over the entirety of bitbake recipes (which I think is fairly sane), and 
the variance of standard in this code block.


I have no preference. So long as there is a standard, I will bow to it.

Randolph

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182685): 
https://lists.openembedded.org/g/openembedded-core/message/182685
Mute This Topic: https://lists.openembedded.org/mt/99441452/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 6/6] weston-init: add profile to point users to global socket

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add profile script to point users capable of interacting with the global
socket to it by default.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb  |  3 +++
 .../wayland/weston-init/weston-socket.sh  | 20 +++
 2 files changed, 23 insertions(+)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 64f613ef8b..2797fea9e1 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -9,6 +9,7 @@ SRC_URI = "file://init \
file://weston.ini \
file://weston.service \
file://weston.socket \
+   file://weston-socket.sh \
file://weston-autologin \
file://weston-start"
 
@@ -39,6 +40,7 @@ do_install() {
 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
 install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
 install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+install -D -p -m0644 ${WORKDIR}/weston-socket.sh 
${D}${sysconfdir}/profile.d/weston-socket.sh
 sed -i -e s:/etc:${sysconfdir}:g \
 -e s:/usr/bin:${bindir}:g \
 -e s:/var:${localstatedir}:g \
@@ -88,6 +90,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 
 FILES:${PN} += "\
 ${sysconfdir}/xdg/weston/weston.ini \
+${sysconfdir}/profile.d/weston-socket.sh \
 ${systemd_system_unitdir}/weston.service \
 ${systemd_system_unitdir}/weston.socket \
 ${sysconfdir}/default/weston \
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-socket.sh 
b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
new file mode 100755
index 00..86389d63a3
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# set weston variables for use with global weston socket
+global_socket="/run/wayland-0"
+if [ -e "$global_socket" ]; then
+   weston_group=$(stat -c "%G" "$global_socket")
+   if [ "$(id -u)" = "0" ]; then
+   export WAYLAND_DISPLAY="$global_socket"
+   else
+   case "$(groups "$USER")" in
+   *"$weston_group"*)
+   export WAYLAND_DISPLAY="$global_socket"
+   ;;
+   *)
+   ;;
+   esac
+   fi
+   unset weston_group
+fi
+unset global_socket
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182601): 
https://lists.openembedded.org/g/openembedded-core/message/182601
Mute This Topic: https://lists.openembedded.org/mt/99441449/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 3/6] weston-init: add the weston user to the wayland group

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add the weston user to the wayland group so all users accessing the
global weston socket in /run all share a group.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 6d62993d7d..4fa302c833 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -93,6 +93,6 @@ FILES:${PN} += "\
 CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render weston"
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render,wayland weston"
 GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182606): 
https://lists.openembedded.org/g/openembedded-core/message/182606
Mute This Topic: https://lists.openembedded.org/mt/99441454/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 4/6] weston-init: fix the mixed indentation

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

I know my text editor is going to get angry at me if this continues.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 76 ++--
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 4fa302c833..01abd4ce78 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,44 +26,44 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
-if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
-   install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
-   sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
-fi
-   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
-   install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
-
-   # Install Weston systemd service and accompanying udev rule
-   install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-   install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
-if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
-   install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
-fi
-   sed -i -e s:/etc:${sysconfdir}:g \
-   -e s:/usr/bin:${bindir}:g \
-   -e s:/var:${localstatedir}:g \
-   ${D}${systemd_system_unitdir}/weston.service
-   # Install weston-start script
-   install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
-   sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
-   sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
-if [ -n "${DEFAULTBACKEND}" ]; then
-   sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
-   fi
-
-   if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
d)}" = "yes" ]; then
-   sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
-   fi
-
-   if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 
'no', d)}" = "yes" ]; then
-   sed -i -e "/^\[core\]/a idle-time=0" 
${D}${sysconfdir}/xdg/weston/weston.ini
-   fi
-
-   if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', 
d)}" = "yes" ]; then
-   sed -i -e "/^\[core\]/a use-pixman=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
-   fi
-
-   install -dm 755 -o weston -g weston ${D}/home/weston
+if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston
+fi
+install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
+
+# Install Weston systemd service and accompanying udev rule
+install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
+fi
+sed -i -e s:/etc:${sysconfdir}:g \
+-e s:/usr/bin:${bindir}:g \
+-e s:/var:${localstatedir}:g \
+${D}${systemd_system_unitdir}/weston.service
+# Install weston-start script
+install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
+sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+if [ -n "${DEFAULTBACKEND}" ]; then
+sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
+fi
+
+if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" 
= "yes" ]; then
+sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
+fi
+
+if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 
'no', d)}" = "yes" ]; then
+sed -i -e "/^\[core\]/a idle-time=0" 
${D}${sysconfdir}/xdg/weston/weston.ini
+fi
+
+if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', 
d)}" = "yes" ]; then
+sed -i -e "/^\[core\]/a use-pixman=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
+fi
+
+install -dm 755 -o weston -g weston ${D}/home/weston
 }
 
 INHIBIT_UPDATERCD_BBCLASS = 
"${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', 
d)}"
-- 
2.41.0



[OE-core][PATCH 1/6] weston-init: make sure the render group exists

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Add the render group explicitly here to make sure it exists for the
useradd command.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index a7adce7fda..b637fa6a4a 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -94,5 +94,5 @@ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/we
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
 USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input weston"
-GROUPADD_PARAM:${PN} = "-r wayland"
+GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182603): 
https://lists.openembedded.org/g/openembedded-core/message/182603
Mute This Topic: https://lists.openembedded.org/mt/99441451/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/6] weston-init: add weston user to the render group

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

The weston user must be in the render group in order to access render
device nodes for standard user-space graphics.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index b637fa6a4a..6d62993d7d 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -93,6 +93,6 @@ FILES:${PN} += "\
 CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini 
${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input weston"
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G 
video,input,render weston"
 GROUPADD_PARAM:${PN} = "-r wayland; -r render"
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182607): 
https://lists.openembedded.org/g/openembedded-core/message/182607
Mute This Topic: https://lists.openembedded.org/mt/99441455/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 0/6] weston-init: add extra config for weston global socket

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Cleaning up some parts of weston-init, adding guards to systemd init
scripts, making sure users are in the correct groups for interacting
with graphics devices and finally attempting to help direct users to the
global Wayland socket when they are allowed to interact with it.

The only functional change here is the addition of a profile script that
checks if the user is in the correct group to interact with the global
systemd socket at /run/wayland-0; if they are, then we set
WAYLAND_DISPLAY to point to that socket directly.

Randolph Sapp (6):
  weston-init: make sure the render group exists
  weston-init: add weston user to the render group
  weston-init: add the weston user to the wayland group
  weston-init: fix the mixed indentation
  weston-init: guard against systemd configs
  weston-init: add profile to point users to global socket

 meta/recipes-graphics/wayland/weston-init.bb  | 88 ++-
 .../wayland/weston-init/weston-socket.sh  | 20 +
 2 files changed, 68 insertions(+), 40 deletions(-)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh

-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182602): 
https://lists.openembedded.org/g/openembedded-core/message/182602
Mute This Topic: https://lists.openembedded.org/mt/99441450/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 5/6] weston-init: guard against systemd configs

2023-06-09 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Just as sysvinit scripts shouldn't be present in a distro using systemd,
systemd scripts shouldn't be present in a system not using systemd.

Signed-off-by: Randolph Sapp 
---
 meta/recipes-graphics/wayland/weston-init.bb | 29 
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 01abd4ce78..64f613ef8b 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -26,27 +26,32 @@ DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
 
 do_install() {
+# Install weston-start script
 if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
+sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' 
${D}${bindir}/weston-start
 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
 sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston
 fi
-install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
-install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
 # Install Weston systemd service and accompanying udev rule
-install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+install -D -p -m0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+install -D -p -m0644 ${WORKDIR}/weston.socket 
${D}${systemd_system_unitdir}/weston.socket
+sed -i -e s:/etc:${sysconfdir}:g \
+-e s:/usr/bin:${bindir}:g \
+-e s:/var:${localstatedir}:g \
+${D}${systemd_system_unitdir}/weston.service
+fi
+
 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
 install -D -p -m0644 ${WORKDIR}/weston-autologin 
${D}${sysconfdir}/pam.d/weston-autologin
 fi
-sed -i -e s:/etc:${sysconfdir}:g \
--e s:/usr/bin:${bindir}:g \
--e s:/var:${localstatedir}:g \
-${D}${systemd_system_unitdir}/weston.service
-# Install weston-start script
-install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
-sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
-sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+
+install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
+
 if [ -n "${DEFAULTBACKEND}" ]; then
 sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
 fi
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182605): 
https://lists.openembedded.org/g/openembedded-core/message/182605
Mute This Topic: https://lists.openembedded.org/mt/99441453/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 1/4] kernel-devicetree: allow specification of dtb directory

2023-05-26 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fedora/Redhat and Arch are somewhat standardized on their dtb directory
structure. Let's add some flags to configure yocto to mimic that
behavior.

Add the following variables to the kernel class:
- KERNEL_DTBDEST (controls the destination directory for dtbs)
- KERNEL_DTBVENDORED (controls if vendor subdirectories are to
  be respected)

Currently KERNEL_DTBDEST is expected to be a subdir of KERNEL_IMAGEDEST
and KERNEL_DTBVENDORED is expected to be "true"/"false". This only
applies to the package directory structure. The deploydir structure is
purposely left untouched for compatibility with existing recipes.

By default this is configured to behave the same as the current recipe
and produce a flat dtb directory at KERNEL_IMAGEDEST.

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 meta/classes/kernel-devicetree.bbclass | 22 +-
 meta/classes/kernel.bbclass|  2 ++
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass 
b/meta/classes/kernel-devicetree.bbclass
index b4338da1b13..11b57adc92c 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -6,7 +6,12 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb 
/${KERNEL_IMAGEDEST}/*.dtbo"
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
+/${KERNEL_DTBDEST}/*.dtb \
+/${KERNEL_DTBDEST}/*.dtbo \
+/${KERNEL_DTBDEST}/*/*.dtb \
+/${KERNEL_DTBDEST}/*/*.dtbo \
+"
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
@@ -67,12 +72,16 @@ do_compile:append() {
 }
 
 do_install:append() {
+   install -d ${D}/${KERNEL_DTBDEST}
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
-   dtb_ext=${dtb##*.}
-   dtb_base_name=`basename $dtb .$dtb_ext`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   install -m 0644 $dtb_path 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb_ext=${dtb##*.}
+   dtb_base_name=`basename $dtb .$dtb_ext`
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -Dm 0644 $dtb_path ${D}/${KERNEL_DTBDEST}/$dtb
done
 }
 
@@ -82,7 +91,10 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   install -m 0644 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext 
$deployDir/$dtb_base_name.$dtb_ext
fi
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d45fa25c32e..87dd46e6fa3 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -210,6 +210,8 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 # The directory where built kernel lies in the kernel tree
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
+KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
+KERNEL_DTBVENDORED ?= "false"
 
 #
 # configuration
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181783): 
https://lists.openembedded.org/g/openembedded-core/message/181783
Mute This Topic: https://lists.openembedded.org/mt/99160230/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 4/4] kernel-devicetree: recursively search for dtbs

2023-05-26 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Upstream's dtb directory structure has no real standard. They just tend
to idle around the 2/3 directory depth. Recursively search for the
dtb/dtbo files instead of assuming anything.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 meta/classes/kernel-devicetree.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass 
b/meta/classes/kernel-devicetree.bbclass
index e1e67cbc56c..18ab6b4c4ff 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -6,12 +6,12 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
+# recursivly search for devicetree files
 FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
-/${KERNEL_DTBDEST}/*.dtb \
-/${KERNEL_DTBDEST}/*.dtbo \
-/${KERNEL_DTBDEST}/*/*.dtb \
-/${KERNEL_DTBDEST}/*/*.dtbo \
+/${KERNEL_DTBDEST}/**/*.dtb \
+/${KERNEL_DTBDEST}/**/*.dtbo \
 "
+
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181785): 
https://lists.openembedded.org/g/openembedded-core/message/181785
Mute This Topic: https://lists.openembedded.org/mt/99160232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 3/4] package: enable recursion on file globs

2023-05-26 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Enable recursion of file globs. This just allows the use of '**' in file
globs to match 0 or more subdirectories, it should not make all current
globs recursive [1].

[1] https://docs.python.org/3.6/library/glob.html#glob.glob

Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 meta/classes/package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 67acc278d13..fed2f5531d3 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -262,7 +262,7 @@ def files_from_filevars(filevars):
 f = '.' + f
 if not f.startswith("./"):
 f = './' + f
-globbed = glob.glob(f)
+globbed = glob.glob(f, recursive=True)
 if globbed:
 if [ f ] != globbed:
 files += globbed
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181784): 
https://lists.openembedded.org/g/openembedded-core/message/181784
Mute This Topic: https://lists.openembedded.org/mt/99160231/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 2/4] kernel-devicetree: make shell scripts posix compliant

2023-05-26 Thread Randolph Sapp via lists.openembedded.org
From: Martin Jansa 

Use the notation suggested by Martin Jansa to avoid a bashism. Also
switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of
true/false.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Martin Jansa 
Signed-off-by: Randolph Sapp 
Signed-off-by: Alexandre Belloni 
---
 meta/classes/kernel-devicetree.bbclass | 4 ++--
 meta/classes/kernel.bbclass| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass 
b/meta/classes/kernel-devicetree.bbclass
index 11b57adc92c..e1e67cbc56c 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -76,7 +76,7 @@ do_install:append() {
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
dtb=$dtb_base_name.$dtb_ext
@@ -91,7 +91,7 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb=$dtb_base_name.$dtb_ext
fi
install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 87dd46e6fa3..3d5422b09ed 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -211,7 +211,7 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
 KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
-KERNEL_DTBVENDORED ?= "false"
+KERNEL_DTBVENDORED ?= "0"
 
 #
 # configuration
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181782): 
https://lists.openembedded.org/g/openembedded-core/message/181782
Mute This Topic: https://lists.openembedded.org/mt/99160225/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 0/4] kernel-devicetree: allow specification of dtb directory

2023-05-26 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Backporting all of the "kernel-devicetree: allow specification of dtb
directory" series and subsequent fixes to kirkstone. This still has the
same backwards compatibility originally advertised. It won't do anything
to the dtb structure unless you tell it to.

Let me know if you want these squashed or anything like that.

Martin Jansa (1):
  kernel-devicetree: make shell scripts posix compliant

Randolph Sapp (3):
  kernel-devicetree: allow specification of dtb directory
  package: enable recursion on file globs
  kernel-devicetree: recursively search for dtbs

 meta/classes/kernel-devicetree.bbclass | 22 +-
 meta/classes/kernel.bbclass|  2 ++
 meta/classes/package.bbclass   |  2 +-
 3 files changed, 20 insertions(+), 6 deletions(-)

-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181781): 
https://lists.openembedded.org/g/openembedded-core/message/181781
Mute This Topic: https://lists.openembedded.org/mt/99160224/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv3 3/3] kernel-devicetree: recursively search for dtbs

2023-05-22 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Upstream's dtb directory structure has no real standard. They just tend
to idle around the 2/3 directory depth. Recursively search for the
dtb/dtbo files instead of assuming anything.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Randolph Sapp 
---
 meta/classes-recipe/kernel-devicetree.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index 831fdd1527..b3bae32f9e 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,12 +12,12 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
+# recursivly search for devicetree files
 FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
-/${KERNEL_DTBDEST}/*.dtb \
-/${KERNEL_DTBDEST}/*.dtbo \
-/${KERNEL_DTBDEST}/*/*.dtb \
-/${KERNEL_DTBDEST}/*/*.dtbo \
+/${KERNEL_DTBDEST}/**/*.dtb \
+/${KERNEL_DTBDEST}/**/*.dtbo \
 "
+
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181616): 
https://lists.openembedded.org/g/openembedded-core/message/181616
Mute This Topic: https://lists.openembedded.org/mt/99074031/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv3 2/3] package: enable recursion on file globs

2023-05-22 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Enable recursion of file globs. This just allows the use of '**' in file
globs to match 0 or more subdirectories, it should not make all current
globs recursive [1].

[1] https://docs.python.org/3.6/library/glob.html#glob.glob

Signed-off-by: Randolph Sapp 
---
 meta/lib/oe/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index edb70daaf1..70040f09e7 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -550,7 +550,7 @@ def files_from_filevars(filevars):
 f = '.' + f
 if not f.startswith("./"):
 f = './' + f
-globbed = glob.glob(f)
+globbed = glob.glob(f, recursive=True)
 if globbed:
 if [ f ] != globbed:
 files += globbed
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181617): 
https://lists.openembedded.org/g/openembedded-core/message/181617
Mute This Topic: https://lists.openembedded.org/mt/99074032/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv3 0/3] Fix: allow specification of dtb directory

2023-05-22 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fix a few of the oddities introduced by the previous patch that allowed
specification of the DTB install directory and specification of vendor
directories in that directory.

Add a recursive search for dtb and dtbo files to make sure upstream dtb
directory standards don't break our packages. This is done by enabling
the recursive flag for all file globs. This shouldn't have any
performance issues for recipes that don't explicitly use '**' in their
globs.

Makes the kernel-devicetree class posix compliant again by using BB
variables more efficiently.

Martin Jansa (1):
  kernel-devicetree: make shell scripts posix compliant

Randolph Sapp (2):
  package: enable recursion on file globs
  kernel-devicetree: recursively search for dtbs

 meta/classes-recipe/kernel-devicetree.bbclass | 12 ++--
 meta/classes-recipe/kernel.bbclass|  2 +-
 meta/lib/oe/package.py|  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181614): 
https://lists.openembedded.org/g/openembedded-core/message/181614
Mute This Topic: https://lists.openembedded.org/mt/99074029/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv3 1/3] kernel-devicetree: make shell scripts posix compliant

2023-05-22 Thread Randolph Sapp via lists.openembedded.org
From: Martin Jansa 

Use the notation suggested by Martin Jansa to avoid a bashism. Also
switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of
true/false.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Martin Jansa 
Signed-off-by: Randolph Sapp 
---
 meta/classes-recipe/kernel-devicetree.bbclass | 4 ++--
 meta/classes-recipe/kernel.bbclass| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index a6c6c5f227..831fdd1527 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -82,7 +82,7 @@ do_install:append() {
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
dtb=$dtb_base_name.$dtb_ext
@@ -97,7 +97,7 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb=$dtb_base_name.$dtb_ext
fi
install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index 8f022b234d..4bce64cf6a 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -216,7 +216,7 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
 KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
-KERNEL_DTBVENDORED ?= "false"
+KERNEL_DTBVENDORED ?= "0"
 
 #
 # configuration
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181615): 
https://lists.openembedded.org/g/openembedded-core/message/181615
Mute This Topic: https://lists.openembedded.org/mt/99074030/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCHv2 2/2] kernel-devicetree: recursively search for dtbs

2023-05-22 Thread Randolph Sapp via lists.openembedded.org

On 5/22/23 11:59, Richard Purdie wrote:

On Mon, 2023-05-22 at 11:22 -0500, Randolph Sapp wrote:

On 5/22/23 03:00, Richard Purdie wrote:

On Fri, 2023-05-12 at 12:22 -0500, Randolph Sapp via
lists.openembedded.org wrote:

From: Randolph Sapp 

Upstream's dtb directory structure has no real standard. They just tend
to idle around the 2/3 directory depth. Recursively search for the
dtb/dtbo files instead of assuming anything.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Randolph Sapp 
---
   meta/classes-recipe/kernel-devicetree.bbclass | 21 +--
   1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index 831fdd1527..fa6de7a140 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,12 +12,21 @@ python () {
   d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
   }
   
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \

-/${KERNEL_DTBDEST}/*.dtb \
-/${KERNEL_DTBDEST}/*.dtbo \
-/${KERNEL_DTBDEST}/*/*.dtb \
-/${KERNEL_DTBDEST}/*/*.dtbo \
-"
+# recursivly search for devicetree files
+def find_device_trees(d):
+import glob
+import os
+
+file_paths = []
+dest_dir = d.getVar('D')
+full_dtb_dir = dest_dir + '/' + d.getVar('KERNEL_DTBDEST')
+
+for file in glob.glob(full_dtb_dir + '/**/*.dtb*', recursive=True):
+file_paths.append('/' + os.path.relpath(file, dest_dir))
+
+return ' '.join(file_paths)
+
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = "${@find_device_trees(d)}"
   FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"


I suspect this still suffers from a determinism problem as the previous
patch did but now it depends on whether the build had occurred or not.

I also really don't like resorting to python functions like this,
they're horrible for performance overhead. I did wonder if:

FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_DTBDEST}/**/*.dtb*"

would work?


Tried that first. Unfortunately bitbake doesn't enable the recursive
option in it's path globs. That would be too easy...


I wonder if we should do something like:

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index edb70daaf17..70040f09e7c 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -550,7 +550,7 @@ def files_from_filevars(filevars):
  f = '.' + f
  if not f.startswith("./"):
  f = './' + f
-globbed = glob.glob(f)
+globbed = glob.glob(f, recursive=True)
  if globbed:
  if [ f ] != globbed:
  files += globbed

we now have the right minimum python version for that. My main concern
would be potential any performance implications.


This should not be an issue. Recursive=true just enables the 
interpretation of **, it *shouldn't* add extra recursion to any of the 
existing recipes... That being said, I've been wrong before.





Also, are there automated tests we should be adding to catch bugs like
this?


Unsure. I haven't looked into automated tests for yocto recipes yet. If
you know of some docs for whatever OE-core is doing, feel free to shoot
them my way.


oe-selftest -r 

where you can see the test cases in lib/oeqa/selftest/cases/

but I'm not seeing much for devicetree specifically. We should have
some!

Cheers,

Richard






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181613): 
https://lists.openembedded.org/g/openembedded-core/message/181613
Mute This Topic: https://lists.openembedded.org/mt/98853893/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCHv2 2/2] kernel-devicetree: recursively search for dtbs

2023-05-22 Thread Randolph Sapp via lists.openembedded.org

On 5/22/23 03:00, Richard Purdie wrote:

On Fri, 2023-05-12 at 12:22 -0500, Randolph Sapp via
lists.openembedded.org wrote:

From: Randolph Sapp 

Upstream's dtb directory structure has no real standard. They just tend
to idle around the 2/3 directory depth. Recursively search for the
dtb/dtbo files instead of assuming anything.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Randolph Sapp 
---
  meta/classes-recipe/kernel-devicetree.bbclass | 21 +--
  1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index 831fdd1527..fa6de7a140 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,12 +12,21 @@ python () {
  d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
  }
  
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \

-/${KERNEL_DTBDEST}/*.dtb \
-/${KERNEL_DTBDEST}/*.dtbo \
-/${KERNEL_DTBDEST}/*/*.dtb \
-/${KERNEL_DTBDEST}/*/*.dtbo \
-"
+# recursivly search for devicetree files
+def find_device_trees(d):
+import glob
+import os
+
+file_paths = []
+dest_dir = d.getVar('D')
+full_dtb_dir = dest_dir + '/' + d.getVar('KERNEL_DTBDEST')
+
+for file in glob.glob(full_dtb_dir + '/**/*.dtb*', recursive=True):
+file_paths.append('/' + os.path.relpath(file, dest_dir))
+
+return ' '.join(file_paths)
+
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = "${@find_device_trees(d)}"
  FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"


I suspect this still suffers from a determinism problem as the previous
patch did but now it depends on whether the build had occurred or not.

I also really don't like resorting to python functions like this,
they're horrible for performance overhead. I did wonder if:

FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_DTBDEST}/**/*.dtb*"

would work?


Tried that first. Unfortunately bitbake doesn't enable the recursive 
option in it's path globs. That would be too easy...




Also, are there automated tests we should be adding to catch bugs like
this?


Unsure. I haven't looked into automated tests for yocto recipes yet. If 
you know of some docs for whatever OE-core is doing, feel free to shoot 
them my way.




Cheers,

Richard




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181599): 
https://lists.openembedded.org/g/openembedded-core/message/181599
Mute This Topic: https://lists.openembedded.org/mt/98853893/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv2 0/2] Fix: allow specification of dtb directory

2023-05-12 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fix a few of the oddities introduced by the previous patch that allowed
specification of the DTB install directory and specification of vendor
directories in that directory.

Add a recursive search for dtb and dtbo files to make sure upstream dtb
directory standards don't break our packages. This uses a seperate
function to avoid metadata changes as reported with the previous
revision [1].

Makes the kernel-devicetree class posix compliant again by using BB
variables more efficiently.

[1] https://lists.openembedded.org/g/openembedded-core/message/181157

Martin Jansa (1):
  kernel-devicetree: make shell scripts posix compliant

Randolph Sapp (1):
  kernel-devicetree: recursively search for dtbs

 meta/classes-recipe/kernel-devicetree.bbclass | 25 +--
 meta/classes-recipe/kernel.bbclass|  2 +-
 2 files changed, 18 insertions(+), 9 deletions(-)

-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181189): 
https://lists.openembedded.org/g/openembedded-core/message/181189
Mute This Topic: https://lists.openembedded.org/mt/98853890/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv2 1/2] kernel-devicetree: make shell scripts posix compliant

2023-05-12 Thread Randolph Sapp via lists.openembedded.org
From: Martin Jansa 

Use the notation suggested by Martin Jansa to avoid a bashism. Also
switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of
true/false.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Martin Jansa 
Signed-off-by: Randolph Sapp 
---
 meta/classes-recipe/kernel-devicetree.bbclass | 4 ++--
 meta/classes-recipe/kernel.bbclass| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index a6c6c5f227..831fdd1527 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -82,7 +82,7 @@ do_install:append() {
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
dtb=$dtb_base_name.$dtb_ext
@@ -97,7 +97,7 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb=$dtb_base_name.$dtb_ext
fi
install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index 8f022b234d..4bce64cf6a 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -216,7 +216,7 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
 KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
-KERNEL_DTBVENDORED ?= "false"
+KERNEL_DTBVENDORED ?= "0"
 
 #
 # configuration
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181190): 
https://lists.openembedded.org/g/openembedded-core/message/181190
Mute This Topic: https://lists.openembedded.org/mt/98853892/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCHv2 2/2] kernel-devicetree: recursively search for dtbs

2023-05-12 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Upstream's dtb directory structure has no real standard. They just tend
to idle around the 2/3 directory depth. Recursively search for the
dtb/dtbo files instead of assuming anything.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Randolph Sapp 
---
 meta/classes-recipe/kernel-devicetree.bbclass | 21 +--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index 831fdd1527..fa6de7a140 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,12 +12,21 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
-/${KERNEL_DTBDEST}/*.dtb \
-/${KERNEL_DTBDEST}/*.dtbo \
-/${KERNEL_DTBDEST}/*/*.dtb \
-/${KERNEL_DTBDEST}/*/*.dtbo \
-"
+# recursivly search for devicetree files
+def find_device_trees(d):
+import glob
+import os
+
+file_paths = []
+dest_dir = d.getVar('D')
+full_dtb_dir = dest_dir + '/' + d.getVar('KERNEL_DTBDEST')
+
+for file in glob.glob(full_dtb_dir + '/**/*.dtb*', recursive=True):
+file_paths.append('/' + os.path.relpath(file, dest_dir))
+
+return ' '.join(file_paths)
+
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = "${@find_device_trees(d)}"
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181191): 
https://lists.openembedded.org/g/openembedded-core/message/181191
Mute This Topic: https://lists.openembedded.org/mt/98853893/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 0/2] Fix: allow specification of dtb directory

2023-05-12 Thread Randolph Sapp via lists.openembedded.org

On 5/12/23 10:06, Alexandre Belloni wrote:

Hello,

This caused the following failures on the AB:

https://autobuilder.yoctoproject.org/typhoon/#/builders/113/builds/3986/steps/13/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/5176/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5167/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/7160/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/106/builds/6067/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/1406/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/5126/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/5205/steps/14/logs/stdio


2023-05-12 09:01:46,475 - oe-selftest - INFO - 
fitimage.FitImageTests.test_initramfs_bundle (subunit.RemotedTestCase)
2023-05-12 09:01:46,476 - oe-selftest - INFO -  ... FAIL

and

ERROR: When reparsing 
/home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-kernel/linux/linux-yocto_6.1.bb:do_package,
 the basehash value changed from 
856d8373327180fa74e88cff2bbc28b82eb24fb635dc7d3ac16d7a2b7d89ff2e to 
d2b77c38850e4954edc1422022fb0dbd307742cf2eafac6d8ae699d03d2ce13b. The metadata 
is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-yocto -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-yocto -cdo_package -Sprintdiff



Right you are. Expect a v2 using a specialized function to avoid the 
metadata change in a minute.



On 11/05/2023 16:36:12-0500, Randolph Sapp via lists.openembedded.org wrote:

From: Randolph Sapp 

Fix a few of the oddities introduced by the previous patch that allowed
specification of the DTB install directory and specification of vendor
directories in that directory.

Add a recursive search for dtb and dtbo files to make sure
upstream dtb directory standards don't break our packages.

Makes the kernel-devicetree class posix compliant again by using BB
variables more efficiently.

Martin Jansa (1):
   kernel-devicetree: make shell scripts posix compliant

Randolph Sapp (1):
   kernel-devicetree: recursively search for dtbs

  meta/classes-recipe/kernel-devicetree.bbclass | 26 +--
  meta/classes-recipe/kernel.bbclass|  2 +-
  2 files changed, 19 insertions(+), 9 deletions(-)

--
2.40.1













-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181188): 
https://lists.openembedded.org/g/openembedded-core/message/181188
Mute This Topic: https://lists.openembedded.org/mt/98837534/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 0/2] Fix: allow specification of dtb directory

2023-05-11 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fix a few of the oddities introduced by the previous patch that allowed
specification of the DTB install directory and specification of vendor
directories in that directory.

Add a recursive search for dtb and dtbo files to make sure
upstream dtb directory standards don't break our packages.

Makes the kernel-devicetree class posix compliant again by using BB
variables more efficiently.

Martin Jansa (1):
  kernel-devicetree: make shell scripts posix compliant

Randolph Sapp (1):
  kernel-devicetree: recursively search for dtbs

 meta/classes-recipe/kernel-devicetree.bbclass | 26 +--
 meta/classes-recipe/kernel.bbclass|  2 +-
 2 files changed, 19 insertions(+), 9 deletions(-)

-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181157): 
https://lists.openembedded.org/g/openembedded-core/message/181157
Mute This Topic: https://lists.openembedded.org/mt/98837534/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/2] kernel-devicetree: recursively search for dtbs

2023-05-11 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Upstream's dtb directory structure has no real standard. They just tend
to idle around the 2/3 directory depth. Recursively search for the
dtb/dtbo files instead of assuming anything.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Randolph Sapp 
---
 meta/classes-recipe/kernel-devicetree.bbclass | 22 ++-
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index 831fdd1527..1beaedfb44 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,12 +12,22 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
-/${KERNEL_DTBDEST}/*.dtb \
-/${KERNEL_DTBDEST}/*.dtbo \
-/${KERNEL_DTBDEST}/*/*.dtb \
-/${KERNEL_DTBDEST}/*/*.dtbo \
-"
+# recursivly search for devicetree files
+python () {
+import glob
+import os
+
+file_paths = []
+dest_dir = d.getVar('D')
+full_dtb_dir = dest_dir + '/' + d.getVar('KERNEL_DTBDEST')
+
+for file in glob.glob(full_dtb_dir + '/**/*.dtb*', recursive=True):
+file_paths.append('/' + os.path.relpath(file, dest_dir))
+
+d.appendVar("FILES:" + d.getVar("KERNEL_PACKAGE_NAME") + '-devicetree',
+' '+' '.join(file_paths))
+}
+
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181158): 
https://lists.openembedded.org/g/openembedded-core/message/181158
Mute This Topic: https://lists.openembedded.org/mt/98837535/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2] kernel-devicetree: make shell scripts posix compliant

2023-05-11 Thread Randolph Sapp via lists.openembedded.org
From: Martin Jansa 

Use the notation suggested by Martin Jansa to avoid a bashism. Also
switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of
true/false.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Martin Jansa 
Signed-off-by: Randolph Sapp 
---
 meta/classes-recipe/kernel-devicetree.bbclass | 4 ++--
 meta/classes-recipe/kernel.bbclass| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index a6c6c5f227..831fdd1527 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -82,7 +82,7 @@ do_install:append() {
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
dtb=$dtb_base_name.$dtb_ext
@@ -97,7 +97,7 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   if "${@'false' if 
oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
dtb=$dtb_base_name.$dtb_ext
fi
install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index 8f022b234d..4bce64cf6a 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -216,7 +216,7 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
 KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
-KERNEL_DTBVENDORED ?= "false"
+KERNEL_DTBVENDORED ?= "0"
 
 #
 # configuration
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181156): 
https://lists.openembedded.org/g/openembedded-core/message/181156
Mute This Topic: https://lists.openembedded.org/mt/98837532/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] kernel-devicetree: allow specification of dtb directory

2023-05-08 Thread Randolph Sapp via lists.openembedded.org

On 5/8/23 13:32, Denys Dmytriyenko wrote:

On Mon, May 08, 2023 at 02:18:57PM -0400, Denys Dmytriyenko wrote:

On Mon, May 08, 2023 at 01:13:58PM -0500, Randolph Sapp wrote:

On 5/8/23 01:13, Peter Kjellerstedt wrote:

That is most certainly a good alternative.

//Peter

*From:*Martin Jansa 
*Sent:* den 8 maj 2023 00:20
*To:* Peter Kjellerstedt 
*Cc:* r...@ti.com; a...@ti.com; detheri...@ti.com; reat...@ti.com;
de...@denix.org; alexandre.bell...@bootlin.com;
openembedded-core@lists.openembedded.org
*Subject:* Re: [OE-core][PATCH] kernel-devicetree: allow
specification of dtb directory

or

if "${@'true' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED'))
else 'false'} 
";
then

to avoid test as well (like systemd recipes is using) and I did
here as well in:

https://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/master=e2a6da5202a6671113758f9746ddbd8141a75757
 


On Sun, May 7, 2023 at 10:49 PM Peter Kjellerstedt
mailto:peter.kjellerst...@axis.com>>
wrote:

[ Outlook does not support commenting inline for HTML mails, thus
I’m top posting…]

The problem is `==`, which is a bashism. POSIX shells (like dash)
only support `=`. When it comes to quoting, you typically want to
quote shell variables in tests in case they are empty. OTOH, static
strings without whitespace or other special characters do not need
quoting. So the correct way to write the if statements is:

    if [ "${KERNEL_DTBVENDORED}" = false ]; then

(In this case it is actually a bitbake variable being quoted, but
unless you can guarantee it is not empty, the same rule applies.)

//Peter






Ah, my bad. I need to figure out a way to get shellcheck to run on
bash blocks in bb recipes. Would save everyone some time. I'll
submit a V2 with your modifications Martin!


No V2 - it already got merged into master. Moreover, due to this oversight, it
defaults to "vendored" DT install in some builds, where bash is not the system
shell...

We should merge Martin's fix from his contrib tree ASAP.


BTW, there are other nuisances with this change:

https://patchwork.yoctoproject.org/project/ti/patch/20230508181551.2404141-1-de...@denix.org/

Not sure how common the use of third level in KERNEL_DTBDEST dir structure is,
maybe we should add a third level generic glob to OE-Core to be safe...



May just be a better idea to have a python / bash function to find all 
related files recursively. Technically there is no set depth to the 
kernel dtb structure. They just tend to idle around 2/3.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181026): 
https://lists.openembedded.org/g/openembedded-core/message/181026
Mute This Topic: https://lists.openembedded.org/mt/98709532/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] kernel-devicetree: allow specification of dtb directory

2023-05-08 Thread Randolph Sapp via lists.openembedded.org

On 5/8/23 01:13, Peter Kjellerstedt wrote:

That is most certainly a good alternative.

//Peter

*From:*Martin Jansa 
*Sent:* den 8 maj 2023 00:20
*To:* Peter Kjellerstedt 
*Cc:* r...@ti.com; a...@ti.com; detheri...@ti.com; reat...@ti.com; 
de...@denix.org; alexandre.bell...@bootlin.com; 
openembedded-core@lists.openembedded.org
*Subject:* Re: [OE-core][PATCH] kernel-devicetree: allow specification 
of dtb directory


or

if "${@'true' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 
'false'} 
<mailto:$%7b@'true'%20if%20oe.types.boolean(d.getVar('KERNEL_DTBVENDORED'))%20else%20'false'%7d>"; then


to avoid test as well (like systemd recipes is using) and I did here as 
well in:


https://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/master=e2a6da5202a6671113758f9746ddbd8141a75757
 
<https://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/master=e2a6da5202a6671113758f9746ddbd8141a75757>

On Sun, May 7, 2023 at 10:49 PM Peter Kjellerstedt 
mailto:peter.kjellerst...@axis.com>> wrote:


[ Outlook does not support commenting inline for HTML mails, thus
I’m top posting…]

The problem is `==`, which is a bashism. POSIX shells (like dash)
only support `=`. When it comes to quoting, you typically want to
quote shell variables in tests in case they are empty. OTOH, static
strings without whitespace or other special characters do not need
quoting. So the correct way to write the if statements is:

    if [ "${KERNEL_DTBVENDORED}" = false ]; then

(In this case it is actually a bitbake variable being quoted, but
unless you can guarantee it is not empty, the same rule applies.)

//Peter

*From:*openembedded-core@lists.openembedded.org
<mailto:openembedded-core@lists.openembedded.org>
mailto:openembedded-core@lists.openembedded.org>> *On Behalf Of
*Martin Jansa
*Sent:* den 6 maj 2023 11:10
*To:* r...@ti.com <mailto:r...@ti.com>
*Cc:* a...@ti.com <mailto:a...@ti.com>; detheri...@ti.com
<mailto:detheri...@ti.com>; reat...@ti.com <mailto:reat...@ti.com>;
de...@denix.org <mailto:de...@denix.org>;
alexandre.bell...@bootlin.com
<mailto:alexandre.bell...@bootlin.com>;
openembedded-core@lists.openembedded.org
<mailto:openembedded-core@lists.openembedded.org>
*Subject:* Re: [OE-core][PATCH] kernel-devicetree: allow
    specification of dtb directory

On Fri, May 5, 2023 at 6:38 PM Randolph Sapp via
lists.openembedded.org <http://lists.openembedded.org>
mailto:ti@lists.openembedded.org>> wrote:

From: Randolph Sapp mailto:r...@ti.com>>

Fedora/Redhat and Arch are somewhat standardized on their dtb
directory
structure. Let's add some flags to configure yocto to mimic that
behavior.

Add the following variables to the kernel class:
         - KERNEL_DTBDEST (controls the destination directory
for dtbs)
         - KERNEL_DTBVENDORED (controls if vendor subdirectories
are to
           be respected)

Currently KERNEL_DTBDEST is expected to be a subdir of
KERNEL_IMAGEDEST
and KERNEL_DTBVENDORED is expected to be "true"/"false". This only
applies to the package directory structure. The deploydir
structure is
purposely left untouched for compatibility with existing recipes.

By default this is configured to behave the same as the current
recipe
and produce a flat dtb directory at KERNEL_IMAGEDEST.

Signed-off-by: Randolph Sapp mailto:r...@ti.com>>
---

Well, suppose I was breaking things by submitting this to kirkstone
first. This is just the master version of the following patchset:
https://lists.openembedded.org/g/openembedded-core/message/180754 
<https://lists.openembedded.org/g/openembedded-core/message/180754>

I'd love to get that series merged as well if this patch is
acceptable.

  meta/classes-recipe/kernel-devicetree.bbclass | 22
++-
  meta/classes-recipe/kernel.bbclass            |  2 ++
  2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass
b/meta/classes-recipe/kernel-devicetree.bbclass
index 4d0ecb1032..a6c6c5f227 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
...

-               dtb_base_name=`basename $dtb .$dtb_ext`
                 dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-               install -m 0644 $dtb_path
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
+               if [ ${KERNEL_DTB

[OE-core][PATCH] kernel-devicetree: allow specification of dtb directory

2023-05-05 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fedora/Redhat and Arch are somewhat standardized on their dtb directory
structure. Let's add some flags to configure yocto to mimic that
behavior.

Add the following variables to the kernel class:
- KERNEL_DTBDEST (controls the destination directory for dtbs)
- KERNEL_DTBVENDORED (controls if vendor subdirectories are to
  be respected)

Currently KERNEL_DTBDEST is expected to be a subdir of KERNEL_IMAGEDEST
and KERNEL_DTBVENDORED is expected to be "true"/"false". This only
applies to the package directory structure. The deploydir structure is
purposely left untouched for compatibility with existing recipes.

By default this is configured to behave the same as the current recipe
and produce a flat dtb directory at KERNEL_IMAGEDEST.

Signed-off-by: Randolph Sapp 
---

Well, suppose I was breaking things by submitting this to kirkstone
first. This is just the master version of the following patchset:
https://lists.openembedded.org/g/openembedded-core/message/180754

I'd love to get that series merged as well if this patch is acceptable.

 meta/classes-recipe/kernel-devicetree.bbclass | 22 ++-
 meta/classes-recipe/kernel.bbclass|  2 ++
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/meta/classes-recipe/kernel-devicetree.bbclass 
b/meta/classes-recipe/kernel-devicetree.bbclass
index 4d0ecb1032..a6c6c5f227 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,7 +12,12 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb 
/${KERNEL_IMAGEDEST}/*.dtbo"
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
+/${KERNEL_DTBDEST}/*.dtb \
+/${KERNEL_DTBDEST}/*.dtbo \
+/${KERNEL_DTBDEST}/*/*.dtb \
+/${KERNEL_DTBDEST}/*/*.dtbo \
+"
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
@@ -73,12 +78,16 @@ do_compile:append() {
 }
 
 do_install:append() {
+   install -d ${D}/${KERNEL_DTBDEST}
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
-   dtb_ext=${dtb##*.}
-   dtb_base_name=`basename $dtb .$dtb_ext`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   install -m 0644 $dtb_path 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb_ext=${dtb##*.}
+   dtb_base_name=`basename $dtb .$dtb_ext`
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -Dm 0644 $dtb_path ${D}/${KERNEL_DTBDEST}/$dtb
done
 }
 
@@ -88,7 +97,10 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   install -m 0644 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext 
$deployDir/$dtb_base_name.$dtb_ext
fi
diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index e634eabd49..8f022b234d 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -215,6 +215,8 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 # The directory where built kernel lies in the kernel tree
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
+KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
+KERNEL_DTBVENDORED ?= "false"
 
 #
 # configuration
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180956): 
https://lists.openembedded.org/g/openembedded-core/message/180956
Mute This Topic: https://lists.openembedded.org/mt/98709532/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-05-02 Thread Randolph Sapp via lists.openembedded.org

On 5/2/23 18:02, Denys Dmytriyenko wrote:

On Wed, Apr 26, 2023 at 02:06:59AM -0700, Paresh Bhagat via 
lists.openembedded.org wrote:

Hi Randolph

I tested your patch in my local kirkstone build for am62x. SD Card boot is 
working.
Boot logs here: http://serenity.dal.design.ti.com:/ewakutoqom.yaml


This is an internal-only resource ^^^
Since you are both TI-ers, don't you think there's a better way to communicate
this information rather than using a public mailing list? :)

I was hopping to get a tested-by tag here but I guess that was lost 
somewhere in the communication chain. I already knew this patch worked :)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180779): 
https://lists.openembedded.org/g/openembedded-core/message/180779
Mute This Topic: https://lists.openembedded.org/mt/98420230/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCHv2] kernel-devicetree: allow specification of dtb directory

2023-05-02 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fedora/Redhat and Arch are somewhat standardized on their dtb directory
structure. Let's add some flags to configure yocto to mimic that
behavior.

Add the following variables to the kernel class:
- KERNEL_DTBDEST (controls the destination directory for dtbs)
- KERNEL_DTBVENDORED (controls if vendor subdirectories are to
  be respected)

Currently KERNEL_DTBDEST is expected to be a subdir of KERNEL_IMAGEDEST
and KERNEL_DTBVENDORED is expected to be "true"/"false". This only
applies to the package directory structure. The deploydir structure is
purposely left untouched for compatibility with existing recipes.

By default this is configured to behave the same as the current recipe
and produce a flat dtb directory at KERNEL_IMAGEDEST.

Signed-off-by: Randolph Sapp 
---

This is currently being submitted against kirkstone because we're slow.
Expect a rebased version for master if this is acceptable. Should be
safe for kirkstone as it doesn't change the current behavior. It just
allows for extra configuration.

Ugh. Sorry about that. Send-email dropped my prefixes in the first
email. This version just fixes that.

 meta/classes/kernel-devicetree.bbclass | 22 +-
 meta/classes/kernel.bbclass|  2 ++
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass 
b/meta/classes/kernel-devicetree.bbclass
index b4338da1b13..11b57adc92c 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -6,7 +6,12 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb 
/${KERNEL_IMAGEDEST}/*.dtbo"
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
+/${KERNEL_DTBDEST}/*.dtb \
+/${KERNEL_DTBDEST}/*.dtbo \
+/${KERNEL_DTBDEST}/*/*.dtb \
+/${KERNEL_DTBDEST}/*/*.dtbo \
+"
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
@@ -67,12 +72,16 @@ do_compile:append() {
 }
 
 do_install:append() {
+   install -d ${D}/${KERNEL_DTBDEST}
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
-   dtb_ext=${dtb##*.}
-   dtb_base_name=`basename $dtb .$dtb_ext`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   install -m 0644 $dtb_path 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb_ext=${dtb##*.}
+   dtb_base_name=`basename $dtb .$dtb_ext`
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -Dm 0644 $dtb_path ${D}/${KERNEL_DTBDEST}/$dtb
done
 }
 
@@ -82,7 +91,10 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   install -m 0644 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext 
$deployDir/$dtb_base_name.$dtb_ext
fi
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b315737fd2f..3e3ac2d47d0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -210,6 +210,8 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 # The directory where built kernel lies in the kernel tree
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
+KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
+KERNEL_DTBVENDORED ?= "false"
 
 #
 # configuration
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180754): 
https://lists.openembedded.org/g/openembedded-core/message/180754
Mute This Topic: https://lists.openembedded.org/mt/98643483/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel-devicetree: allow specification of dtb directory

2023-05-02 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

Fedora/Redhat and Arch are somewhat standardized on their dtb directory
structure. Let's add some flags to configure yocto to mimic that
behavior.

Add the following variables to the kernel class:
- KERNEL_DTBDEST (controls the destination directory for dtbs)
- KERNEL_DTBVENDORED (controls if vendor subdirectories are to
  be respected)

Currently KERNEL_DTBDEST is expected to be a subdir of KERNEL_IMAGEDEST
and KERNEL_DTBVENDORED is expected to be "true"/"false". This only
applies to the package directory structure. The deploydir structure is
purposely left untouched for compatibility with existing recipes.

By default this is configured to behave the same as the current recipe
and produce a flat dtb directory at KERNEL_IMAGEDEST.

Signed-off-by: Randolph Sapp 
---

This is currently being submitted against kirkstone because we're slow.
Expect a rebased version for master if this is acceptable. Should be
safe for kirkstone as it doesn't change the current behavior. It just
allows for extra configuration.

 meta/classes/kernel-devicetree.bbclass | 22 +-
 meta/classes/kernel.bbclass|  2 ++
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass 
b/meta/classes/kernel-devicetree.bbclass
index b4338da1b13..11b57adc92c 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -6,7 +6,12 @@ python () {
 d.appendVar("PACKAGES", " 
${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
-FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb 
/${KERNEL_IMAGEDEST}/*.dtbo"
+FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
+/${KERNEL_DTBDEST}/*.dtb \
+/${KERNEL_DTBDEST}/*.dtbo \
+/${KERNEL_DTBDEST}/*/*.dtb \
+/${KERNEL_DTBDEST}/*/*.dtbo \
+"
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = 
"/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
@@ -67,12 +72,16 @@ do_compile:append() {
 }
 
 do_install:append() {
+   install -d ${D}/${KERNEL_DTBDEST}
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
-   dtb_ext=${dtb##*.}
-   dtb_base_name=`basename $dtb .$dtb_ext`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-   install -m 0644 $dtb_path 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb_ext=${dtb##*.}
+   dtb_base_name=`basename $dtb .$dtb_ext`
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -Dm 0644 $dtb_path ${D}/${KERNEL_DTBDEST}/$dtb
done
 }
 
@@ -82,7 +91,10 @@ do_deploy:append() {
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
install -d $deployDir
-   install -m 0644 
${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
+   if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+   dtb=$dtb_base_name.$dtb_ext
+   fi
+   install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb 
$deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext 
$deployDir/$dtb_base_name.$dtb_ext
fi
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b315737fd2f..3e3ac2d47d0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -210,6 +210,8 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 # The directory where built kernel lies in the kernel tree
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
+KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
+KERNEL_DTBVENDORED ?= "false"
 
 #
 # configuration
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180753): 
https://lists.openembedded.org/g/openembedded-core/message/180753
Mute This Topic: https://lists.openembedded.org/mt/98643437/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-05-01 Thread Randolph Sapp via lists.openembedded.org
From: Randolph Sapp 

This is a bit of a compatibility issue more than anything. Some devices
get upset if the FAT file system contains less blocks than the
partition.

The fixed-size argument is currently respected by the partition creation
step but not by the file system creation step. Let's make it so the file
system respects this value as well.

Signed-off-by: Randolph Sapp 
---

This fix is already available in master but we'd like to backport it to
kirkstone if possible! Considering it's a compatibility fix it should be
applicable to other branches as well, but we only really care about
Kirkstone at the moment.

 scripts/lib/wic/plugins/source/bootimg-efi.py | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index d6aeab2aad..43c6fd94d9 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -439,6 +439,13 @@ class BootimgEFIPlugin(SourcePlugin):
 logger.debug("Added %d extra blocks to %s to get to %d total blocks",
  extra_blocks, part.mountpoint, blocks)
 
+# required for compatibility with certain devices expecting file system
+# block count to be equal to partition block count
+if blocks < part.fixed_size:
+blocks = part.fixed_size
+logger.debug("Overriding %s to %d total blocks for compatibility",
+ part.mountpoint, blocks)
+
 # dosfs image, created by mkdosfs
 bootimg = "%s/boot.img" % cr_workdir
 
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180586): 
https://lists.openembedded.org/g/openembedded-core/message/180586
Mute This Topic: https://lists.openembedded.org/mt/98618867/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-04-24 Thread Randolph Sapp via lists.openembedded.org

On 4/24/23 03:48, Luca Ceresoli wrote:

Hello Randolph,

On Fri, 21 Apr 2023 16:26:13 -0500
"Randolph Sapp via lists.openembedded.org"
 wrote:
  

As you can see your sender address has been mangled, and as a result
the patch is rejected by the the openembedded git server. This is not
your fault, but we need you to modify your git configuration to prevent
this from happening in the future. Have a look at the wiki for more
info and how to solve that:


Ah! Thanks for the heads up. I've just adjust my configs.


https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Fixing_your_From_identity

I'm taking your patch for testing on the autobuilders, fixing it
manually so you don't need to resend your patch this time.

Best regards,
Luca


Cool, thanks!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180358): 
https://lists.openembedded.org/g/openembedded-core/message/180358
Mute This Topic: https://lists.openembedded.org/mt/98420230/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-04-21 Thread Randolph Sapp via lists.openembedded.org

On 4/21/23 16:10, Randolph Sapp via lists.openembedded.org wrote:

This is a bit of a compatibility issue more than anything. Some devices
get upset if the FAT file system contains less blocks than the
partition.

The fixed-size argument is currently respected by the partition creation
step but not by the file system creation step. Let's make it so the file
system respects this value as well.

Signed-off-by: Randolph Sapp 
---
  scripts/lib/wic/plugins/source/bootimg-efi.py | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index a65a5b9780..15557e5d36 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -387,6 +387,9 @@ class BootimgEFIPlugin(SourcePlugin):
  
  blocks += extra_blocks
  
+if blocks < part.fixed_size:

+blocks = part.fixed_size
+
  logger.debug("Added %d extra blocks to %s to get to %d total blocks",
   extra_blocks, part.mountpoint, blocks)
  








Just realized I stepped on a log message. v2 to fix that.

https://lists.openembedded.org/g/openembedded-core/message/180298

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180299): 
https://lists.openembedded.org/g/openembedded-core/message/180299
Mute This Topic: https://lists.openembedded.org/mt/98419903/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-04-21 Thread Randolph Sapp via lists.openembedded.org
This is a bit of a compatibility issue more than anything. Some devices
get upset if the FAT file system contains less blocks than the
partition.

The fixed-size argument is currently respected by the partition creation
step but not by the file system creation step. Let's make it so the file
system respects this value as well.

Signed-off-by: Randolph Sapp 
---

Ugh. I muddied up the log statement in the last revision. Fix that here.

 scripts/lib/wic/plugins/source/bootimg-efi.py | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index a65a5b9780..c28d3917c2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -390,6 +390,13 @@ class BootimgEFIPlugin(SourcePlugin):
 logger.debug("Added %d extra blocks to %s to get to %d total blocks",
  extra_blocks, part.mountpoint, blocks)
 
+# required for compatibility with certain devices expecting file system
+# block count to be equal to partition block count
+if blocks < part.fixed_size:
+blocks = part.fixed_size
+logger.debug("Overriding %s to %d total blocks for compatibility",
+ part.mountpoint, blocks)
+
 # dosfs image, created by mkdosfs
 bootimg = "%s/boot.img" % cr_workdir
 
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180298): 
https://lists.openembedded.org/g/openembedded-core/message/180298
Mute This Topic: https://lists.openembedded.org/mt/98420230/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

2023-04-21 Thread Randolph Sapp via lists.openembedded.org
This is a bit of a compatibility issue more than anything. Some devices
get upset if the FAT file system contains less blocks than the
partition.

The fixed-size argument is currently respected by the partition creation
step but not by the file system creation step. Let's make it so the file
system respects this value as well.

Signed-off-by: Randolph Sapp 
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index a65a5b9780..15557e5d36 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -387,6 +387,9 @@ class BootimgEFIPlugin(SourcePlugin):
 
 blocks += extra_blocks
 
+if blocks < part.fixed_size:
+blocks = part.fixed_size
+
 logger.debug("Added %d extra blocks to %s to get to %d total blocks",
  extra_blocks, part.mountpoint, blocks)
 
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180297): 
https://lists.openembedded.org/g/openembedded-core/message/180297
Mute This Topic: https://lists.openembedded.org/mt/98419903/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-