summaryrefslogtreecommitdiffstats
path: root/meta-agl-core-test/recipes-test/glmark2/glmark2_%.bbappend
blob: ab453d8b087cc38dc58268db5cb7ce207142b316 (plain)
1
2
3
4
5
6
7
# Update glmark2
SRCREV = "784aca755a469b144acf3cae180b6e613b7b057a"
# Already in newer version
SRC_URI:remove = "file://python3.patch"

PACKAGECONFIG = "wayland-gles2"
PACKAGECONFIG[wayland-gles2] = ",,virtual/egl virtual/libgles2 wayland wayland-protocols wayland-native"
r: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

inherit agl-graphical

WESTONSTART ??= "/usr/bin/weston ${WESTONARGS}"
WESTONSTART_append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/weston.log", "",d)}"

SRC_URI += " \
    file://weston_tmpfiles.conf \
    file://weston.service.add \
"

do_install_append() {
    sed -i "/\[Unit\]/aConflicts=getty@tty${WESTONTTY}.service" \
           ${D}${systemd_system_unitdir}/weston.service

    sed -i "/\[Service\]/r ${S}/weston.service.add" \
           ${D}${systemd_system_unitdir}/weston.service

    if ! grep -q '^Group=' ${D}${systemd_system_unitdir}/weston.service; then
        sed -i "/\[Service\]/aGroup=root" ${D}${systemd_system_unitdir}/weston.service
    fi
    if ! grep -q '^User=' ${D}${systemd_system_unitdir}/weston.service; then
        sed -i "/\[Service\]/aUser=root" ${D}${systemd_system_unitdir}/weston.service
    fi

    sed -e 's,User=root,User=${WESTONUSER},g' \
        -e 's,Group=root,Group=${WESTONGROUP},g' \
        -e 's,ExecStart=.*,ExecStart=${WESTONSTART},g' \
        -e 's,@WESTONTTY@,${WESTONTTY},g' \
        -e 's,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \
        -i ${D}${systemd_system_unitdir}/weston.service

    # Add a rule to ensure the 'display' user has permissions to
    # open the graphics device
    install -d ${D}${sysconfdir}/init.d
    install -d ${D}${sysconfdir}/udev/rules.d
    cat >${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF'
SUBSYSTEM=="drm", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
EOF

    # user 'display' must own /dev/tty${WESTONTTY} for weston to start correctly
    cat >${D}${sysconfdir}/udev/rules.d/zz-tty.rules <<'EOF'
SUBSYSTEM=="tty", KERNEL=="tty${WESTONTTY}", OWNER="${WESTONUSER}", SECLABEL{smack}="^", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
EOF

    # user 'display' must also be able to access /dev/input/*
    cat >${D}${sysconfdir}/udev/rules.d/zz-input.rules <<'EOF'
SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="^", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
EOF

    # user 'display' must also be able to access /dev/media*, etc.
    cat >${D}${sysconfdir}/udev/rules.d/zz-remote-display.rules <<'EOF'
SUBSYSTEM=="media", MODE="0660", GROUP="display", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
SUBSYSTEM=="video4linux", MODE="0660", GROUP="display", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
KERNEL=="uvcs", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*"
KERNEL=="rgnmm", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*"
EOF

    install -d ${D}${sysconfdir}/tmpfiles.d
    install -Dm755 ${WORKDIR}/weston_tmpfiles.conf ${D}/${libdir}/tmpfiles.d/weston.conf

    sed -e 's,@WESTONUSER@,${WESTONUSER},g' \
        -e 's,@WESTONGROUP@,${WESTONGROUP},g' \
        -i ${D}/${libdir}/tmpfiles.d/weston.conf
}

do_install_append_imx() {

    install -d ${D}${sysconfdir}/udev/rules.d
    cat >>${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF'
SUBSYSTEM=="gpu_class", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*"
EOF

}

FILES_${PN} += "${libdir}/tmpfiles.d/*.conf"