1 FILESEXTRAPATHS:prepend := "${THISDIR}/weston-init:"
5 AGL_DEFAULT_WESTONSTART ??= "/usr/bin/agl-compositor --config ${sysconfdir}/xdg/weston/weston.ini"
6 WESTON_USE_PIXMAN ??= "0"
8 WESTONSTART ??= "${AGL_DEFAULT_WESTONSTART} ${WESTONARGS}"
9 WESTONSTART:append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/compositor.log", "",d)}"
10 WESTONSTART:append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}"
11 WESTONSTART:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", " --use-pixman", "",d)}"
13 # Systemd name of DRM device to have weston/agl-compositor startup depend
14 # upon, if required. Currently only x86-64 seems to need a dependency to
15 # avoid failures due to racing with i915 driver init on e.g. UpSquared.
16 # It seems safer for now to only apply it there rather than doing a blanket
17 # default everywhere that might then need to be over-ridden for vendor BSPs.
18 WESTON_DRM_DEVICE ?= ""
21 file://weston.conf.in \
22 file://weston-dep.conf.in \
23 file://tmpfiles.conf.in \
24 file://zz-dri.rules.in \
25 file://zz-input.rules.in \
26 file://zz-tty.rules.in \
27 file://zz-video.rules.in \
30 WIFILES:append:imx = " \
31 file://zz-dri-imx.rules.in \
34 SRC_URI:append = " ${WIFILES}"
37 # Remove upstream weston udev rules just to be safe
38 rm -f ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
41 files=$(echo ${WIFILES} | sed s,file://,,g)
44 if [ "${f}" != "${g}" ]; then
45 sed -e "s,@WESTONUSER@,${WESTONUSER},g" \
46 -e "s,@WESTONGROUP@,${WESTONGROUP},g" \
47 -e "s,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g" \
48 -e "s,@WESTONSTART@,${WESTONSTART},g" \
49 -e "s,@WESTON_DRM_DEVICE@,${WESTON_DRM_DEVICE},g" \
50 ${WORKDIR}/${f} > ${WORKDIR}/${g}
54 # Install weston drop-in
55 install -d ${D}${systemd_system_unitdir}/weston@.service.d
56 install -m644 ${WORKDIR}/weston.conf ${D}/${systemd_system_unitdir}/weston@.service.d/weston-init.conf
58 # Install weston DRM device dependency drop-in if required
59 if [ -n "${WESTON_DRM_DEVICE}" ]; then
60 install -m 0644 ${WORKDIR}/weston-dep.conf ${D}/${systemd_system_unitdir}/weston@.service.d/
63 # Install tmpfiles drop-in
64 install -d ${D}${libdir}/tmpfiles.d
65 install -m644 ${WORKDIR}/tmpfiles.conf ${D}${libdir}/tmpfiles.d/weston-init.conf
68 install -d ${D}${sysconfdir}/udev/rules.d
72 if [ "${g}" != "${h}" ]; then
73 install -m644 ${WORKDIR}/${g} ${D}${sysconfdir}/udev/rules.d
79 ${libdir}/tmpfiles.d/ \
80 ${systemd_system_unitdir}/weston@.service.d/ \