aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-core/udev/udev-extraconf_%.bbappend
blob: 28e5e30fe3ab1b713289cbbd420f53fc76630fb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += " \
       file://60-drm-hotplug-mode.rules \
       file://hotplug-display-auto.sh \
       file://hotplug-display-mirrored.sh \
       file://hotplug-display-extended-h.sh \
       file://hotplug-display-extended-v.sh \
"
# Allowed options for MULTI_DISPLAY_MODE: auto | mirrored | extended-h | extended-v
MULTI_DISPLAY_MODE ?= "auto"

do_install_append() {
    sed -i 's/@MULTIDISPLAYMODE/${MULTI_DISPLAY_MODE}/' ${WORKDIR}/60-drm-hotplug-mode.rules

    install -d ${D}${sysconfdir}/udev/rules.d
    install -m 0644 ${WORKDIR}/60-drm-hotplug-mode.rules     ${D}${sysconfdir}/udev/rules.d/60-drm-hotplug-mode.rules

    install -d ${D}${sysconfdir}/udev/scripts/
    install -m 0755 ${WORKDIR}/hotplug-display-auto.sh ${D}${sysconfdir}/udev/scripts/hotplug-display-auto.sh
    install -m 0755 ${WORKDIR}/hotplug-display-mirrored.sh ${D}${sysconfdir}/udev/scripts/hotplug-display-mirrored.sh
    install -m 0755 ${WORKDIR}/hotplug-display-extended-h.sh ${D}${sysconfdir}/udev/scripts/hotplug-display-extended-h.sh
    install -m 0755 ${WORKDIR}/hotplug-display-extended-v.sh ${D}${sysconfdir}/udev/scripts/hotplug-display-extended-v.sh
}

RDEPENDS_${PN} += "${@bb.utils.contains('IMAGE_FEATURES', 'x11-base', 'xrandr', '', d)}"