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 \
29 WIFILES_append_imx = " \
30 file://zz-dri-imx.rules.in \
33 SRC_URI_append = " ${WIFILES}"
36 # Remove upstream weston udev rules just to be safe
37 rm -f ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
40 files=$(echo ${WIFILES} | sed s,file://,,g)
43 if [ "${f}" != "${g}" ]; then
44 sed -e "s,@WESTONUSER@,${WESTONUSER},g" \
45 -e "s,@WESTONGROUP@,${WESTONGROUP},g" \
46 -e "s,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g" \
47 -e "s,@WESTONSTART@,${WESTONSTART},g" \
48 -e "s,@WESTON_DRM_DEVICE@,${WESTON_DRM_DEVICE},g" \
49 ${WORKDIR}/${f} > ${WORKDIR}/${g}
53 # Install weston drop-in
54 install -d ${D}${systemd_system_unitdir}/weston@.service.d
55 install -m644 ${WORKDIR}/weston.conf ${D}/${systemd_system_unitdir}/weston@.service.d/weston-init.conf
57 # Install weston DRM device dependency drop-in if required
58 if [ -n "${WESTON_DRM_DEVICE}" ]; then
59 install -m 0644 ${WORKDIR}/weston-dep.conf ${D}/${systemd_system_unitdir}/weston@.service.d/
62 # Install tmpfiles drop-in
63 install -d ${D}${libdir}/tmpfiles.d
64 install -m644 ${WORKDIR}/tmpfiles.conf ${D}${libdir}/tmpfiles.d/weston-init.conf
67 install -d ${D}${sysconfdir}/udev/rules.d
71 if [ "${g}" != "${h}" ]; then
72 install -m644 ${WORKDIR}/${g} ${D}${sysconfdir}/udev/rules.d
78 ${libdir}/tmpfiles.d/ \
79 ${systemd_system_unitdir}/weston@.service.d/ \