1 FILESEXTRAPATHS_prepend := "${THISDIR}/weston-init:"
5 AGL_DEFAULT_WESTONSTART ??= "/usr/bin/agl-compositor --config ${sysconfdir}/xdg/weston/weston.ini"
7 WESTONSTART ??= "${AGL_DEFAULT_WESTONSTART} ${WESTONARGS}"
8 WESTONSTART_append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/compositor.log", "",d)}"
9 WESTONSTART_append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}"
11 # Systemd name of DRM device to have weston/agl-compositor startup depend
12 # upon, if required. Currently only x86-64 seems to need a dependency to
13 # avoid failures due to racing with i915 driver init on e.g. UpSquared.
14 # It seems safer for now to only apply it there rather than doing a blanket
15 # default everywhere that might then need to be over-ridden for vendor BSPs.
16 WESTON_DRM_DEVICE ?= ""
19 file://weston.conf.in \
20 file://weston-dep.conf.in \
21 file://tmpfiles.conf.in \
22 file://zz-dri.rules.in \
23 file://zz-input.rules.in \
24 file://zz-tty.rules.in \
27 WIFILES_append_imx = " \
28 file://zz-dri-imx.rules.in \
31 SRC_URI_append = " ${WIFILES}"
34 # Remove upstream weston udev rules just to be safe
35 rm -f ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
38 files=$(echo ${WIFILES} | sed s,file://,,g)
41 if [ "${f}" != "${g}" ]; then
42 sed -e "s,@WESTONUSER@,${WESTONUSER},g" \
43 -e "s,@WESTONGROUP@,${WESTONGROUP},g" \
44 -e "s,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g" \
45 -e "s,@WESTONSTART@,${WESTONSTART},g" \
46 -e "s,@WESTON_DRM_DEVICE@,${WESTON_DRM_DEVICE},g" \
47 ${WORKDIR}/${f} > ${WORKDIR}/${g}
51 # Install weston drop-in
52 install -d ${D}${systemd_system_unitdir}/weston@.service.d
53 install -m644 ${WORKDIR}/weston.conf ${D}/${systemd_system_unitdir}/weston@.service.d/weston-init.conf
55 # Install weston DRM device dependency drop-in if required
56 if [ -n "${WESTON_DRM_DEVICE}" ]; then
57 install -m 0644 ${WORKDIR}/weston-dep.conf ${D}/${systemd_system_unitdir}/weston@.service.d/
60 # Install tmpfiles drop-in
61 install -d ${D}${libdir}/tmpfiles.d
62 install -m644 ${WORKDIR}/tmpfiles.conf ${D}${libdir}/tmpfiles.d/weston-init.conf
65 install -d ${D}${sysconfdir}/udev/rules.d
69 if [ "${g}" != "${h}" ]; then
70 install -m644 ${WORKDIR}/${g} ${D}${sysconfdir}/udev/rules.d
76 ${libdir}/tmpfiles.d/ \
77 ${systemd_system_unitdir}/weston@.service.d/ \