diff options
| author | Adam Duskett <adam.duskett@amarulasolutions.com> | 2026-01-16 11:48:16 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-01-16 09:39:26 -0800 |
| commit | 0479d8d6f0a2badae00c381d6b80f994f773b6bb (patch) | |
| tree | c58a3fe71a3524a8095d54122f66d6940702a0d5 | |
| parent | 64b4aa436ecbbbab278e3b4b4d67bc2481a4f4d1 (diff) | |
| download | meta-openembedded-0479d8d6f0a2badae00c381d6b80f994f773b6bb.tar.gz | |
kmscon: Add recipe
Provide sane defaults that do not have dependencies, such as
a dummy and terminal session support and basic fbdev support.
kmsconvt@.service must be added separatly or else
do_rootfs fails with the following error:
```
do_rootfs: Postinstall scriptlets of ['kmscon'] have failed. If the intention
is to defer them to first boot, then please place them into
pkg_postinst_ontarget:${PN} (). Deferring to first boot via 'exit 1' is no
longer supported.
```
Add a small patch to fix a compiling error when using LLVM as the
preferred toolchain.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-graphics/kmscon/files/0001-kmscon_conf.c-Fix-llvm-compilation-failure.patch | 40 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb | 66 |
2 files changed, 106 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/kmscon/files/0001-kmscon_conf.c-Fix-llvm-compilation-failure.patch b/meta-oe/recipes-graphics/kmscon/files/0001-kmscon_conf.c-Fix-llvm-compilation-failure.patch new file mode 100644 index 0000000000..0806f9bb04 --- /dev/null +++ b/meta-oe/recipes-graphics/kmscon/files/0001-kmscon_conf.c-Fix-llvm-compilation-failure.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From 03a330d486132e3798a125d26d4f10252ffd8e2d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Adam Duskett <adam.duskett@amarulasolutions.com> | ||
| 3 | Date: Fri, 16 Jan 2026 11:35:39 +0100 | ||
| 4 | Subject: [PATCH] kmscon_conf.c: Fix llvm compilation failure | ||
| 5 | |||
| 6 | When building with an LLVM toolchain, the follow error occurs: | ||
| 7 | |||
| 8 | ``` | ||
| 9 | kmscon_conf.c:757:72: | ||
| 10 | error: expression which evaluates to zero treated as a null pointer constant | ||
| 11 | of type 'void *' [-Werror,-Wnon-literal-null-conversion] | ||
| 12 | CONF_OPTION(0, 0, "gpus", &conf_gpus, NULL, NULL, NULL, &conf->gpus, KMSCON_GPU_ALL), | ||
| 13 | ^~~~~~~~~~~~~~ | ||
| 14 | 1 error generated. | ||
| 15 | ``` | ||
| 16 | |||
| 17 | Fix the error by adding a cast to (void *). | ||
| 18 | |||
| 19 | Upstream-Status: Submitted [https://github.com/kmscon/kmscon/pull/225] | ||
| 20 | Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> | ||
| 21 | --- | ||
| 22 | src/kmscon_conf.c | 2 +- | ||
| 23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 24 | |||
| 25 | diff --git a/src/kmscon_conf.c b/src/kmscon_conf.c | ||
| 26 | index df2e51d..9e9a839 100644 | ||
| 27 | --- a/src/kmscon_conf.c | ||
| 28 | +++ b/src/kmscon_conf.c | ||
| 29 | @@ -754,7 +754,7 @@ int kmscon_conf_new(struct conf_ctx **out) | ||
| 30 | /* Video Options */ | ||
| 31 | CONF_OPTION_BOOL_FULL(0, "drm", aftercheck_drm, NULL, NULL, &conf->drm, true), | ||
| 32 | CONF_OPTION_BOOL(0, "hwaccel", &conf->hwaccel, false), | ||
| 33 | - CONF_OPTION(0, 0, "gpus", &conf_gpus, NULL, NULL, NULL, &conf->gpus, KMSCON_GPU_ALL), | ||
| 34 | + CONF_OPTION(0, 0, "gpus", &conf_gpus, NULL, NULL, NULL, &conf->gpus, (void *)KMSCON_GPU_ALL), | ||
| 35 | CONF_OPTION_STRING(0, "render-engine", &conf->render_engine, NULL), | ||
| 36 | CONF_OPTION_BOOL(0, "use-original-mode", &conf->use_original_mode, true), | ||
| 37 | CONF_OPTION_STRING(0, "mode", &conf->mode, NULL), | ||
| 38 | -- | ||
| 39 | 2.52.0 | ||
| 40 | |||
diff --git a/meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb b/meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb new file mode 100644 index 0000000000..925bebee81 --- /dev/null +++ b/meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | SUMMARY = "Simple terminal emulator based on linux kernel mode setting (KMS)." | ||
| 2 | DESCRIPTION = "\ | ||
| 3 | Kmscon is a simple terminal emulator based on linux kernel mode setting \ | ||
| 4 | (KMS). It is an attempt to replace the in-kernel VT implementation with \ | ||
| 5 | a userspace console. \ | ||
| 6 | " | ||
| 7 | HOMEPAGE = "https://github.com/kmscon/kmscon" | ||
| 8 | BUGTRACKER = "https://github.com/kmscon/kmscon/issues" | ||
| 9 | CVE_PRODUCT = "kmscon" | ||
| 10 | |||
| 11 | SECTION = "graphics" | ||
| 12 | |||
| 13 | LICENSE = "MIT" | ||
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=6d4602d249f8a3401040238e98367d9e" | ||
| 15 | |||
| 16 | DEPENDS = "\ | ||
| 17 | libtsm \ | ||
| 18 | libxkbcommon \ | ||
| 19 | udev \ | ||
| 20 | " | ||
| 21 | |||
| 22 | SRC_URI = "\ | ||
| 23 | git://github.com/kmscon/kmscon;branch=main;protocol=https \ | ||
| 24 | file://0001-kmscon_conf.c-Fix-llvm-compilation-failure.patch \ | ||
| 25 | " | ||
| 26 | SRCREV = "7d46650dbb0826f9b89de42f879be879391c14fd" | ||
| 27 | |||
| 28 | inherit meson pkgconfig systemd | ||
| 29 | |||
| 30 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" | ||
| 31 | |||
| 32 | PACKAGECONFIG[backspace_sends_delete] = "-Dbackspace_sends_delete=true, -Dbackspace_sends_delete=false" | ||
| 33 | PACKAGECONFIG[font_pango] = "-Dfont_pango=enabled, -Dfont_pango=disabled, pango" | ||
| 34 | PACKAGECONFIG[multi_seat] = "-Dmulti_seat=enabled, -Dmulti_seat=disabled, systemd" | ||
| 35 | PACKAGECONFIG[opengl] = "-Drenderer_gltex=enabled -Dvideo_drm3d=enabled, -Drenderer_gltex=disabled -Dvideo_drm3d=disabled, libdrm virtual/egl virtual/libgles2 virtual/libgbm" | ||
| 36 | PACKAGECONFIG[video_drm2d] = "-Dvideo_drm2d=enabled, -Dvideo_drm2d=disabled, libdrm" | ||
| 37 | |||
| 38 | EXTRA_OEMESON = "\ | ||
| 39 | -Delogind=disabled \ | ||
| 40 | -Dextra_debug=false \ | ||
| 41 | -Dfont_unifont=enabled \ | ||
| 42 | -Dsession_dummy=enabled \ | ||
| 43 | -Dsession_terminal=enabled \ | ||
| 44 | -Dtests=false \ | ||
| 45 | -Dvideo_fbdev=enabled \ | ||
| 46 | " | ||
| 47 | |||
| 48 | SYSTEMD_SERVICE:${PN} = "kmscon.service" | ||
| 49 | FILES:${PN} += "${systemd_system_unitdir}/kmsconvt@.service" | ||
| 50 | |||
| 51 | do_install:append() { | ||
| 52 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 53 | install -d ${D}${sysconfdir}/systemd/system | ||
| 54 | ln -sf ${systemd_system_unitdir}/kmsconvt@.service \ | ||
| 55 | ${D}${sysconfdir}/systemd/system/autovt@.service | ||
| 56 | fi | ||
| 57 | |||
| 58 | if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'true', 'false', d)}; then | ||
| 59 | sed -e "s@#drm@drm@g" \ | ||
| 60 | -e "s@#hwaccel@hwaccel@g" \ | ||
| 61 | -e "s@#render-engine=gltex@render-engine=gltex@g" \ | ||
| 62 | -i ${D}${sysconfdir}/kmscon/kmscon.conf | ||
| 63 | fi | ||
| 64 | } | ||
| 65 | |||
| 66 | RDEPENDS:${PN} = "xkeyboard-config" | ||
