Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightdm-fb: add hotplug support for display port #466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kas/opt/lxde.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ header:

local_conf_header:
add-lxde: |
IMAGE_INSTALL += "lxde-touch"
IMAGE_INSTALL += "lxde-touch lightdm-fb"
12 changes: 12 additions & 0 deletions recipes-core/lightdm-fb/files/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we ship a postinst script, we should ideally have a postrm script to support uninstallation

# Copyright (c) Siemens AG, 2023
#
# This file is subject to the terms and conditions of the MIT License. See
# COPYING.MIT file in the top-level directory.
#

# Add support for hotplug of Display Port
sed -i 's/LABEL="systemd_end"/SUBSYSTEM=="graphics", KERNEL=="fb0", SYMLINK="fb0", TAG+="systemd"\nLABEL="systemd_end"/g' /lib/udev/rules.d/99-systemd.rules
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ship and install a file to /etc. Make this package a customization package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in addition, the whole purpose of rules.d is to let people add their own rules (in separate files)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct debian way would be to use dh_installudev. By that, the file also gets correctly numbered. Just put it into its own package and add a file <package>.udev in the debian folder. For details, see man dh_installudev.


sed -i '/plymouth/d' /lib/systemd/system/lightdm.service
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, thats's what /etc/systemd is for.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is also unclear what we are doing here (I mean I understand that we are essentially killing every single line where the word plymouth can be found but why?)

sed -i '/Service/i [email protected] [email protected]\[email protected] [email protected]\nBindsTo=dev-fb0.device\nAfter=dev-fb0.device\n' /lib/systemd/system/lightdm.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use a systemd dropin (we should avoid patching systemd units from other packages)

14 changes: 14 additions & 0 deletions recipes-core/lightdm-fb/lightdm-fb_0.1.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (c) Siemens AG, 2023
#
# This file is subject to the terms and conditions of the MIT License. See
# COPYING.MIT file in the top-level directory.
#

inherit dpkg-raw

DESCRIPTION = "Add hotplug Display Port support for Light Desktop Manager"

DEBIAN_DEPENDS = "lightdm,systemd"

SRC_URI = "file://postinst"