diff mbox series

[v2,2/2] kmscon: Add recipe

Message ID 20260115103503.200126-2-adam.duskett@amarulasolutions.com
State Superseded, archived
Headers show
Series [v2,1/2] libtsm: add recipe for kmscon dependency | expand

Commit Message

Adam Duskett Jan. 15, 2026, 10:35 a.m. UTC
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.
```

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
v1 -> v2: add tag=v${PV} to the SRC_URI

 .../recipes-graphics/kmscon/kmscon_9.2.1.bb   | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb

Comments

Khem Raj Jan. 15, 2026, 4:07 p.m. UTC | #1
Thanks for your submission. This fails to build with TOOLCHAIN = "clang"

https://errors.yoctoproject.org/Errors/Details/896251/

On Thu, Jan 15, 2026 at 2:40 AM Adam Duskett via lists.openembedded.org
<adam.duskett=amarulasolutions.com@lists.openembedded.org> wrote:

> 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.
> ```
>
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
> v1 -> v2: add tag=v${PV} to the SRC_URI
>
>  .../recipes-graphics/kmscon/kmscon_9.2.1.bb   | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb
>
> 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..6c4060763b
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb
> @@ -0,0 +1,63 @@
> +SUMMARY = "Simple terminal emulator based on linux kernel mode setting
> (KMS)."
> +DESCRIPTION = "\
> +    Kmscon is a simple terminal emulator based on linux kernel mode
> setting \
> +    (KMS). It is an attempt to replace the in-kernel VT implementation
> with \
> +    a userspace console. \
> +"
> +HOMEPAGE = "https://github.com/kmscon/kmscon"
> +BUGTRACKER = "https://github.com/kmscon/kmscon/issues"
> +CVE_PRODUCT = "kmscon"
> +
> +SECTION = "graphics"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=6d4602d249f8a3401040238e98367d9e"
> +
> +DEPENDS = "\
> +    libtsm \
> +    libxkbcommon \
> +    udev \
> +"
> +
> +SRC_URI = "git://
> github.com/kmscon/kmscon;protocol=https;branch=main;tag=v${PV}
> <http://github.com/kmscon/kmscon;protocol=https;branch=main;tag=v$%7BPV%7D>
> "
> +SRCREV = "7d46650dbb0826f9b89de42f879be879391c14fd"
> +
> +inherit meson pkgconfig systemd
> +
> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
> +
> +PACKAGECONFIG[backspace_sends_delete] = "-Dbackspace_sends_delete=true,
> -Dbackspace_sends_delete=false"
> +PACKAGECONFIG[font_pango] = "-Dfont_pango=enabled, -Dfont_pango=disabled,
> pango"
> +PACKAGECONFIG[multi_seat] = "-Dmulti_seat=enabled, -Dmulti_seat=disabled,
> systemd"
> +PACKAGECONFIG[opengl] = "-Drenderer_gltex=enabled -Dvideo_drm3d=enabled,
> -Drenderer_gltex=disabled -Dvideo_drm3d=disabled, libdrm virtual/egl
> virtual/libgles2 virtual/libgbm"
> +PACKAGECONFIG[video_drm2d] = "-Dvideo_drm2d=enabled,
> -Dvideo_drm2d=disabled, libdrm"
> +
> +EXTRA_OEMESON = "\
> +    -Delogind=disabled \
> +    -Dextra_debug=false \
> +    -Dfont_unifont=enabled \
> +    -Dsession_dummy=enabled \
> +    -Dsession_terminal=enabled \
> +    -Dtests=false \
> +    -Dvideo_fbdev=enabled \
> +"
> +
> +SYSTEMD_SERVICE:${PN} = "kmscon.service"
> +FILES:${PN} += "${systemd_system_unitdir}/kmsconvt@.service"
> +
> +do_install:append() {
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
> 'false', d)}; then
> +        install -d ${D}${sysconfdir}/systemd/system
> +        ln -sf ${systemd_system_unitdir}/kmsconvt@.service \
> +            ${D}${sysconfdir}/systemd/system/autovt@.service
> +    fi
> +
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'true', 'false',
> d)}; then
> +        sed -e "s@#drm@drm@g" \
> +            -e "s@#hwaccel@hwaccel@g" \
> +            -e "s@#render-engine=gltex@render-engine=gltex@g" \
> +            -i ${D}${sysconfdir}/kmscon/kmscon.conf
> +    fi
> +}
> +
> +RDEPENDS:${PN} = "xkeyboard-config"
> --
> 2.52.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#123502):
> https://lists.openembedded.org/g/openembedded-devel/message/123502
> Mute This Topic: https://lists.openembedded.org/mt/117277014/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Adam Duskett Jan. 16, 2026, 8:43 a.m. UTC | #2
Hi Khem!

Thanks for the test! I didn't know about TOOLCHAIN = "clang" and will get
it fixed!

Thanks again!

Adam Duskett


On Thu, Jan 15, 2026 at 5:08 PM Khem Raj <raj.khem@gmail.com> wrote:

> Thanks for your submission. This fails to build with TOOLCHAIN = "clang"
>
> https://errors.yoctoproject.org/Errors/Details/896251/
>
> On Thu, Jan 15, 2026 at 2:40 AM Adam Duskett via lists.openembedded.org
> <adam.duskett=amarulasolutions.com@lists.openembedded.org> wrote:
>
>> 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.
>> ```
>>
>> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
>> ---
>> v1 -> v2: add tag=v${PV} to the SRC_URI
>>
>>  .../recipes-graphics/kmscon/kmscon_9.2.1.bb   | 63 +++++++++++++++++++
>>  1 file changed, 63 insertions(+)
>>  create mode 100644 meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb
>>
>> 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..6c4060763b
>> --- /dev/null
>> +++ b/meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb
>> @@ -0,0 +1,63 @@
>> +SUMMARY = "Simple terminal emulator based on linux kernel mode setting
>> (KMS)."
>> +DESCRIPTION = "\
>> +    Kmscon is a simple terminal emulator based on linux kernel mode
>> setting \
>> +    (KMS). It is an attempt to replace the in-kernel VT implementation
>> with \
>> +    a userspace console. \
>> +"
>> +HOMEPAGE = "https://github.com/kmscon/kmscon"
>> +BUGTRACKER = "https://github.com/kmscon/kmscon/issues"
>> +CVE_PRODUCT = "kmscon"
>> +
>> +SECTION = "graphics"
>> +
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=6d4602d249f8a3401040238e98367d9e"
>> +
>> +DEPENDS = "\
>> +    libtsm \
>> +    libxkbcommon \
>> +    udev \
>> +"
>> +
>> +SRC_URI = "git://
>> github.com/kmscon/kmscon;protocol=https;branch=main;tag=v${PV}
>> <http://github.com/kmscon/kmscon;protocol=https;branch=main;tag=v$%7BPV%7D>
>> "
>> +SRCREV = "7d46650dbb0826f9b89de42f879be879391c14fd"
>> +
>> +inherit meson pkgconfig systemd
>> +
>> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>> +
>> +PACKAGECONFIG[backspace_sends_delete] = "-Dbackspace_sends_delete=true,
>> -Dbackspace_sends_delete=false"
>> +PACKAGECONFIG[font_pango] = "-Dfont_pango=enabled,
>> -Dfont_pango=disabled, pango"
>> +PACKAGECONFIG[multi_seat] = "-Dmulti_seat=enabled,
>> -Dmulti_seat=disabled, systemd"
>> +PACKAGECONFIG[opengl] = "-Drenderer_gltex=enabled -Dvideo_drm3d=enabled,
>> -Drenderer_gltex=disabled -Dvideo_drm3d=disabled, libdrm virtual/egl
>> virtual/libgles2 virtual/libgbm"
>> +PACKAGECONFIG[video_drm2d] = "-Dvideo_drm2d=enabled,
>> -Dvideo_drm2d=disabled, libdrm"
>> +
>> +EXTRA_OEMESON = "\
>> +    -Delogind=disabled \
>> +    -Dextra_debug=false \
>> +    -Dfont_unifont=enabled \
>> +    -Dsession_dummy=enabled \
>> +    -Dsession_terminal=enabled \
>> +    -Dtests=false \
>> +    -Dvideo_fbdev=enabled \
>> +"
>> +
>> +SYSTEMD_SERVICE:${PN} = "kmscon.service"
>> +FILES:${PN} += "${systemd_system_unitdir}/kmsconvt@.service"
>> +
>> +do_install:append() {
>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
>> 'false', d)}; then
>> +        install -d ${D}${sysconfdir}/systemd/system
>> +        ln -sf ${systemd_system_unitdir}/kmsconvt@.service \
>> +            ${D}${sysconfdir}/systemd/system/autovt@.service
>> +    fi
>> +
>> +    if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'true', 'false',
>> d)}; then
>> +        sed -e "s@#drm@drm@g" \
>> +            -e "s@#hwaccel@hwaccel@g" \
>> +            -e "s@#render-engine=gltex@render-engine=gltex@g" \
>> +            -i ${D}${sysconfdir}/kmscon/kmscon.conf
>> +    fi
>> +}
>> +
>> +RDEPENDS:${PN} = "xkeyboard-config"
>> --
>> 2.52.0
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#123502):
>> https://lists.openembedded.org/g/openembedded-devel/message/123502
>> Mute This Topic: https://lists.openembedded.org/mt/117277014/1997914
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
>> raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>>
diff mbox series

Patch

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..6c4060763b
--- /dev/null
+++ b/meta-oe/recipes-graphics/kmscon/kmscon_9.2.1.bb
@@ -0,0 +1,63 @@ 
+SUMMARY = "Simple terminal emulator based on linux kernel mode setting (KMS)."
+DESCRIPTION = "\
+    Kmscon is a simple terminal emulator based on linux kernel mode setting \
+    (KMS). It is an attempt to replace the in-kernel VT implementation with \
+    a userspace console. \
+"
+HOMEPAGE = "https://github.com/kmscon/kmscon"
+BUGTRACKER = "https://github.com/kmscon/kmscon/issues"
+CVE_PRODUCT = "kmscon"
+
+SECTION = "graphics"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6d4602d249f8a3401040238e98367d9e"
+
+DEPENDS = "\
+    libtsm \
+    libxkbcommon \
+    udev \
+"
+
+SRC_URI = "git://github.com/kmscon/kmscon;protocol=https;branch=main;tag=v${PV}"
+SRCREV = "7d46650dbb0826f9b89de42f879be879391c14fd"
+
+inherit meson pkgconfig systemd
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
+
+PACKAGECONFIG[backspace_sends_delete] = "-Dbackspace_sends_delete=true, -Dbackspace_sends_delete=false"
+PACKAGECONFIG[font_pango] = "-Dfont_pango=enabled, -Dfont_pango=disabled, pango"
+PACKAGECONFIG[multi_seat] = "-Dmulti_seat=enabled, -Dmulti_seat=disabled, systemd"
+PACKAGECONFIG[opengl] = "-Drenderer_gltex=enabled -Dvideo_drm3d=enabled, -Drenderer_gltex=disabled -Dvideo_drm3d=disabled, libdrm virtual/egl virtual/libgles2 virtual/libgbm"
+PACKAGECONFIG[video_drm2d] = "-Dvideo_drm2d=enabled, -Dvideo_drm2d=disabled, libdrm"
+
+EXTRA_OEMESON = "\
+    -Delogind=disabled \
+    -Dextra_debug=false \
+    -Dfont_unifont=enabled \
+    -Dsession_dummy=enabled \
+    -Dsession_terminal=enabled \
+    -Dtests=false \
+    -Dvideo_fbdev=enabled \
+"
+
+SYSTEMD_SERVICE:${PN} = "kmscon.service"
+FILES:${PN} += "${systemd_system_unitdir}/kmsconvt@.service"
+
+do_install:append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/systemd/system
+        ln -sf ${systemd_system_unitdir}/kmsconvt@.service \
+            ${D}${sysconfdir}/systemd/system/autovt@.service
+    fi
+
+    if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'true', 'false', d)}; then
+        sed -e "s@#drm@drm@g" \
+            -e "s@#hwaccel@hwaccel@g" \
+            -e "s@#render-engine=gltex@render-engine=gltex@g" \
+            -i ${D}${sysconfdir}/kmscon/kmscon.conf
+    fi
+}
+
+RDEPENDS:${PN} = "xkeyboard-config"