summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston-init.bb
Commit message (Collapse)AuthorAgeFilesLines
* weston-init: fix weston not starting when xwayland is enabledQuentin Schulz2024-09-031-1/+1
| | | | | | | | | | | | | | | | | | When xwayland PACKAGECONFIG option is set, xwayland is enabled in weston.ini. However, if the xwayland module isn't installed, weston will refuse to start with the following error message: Failed to load module: /usr/lib/libweston-13/xwayland.so: cannot open shared object file: No such file or directory Therefore, whenever the xwayland PACKAGECONFIG is set, weston-init should depend on weston-xwayland to bring this module in. Fixes: fdbe559c66c9 ("weston.init: enabled xwayland") (From OE-Core rev: ba66fa75e57f94d35bfd703075ea6706879c63cb) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fa2314125318634108452af4e40c9eeee260767c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* weston-init: remove misleading comment about udev ruleOtavio Salvador2023-09-101-1/+1
| | | | | | | | | | | | The udev rule has been removed but the comment has kept, by mistake. Remove it. Fixes: dd83fb40f7 ("weston-init: Stop running weston as root") Tested-by: Tom Hochstein <tom.hochstein@nxp.com> (From OE-Core rev: 8aa3d43fa1c53cdce45ec88a49f27b076d3812ac) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: add profile to point users to global socketRandolph Sapp2023-06-151-0/+3
| | | | | | | | | | Add profile script to point users capable of interacting with the global socket to it by default. (From OE-Core rev: 2818cbc73093996f8ecb93a4f0df8a31fd4692d3) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: guard against systemd configsRandolph Sapp2023-06-151-12/+17
| | | | | | | | | | 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. (From OE-Core rev: 00e3eb3893eeb32839e02b05bc1299440895a53d) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: fix the mixed indentationRandolph Sapp2023-06-151-5/+5
| | | | | | | | | I know my text editor is going to get angry at me if this continues. (From OE-Core rev: da6e01517336694911f5aea53d637e9c0ad72c9b) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: add the weston user to the wayland groupRandolph Sapp2023-06-131-1/+1
| | | | | | | | | | | Add the weston user to the wayland group so all users accessing the global weston socket in /run all share a group. (From OE-Core rev: 30198b36b00a1967d1f8f8f556a0ba2415954f4e) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: add weston user to the render groupRandolph Sapp2023-06-131-1/+1
| | | | | | | | | | | The weston user must be in the render group in order to access render device nodes for standard user-space graphics. (From OE-Core rev: 1cba8aa3c5e0635d7b89222d9ccaf889954fe0c9) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: make sure the render group existsRandolph Sapp2023-06-131-1/+1
| | | | | | | | | | | Add the render group explicitly here to make sure it exists for the useradd command. (From OE-Core rev: 3134fca12c6f74d2b99f79fb751bc5513c5b937a) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: introduce xwayland PACKAGECONFIGMing Liu2023-06-091-2/+3
| | | | | | | | | | Some BSPs dont support xwayland in weston, this is easier for them to control that. (From OE-Core rev: b2b40d3470a4a75a18d1cc7a948eec73d84a883b) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston.init: enabled xwaylandssuesens2022-06-151-0/+4
| | | | | | | | | | set xwayland support in weston.init file to true (From OE-Core rev: fdbe559c66c96954bd3322ab2981af36a95a50ea) Signed-off-by: ssuesens <sebastian.suesens@baslerweb.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston: use same distro features for weston and westion-initJoe Slater2022-03-241-3/+3
| | | | | | | | | | | | | We want to avoid situations (like world builds) where weston-init will build, but weston won't. This could cause "nothing RPROVIDES..." dependency errors. We set required distro features in a common include file. (From OE-Core rev: 1c7802f025eb3d9ee3310e083a5d8bef7178de9c) Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Use pixman rendering for qemuppc64Khem Raj2022-03-201-0/+1
| | | | | | | | (From OE-Core rev: 2b9d8becad7abdd8c53c9f8b46082a0a445dcaf8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Use pixman on riscv64 qemuKhem Raj2022-03-181-0/+1
| | | | | | | | | | Helps boot weston/wayland images (From OE-Core rev: ed2c7c806f1a48c388282f5cbdc93f034ba2c93d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: add use-pixman PACKAGECONFIGMing Liu2022-03-131-0/+5
| | | | | | | | | | | Fbdev backend has been deprecated since weston 10.0.0, and it could be replaced by passing --use-pixman to drm backend, add a use-pixman PACKAGECONFIG for convenience. (From OE-Core rev: e3dc3ee5e41caa1691ebdb1c6ed6e51077f9ce7a) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: replace deprecated/disabled fbdev with drm backendAlexander Kanavin2022-02-211-7/+1
| | | | | | | | | | | drm will default to opengl rendering by default; if this is problematic, --use-pixman option may help, apply only where it's proven necessary. (From OE-Core rev: 432f24ef9af3c0e6e0c769dc2a751023138f7bae) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: '${systemd_unitdir}/system' => '${systemd_system_unitdir}'Robert P. J. Day2021-09-071-1/+1
| | | | | | | | | | | Repo-wide replacement to use newer variable to represent systemd system unitdir directory. (From OE-Core rev: 5ace3ada5c54500c71becc8e0c6eddeb8bc053e3) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-12/+12
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Set $HOME variable for SysVinit managerAdrian2021-03-201-0/+1
| | | | | | | | | | | SysVinit sets by default the $HOME directory to "/" for the init scripts. It's picked then by the weston-launcher and make weston-terminal to have wrongly set $HOME environment variable for the root user. (From OE-Core rev: f5ddf5533b19a41be9e9cd403c2e7ded6da6f272) Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Stop running weston as rootJoshua Watt2020-11-241-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Running the weston compositor as the root user is an insecure default behavior for OE-core. We can do much better, at least when using systemd. Change the recipe to create a dedicated "weston" user and start weston as this user. The systemd service and socket units are no longer template units, as there were several inconsistencies in the templates. Instead, there is now a global /run/wayland-0 socket that gets created, and systemd will start weston on demand when a client connects to that socket or when attempting to reach graphical.target, whichever comes first. This also allows downstream users to easily change the behavior so that weston *only* starts on demand by adding a drop file. Access to the global socket is controlled by a "wayland" group; any user that is a member of the group can use the socket to talk to the compositor. This also satisfies another use case where another systemd service might start a graphical application that needs to display with weston (e.g. a single function device in kiosk mode). Finally, the udev rules for starting weston with the existance of a DRM device have been removed. Being WantedBy= a graphical target should eliminate the need for this behavior, and having it present makes it difficult for downstream users to start weston on demand (having to override the udev rules). (From OE-Core rev: dd83fb40f76749c6689807afabc63b9d5c2a4065) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Fix incorrect idle-time settingAlistair2020-11-171-1/+1
| | | | | | | (From OE-Core rev: 84b3a6b7bd73ebad90865ee4351578c2109358fb) Signed-off-by: Alistair Francis <alistair@alistair23.me> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: fall back to fbdev under x32Alexander Kanavin2020-11-111-0/+3
| | | | | | | | | | Otherwise, there's a crash in swrast - the same issue as with X11. (From OE-Core rev: 09ef3dacc55544143a146190c3d66fcf5dc697ad) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: correctly start under systemdAlexander Kanavin2020-11-111-2/+7
| | | | | | | | | | | | | | | Several issues are addressed: 1. weston requires pam when starting under systemd 2. systemd was attempting to launch weston twice (from sysvinit script and from systemd unit file) which caused confusion and errors. 3. runtime test should stop/start weston via systemd only if systemd actually controls system startup, not merely when systemd is present. (From OE-Core rev: 72dd74c5d384dbe641cc7c02ecf766ff8d5f555f) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Allow setting idle time to 0Alistair2020-10-261-0/+8
| | | | | | | | | | Add a PACKAGECONFIG that can be used to set the idle-time to 0. This is useful for always on machine (such as kiosks) and for debugging. (From OE-Core rev: 082902a3e97020f0b02097feb3c2173c64a017bf) Signed-off-by: Alistair Francis <alistair@alistair23.me> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Select drm/fbdev backends for qemu machinesKhem Raj2020-09-141-0/+9
| | | | | | | | | | | qemux86/x86_64/aarch64 supports drm backend well, therefore enable it on these qemu machines, other qemu machines should be defaulting to fbdev, if its not qemu then leave it empty (From OE-Core rev: cfda3e10d5eb1563d10318c1d8ff6287b539ee04) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston: plane_add_prop() calls break musl atomic modesettingKhem Raj2020-09-141-8/+0
| | | | | | | | | | This patch ensures, weston/drm backend works which ends up with blank screen on musl based systems (From OE-Core rev: b3a5b64f717b39536c96627ce058cf9c51cf3ba6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Redefine weston service and add socket activation optionKhem Raj2020-09-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | Currently, weston when autolauched with systemd ends up with seat0 related errors because its launched before seat0 is assigned. Fixes [05:16:09.357] logind: failed to get session seat [05:16:09.358] logind: cannot setup systemd-logind helper (-61), using legacy fallback The above error results in ptest failures in parselogs, even though weston has started ok using fallback methods, these errors are still seen in logs Also fixes weston ptests RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: PASSED (8.58s) (From OE-Core rev: c21fa5a291ab207a084285935ab73a0b4225c965) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Marek Vasut <marex@denx.de> Cc: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Launch weston with WESTON_DISABLE_ATOMIC on musl/x86Khem Raj2020-03-131-2/+12
| | | | | | | | | | | | | | | | | | | Since we enabled drm/kms backend for qemux86, it does not work with musl fdbdev worked ok, we see this error [18:58:45.628] launching '/usr/libexec/weston-desktop-shell' [18:58:45.737] atomic: couldn't commit new state: Invalid argument [18:58:45.737] repaint-flush failed: Invalid argument There seems to be some problem with atomics in libdrm, until that gets diagnosed, simple solution is to not use it on musl when drm backend is used thats why WESTON_DISABLE_ATOMIC=Y is set in environment file for such cases (From OE-Core rev: e571ef707d76cf3aceb0d56fd588b37f9b5092ff) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distro_features_check: expand with MACHINE_FEATURES and COMBINED_FEATURES, ↵Denys Dmytriyenko2019-11-211-1/+1
| | | | | | | | | | | | | | | | rename Besides checking DISTRO_FEATURES for required or conflicting features, being able to check MACHINE_FEATURES and/or COMBINED_FEATURES may also be useful at times. Temporarily support the old class name with a warning about future deprecation. (From OE-Core rev: 5f4875b950ce199e91f99c8e945a0c709166dc14) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Add possibility to run weston as non-root userKhem Raj2019-09-191-5/+23
| | | | | | | | | | | | | | | | | | | These changes are from meta-96boards primarily Launch the session via a udev rule based on what kind of display device is available delete weston-conf and move the fuctionality into weston-init other layers are doing same weston-init installs machine specific weston.ini therefore mark is machine specific now (From OE-Core rev: aa3bced2e1de2f4ba507aa014835b06edccc138a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove $COREBASE/LICENSE from LIC_FILES_CHKSUMOlaf Mandel2016-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Several recipes reference the LICENSE file in their LIC_FILES_CHKSUM variable as ${COREBASE}/LICENSE. This forces distribution providers to keep this file verbatim or to overload the affected recipes. The section "Moving to the Yocto Project 1.6 Release" in the Yocto manual suggests removing the LICENSE file where possible. Remove LICENSE in cases where COPYING.MIT is also given and replace LICENSE with COPYING.MIT if the former was the only entry. All modified recipes specify LICENSE = "MIT" and none of the in-tree files specify a different license either. As the packages do not change (the license files are not contained in them), do not increase PR. (From OE-Core rev: 0059e0661826c857a07c862bcb46162671e0e330) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Use bitbake path variableTom Hochstein2016-06-121-0/+1
| | | | | | | | (From OE-Core rev: 537afef2209bef327a28234207d1ef7e4e596a6e) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Add module support for the weston-start helperOtavio Salvador2016-05-211-0/+3
| | | | | | | | | | | | | | To make weston-start more flexible we now support module loading. For such modules, following functions can be used: - add_weston_argument - add_openvt_argument (From OE-Core rev: 3e7c4d06aaa1fccc1a18f4431122603cc4a9bbe9) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Rework init sequence to avoid code duplicationOtavio Salvador2016-05-211-1/+3
| | | | | | | | | | | The new 'weston-start' script redcues the code duplication for SysV and SystemD based images. (From OE-Core rev: 1963dfb002b9e0b4bff02dbf783909102ca59719) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Rework do_install to use install -D optionOtavio Salvador2016-05-211-5/+2
| | | | | | | | | | | | The install -D allow for the parent directories to be created in a single command line, reducing the code and number of fork during the build. (From OE-Core rev: 9d745d7c958402fa1d59c9d0267b58a05d7ee4b3) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: add a native systemd unit fileAlexander Kanavin2015-12-121-3/+10
| | | | | | | | | | | | Previously weston was started by systemd via a classic init script [YOCTO #5582] (From OE-Core rev: e67c7f0998a5a285bd079d2c956bd61457e75077) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: add distro_features_check for some packagesWenzong Fan2015-11-161-1/+3
| | | | | | | | | | | | | | * The packages that depends on gtk+3 require any of distro features from ${GTK3DISTROFEATURES} * The packages that depends on virtual/egl, virtual/libgl ... require distro feature 'opengl' (From OE-Core rev: 3edf08b38b0af93cef0933b061349264dc86d54c) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Update after toplevel LICENSE file checksum changeRichard Purdie2014-01-021-1/+1
| | | | | | (From OE-Core rev: bbd88aebcabbb19c27a7d752d4a5b8ad9ff9412e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Replace one-line DESCRIPTION with SUMMARYPaul Eggleton2014-01-021-1/+1
| | | | | | | | | | | | | | A lot of our recipes had short one-line DESCRIPTION values and no SUMMARY value set. In this case it's much better to just set SUMMARY since DESCRIPTION is defaulted from SUMMARY anyway and then the SUMMARY is at least useful. I also took the opportunity to fix up a lot of the new SUMMARY values, making them concisely explain the function of the recipe / package where possible. (From OE-Core rev: b8feee3cf21f70ba4ec3b822d2f596d4fc02a292) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: start weston on a new VTRoss Burton2013-11-081-0/+2
| | | | | | | | | | | | | | | Weston 1.3 needs to run on a VT, which is typically handled by weston-launch. Currently weston-init doesn't use weston-launch as that depends on the (non-default) pam DISTRO_FEATURE, so depend on kbd and use openvt directly. This also fixes problems caused by the init script blocking until Weston exits, which meant that later init scripts were not actually running. (From OE-Core rev: 3726eb29cfa79a4a1fbdbcaa96f770063c482858) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: basic init script to start Weston on KMS/DRMRoss Burton2013-06-071-0/+17
weston-init is a very basic init script to start Weston as root on KMS/DRM. To re-iterate, this runs Weston as root. This will be fixed to use weston-launch shortly. (From OE-Core rev: eba825e4698f6923c32c347eb306abe9d7f3519d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>