diff options
Diffstat (limited to '_to_remove')
187 files changed, 7833 insertions, 0 deletions
diff --git a/_to_remove/feature/agl-cloudproxy/50_local.conf.inc b/_to_remove/feature/agl-cloudproxy/50_local.conf.inc new file mode 100644 index 000000000..93b0cb407 --- /dev/null +++ b/_to_remove/feature/agl-cloudproxy/50_local.conf.inc @@ -0,0 +1,2 @@ +# Set cloud proxy flag +AGL_CLOUDPROXY_WANTED = "1"
\ No newline at end of file diff --git a/_to_remove/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb b/_to_remove/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb new file mode 100644 index 000000000..4ff82fee1 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Bluetooth MAP Service Binding" +DESCRIPTION = "AGL Bluetooth MAP Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-bluetooth-map" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-bluetooth-map;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS:${PN} = "bluez5-obex agl-service-bluetooth" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb b/_to_remove/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb new file mode 100644 index 000000000..7b5e7e429 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Bluetooth PBAP Service Binding" +DESCRIPTION = "AGL Bluetooth PBAP Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-bluetooth-pbap" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-bluetooth-pbap;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS:${PN} = "bluez5-obex agl-service-bluetooth agl-service-data-persistence" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb b/_to_remove/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb new file mode 100644 index 000000000..76f5ffa39 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Bluetooth Service Binding" +DESCRIPTION = "AGL Bluetooth Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-bluetooth" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-bluetooth;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS:${PN} = "agl-service-data-persistence agl-service-network" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-can-high-level-viwi/agl-service-can-high-level-viwi.bb b/_to_remove/recipes-apis/agl-service-can-high-level-viwi/agl-service-can-high-level-viwi.bb new file mode 100644 index 000000000..81788646c --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-high-level-viwi/agl-service-can-high-level-viwi.bb @@ -0,0 +1,19 @@ +SUMMARY = "High level ViWi service" +DESCRIPTION = "AGL High Level service using ViWi protocol to expose CAN API." +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-can-high-level-viwi/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5de84541278ea4e62cacfdc0f890c459" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-can-high-level-viwi;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "4.0+git${SRCPV}" +S = "${WORKDIR}/git" + +# Run-time dependencies +RDEPENDS:${PN} += "agl-service-can-low-level" + +inherit cmake aglwgt + +AGLWGT_AUTOINSTALL_${PN} := "0" diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb b/_to_remove/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb new file mode 100644 index 000000000..6ac2f4f29 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "Low level CAN service" +DESCRIPTION = "AGL Service application for read and decode CAN messages" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/low-level-can-service" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-can-low-level;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + +DEPENDS = "libafb-helpers libappcontroller" + +inherit cmake aglwgt pkgconfig ptest + +# For now, just enable J1939 on the qemu platforms where we know the +# linux-yocto kernel is new enough (>= 5.4) and has the support enabled. +AGLWGT_CMAKE_CONFIGURE_ARGS:append:qemuall = " -DWITH_FEATURE_J1939=ON" + +RDEPENDS:${PN} = "virtual/low-can-dev-mapping" diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bbappend b/_to_remove/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bbappend new file mode 100644 index 000000000..bc2d0d357 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " file://can-dev-mapping-helper.conf" + +do_install:append() { + install -D -m 0644 ${WORKDIR}/can-dev-mapping-helper.conf \ + ${D}${sysconfdir}/systemd/system/afm-service-agl-service-can-low-level-.service.d/can-dev-mapping-helper.conf +} + +RDEPENDS:${PN}:append = " can-dev-mapping-helper" diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/can-dev-mapping-helper_1.0.bb b/_to_remove/recipes-apis/agl-service-can-low-level/can-dev-mapping-helper_1.0.bb new file mode 100644 index 000000000..cc50bfe2a --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/can-dev-mapping-helper_1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "Systemd unit for agl-service-can-low-level CAN device helper" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit systemd allarch + +SRC_URI = "file://can-dev-mapping-helper.service \ + file://can-dev-mapping-helper.sh \ +" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service + install -D -m 0755 ${WORKDIR}/${BPN}.sh ${D}${sbindir}/${BPN}.sh +} + +FILES:${PN} += "${systemd_system_unitdir}" + +RDEPENDS:${PN} += "bash" diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.conf b/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.conf new file mode 100644 index 000000000..c89cc4d87 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.conf @@ -0,0 +1,3 @@ +[Unit] +Wants=can-dev-mapping-helper.service +After=can-dev-mapping-helper.service diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.service b/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.service new file mode 100644 index 000000000..0436716cb --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.service @@ -0,0 +1,6 @@ +[Unit] +Description=CAN interface helper + +[Service] +ExecStart=/usr/sbin/can-dev-mapping-helper.sh +Type=oneshot diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.sh b/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.sh new file mode 100644 index 000000000..c81014f3e --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/files/can-dev-mapping-helper.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# +# Script to bring up CAN interfaces configured in /etc/dev-mapping.conf +# as vcan interfaces if no physical interface is present. +# + +vcan_up() { + if [ -n "$1" ]; then + echo "Bringing up $1 as virtual CAN device" + ip link add dev $1 type vcan + ip link set up $1 + fi +} + +if [ ! -f /etc/dev-mapping.conf ]; then + exit 0 +fi + +hs=$(grep ^hs= /etc/dev-mapping.conf |cut -d= -f2 |tr -d '"') +ls=$(grep ^ls= /etc/dev-mapping.conf |cut -d= -f2 |tr -d '"') + +if [ -n "$hs" ]; then + echo "Checking $hs" + if ! ifconfig $hs >/dev/null 2>&1; then + vcan_up $hs + fi +fi +if [ -n "$ls" -a "$ls" != "$hs" ]; then + echo "Checking $ls" + if ! ifconfig $ls >/dev/null 2>&1; then + vcan_up $ls + fi +fi + +exit 0 diff --git a/_to_remove/recipes-apis/agl-service-can-low-level/files/run-ptest b/_to_remove/recipes-apis/agl-service-can-low-level/files/run-ptest new file mode 100644 index 000000000..cc9c41365 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-can-low-level/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +afm-test /usr/AGL/apps/testwgt/low-can-service-test.wgt diff --git a/_to_remove/recipes-apis/agl-service-cloudproxy/agl-service-cloudproxy_git.bb b/_to_remove/recipes-apis/agl-service-cloudproxy/agl-service-cloudproxy_git.bb new file mode 100644 index 000000000..7281a59f0 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-cloudproxy/agl-service-cloudproxy_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "AGL cloud proxy service" +DESCRIPTION = "AGL cloud proxy service build with recipe method" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-cloudproxy" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=34f8c1142fd6208a8be89399cb521df9" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-cloudproxy;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "azure-iot-sdk-c aws-iot-device-sdk-embedded-c glib-2.0 nlohmann-json" + +inherit cmake aglwgt pkgconfig + +# Azure include files +CXXFLAGS:prepend += "-I${STAGING_INCDIR}/azureiot" + +RDEPENDS:${PN} += "azure-iot-sdk-c azure-c-shared-utility aws-iot-device-sdk-embedded-c" + +BBCLASSEXTEND = "native nativesdk" diff --git a/_to_remove/recipes-apis/agl-service-cloudproxy/libcloudproxy_git.bb b/_to_remove/recipes-apis/agl-service-cloudproxy/libcloudproxy_git.bb new file mode 100644 index 000000000..dddfcc8d6 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-cloudproxy/libcloudproxy_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "AGL Client Cloud Proxy Library" +DESCRIPTION = "libcloudproxy" +HOMEPAGE = "http://docs.automotivelinux.org" +LICENSE = "Apache-2.0" +SECTION = "libs" + +BBCLASSEXTEND = " nativesdk" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "af-binder json-c" + +inherit cmake + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libcloudproxy;protocol=https" +SRCREV = "2d66933b9bf25af66696b097283109c8a6e87151" + +S = "${WORKDIR}/git" + diff --git a/_to_remove/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb b/_to_remove/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb new file mode 100644 index 000000000..569f0707e --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "AGL low level user database binding" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-data-persistence/" +SECTION = "base" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-data-persistence;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +inherit cmake aglwgt pkgconfig + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " af-binder json-c gdbm " + diff --git a/_to_remove/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb b/_to_remove/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb new file mode 100644 index 000000000..a12923247 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "GeoClue Service Binding" +DESCRIPTION = "AGL GeoClue Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-geoclue" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-geoclue;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c geoclue" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb b/_to_remove/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb new file mode 100644 index 000000000..05f7f0eaa --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Geofence Service Binding" +DESCRIPTION = "AGL Geofence Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-geofence" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-geofence;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c glib-2.0" +RDEPENDS:${PN} = "agl-service-gps" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-gps/agl-service-gps_git.bb b/_to_remove/recipes-apis/agl-service-gps/agl-service-gps_git.bb new file mode 100644 index 000000000..dfa7b3ebf --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-gps/agl-service-gps_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "GPS/GNSS Service Binding" +DESCRIPTION = "AGL GPS/GNSS Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-gps" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-gps;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c gpsd" +RDEPENDS:${PN} = "libgps" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb b/_to_remove/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb new file mode 100644 index 000000000..7d2661bc0 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb @@ -0,0 +1,14 @@ +SUMMARY = "Homescreen binding and client library for application" +DESCRIPTION = "agl-service-homescreen is the binding library" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-homescreen" +SECTION = "HMI" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "dbus glib-2.0 af-binder json-c" + +inherit cmake aglwgt + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-homescreen;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" +S = "${WORKDIR}/git" diff --git a/_to_remove/recipes-apis/agl-service-hvac/agl-service-hvac-conf_git.bb b/_to_remove/recipes-apis/agl-service-hvac/agl-service-hvac-conf_git.bb new file mode 100644 index 000000000..4078c6107 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-hvac/agl-service-hvac-conf_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "HVAC Service Binding Configuration" +DESCRIPTION = "AGL HVAC Service Binding Configuration" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-hvac" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-hvac;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install () { + install -D -m 644 ${S}/hvac.json ${D}${sysconfdir}/hvac.json +} + +do_install:append:ulcb() { + sed -i -e "s#vcan0#sllin0#g" ${D}${sysconfdir}/hvac.json +} + diff --git a/_to_remove/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb b/_to_remove/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb new file mode 100644 index 000000000..8d1399c60 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "HVAC Service Binding" +DESCRIPTION = "AGL HVAC Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-hvac" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-hvac;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c" + +inherit cmake aglwgt pkgconfig + +RDEPENDS:${PN} += "agl-service-identity-agent agl-service-can-low-level" +RRECOMMENDS:${PN} += "agl-service-hvac-conf" diff --git a/_to_remove/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb b/_to_remove/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb new file mode 100644 index 000000000..f2474be7b --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "AGL identity agent binding" +HOMEPAGE = "https://gitlab.com/iotbzh/aia-binding" +SECTION = "base" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-identity-agent;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" +PV = "1.0+git${SRCPV}" + +inherit cmake aglwgt pkgconfig + +S = "${WORKDIR}/git" + +DEPENDS = "curl af-binder json-c systemd" + diff --git a/_to_remove/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb b/_to_remove/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb new file mode 100644 index 000000000..600f9103a --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "IIODEVICES Service Binding" +DESCRIPTION = "AGL IIODEVICES Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-iiodevices" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-iiodevices;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c libiio glib-2.0" + +RDEPENDS:${PN} = "libiio" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb b/_to_remove/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb new file mode 100644 index 000000000..c7d695f25 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Mediaplayer Service Binding" +DESCRIPTION = "AGL Mediaplayer Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-mediaplayer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-mediaplayer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c gstreamer1.0 gstreamer1.0-plugins-base" +RDEPENDS:${PN} = "agl-service-mediascanner agl-service-bluetooth gstreamer1.0-plugins-bad-waylandsink" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb b/_to_remove/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb new file mode 100644 index 000000000..1013ab693 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Mediascanner Service Binding" +DESCRIPTION = "AGL Mediascanner Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-mediascanner" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-mediascanner;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c sqlite3 glib-2.0" +RDEPENDS:${PN} = "lightmediascanner" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb b/_to_remove/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb new file mode 100755 index 000000000..2d40d15ee --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Navigation Service Binding" +DESCRIPTION = "AGL Navigation Service API Binding" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "json-c libdbus-c++" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-navigation;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig + +RDEPENDS:${PN} += "json-c libdbus-c++" diff --git a/_to_remove/recipes-apis/agl-service-network/agl-service-network_git.bb b/_to_remove/recipes-apis/agl-service-network/agl-service-network_git.bb new file mode 100644 index 000000000..3599e3cd7 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-network/agl-service-network_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Network Service Binding" +DESCRIPTION = "AGL Network Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-network" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-network;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" + +inherit cmake aglwgt pkgconfig + +do_install:append() { + install -d ${D}${sbindir} + install -m 755 ${B}/build-release/test/agl-service-network-ctl ${D}${sbindir} +} + +FILES:${PN}-tools = "${sbindir}/agl-service-network-ctl" +PACKAGES:prepend = "${PN}-tools " diff --git a/_to_remove/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb b/_to_remove/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb new file mode 100644 index 000000000..1757dcb38 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "agl-service-nfc" +DESCRIPTION = "" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-nfc/" +SECTION = "apps" +DEPENDS = "af-binder json-c glib-2.0 neardal" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake pkgconfig aglwgt + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-nfc;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + diff --git a/_to_remove/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb b/_to_remove/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb new file mode 100644 index 000000000..43eed3f2e --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Platform info provider binding" +DESCRIPTION = "AGL Platform info provider binding" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-platform-info/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-platform-info;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "libafb-helpers" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-radio/agl-service-radio_git.bb b/_to_remove/recipes-apis/agl-service-radio/agl-service-radio_git.bb new file mode 100644 index 000000000..a46ce128c --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-radio/agl-service-radio_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Radio Service Binding" +DESCRIPTION = "AGL Radio Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-radio" +SECTION = "apps" +LICENSE = "Apache-2.0 & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ + file://LICENSE.GPL-2.0-only;md5=751419260aa954499f7abaabaa882bbe" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-radio;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +# build-time dependencies +DEPENDS = "rtl-sdr glib-2.0 gstreamer1.0 libusb-compat" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb b/_to_remove/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb new file mode 100644 index 000000000..8f79527e6 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "agl-service-signal-composer" +DESCRIPTION = "AGL High Level Signaling service to handle CAN, LIN, and others signaling sources" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-signal-composer/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake pkgconfig aglwgt ptest + +DEPENDS += "lua lua-native libappcontroller libafb-helpers" +RDEPENDS:${PN} += "lua" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-signal-composer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" diff --git a/_to_remove/recipes-apis/agl-service-signal-composer/files/run-ptest b/_to_remove/recipes-apis/agl-service-signal-composer/files/run-ptest new file mode 100644 index 000000000..49187ad85 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-signal-composer/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +afm-test /usr/AGL/apps/testwgt/signal-composer-test.wgt diff --git a/_to_remove/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb b/_to_remove/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb new file mode 100644 index 000000000..6c5a18107 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb @@ -0,0 +1,18 @@ +SUMMARY = "Task Manager Service Binding" +DESCRIPTION = "AGL Task Manager Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-taskmanager" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-taskmanager;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c procps" + +inherit cmake aglwgt pkgconfig + diff --git a/_to_remove/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb b/_to_remove/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb new file mode 100644 index 000000000..656d76e0c --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Telephony Service Binding" +DESCRIPTION = "AGL Telephony Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-telephony" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-telephony;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c glib-2.0" +RDEPENDS:${PN} = "ofono" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-apis/agl-service-unicens-controller/agl-service-unicens-controller_git.bb b/_to_remove/recipes-apis/agl-service-unicens-controller/agl-service-unicens-controller_git.bb new file mode 100644 index 000000000..90df1dc48 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-unicens-controller/agl-service-unicens-controller_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Infotainment network device control" +DESCRIPTION = "Abstraction layer to control INICnet devices" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-unicens-controller" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-unicens-controller;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig + +DEPENDS += "json-c af-binder libafb-helpers" +RDEPENDS:${PN} += "agl-service-unicens" + diff --git a/_to_remove/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb b/_to_remove/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb new file mode 100644 index 000000000..b6f006e39 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "4A - Infotainment network setup and access" +DESCRIPTION = "Infotainment network setup and access (using Unified Centralized Network Stack)" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-unicens" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-unicens;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig + +DEPENDS += "alsa-lib json-c systemd af-binder glib-2.0 libxml2 libafb-helpers" +RDEPENDS:${PN} += "libxml2 " + diff --git a/_to_remove/recipes-apis/agl-service-voice-high-capabilities/agl-service-voice-high-capabilities_git.bb b/_to_remove/recipes-apis/agl-service-voice-high-capabilities/agl-service-voice-high-capabilities_git.bb new file mode 100644 index 000000000..0ab1f3d8f --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-voice-high-capabilities/agl-service-voice-high-capabilities_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "agl-service-voice-high" +DESCRIPTION = "AGL High Level Voice service" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-voice-high-capabilities" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS = "libafb-helpers libappcontroller nlohmann-json" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high-capabilities.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake pkgconfig aglwgt diff --git a/_to_remove/recipes-apis/agl-service-voice-high/agl-service-voice-high_git.bb b/_to_remove/recipes-apis/agl-service-voice-high/agl-service-voice-high_git.bb new file mode 100644 index 000000000..54620144a --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-voice-high/agl-service-voice-high_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "High level voice service binding" +DESCRIPTION = "agl-service-voice-high is the binding library" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS = "json-c systemd af-binder libafb-helpers libappcontroller nlohmann-json glib-2.0" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt + +RDEPENDS:${PN} += "virtual/voice-high-config" diff --git a/_to_remove/recipes-apis/agl-service-voice-high/default-voice-high-config/voice-high.json b/_to_remove/recipes-apis/agl-service-voice-high/default-voice-high-config/voice-high.json new file mode 100644 index 000000000..1b72b8c85 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-voice-high/default-voice-high-config/voice-high.json @@ -0,0 +1 @@ +{ "default": "" } diff --git a/_to_remove/recipes-apis/agl-service-voice-high/default-voice-high-config_1.0.bb b/_to_remove/recipes-apis/agl-service-voice-high/default-voice-high-config_1.0.bb new file mode 100644 index 000000000..caa66188f --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-voice-high/default-voice-high-config_1.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "High level voice service binding default voiceagent configuration" +DESCRIPTION = "Default voiceagent JSON configuration file for agl-service-voice-high binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-voice-high" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "file://voice-high.json" + +inherit allarch + +do_compile[noexec] = "1" + +do_install () { + install -D -m 644 ${WORKDIR}/voice-high.json ${D}${sysconfdir}/xdg/AGL/voice-high.json +} + +RPROVIDES:${PN} += "virtual/voice-high-config" + diff --git a/_to_remove/recipes-apis/agl-service-weather/agl-service-weather_git.bb b/_to_remove/recipes-apis/agl-service-weather/agl-service-weather_git.bb new file mode 100644 index 000000000..abc401f93 --- /dev/null +++ b/_to_remove/recipes-apis/agl-service-weather/agl-service-weather_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Weather Service Binding" +DESCRIPTION = "AGL Weather Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-weather" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-weather;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS:${PN} = "agl-service-geoclue" + +inherit cmake aglwgt pkgconfig diff --git a/_to_remove/recipes-config/cluster-dashboard-demo-config/cluster-dashboard-demo-config_1.0.bb b/_to_remove/recipes-config/cluster-dashboard-demo-config/cluster-dashboard-demo-config_1.0.bb new file mode 100644 index 000000000..f1fce78f8 --- /dev/null +++ b/_to_remove/recipes-config/cluster-dashboard-demo-config/cluster-dashboard-demo-config_1.0.bb @@ -0,0 +1,11 @@ +SUMMARY = "AGL cluster demo dashboard configuration file" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += "file://AGL.conf.cluster" + +inherit allarch + +do_install() { + install -D -m 0644 ${WORKDIR}/AGL.conf.cluster ${D}${sysconfdir}/xdg/AGL.conf +} diff --git a/_to_remove/recipes-config/cluster-dashboard-demo-config/files/AGL.conf.cluster b/_to_remove/recipes-config/cluster-dashboard-demo-config/files/AGL.conf.cluster new file mode 100644 index 000000000..dd8a912c5 --- /dev/null +++ b/_to_remove/recipes-config/cluster-dashboard-demo-config/files/AGL.conf.cluster @@ -0,0 +1,2 @@ +[dashboard] +animation=false diff --git a/_to_remove/recipes-config/cluster-demo-network-config/cluster-demo-network-config_1.0.bb b/_to_remove/recipes-config/cluster-demo-network-config/cluster-demo-network-config_1.0.bb new file mode 100644 index 000000000..8d737282d --- /dev/null +++ b/_to_remove/recipes-config/cluster-demo-network-config/cluster-demo-network-config_1.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Setting files for cluster network for the AGL Demonstrator" +DESCRIPTION = "Setting files for cluster network for the AGL Demonstrator" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit systemd allarch + +SRC_URI = "file://cluster-demo-network-conf@.service \ + file://cluster-demo-network-conf.sh \ +" + +# Network device for dedicated connection to cluster +AGL_CLUSTER_NET_DEVICE ?= "eth1" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + # Install helper script + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/cluster-demo-network-conf.sh ${D}${sbindir}/ + + # Install service unit + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/cluster-demo-network-conf@.service ${D}${systemd_system_unitdir}/ + + # Add symlink to network.target.wants + install -d ${D}${sysconfdir}/systemd/system/network.target.wants + ln -s ${systemd_system_unitdir}/cluster-demo-network-conf@.service \ + ${D}${sysconfdir}/systemd/system/network.target.wants/cluster-demo-network-conf@${AGL_CLUSTER_NET_DEVICE}.service +} + +FILES:${PN} += "${systemd_system_unitdir}" diff --git a/_to_remove/recipes-config/cluster-demo-network-config/files/cluster-demo-network-conf.sh b/_to_remove/recipes-config/cluster-demo-network-config/files/cluster-demo-network-conf.sh new file mode 100644 index 000000000..3f538175f --- /dev/null +++ b/_to_remove/recipes-config/cluster-demo-network-config/files/cluster-demo-network-conf.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +CONNMAN_CONF=/etc/connman/main.conf +CLUSTER_ADDRESS=192.168.20.93 + +if [ -z "$1" ]; then + echo "Usage: $0 <network device>" + exit 1 +fi + +# Need to blacklist given device with connman if it isn't already, +# otherwise connman will over-ride address configuration. +if ! grep '^NetworkInterfaceBlacklist=' ${CONNMAN_CONF} | grep -q $1; then + sed -i "s/^\(NetworkInterfaceBlacklist=.*\)/\1,$1/" ${CONNMAN_CONF} +fi + +/sbin/ifconfig $1 ${CLUSTER_ADDRESS} diff --git a/_to_remove/recipes-config/cluster-demo-network-config/files/cluster-demo-network-conf@.service b/_to_remove/recipes-config/cluster-demo-network-config/files/cluster-demo-network-conf@.service new file mode 100644 index 000000000..5fc29b7a0 --- /dev/null +++ b/_to_remove/recipes-config/cluster-demo-network-config/files/cluster-demo-network-conf@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Configure dedicated link for cluster demo network +After=sys-subsystem-net-devices-%i.device +Requires=sys-subsystem-net-devices-%i.device +Before=network.target + +[Service] +ExecStart=/usr/sbin/cluster-demo-network-conf.sh %i +Type=oneshot + +[Install] +WantedBy=network.target diff --git a/_to_remove/recipes-config/cluster-demo-simulator/cluster-demo-simulator.bb b/_to_remove/recipes-config/cluster-demo-simulator/cluster-demo-simulator.bb new file mode 100644 index 000000000..2eaabc979 --- /dev/null +++ b/_to_remove/recipes-config/cluster-demo-simulator/cluster-demo-simulator.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Systemd unit to start simple CAN simulator" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://cluster-demo-simulator.service" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "cluster-demo-simulator.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/cluster-demo-simulator.service ${D}${systemd_system_unitdir} +} + +FILES:${PN} += "${systemd_system_unitdir}" + +RDEPENDS:${PN} = "simple-can-simulator" diff --git a/_to_remove/recipes-config/cluster-demo-simulator/files/cluster-demo-simulator.service b/_to_remove/recipes-config/cluster-demo-simulator/files/cluster-demo-simulator.service new file mode 100644 index 000000000..04d41c6cf --- /dev/null +++ b/_to_remove/recipes-config/cluster-demo-simulator/files/cluster-demo-simulator.service @@ -0,0 +1,13 @@ +[Unit] +Description=Cluster demo driving simulator +After=sllin-demo.service sllin-demo-virtual.service cluster-lin-bridging.service +Requires=sllin-demo.service sllin-demo-virtual.service cluster-lin-bridging.service + +[Service] +Type=simple +Restart=always +RestartSec=1 +ExecStart=/usr/bin/python3 /usr/sbin/simple_can_simulator.py + +[Install] +WantedBy=multi-user.target diff --git a/_to_remove/recipes-config/cluster-demo-simulator/files/simple_can_simulator.py b/_to_remove/recipes-config/cluster-demo-simulator/files/simple_can_simulator.py new file mode 100755 index 000000000..83f88706e --- /dev/null +++ b/_to_remove/recipes-config/cluster-demo-simulator/files/simple_can_simulator.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 Alex Bencz +# Copyright (c) 2019 Konsulko Group, smurray@konsulko.com +# Copyright (c) 2020 The Linux Foundation, jsmoeller@linuxfoundation.org +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# of the Software, and to permit persons to whom the Software is furnished to do +# so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# +# CANSocket from: +# +# https://github.com/abencz/python_socketcan/blob/master/python_socketcan_example.py +# + +import sys +import socket +import argparse +import struct +import errno +import threading +import time + +class CANSocket(object): + FORMAT = "<IB3x8s" + FD_FORMAT = "<IB3x64s" + + def __init__(self, interface=None): + self.sock = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) + if interface is not None: + self.bind(interface) + + def bind(self, interface): + self.sock.bind((interface,)) + self.sock.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FD_FRAMES, 1) + + def send(self, can_id, data, flags=0): + can_id = can_id | flags + can_pkt = struct.pack(self.FORMAT, can_id, len(data), data) + self.sock.send(can_pkt) + + def sendfd(self, can_id, data, flags=0): + can_id = can_id | flags + datafd = data.ljust(64, b'\x00'); + can_pkt = struct.pack(self.FD_FORMAT, can_id, len(datafd), datafd) + self.sock.send(can_pkt) + + def recv(self, flags=0): + can_pkt = self.sock.recv(72) + + if len(can_pkt) == 16: + can_id, length, data = struct.unpack(self.FORMAT, can_pkt) + else: + can_id, length, data = struct.unpack(self.FD_FORMAT, can_pkt) + + can_id &= socket.CAN_EFF_MASK + return (can_id, data[:length]) + +class VehicleSimulator(object): + DEFAULT_IDLE_RPM = 600 + + def __init__(self): + self.CRUISEMODE = False + self.CRUISEACTIVE = False + self.CRUISESPEED = 0 + self.CRUISERPM = 0 + self.freq = 10 + self.vehicle_speed = 0 + self.engine_speed = self.DEFAULT_IDLE_RPM + self.thread = threading.Thread(target=self.run, daemon=True) + self.lock = threading.Lock() + + def reset(self): + with self.lock: + self.vehicle_speed = 0 + self.engine_speed = self.DEFAULT_IDLE_RPM + + def start(self): + self.thread.start() + + def get_engine_speed(self): + with self.lock: + return int(self.engine_speed) + + def get_vehicle_speed(self): + with self.lock: + return int(self.vehicle_speed) + + def accelerate(self, target_speed, target_rpm, duration, bycruise = False): + if target_speed <= self.vehicle_speed: + return + v = (target_speed - self.vehicle_speed) / (duration * self.freq) + r = (target_rpm - self.engine_speed) / (duration * self.freq) + while self.vehicle_speed < target_speed and (not self.CRUISEACTIVE or bycruise): + with self.lock: + self.vehicle_speed += v; + self.engine_speed += r; + time.sleep(1 / self.freq) + + def brake(self, target_speed, target_rpm, duration, bycruise = False): + if target_speed >= self.vehicle_speed: + return + v = (self.vehicle_speed - target_speed) / (duration * self.freq) + r = (self.engine_speed - target_rpm) / (duration * self.freq) + while self.vehicle_speed > target_speed and (not self.CRUISEACTIVE or bycruise): + with self.lock: + self.vehicle_speed -= v; + self.engine_speed -= r; + time.sleep(1 / self.freq) + + def increase(self, bycruise = True): + if self.CRUISEACTIVE: + target_speed = self.vehicle_speed + 5 + target_rpm = self.engine_speed * 1.1 + self.accelerate(target_speed, target_rpm, 2, bycruise) + + def decrease(self, bycruise = True): + if self.CRUISEACTIVE: + target_speed = self.vehicle_speed - 5 + target_rpm = self.engine_speed * 0.9 + self.brake(target_speed, target_rpm, 2, bycruise) + + def resume(self, bycruise = True): + target_speed = self.CRUISESPEED + target_rpm = self.CRUISERPM + current_speed = self.get_vehicle_speed() + if target_speed > current_speed: + self.accelerate(target_speed, target_rpm, 2, bycruise) + else: + self.brake(target_speed, target_rpm, 2, bycruise) + + def run(self): + while True: + if not self.CRUISEACTIVE: + self.accelerate(80, 3000, 5) + self.accelerate(104, 4000, 3) + self.brake(80, 3000, 3) + self.accelerate(104, 4000, 6) + self.brake(40, 2000, 4) + self.accelerate(90, 3000, 5) + self.brake(1, 650, 5) + if not self.CRUISEACTIVE: + self.reset() + time.sleep(5) + +class DiagnosticMessageHandler(object): + def __init__(self, can_sock, simulator, verbose=False): + self.can_sock = can_sock + self.simulator = simulator + self.verbose = verbose + self.thread = threading.Thread(target=self.run, daemon=True) + + def start(self): + self.thread.start() + + def run(self): + while True: + can_id, data = self.can_sock.recv() + #print('%03X#%s' % (can_id, ''.join(format(x, '02X') for x in data))) + if can_id == 0x7df: + # OBD-II request + if data[1] == 0x01 and data[2] == 0x0C: + # Engine speed + speed = self.simulator.get_engine_speed() + #print('engine speed = %d' % speed) + if speed > 16383.75: + speed = 16383.75 + reply = [ 0x04, 0x41, 0x0C ] + reply.append(4 * speed // 256) + reply.append(4 * speed % 256) + # pad remaining bytes to make 8 + reply.append(0) + reply.append(0) + reply.append(0) + self.can_sock.send(0x7e8, bytes(reply), 0) + elif data[1] == 0x01 and data[2] == 0x0D: + # Vehicle speed + speed = int(self.simulator.get_vehicle_speed()) % 256 + #print('vehicle speed = %d' % speed) + reply = [ 0x03, 0x41, 0x0D ] + reply.append(speed) + # pad remaining bytes to make 8 + reply.append(0) + reply.append(0) + reply.append(0) + reply.append(0) + self.can_sock.send(0x7e8, bytes(reply), 0) + +class SteeringWheelMessageHandler(object): + def __init__(self, can_sock, simulator, verbose=False): + self.can_sock = can_sock + self.simulator = simulator + self.verbose = verbose + self.thread = threading.Thread(target=self.run, daemon=True) + self.buttonpressed = False + self.buttonenabled = False + self.buttoncancel = False + self.buttondec = False + self.buttoninc = False + self.cruisemode = False + self.cruiseactive = False + + def start(self): + self.thread.start() + + def run(self): + while True: + can_id, data = self.can_sock.recv() + #print('%03X#%s' % (can_id, ''.join(format(x, '02X') for x in data))) + if can_id == 0x21: + #print('%03X#%s' % (can_id, ''.join(format(x, '02X') for x in data))) + if data: + #if data[6]: + #print('data6: %02X' % (data[6])) + if data[6] == 0x80 and not self.buttonpressed: + # we do skip any further lin messages + # two buttons at the same time won't work + # (aka unlikely w/o twisting fingers) + self.buttonpressed = True + self.buttonenabled = True + if data[6] == 0x08 and not self.buttonpressed: + self.buttonpressed = True + self.buttoncancel = True + if data[6] == 0x10 and not self.buttonpressed: + self.buttonpressed = True + self.buttondec = True + if data[6] == 0x40 and not self.buttonpressed: + self.buttonpressed = True + self.buttoninc = True + if data[6] == 0x00 and self.buttonpressed: + #now handle it as the button was released + if self.buttonenabled: + self.buttonenabled = False + self.cruisemode = not self.cruisemode + #print("set cruisemode to %s" % self.cruisemode) + self.simulator.CRUISEMODE = self.cruisemode + # disable/reset all if going off + if not self.cruisemode: + self.cruiseactive = False + self.simulator.CRUISEACTIVE = self.cruiseactive + self.simulator.CRUISESPEED = 0 + self.simulator.CRUISERPM = 0 + #print("set cruiseactive to %s" % self.cruiseactive) + if self.buttoncancel: + self.buttoncancel = False + self.simulator.CRUISESPEED = self.simulator.get_vehicle_speed() + self.simulator.CRUISERPM = self.simulator.get_engine_speed() + #print("set cruisespeed to %d" % self.simulator.CRUISESPEED ) + #print("set cruiserpm to %d" % self.simulator.CRUISERPM ) + self.cruiseactive = False + #print("set cruiseactive to %s" % self.cruiseactive ) + self.simulator.CRUISEACTIVE = self.cruiseactive + if self.buttondec: + self.buttondec = False + if self.cruiseactive: + #print("decrease") + self.simulator.decrease() + else: + # set speed + #print("set speed") + self.simulator.CRUISESPEED = self.simulator.get_vehicle_speed() + self.simulator.CRUISERPM = self.simulator.get_engine_speed() + #print("set cruisespeed to %d" % self.simulator.CRUISESPEED ) + #print("set cruiserpm to %d" % self.simulator.CRUISERPM ) + self.cruiseactive = not self.cruiseactive + #print("set cruiseactive to %s" % self.cruiseactive ) + self.simulator.CRUISEACTIVE = self.cruiseactive + if self.buttoninc: + self.buttoninc = False + if self.cruiseactive: + #print("increase") + self.simulator.increase() + else: + if self.simulator.CRUISESPEED > 0: + # resume + self.cruiseactive = not self.cruiseactive + self.simulator.CRUISEACTIVE = self.cruiseactive + #print("set cruiseactive to %s" % self.cruiseactive ) + #print("resume") + self.simulator.resume() + self.buttonpressed = False + + +class StatusMessageSender(object): + def __init__(self, can_sock, simulator, verbose=False): + self.can_sock = can_sock + self.simulator = simulator + self.verbose = verbose + self.thread = threading.Thread(target=self.run, daemon=True) + + def start(self): + self.thread.start() + + def run(self): + while True: + # Engine speed + speed = self.simulator.get_engine_speed() + if self.verbose: + print('engine speed = %d' % speed) + if speed > 16383.75: + speed = 16383.75 + # Message is 1 byte unknown, 1 byte fuel level, 2 bytes engine speed (4x), fuel low @ bit 55 + msg = [ 0, 0 ] + speed *= 4 + msg.append(speed // 256) + msg.append(speed % 256) + # pad remaining bytes to make 8 + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + self.can_sock.send(0x3d9, bytes(msg), 0) + + # Vehicle speed + speed = int(self.simulator.get_vehicle_speed()) % 256 + if self.verbose: + print('vehicle speed = %d' % speed) + # Message is 15 bits speed (64x), left aligned + msg = [ ] + # Note: extra 2x to yield required left-alignment + speed *= 128 + msg.append(speed // 256) + msg.append(speed % 256) + # pad remaining bytes to make 8 + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + self.can_sock.send(0x3e9, bytes(msg), 0) + + # Sleep 100 ms + time.sleep(0.1) + +def main(): + parser = argparse.ArgumentParser(description='Simple CAN vehicle simulator.') + parser.add_argument('interface', type=str, help='interface name (e.g. vcan0)') + parser.add_argument('-v', '--verbose', help='increase output verbosity', action='store_true') + args = parser.parse_args() + + try: + can_sock = CANSocket(args.interface) + diag_can_sock = CANSocket(args.interface) + steeringwheel_can_sock = CANSocket(args.interface) + except OSError as e: + sys.stderr.write('Could not listen on interface {0}\n'.format(args.interface)) + sys.exit(e.errno) + + print('Using {0}'.format(args.interface)) + sim = VehicleSimulator() + status_sender = StatusMessageSender(can_sock, sim, args.verbose) + diag_handler = DiagnosticMessageHandler(diag_can_sock, sim, args.verbose) + steeringwheel_handler = SteeringWheelMessageHandler(steeringwheel_can_sock, sim, args.verbose) + sim.start() + status_sender.start() + diag_handler.start() + steeringwheel_handler.start() + try: + while True: + time.sleep(60) + except (KeyboardInterrupt, SystemExit): + #sim.stop() + sys.exit(0) + +if __name__ == '__main__': + main() diff --git a/_to_remove/recipes-config/cluster-lin-bridging-config/cluster-lin-bridging-config.bb b/_to_remove/recipes-config/cluster-lin-bridging-config/cluster-lin-bridging-config.bb new file mode 100644 index 000000000..5366f2d0b --- /dev/null +++ b/_to_remove/recipes-config/cluster-lin-bridging-config/cluster-lin-bridging-config.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Configure LIN to external CAN bridging" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "\ + file://cluster-lin-bridging.service \ +" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "cluster-lin-bridging.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/cluster-lin-bridging.service ${D}${systemd_system_unitdir} +} + +FILES:${PN} += "${systemd_system_unitdir}" + +RDEPENDS:${PN} = " \ + can-utils \ + sllin \ +" diff --git a/_to_remove/recipes-config/cluster-lin-bridging-config/files/cluster-lin-bridging.service b/_to_remove/recipes-config/cluster-lin-bridging-config/files/cluster-lin-bridging.service new file mode 100644 index 000000000..1dde33786 --- /dev/null +++ b/_to_remove/recipes-config/cluster-lin-bridging-config/files/cluster-lin-bridging.service @@ -0,0 +1,11 @@ +[Unit] +Description=LIN to CAN bridging +After=sllin-demo.service sllin-demo-virtual.service +Requires=sllin-demo.service sllin-demo-virtual.service + +[Service] +Type=simple +ExecStart=/usr/bin/candump -s 2 -B can0 sllin0 + +[Install] +WantedBy=multi-user.target diff --git a/_to_remove/recipes-config/dev-mapping/dev-mapping-ci/dev-mapping.conf.ci b/_to_remove/recipes-config/dev-mapping/dev-mapping-ci/dev-mapping.conf.ci new file mode 100644 index 000000000..bd5c2135a --- /dev/null +++ b/_to_remove/recipes-config/dev-mapping/dev-mapping-ci/dev-mapping.conf.ci @@ -0,0 +1,7 @@ +; Default CAN device mapping +; Format has to follow ini rules key="value", notice " around value. + +[CANbus-mapping] +hs="vcan0" +ls="vcan0" +j1939="vcan0" diff --git a/_to_remove/recipes-config/dev-mapping/dev-mapping-ci_1.0.bb b/_to_remove/recipes-config/dev-mapping/dev-mapping-ci_1.0.bb new file mode 100644 index 000000000..7b40e40c6 --- /dev/null +++ b/_to_remove/recipes-config/dev-mapping/dev-mapping-ci_1.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "AGL demo device mapping configuration file" +DESCRIPTION = "This provides a default dev-mapping.conf file \ + that defines mapping between kernel device and logical name \ + used in the low-can binding for the AGL CI setup." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += "file://dev-mapping.conf.ci" + +inherit allarch + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/dev-mapping.conf.ci ${D}${sysconfdir}/dev-mapping.conf +} + +RPROVIDES:${PN} = "virtual/low-can-dev-mapping" diff --git a/_to_remove/recipes-config/dev-mapping/dev-mapping-demo/dev-mapping.conf.demo b/_to_remove/recipes-config/dev-mapping/dev-mapping-demo/dev-mapping.conf.demo new file mode 100644 index 000000000..1fd12ad03 --- /dev/null +++ b/_to_remove/recipes-config/dev-mapping/dev-mapping-demo/dev-mapping.conf.demo @@ -0,0 +1,7 @@ +; Default CAN device mapping +; Format has to follow ini rules key="value", notice " around value. + +[CANbus-mapping] +hs="can0" +ls="sllin0" +j1939="can0" diff --git a/_to_remove/recipes-config/dev-mapping/dev-mapping-demo_1.0.bb b/_to_remove/recipes-config/dev-mapping/dev-mapping-demo_1.0.bb new file mode 100644 index 000000000..23fdc078a --- /dev/null +++ b/_to_remove/recipes-config/dev-mapping/dev-mapping-demo_1.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "AGL demo device mapping configuration file" +DESCRIPTION = "This provide default dev-mapping.conf file \ + that defines mapping between kernel device and logical name \ + used in low-can binding for the AGL demo setup." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += "file://dev-mapping.conf.demo" + +inherit allarch + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/dev-mapping.conf.demo ${D}${sysconfdir}/dev-mapping.conf +} + +RPROVIDES:${PN} = "virtual/low-can-dev-mapping" diff --git a/_to_remove/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default b/_to_remove/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default new file mode 100644 index 000000000..8519a5873 --- /dev/null +++ b/_to_remove/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default @@ -0,0 +1,7 @@ +; Default CAN device mapping +; Format has to follow ini rules key="value", notice " around value. + +[CANbus-mapping] +hs="can0" +ls="can0" +j1939="can0" diff --git a/_to_remove/recipes-config/dev-mapping/dev-mapping_0.1.bb b/_to_remove/recipes-config/dev-mapping/dev-mapping_0.1.bb new file mode 100644 index 000000000..f880d39d8 --- /dev/null +++ b/_to_remove/recipes-config/dev-mapping/dev-mapping_0.1.bb @@ -0,0 +1,18 @@ +SUMMARY = "AGL Device mapping configuration file" +DESCRIPTION = "This provide default dev-mapping.conf file \ + that defines mapping between kernel device and logical name \ + used in low-can binding by example." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += "file://dev-mapping.conf.default" + +inherit allarch + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/dev-mapping.conf.default ${D}${sysconfdir}/dev-mapping.conf +} + +RPROVIDES:${PN} = "virtual/low-can-dev-mapping" diff --git a/_to_remove/recipes-config/systemd-sync/systemd-agl-sync_1.0.bb b/_to_remove/recipes-config/systemd-sync/systemd-agl-sync_1.0.bb new file mode 100644 index 000000000..0b2dc4e4d --- /dev/null +++ b/_to_remove/recipes-config/systemd-sync/systemd-agl-sync_1.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "Systemd synchronization script" +DESCRIPTION = "\ +Systemd synchronization script \ +reload daemon at the first boot. \ +" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +#This script should be the last to be execute at the first boot +POST_INSTALL_LEVEL = "X0" +POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh" + +do_install() { + install -d ${D}/${sysconfdir}/agl-postinsts + cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF +#!/bin/sh -e +echo "restart daemon ..." +result=0 +systemctl daemon-reload +if [ \$? -ne 0 ]; then + result=1 +fi +systemctl restart sockets.target +if [ \$? -ne 0 ]; then + result=1 +fi + +if [ \$result -eq 0 ]; then + echo "restart daemon OK" + exit \$result +else + echo "restart daemon failed" + exit \$result +fi +EOF + chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} +} + +FILES:${PN} = "${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}" diff --git a/_to_remove/recipes-config/unicens-config/files/55-inic.rules b/_to_remove/recipes-config/unicens-config/files/55-inic.rules new file mode 100644 index 000000000..2da65cb80 --- /dev/null +++ b/_to_remove/recipes-config/unicens-config/files/55-inic.rules @@ -0,0 +1,4 @@ +# OS81118 devices for Microchip UNICENS +KERNEL=="inic-usb-crx", SUBSYSTEM=="most_cdev_aim", GROUP="audio", SECLABEL{smack}="*" +KERNEL=="inic-usb-ctx", SUBSYSTEM=="most_cdev_aim", GROUP="audio", SECLABEL{smack}="*" +KERNEL=="inic-usb-itx1", SUBSYSTEM=="most_cdev_aim", GROUP="audio", SECLABEL{smack}="*" diff --git a/_to_remove/recipes-config/unicens-config/files/unicens-config.service b/_to_remove/recipes-config/unicens-config/files/unicens-config.service new file mode 100644 index 000000000..43c8a1673 --- /dev/null +++ b/_to_remove/recipes-config/unicens-config/files/unicens-config.service @@ -0,0 +1,11 @@ +[Unit] +Description=Driver configuration for Unicens2 +After=systemd-modules-load.service +Requires=systemd-modules-load.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/unicens-config.sh + +[Install] +WantedBy=multi-user.target diff --git a/_to_remove/recipes-config/unicens-config/files/unicens-config.sh b/_to_remove/recipes-config/unicens-config/files/unicens-config.sh new file mode 100644 index 000000000..1f7fd3906 --- /dev/null +++ b/_to_remove/recipes-config/unicens-config/files/unicens-config.sh @@ -0,0 +1,143 @@ +#!/bin/bash + +########################################################################## +# NOTE: This script is intentended to be used with the MOST starter-kit[1] +# in conjuction with the agl-service-unicens widget only. For other setups +# this script and also the UNICENS config settings need to be adapted +# accordingly. +# +# An optional approach to configure the driver is provided by the +# default_conf.ko kernel module that can be found in +# /lib/modules/`uname -r`/extra +# +# +# [1]: The starter-kit consists of one Network Interface Controller and +# three slim amplifier modules) +########################################################################## + + +########################################## +# interface: mdev0 +# chip: Vantage +# aim: cdev +# name: inic-usb-crx +echo rx > /sys/devices/virtual/most/mostcore/devices/mdev0/ep8f/set_direction 2>/dev/null +echo control > /sys/devices/virtual/most/mostcore/devices/mdev0/ep8f/set_datatype 2>/dev/null +echo 16 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep8f/set_number_of_buffers 2>/dev/null +echo 64 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep8f/set_buffer_size 2>/dev/null + +echo mdev0:ep8f:inic-usb-crx > /sys/devices/virtual/most/mostcore/aims/cdev/add_link 2>/dev/null + +#aim: cdev +#name: inic-usb-ctx +echo tx > /sys/devices/virtual/most/mostcore/devices/mdev0/ep0f/set_direction 2>/dev/null +echo control > /sys/devices/virtual/most/mostcore/devices/mdev0/ep0f/set_datatype 2>/dev/null +echo 16 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep0f/set_number_of_buffers 2>/dev/null +echo 64 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep0f/set_buffer_size 2>/dev/null + +echo mdev0:ep0f:inic-usb-ctx > /sys/devices/virtual/most/mostcore/aims/cdev/add_link 2>/dev/null + +########################################## +# interface: mdev1 +#aim: networking +#name: inic-usb-arx +echo rx > /sys/devices/virtual/most/mostcore/devices/mdev1/ep8e/set_direction 2>/dev/null +echo async > /sys/devices/virtual/most/mostcore/devices/mdev1/ep8e/set_datatype 2>/dev/null +echo 20 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep8e/set_number_of_buffers 2>/dev/null +echo 1522 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep8e/set_buffer_size 2>/dev/null + +echo mdev1:ep8e:inic-usb-arx > /sys/devices/virtual/most/mostcore/aims/networking/add_link 2>/dev/null +#aim: networking +#name: inic-usb-atx +echo tx > /sys/devices/virtual/most/mostcore/devices/mdev1/ep0e/set_direction 2>/dev/null +echo async > /sys/devices/virtual/most/mostcore/devices/mdev1/ep0e/set_datatype 2>/dev/null +echo 20 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep0e/set_number_of_buffers 2>/dev/null +echo 1522 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep0e/set_buffer_size 2>/dev/null + +echo mdev1:ep0e:inic-usb-atx > /sys/devices/virtual/most/mostcore/aims/networking/add_link 2>/dev/null +########################################### +## interface: mdev0 +## chip: Durango +##aim: cdev +##name: inic-usb-crx +echo rx > /sys/devices/virtual/most/mostcore/devices/mdev0/ep87/set_direction 2>/dev/null +echo control > /sys/devices/virtual/most/mostcore/devices/mdev0/ep87/set_datatype 2>/dev/null +echo 16 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep87/set_number_of_buffers 2>/dev/null +echo 64 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep87/set_buffer_size 2>/dev/null + +echo mdev0:ep87:inic-usb-crx > /sys/devices/virtual/most/mostcore/aims/cdev/add_link 2>/dev/null +#aim: cdev +#name: inic-usb-ctx +echo tx > /sys/devices/virtual/most/mostcore/devices/mdev0/ep07/set_direction 2>/dev/null +echo control > /sys/devices/virtual/most/mostcore/devices/mdev0/ep07/set_datatype 2>/dev/null +echo 16 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep07/set_number_of_buffers 2>/dev/null +echo 64 > /sys/devices/virtual/most/mostcore/devices/mdev0/ep07/set_buffer_size 2>/dev/null + +echo mdev0:ep07:inic-usb-ctx > /sys/devices/virtual/most/mostcore/aims/cdev/add_link 2>/dev/null +########################################### +## interface: mdev1 +## chip: Durango +## aim: networking +##name: inic-usb-arx +echo rx > /sys/devices/virtual/most/mostcore/devices/mdev1/ep86/set_direction 2>/dev/null +echo async > /sys/devices/virtual/most/mostcore/devices/mdev1/ep86/set_datatype 2>/dev/null +echo 20 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep86/set_number_of_buffers 2>/dev/null +echo 1522 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep86/set_buffer_size 2>/dev/null + +echo mdev1:ep86:inic-usb-arx > /sys/devices/virtual/most/mostcore/aims/networking/add_link 2>/dev/null +#aim: networking +#name: inic-usb-atx +echo tx > /sys/devices/virtual/most/mostcore/devices/mdev1/ep06/set_direction 2>/dev/null +echo async > /sys/devices/virtual/most/mostcore/devices/mdev1/ep06/set_datatype 2>/dev/null +echo 20 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep06/set_number_of_buffers 2>/dev/null +echo 1522 > /sys/devices/virtual/most/mostcore/devices/mdev1/ep06/set_buffer_size 2>/dev/null + +echo mdev1:ep06:inic-usb-atx > /sys/devices/virtual/most/mostcore/aims/networking/add_link 2>/dev/null + +########################################## +# interface: mdev2 +#aim: sound +#name: ep01-6ch.6x16 +echo tx > /sys/devices/virtual/most/mostcore/devices/mdev2/ep01/set_direction 2>/dev/null +echo sync > /sys/devices/virtual/most/mostcore/devices/mdev2/ep01/set_datatype 2>/dev/null +echo 16 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep01/set_number_of_buffers 2>/dev/null +echo 1008 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep01/set_buffer_size 2>/dev/null +echo 12 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep01/set_subbuffer_size 2>/dev/null +echo 42 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep01/set_packets_per_xact 2>/dev/null + +echo mdev2:ep01:ep01-6ch.6x16 > /sys/devices/virtual/most/mostcore/aims/sound/add_link 2>/dev/null + +# interface: mdev2 +# aim: sound +# name: ep81-1ch.1x16 +echo rx > /sys/devices/virtual/most/mostcore/devices/mdev2/ep81/set_direction 2>/dev/null +echo sync > /sys/devices/virtual/most/mostcore/devices/mdev2/ep81/set_datatype 2>/dev/null +echo 8 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep81/set_number_of_buffers 2>/dev/null +echo 2048 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep81/set_buffer_size 2>/dev/null +echo 2 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep81/set_subbuffer_size 2>/dev/null +echo 256 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep81/set_packets_per_xact 2>/dev/null + +echo mdev2:ep81:ep81-1ch.1x16 > /sys/devices/virtual/most/mostcore/aims/sound/add_link 2>/dev/null + +# interface: mdev2 +# aim: sound +# name: ep82-1ch.1x16 +echo rx > /sys/devices/virtual/most/mostcore/devices/mdev2/ep82/set_direction 2>/dev/null +echo sync > /sys/devices/virtual/most/mostcore/devices/mdev2/ep82/set_datatype 2>/dev/null +echo 8 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep82/set_number_of_buffers 2>/dev/null +echo 2048 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep82/set_buffer_size 2>/dev/null +echo 2 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep82/set_subbuffer_size 2>/dev/null +echo 256 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep82/set_packets_per_xact 2>/dev/null + +echo mdev2:ep82:ep82-1ch.1x16 > /sys/devices/virtual/most/mostcore/aims/sound/add_link 2>/dev/null + +##aim: cdev +##name: inic-usb-itx1 +echo tx > /sys/devices/virtual/most/mostcore/devices/mdev2/ep02/set_direction 2>/dev/null +echo isoc > /sys/devices/virtual/most/mostcore/devices/mdev2/ep02/set_datatype 2>/dev/null +echo 8 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep02/set_number_of_buffers 2>/dev/null +echo 7520 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep02/set_buffer_size 2>/dev/null +echo 188 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep02/set_subbuffer_size 2>/dev/null +echo 2 > /sys/devices/virtual/most/mostcore/devices/mdev2/ep02/set_packets_per_xact 2>/dev/null + +echo mdev2:ep02:inic-usb-itx1 > /sys/devices/virtual/most/mostcore/aims/cdev/add_link 2>/dev/null diff --git a/_to_remove/recipes-config/unicens-config/unicens-config.bb b/_to_remove/recipes-config/unicens-config/unicens-config.bb new file mode 100644 index 000000000..57b93a76f --- /dev/null +++ b/_to_remove/recipes-config/unicens-config/unicens-config.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "Configure MOST driver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +RDEPENDS:${PN} = "bash" + +SRC_URI = "\ + file://unicens-config.service \ + file://unicens-config.sh \ + file://55-inic.rules \ +" + + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "unicens-config.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/unicens-config.service ${D}${systemd_system_unitdir} + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/unicens-config.sh ${D}${bindir} + install -D -m 0644 ${WORKDIR}/55-inic.rules ${D}${sysconfdir}/udev/rules.d/55-inic.rules +} + +FILES:${PN} += "${systemd_system_unitdir}" diff --git a/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch new file mode 100644 index 000000000..6c9a388c8 --- /dev/null +++ b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch @@ -0,0 +1,517 @@ +From f2e6a0a324106b40195f88953e55a355875d2b1b Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis <george.kiagiadakis@collabora.com> +Date: Fri, 4 Oct 2019 20:51:24 +0300 +Subject: [PATCH] utils: add a gstreamer helper application for interconnection + with pipewire + +Unfortunately, the bluez-alsa PCM plugin does not work correctly +when it is used through pipewire (or gstreamer, or anywhere really...). + +Thanfully, the bluez-alsa PCM plugin is only a simple client that +reads/writes on a file descriptor that was opened by bluealsa. +This allows us to use bluealsa without the PCM plugin, just like it +is done in the aplay.c util. + +This one uses GStreamer to implement the plumbing between pipewire +and the file descriptor. On the reading side we are also doing some +tricks to ensure a smooth stream, which is not the case for the +stream that is coming out of bluealsa. + +This helper is implemented as a patch to bluez-alsa so that it can +use its internal private API. In the future this needs some re-thinking. + +Upstream-Status: Inappropriate +--- + configure.ac | 7 + + utils/Makefile.am | 20 +++ + utils/gst-helper.c | 432 +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 459 insertions(+) + create mode 100644 utils/gst-helper.c + +diff --git a/configure.ac b/configure.ac +index 4825afa..9125871 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -141,6 +141,13 @@ AM_COND_IF([ENABLE_HCITOP], [ + PKG_CHECK_MODULES([NCURSES], [ncurses]) + ]) + ++AC_ARG_ENABLE([gsthelper], ++ [AS_HELP_STRING([--enable-gsthelper], [enable building of gsthelper tool])]) ++AM_CONDITIONAL([ENABLE_GSTHELPER], [test "x$enable_gsthelper" = "xyes"]) ++AM_COND_IF([ENABLE_GSTHELPER], [ ++ PKG_CHECK_MODULES([GST], [gstreamer-1.0 glib-2.0]) ++]) ++ + AC_ARG_ENABLE([test], + [AS_HELP_STRING([--enable-test], [enable unit test])]) + AM_CONDITIONAL([ENABLE_TEST], [test "x$enable_test" = "xyes"]) +diff --git a/utils/Makefile.am b/utils/Makefile.am +index 9057f2c..9790474 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -47,3 +47,23 @@ hcitop_LDADD = \ + @LIBBSD_LIBS@ \ + @NCURSES_LIBS@ + endif ++ ++if ENABLE_GSTHELPER ++bin_PROGRAMS += bluealsa-gst-helper ++bluealsa_gst_helper_SOURCES = \ ++ ../src/shared/dbus-client.c \ ++ ../src/shared/ffb.c \ ++ ../src/shared/log.c \ ++ gst-helper.c ++bluealsa_gst_helper_CFLAGS = \ ++ -I$(top_srcdir)/src \ ++ @ALSA_CFLAGS@ \ ++ @BLUEZ_CFLAGS@ \ ++ @DBUS1_CFLAGS@ \ ++ @GST_CFLAGS@ ++bluealsa_gst_helper_LDADD = \ ++ @ALSA_LIBS@ \ ++ @BLUEZ_LIBS@ \ ++ @DBUS1_LIBS@ \ ++ @GST_LIBS@ ++endif +diff --git a/utils/gst-helper.c b/utils/gst-helper.c +new file mode 100644 +index 0000000..de1d47c +--- /dev/null ++++ b/utils/gst-helper.c +@@ -0,0 +1,432 @@ ++/* Bluez-Alsa PipeWire integration GStreamer helper ++ * ++ * Copyright © 2016-2019 Arkadiusz Bokowy ++ * Copyright © 2019 Collabora Ltd. ++ * @author George Kiagiadakis <george.kiagiadakis@collabora.com> ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#if HAVE_CONFIG_H ++# include <config.h> ++#endif ++ ++#include <errno.h> ++#include <getopt.h> ++#include <poll.h> ++#include <pthread.h> ++#include <signal.h> ++#include <stdbool.h> ++#include <stdint.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> ++ ++#include <bluetooth/bluetooth.h> ++#include <dbus/dbus.h> ++#include <gst/gst.h> ++ ++#include "shared/dbus-client.h" ++#include "shared/defs.h" ++#include "shared/ffb.h" ++#include "shared/log.h" ++ ++struct worker { ++ /* used BlueALSA PCM device */ ++ struct ba_pcm ba_pcm; ++ /* file descriptor of PCM FIFO */ ++ int ba_pcm_fd; ++ /* file descriptor of PCM control */ ++ int ba_pcm_ctrl_fd; ++ /* the gstreamer pipelines (sink & source) */ ++ GstElement *pipeline[2]; ++ /* the queue & pwaudiosink of the sink pipeline */ ++ GstElement *queue; ++ GstElement *pwelem; ++}; ++ ++static struct ba_dbus_ctx dbus_ctx; ++static GHashTable *workers; ++static bool main_loop_on = true; ++ ++static void ++main_loop_stop(int sig) ++{ ++ /* Call to this handler restores the default action, so on the ++ * second call the program will be forcefully terminated. */ ++ ++ struct sigaction sigact = { .sa_handler = SIG_DFL }; ++ sigaction(sig, &sigact, NULL); ++ ++ main_loop_on = false; ++} ++ ++static GstBusSyncReply ++bus_sync_handler(GstBus *bus, GstMessage *message, gpointer user_data) ++{ ++ struct worker *w = user_data; ++ GstState s; ++ ++ switch (GST_MESSAGE_TYPE (message)) { ++ case GST_MESSAGE_REQUEST_STATE: ++ gst_message_parse_request_state (message, &s); ++ ++ debug ("corked: %d", (s == GST_STATE_PAUSED)); ++ ++ /* drop queue data when corked */ ++ g_object_set (w->queue, ++ "leaky", (s == GST_STATE_PAUSED) ? 2 /* downstream */ : 0 /* no */, ++ NULL); ++ gst_element_set_state (w->pwelem, s); ++ ++ /* flush the queue when resuming */ ++ if (s == GST_STATE_PLAYING) { ++ gst_element_send_event (w->queue, gst_event_new_flush_start ()); ++ gst_element_send_event (w->queue, gst_event_new_flush_stop (FALSE)); ++ } ++ break; ++ default: ++ break; ++ } ++ ++ gst_message_unref (message); ++ return GST_BUS_DROP; ++} ++ ++static int ++worker_start_pipeline(struct worker *w, int id, int mode, int profile) ++{ ++ GError *gerr = NULL; ++ DBusError err = DBUS_ERROR_INIT; ++ const gchar * role = NULL; ++ ++ if (w->pipeline[id]) ++ return 0; ++ ++ if (!bluealsa_dbus_pcm_open(&dbus_ctx, w->ba_pcm.pcm_path, mode, ++ &w->ba_pcm_fd, &w->ba_pcm_ctrl_fd, &err)) { ++ error("Couldn't open PCM: %s", err.message); ++ dbus_error_free(&err); ++ goto fail; ++ } ++ ++ if (mode == BA_PCM_FLAG_SINK) { ++ debug("sink start"); ++ w->pipeline[id] = gst_parse_launch( ++ /* add a silent live source to ensure a perfect live stream on the ++ output, even when the bt device is not sending or has gaps; ++ this also effectively changes the clock to be the system clock, ++ which is the same clock used by bluez-alsa on the sending side */ ++ "audiotestsrc is-live=true wave=silence ! capsfilter name=capsf " ++ "! audiomixer name=m " ++ /* mix the input from bluez-alsa using fdsrc; rawaudioparse ++ is necessary to convert bytes to time and align the buffers */ ++ "fdsrc name=fdelem do-timestamp=true ! capsfilter name=capsf2 " ++ "! rawaudioparse use-sink-caps=true ! m. " ++ /* take the mixer output, convert and push to pipewire */ ++ "m.src ! capsfilter name=capsf3 ! audioconvert ! audioresample " ++ "! audio/x-raw,format=F32LE,rate=48000 ! identity sync=true " ++ "! queue name=queue leaky=no max-size-time=0 max-size-buffers=0 max-size-bytes=192000 " ++ "! pwaudiosink name=pwelem", ++ &gerr); ++ ++ /* a2dp is for music, sco is for calls */ ++ role = (profile == BA_PCM_FLAG_PROFILE_A2DP) ? "Multimedia" : "Communication"; ++ } ++ else if (mode == BA_PCM_FLAG_SOURCE && profile == BA_PCM_FLAG_PROFILE_SCO) { ++ debug("source start"); ++ w->pipeline[id] = gst_parse_launch( ++ /* read from pipewire and put the buffers on a leaky queue, which ++ will essentially allow pwaudiosrc to continue working while ++ the fdsink is blocked (when there is no phone call in progress). ++ 9600 bytes = 50ms @ F32LE/1ch/48000 ++ */ ++ "pwaudiosrc name=pwelem ! audio/x-raw,format=F32LE,rate=48000 " ++ "! queue name=queue leaky=downstream max-size-time=0 max-size-buffers=0 max-size-bytes=9600 " ++ "! audioconvert ! audioresample ! capsfilter name=capsf " ++ "! fdsink name=fdelem", &gerr); ++ ++ role = "Communication"; ++ } ++ ++ if (gerr) { ++ error("Failed to start pipeline: %s", gerr->message); ++ g_error_free(gerr); ++ goto fail; ++ } ++ ++ if (w->pipeline[id]) { ++ g_autofree gchar *capsstr = NULL; ++ g_autoptr (GstElement) fdelem = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "fdelem"); ++ g_autoptr (GstElement) pwelem = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "pwelem"); ++ g_autoptr (GstElement) queue = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "queue"); ++ g_autoptr (GstElement) capsf = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "capsf"); ++ g_autoptr (GstElement) capsf2 = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "capsf2"); ++ g_autoptr (GstElement) capsf3 = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "capsf3"); ++ g_autoptr (GstCaps) caps = gst_caps_new_simple("audio/x-raw", ++ "format", G_TYPE_STRING, "S16LE", ++ "layout", G_TYPE_STRING, "interleaved", ++ "channels", G_TYPE_INT, w->ba_pcm.channels, ++ "rate", G_TYPE_INT, w->ba_pcm.sampling, ++ NULL); ++ g_autoptr (GstStructure) stream_props = gst_structure_new("props", ++ "media.role", G_TYPE_STRING, role, ++ "bluealsa.profile", G_TYPE_STRING, ++ (profile == BA_PCM_FLAG_PROFILE_SCO) ? "sco" : "a2dp", ++ NULL); ++ ++ g_object_set(capsf, "caps", caps, NULL); ++ if (capsf2) ++ g_object_set(capsf2, "caps", caps, NULL); ++ if (capsf3) ++ g_object_set(capsf3, "caps", caps, NULL); ++ ++ capsstr = gst_caps_to_string (caps); ++ debug(" caps: %s", capsstr); ++ ++ g_object_set(fdelem, "fd", w->ba_pcm_fd, NULL); ++ g_object_set(pwelem, "stream-properties", stream_props, NULL); ++ ++ if (mode == BA_PCM_FLAG_SINK) { ++ g_autoptr (GstBus) bus = gst_pipeline_get_bus(GST_PIPELINE(w->pipeline[id])); ++ gst_bus_set_sync_handler(bus, bus_sync_handler, w, NULL); ++ w->queue = queue; ++ w->pwelem = pwelem; ++ } ++ ++ gst_element_set_state(w->pipeline[id], GST_STATE_PLAYING); ++ } ++ ++ return 0; ++fail: ++ g_clear_object(&w->pipeline[id]); ++ return -1; ++} ++ ++static int ++worker_start(struct worker *w) ++{ ++ int mode = w->ba_pcm.flags & (BA_PCM_FLAG_SOURCE | BA_PCM_FLAG_SINK); ++ int profile = w->ba_pcm.flags & (BA_PCM_FLAG_PROFILE_A2DP | BA_PCM_FLAG_PROFILE_SCO); ++ /* human-readable BT address */ ++ char addr[18]; ++ ++ g_return_val_if_fail (profile != 0 && profile != (BA_PCM_FLAG_PROFILE_A2DP | BA_PCM_FLAG_PROFILE_SCO), -1); ++ ++ ba2str(&w->ba_pcm.addr, addr); ++ debug("%p: worker start addr:%s, mode:0x%x, profile:0x%x", w, addr, mode, profile); ++ ++ if (mode & BA_PCM_FLAG_SINK) ++ worker_start_pipeline(w, 0, BA_PCM_FLAG_SINK, profile); ++ if (mode & BA_PCM_FLAG_SOURCE) ++ worker_start_pipeline(w, 1, BA_PCM_FLAG_SOURCE, profile); ++} ++ ++static int ++worker_stop(struct worker *w) ++{ ++ debug("stop worker %p", w); ++ if (w->pipeline[0]) { ++ gst_element_set_state(w->pipeline[0], GST_STATE_NULL); ++ g_clear_object(&w->pipeline[0]); ++ } ++ if (w->pipeline[1]) { ++ gst_element_set_state(w->pipeline[1], GST_STATE_NULL); ++ g_clear_object(&w->pipeline[1]); ++ } ++ if (w->ba_pcm_fd != -1) { ++ close(w->ba_pcm_fd); ++ w->ba_pcm_fd = -1; ++ } ++ if (w->ba_pcm_ctrl_fd != -1) { ++ close(w->ba_pcm_ctrl_fd); ++ w->ba_pcm_ctrl_fd = -1; ++ } ++ return 0; ++} ++ ++static int ++supervise_pcm_worker(struct worker *worker) ++{ ++ if (worker == NULL) ++ return -1; ++ ++ /* no mode? */ ++ if (worker->ba_pcm.flags & (BA_PCM_FLAG_SOURCE | BA_PCM_FLAG_SINK) == 0) ++ goto stop; ++ ++ /* no profile? */ ++ if (worker->ba_pcm.flags & (BA_PCM_FLAG_PROFILE_A2DP | BA_PCM_FLAG_PROFILE_SCO) == 0) ++ goto stop; ++ ++ /* check whether SCO has selected codec */ ++ if (worker->ba_pcm.flags & BA_PCM_FLAG_PROFILE_SCO && ++ worker->ba_pcm.codec == 0) { ++ debug("Skipping SCO with codec not selected"); ++ goto stop; ++ } ++ ++start: ++ return worker_start(worker); ++stop: ++ return worker_stop(worker); ++} ++ ++static void ++worker_new(struct ba_pcm *pcm) ++{ ++ struct worker *w = g_slice_new0 (struct worker); ++ memcpy(&w->ba_pcm, pcm, sizeof(struct ba_pcm)); ++ w->ba_pcm_fd = -1; ++ w->ba_pcm_ctrl_fd = -1; ++ g_hash_table_insert(workers, w->ba_pcm.pcm_path, w); ++ supervise_pcm_worker(w); ++} ++ ++static DBusHandlerResult ++dbus_signal_handler(DBusConnection *conn, DBusMessage *message, void *data) ++{ ++ (void)conn; ++ (void)data; ++ ++ const char *path = dbus_message_get_path(message); ++ const char *interface = dbus_message_get_interface(message); ++ const char *signal = dbus_message_get_member(message); ++ ++ DBusMessageIter iter; ++ struct worker *worker; ++ ++ if (strcmp(interface, BLUEALSA_INTERFACE_MANAGER) == 0) { ++ ++ if (strcmp(signal, "PCMAdded") == 0) { ++ struct ba_pcm pcm; ++ if (!dbus_message_iter_init(message, &iter) || ++ !bluealsa_dbus_message_iter_get_pcm(&iter, NULL, &pcm)) { ++ error("Couldn't add new PCM: %s", "Invalid signal signature"); ++ goto fail; ++ } ++ worker_new(&pcm); ++ return DBUS_HANDLER_RESULT_HANDLED; ++ } ++ ++ if (strcmp(signal, "PCMRemoved") == 0) { ++ if (!dbus_message_iter_init(message, &iter) || ++ dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_OBJECT_PATH) { ++ error("Couldn't remove PCM: %s", "Invalid signal signature"); ++ goto fail; ++ } ++ dbus_message_iter_get_basic(&iter, &path); ++ g_hash_table_remove(workers, path); ++ return DBUS_HANDLER_RESULT_HANDLED; ++ } ++ ++ } ++ ++ if (strcmp(interface, DBUS_INTERFACE_PROPERTIES) == 0) { ++ worker = g_hash_table_lookup(workers, path); ++ if (!worker) ++ goto fail; ++ if (!dbus_message_iter_init(message, &iter) || ++ dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING) { ++ error("Couldn't update PCM: %s", "Invalid signal signature"); ++ goto fail; ++ } ++ dbus_message_iter_get_basic(&iter, &interface); ++ dbus_message_iter_next(&iter); ++ if (!bluealsa_dbus_message_iter_get_pcm_props(&iter, NULL, &worker->ba_pcm)) ++ goto fail; ++ supervise_pcm_worker(worker); ++ return DBUS_HANDLER_RESULT_HANDLED; ++ } ++ ++fail: ++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; ++} ++ ++static void ++destroy_worker(void *worker) ++{ ++ struct worker *w = worker; ++ worker_stop(w); ++ g_slice_free(struct worker, w); ++} ++ ++int ++main(int argc, char *argv[]) ++{ ++ int ret = EXIT_SUCCESS; ++ ++ log_open(argv[0], false, false); ++ gst_init(&argc, &argv); ++ dbus_threads_init_default(); ++ ++ DBusError err = DBUS_ERROR_INIT; ++ if (!bluealsa_dbus_connection_ctx_init(&dbus_ctx, BLUEALSA_SERVICE, &err)) { ++ error("Couldn't initialize D-Bus context: %s", err.message); ++ return EXIT_FAILURE; ++ } ++ ++ bluealsa_dbus_connection_signal_match_add(&dbus_ctx, ++ BLUEALSA_SERVICE, NULL, BLUEALSA_INTERFACE_MANAGER, "PCMAdded", NULL); ++ bluealsa_dbus_connection_signal_match_add(&dbus_ctx, ++ BLUEALSA_SERVICE, NULL, BLUEALSA_INTERFACE_MANAGER, "PCMRemoved", NULL); ++ bluealsa_dbus_connection_signal_match_add(&dbus_ctx, ++ BLUEALSA_SERVICE, NULL, DBUS_INTERFACE_PROPERTIES, "PropertiesChanged", ++ "arg0='"BLUEALSA_INTERFACE_PCM"'"); ++ ++ if (!dbus_connection_add_filter(dbus_ctx.conn, dbus_signal_handler, NULL, NULL)) { ++ error("Couldn't add D-Bus filter: %s", err.message); ++ return EXIT_FAILURE; ++ } ++ ++ workers = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, destroy_worker); ++ ++ { ++ struct ba_pcm *pcms = NULL; ++ size_t pcms_count = 0, i; ++ ++ if (!bluealsa_dbus_get_pcms(&dbus_ctx, &pcms, &pcms_count, &err)) ++ warn("Couldn't get BlueALSA PCM list: %s", err.message); ++ ++ for (i = 0; i < pcms_count; i++) { ++ worker_new(&pcms[i]); ++ } ++ ++ free(pcms); ++ } ++ ++ struct sigaction sigact = { .sa_handler = main_loop_stop }; ++ sigaction(SIGTERM, &sigact, NULL); ++ sigaction(SIGINT, &sigact, NULL); ++ ++ /* Ignore SIGPIPE, which may be received when writing to the bluealsa ++ socket when it is closed on the remote end */ ++ signal(SIGPIPE, SIG_IGN); ++ ++ debug("Starting main loop"); ++ while (main_loop_on) { ++ ++ struct pollfd pfds[10]; ++ nfds_t pfds_len = ARRAYSIZE(pfds); ++ ++ if (!bluealsa_dbus_connection_poll_fds(&dbus_ctx, pfds, &pfds_len)) { ++ error("Couldn't get D-Bus connection file descriptors"); ++ ret = EXIT_FAILURE; ++ goto out; ++ } ++ ++ if (poll(pfds, pfds_len, -1) == -1 && ++ errno == EINTR) ++ continue; ++ ++ if (bluealsa_dbus_connection_poll_dispatch(&dbus_ctx, pfds, pfds_len)) ++ while (dbus_connection_dispatch(dbus_ctx.conn) == DBUS_DISPATCH_DATA_REMAINS) ++ continue; ++ ++ } ++ ++out: ++ g_hash_table_unref(workers); ++ return ret; ++} +-- +2.24.0 + diff --git a/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service new file mode 100644 index 000000000..495ab6222 --- /dev/null +++ b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service @@ -0,0 +1,18 @@ +[Unit] +Description=Bluetooth audio helper for user %i +Requires=pipewire@%i.socket bluez-alsa.service +After=pipewire@%i.socket bluez-alsa.service + +[Service] +Type=simple +Restart=on-failure +ExecStart=/usr/bin/bluealsa-gst-helper + +Environment=XDG_RUNTIME_DIR=/run/user/%i +Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus + +User=%i +Slice=user-%i.slice +SupplementaryGroups=audio +UMask=0077 +CapabilityBoundingSet= diff --git a/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb new file mode 100644 index 000000000..27f462a87 --- /dev/null +++ b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb @@ -0,0 +1,43 @@ +SUMMARY = "Bluetooth Audio ALSA Backend" +HOMEPAGE = "https://github.com/Arkq/bluez-alsa" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3d7d6ac7e2dbd2505652dceb3acdf1fe" + +SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master" +SRCREV = "2cd6e4686f7808276480b430fb37df55dfdcc02b" + +SRC_URI += "file://bluez-alsa.service" + +S = "${WORKDIR}/git" + +DEPENDS += "alsa-lib bluez5 systemd glib-2.0 sbc" + +PACKAGECONFIG[aac] = "--enable-aac, --disable-aac, " +PACKAGECONFIG[aptx] = "--enable-aptx,--disable-aptx," +PACKAGECONFIG[ofono] = "--enable-ofono, --disable-ofono," + +inherit autotools pkgconfig +inherit systemd + +SYSTEMD_AUTO_ENABLE = "enable" +SYSTEMD_SERVICE:${PN} = "bluez-alsa.service" + +PACKAGECONFIG += "ofono" + +# enable debug tools in devel images +PACKAGECONFIG[hcitop] = "--enable-hcitop, --disable-hcitop, libbsd ncurses" +PACKAGECONFIG[rfcomm] = "--enable-rfcomm, --disable-rfcomm," +PACKAGECONFIG:append:agl-devel = " hcitop rfcomm" + +do_install:append () { + install -d ${D}${base_libdir}/systemd/system + install -m 0644 ${WORKDIR}/bluez-alsa.service ${D}${base_libdir}/systemd/system +} + +FILES:${PN} += "\ + ${datadir}/alsa/alsa.conf.d/20-bluealsa.conf\ + ${libdir}/alsa-lib/libasound_module_ctl_bluealsa.so\ + ${libdir}/alsa-lib/libasound_module_pcm_bluealsa.so\ +" diff --git a/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend new file mode 100644 index 000000000..b592e822b --- /dev/null +++ b/_to_remove/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend @@ -0,0 +1,35 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/bluez-alsa:" + +SRC_URI += "\ + file://0001-utils-add-a-gstreamer-helper-application-for-interco.patch \ + file://bluealsa-gst-helper@.service \ + " + +PACKAGECONFIG += "gsthelper" +PACKAGECONFIG[gsthelper] = "--enable-gsthelper, --disable-gsthelper, gstreamer1.0" + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # install the service file + mkdir -p ${D}${systemd_system_unitdir}/ + install -m 0644 ${WORKDIR}/bluealsa-gst-helper@.service ${D}${systemd_system_unitdir}/bluealsa-gst-helper@.service + + # enable the helper to start together with afm-user-session + mkdir -p ${D}${systemd_system_unitdir}/afm-user-session@.target.wants + ln -sf ../bluealsa-gst-helper@.service ${D}${systemd_system_unitdir}/afm-user-session@.target.wants/bluealsa-gst-helper@.service + fi +} + +PACKAGES =+ "${PN}-pipewire" + +FILES:${PN}-pipewire = "\ + ${bindir}/bluealsa-gst-helper \ + ${systemd_system_unitdir}/bluealsa-gst-helper@.service \ + ${systemd_system_unitdir}/afm-user-session@.target.wants/bluealsa-gst-helper@.service \ + " +RDEPENDS:${PN}-pipewire += "\ + bluez-alsa \ + pipewire \ + gstreamer1.0-plugins-base \ + gstreamer1.0-pipewire \ + " diff --git a/_to_remove/recipes-connectivity/bluez-alsa/files/bluez-alsa.service b/_to_remove/recipes-connectivity/bluez-alsa/files/bluez-alsa.service new file mode 100644 index 000000000..b59302ee4 --- /dev/null +++ b/_to_remove/recipes-connectivity/bluez-alsa/files/bluez-alsa.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth Audio ALSA Backend +After=bluetooth.service +Requires=bluetooth.service + +[Service] +Type=simple +ExecStart=/usr/bin/bluealsa -p a2dp-sink -p hfp-ofono + +[Install] +WantedBy=multi-user.target diff --git a/_to_remove/recipes-demo/alexa-viewer/alexa-viewer_git.bb b/_to_remove/recipes-demo/alexa-viewer/alexa-viewer_git.bb new file mode 100644 index 000000000..d8af6888c --- /dev/null +++ b/_to_remove/recipes-demo/alexa-viewer/alexa-viewer_git.bb @@ -0,0 +1,38 @@ +SUMMARY = "Demo voice capabilities template viewer for Alexa voiceagent" +DESCRIPTION = "Demo voice capabilities template viewer for Alexa voiceagent" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/alexa-viewer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + qtquickcontrols2 \ + qlibhomescreen \ + af-binder \ + libqtappfw \ + wayland-native \ + wayland \ + qtwayland \ + qtwayland-native \ + agl-compositor \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/alexa-viewer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake_qt5 aglwgt + +OECMAKE_CXX_FLAGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '' , '-DQT_NO_DEBUG_OUTPUT', d)}" + +RDEPENDS:${PN} = " \ + libqtappfw \ + libafbwsc \ + qlibhomescreen \ + agl-service-homescreen \ + agl-service-voice-high-capabilities \ +" diff --git a/_to_remove/recipes-demo/camera-gstreamer/camera-gstreamer_git.bb b/_to_remove/recipes-demo/camera-gstreamer/camera-gstreamer_git.bb new file mode 100644 index 000000000..4fe09e913 --- /dev/null +++ b/_to_remove/recipes-demo/camera-gstreamer/camera-gstreamer_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "Camera gstreamer demo application" +DESCRIPTION = "AGL demonstration of displaying incoming camera feed" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/camera-gstreamer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + wayland wayland-native \ + gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/camera-gstreamer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig aglwgt + +RDEPENDS:${PN} += " \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ +" diff --git a/_to_remove/recipes-demo/cluster-dashboard/cluster-dashboard_git.bb b/_to_remove/recipes-demo/cluster-dashboard/cluster-dashboard_git.bb new file mode 100644 index 000000000..480d1f22d --- /dev/null +++ b/_to_remove/recipes-demo/cluster-dashboard/cluster-dashboard_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "Instrument Cluster Dashboard application" +DESCRIPTION = "AGL demonstration instrument cluster dashboard application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-cluster-demo-dashboard" +SECTION = "apps" + +LICENSE = "Apache-2.0 & BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ + file://app/cluster-gauges.qml;beginline=9;endline=48;md5=54187d50b29429abee6095fe8b7c1a78" + +DEPENDS = " \ + qtquickcontrols2 libqtappfw glib-2.0 \ + wayland-native wayland qtwayland qtwayland-native \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-cluster-demo-dashboard;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit pkgconfig cmake_qt5 aglwgt + +RDEPENDS:${PN} += " \ + qtquickcontrols \ + qtquickcontrols-qmlplugins \ + qtquickcontrols2 \ + qtquickcontrols2-qmlplugins \ + libqtappfw \ + agl-service-signal-composer \ +" diff --git a/_to_remove/recipes-demo/cluster-gauges-qtcompositor/cluster-gauges-qtcompositor_git.bb b/_to_remove/recipes-demo/cluster-gauges-qtcompositor/cluster-gauges-qtcompositor_git.bb new file mode 100644 index 000000000..8b5b62093 --- /dev/null +++ b/_to_remove/recipes-demo/cluster-gauges-qtcompositor/cluster-gauges-qtcompositor_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "Minimal cluster demo gauges that can be used standalone" +DESCRIPTION = "AGL HMI Application for demonstrating instrument cluster gauges as a wayland compositor" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-cluster-demo-gauges" +SECTION = "apps" + +LICENSE = "Apache-2.0 & BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ + file://app/cluster-gauges.qml;beginline=10;endline=49;md5=54187d50b29429abee6095fe8b7c1a78" + +DEPENDS = "qtquickcontrols2 qtwebsockets" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-cluster-demo-gauges;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit pkgconfig cmake_qt5 aglwgt + +RDEPENDS:${PN} += " \ + qtquickcontrols \ + qtquickcontrols-qmlplugins \ + qtquickcontrols2 \ + qtquickcontrols2-qmlplugins \ + qtwebsockets \ + qtwebsockets-qmlplugins \ + kms-conf \ +" diff --git a/_to_remove/recipes-demo/cluster-receiver/cluster-receiver_git.bb b/_to_remove/recipes-demo/cluster-receiver/cluster-receiver_git.bb new file mode 100644 index 000000000..7028d5fc1 --- /dev/null +++ b/_to_remove/recipes-demo/cluster-receiver/cluster-receiver_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "Instrument Cluster Receiver application" +DESCRIPTION = "AGL demonstration instrument cluster remote display application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-cluster-demo-receiver" +SECTION = "apps" + +LICENSE = "Apache-2.0 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=374fee6a7817f1e1a5a7bfb7b7989553" + +DEPENDS = " \ + wayland wayland-native \ + gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad agl-compositor \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-cluster-demo-receiver;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig aglwgt + +RDEPENDS:${PN} += " \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ +" diff --git a/_to_remove/recipes-demo/cluster-receiver/qt-cluster-receiver_git.bb b/_to_remove/recipes-demo/cluster-receiver/qt-cluster-receiver_git.bb new file mode 100644 index 000000000..80f8edbb0 --- /dev/null +++ b/_to_remove/recipes-demo/cluster-receiver/qt-cluster-receiver_git.bb @@ -0,0 +1,30 @@ +SUMMARY = "Instrument Cluster Receiver AGL Demonstration" +DESCRIPTION = "AGL HMI Application for demonstrating instrument cluster remote display" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/admin/repos/apps/agl-qt-cluster-demo-receiver" +SECTION = "apps" + +LICENSE = "Apache-2.0 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ + file://app/surface.hpp;beginline=5;endline=21;md5=5351c531a191f0e3463aafcd0a6a00a3" + +DEPENDS = " \ + wayland wayland-native \ + qtwayland qtwayland-native \ + qtquickcontrols2 qtwebsockets qtbase qtdeclarative \ + gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-qt-cluster-demo-receiver;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake_qt5 pkgconfig aglwgt + +RDEPENDS:${PN} += " \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ +" diff --git a/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/areas.json b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/areas.json new file mode 100644 index 000000000..90180dcaf --- /dev/null +++ b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/areas.json @@ -0,0 +1,40 @@ +{ + "areas": [ + { + "name": "fullscreen", + "rect": { + "x": 0, + "y": 0, + "w": 1920, + "h": 1080 + } + }, + { + "name": "normal.full", + "rect": { + "x": 640, + "y": 180, + "w": 640, + "h": 720 + } + }, + { + "name": "restriction.normal", + "rect": { + "x": 640, + "y": 180, + "w": 640, + "h": 720 + } + }, + { + "name": "on_screen", + "rect": { + "x": 640, + "y": 180, + "w": 640, + "h": 720 + } + } + ] +} diff --git a/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/layers.json b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/layers.json new file mode 100644 index 000000000..5c6a5b35d --- /dev/null +++ b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/layers.json @@ -0,0 +1,47 @@ +{ + "description": "Layer mapping", + "mappings": [ + { + "name": "BackGroundLayer", + "role" : "receiver", + "id_range_begin": 0, + "id_range_end": 0, + "comment": "Work Around: This is a special fallback layer that not stopping wayland event loop." + }, + { + "name": "FarHomeScreen", + "role": "homescreen", + "id_range_begin": 100, + "id_range_end": 199, + "comment": "FarHomeScreen is the part of HomeScreen. The z order of this layer is lower than NearHomeScreen" + }, + { + "name": "Apps", + "role": "receiver|fallback", + "id_range_begin": 1000, + "id_range_end": 2999, + "comment": "Application layer" + }, + { + "name": "Popup", + "role": "popup*", + "id_range_begin": 4000, + "id_range_end": 4999, + "comment": "This layer is for popup application layer" + }, + { + "name": "Restriction", + "role": "restriction", + "id_range_begin": 5000, + "id_range_end": 5999, + "comment": "This layer is for restriction notification on driving. This is used by restriction role" + }, + { + "name": "OnScreen", + "role": "^on_screen.*", + "id_range_begin": 6000, + "id_range_end": 6999, + "comment": "System notification layer. For example, on_screen_low_battery_alert to notify user" + } + ] +} diff --git a/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/roles.db b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/roles.db new file mode 100644 index 000000000..13702144a --- /dev/null +++ b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf/roles.db @@ -0,0 +1,34 @@ +{ + "roles":[ + { + "category": "homescreen", + "role": "homescreen", + "area": "fullscreen", + "layer": "homescreen", + }, + { + "category": "debug", + "role": "receiver | fallback", + "area": "normal.full", + "layer": "apps", + }, + { + "category": "restriction", + "role": "restriction", + "area": "restriction.normal", + "layer": "restriction", + }, + { + "category": "pop_up", + "role": "on_screen | on_screen_phone", + "area": "on_screen", + "layer": "on_screen", + }, + { + "category": "system_alert", + "role": "system_alert", + "area": "on_screen", + "layer": "on_screen", + } + ] +} diff --git a/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf_1.0.bb b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf_1.0.bb new file mode 100644 index 000000000..f8cf9b928 --- /dev/null +++ b/_to_remove/recipes-demo/cluster-windowmanager-conf/cluster-windowmanager-conf_1.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "Cluster demo windowmanager configuration" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://layers.json \ + file://areas.json \ + file://roles.db \ +" + +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${sysconfdir}/xdg/windowmanager + install -m 0644 ${WORKDIR}/layers.json ${D}${sysconfdir}/xdg/windowmanager/layers.json + install -m 0644 ${WORKDIR}/areas.json ${D}${sysconfdir}/xdg/windowmanager/areas.json + install -m 0644 ${WORKDIR}/roles.db ${D}${sysconfdir}/xdg/windowmanager/roles.db +} + +#FILES:${PN} += "${sysconfdir}/*" diff --git a/_to_remove/recipes-demo/dashboard/dashboard_git.bb b/_to_remove/recipes-demo/dashboard/dashboard_git.bb new file mode 100644 index 000000000..22f5b73ec --- /dev/null +++ b/_to_remove/recipes-demo/dashboard/dashboard_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "Dashboard application" +DESCRIPTION = "AGL demonstration Dashboard application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/dashboard" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 qttools-native libqtappfw" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/dashboard;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} += " \ + libqtappfw \ + agl-service-signal-composer \ +" diff --git a/_to_remove/recipes-demo/homescreen-demo-ci/homescreen-demo-ci_git.bb b/_to_remove/recipes-demo/homescreen-demo-ci/homescreen-demo-ci_git.bb new file mode 100644 index 000000000..d33356999 --- /dev/null +++ b/_to_remove/recipes-demo/homescreen-demo-ci/homescreen-demo-ci_git.bb @@ -0,0 +1,37 @@ +SUMMARY = "homescreen-demo-ci AGL client shell for testing in CI" +DESCRIPTION = "homescreen-demo-ci AGL client shell for testing in CI" +HOMEPAGE = "http://docs.automotivelinux.org" +LICENSE = "MIT" +SECTION = "apps" +LIC_FILES_CHKSUM = "file://COPYING;md5=374fee6a7817f1e1a5a7bfb7b7989553" + +DEPENDS = "\ + qtbase \ + qtdeclarative \ + qtquickcontrols2 \ + agl-service-homescreen \ + agl-service-weather \ + libqtappfw \ + libhomescreen \ + libafb-helpers-qt \ + wayland-native \ + wayland \ + qtwayland \ + qtwayland-native \ +" + +inherit qmake5 systemd pkgconfig aglwgt + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/homescreen-demo-ci;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +PATH:prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:" + +OE_QMAKE_CXXFLAGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '' , '-DQT_NO_DEBUG_OUTPUT', d)}" + +RDEPENDS:${PN} += " \ + libqtappfw \ +" diff --git a/_to_remove/recipes-demo/homescreen/homescreen_git.bb b/_to_remove/recipes-demo/homescreen/homescreen_git.bb new file mode 100644 index 000000000..bf8034b91 --- /dev/null +++ b/_to_remove/recipes-demo/homescreen/homescreen_git.bb @@ -0,0 +1,43 @@ +SUMMARY = "Home Screen application" +DESCRIPTION = "AGL demonstration Home Screen application" +HOMEPAGE = "http://docs.automotivelinux.org" +LICENSE = "Apache-2.0" +SECTION = "apps" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + qtbase \ + qtdeclarative \ + qtquickcontrols2 \ + libqtappfw \ + libhomescreen \ + libafb-helpers-qt \ + wayland-native \ + wayland \ + qtwayland \ + qtwayland-native \ + agl-compositor \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/homescreen;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 systemd pkgconfig aglwgt + +PATH:prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:" + +OE_QMAKE_CXXFLAGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '' , '-DQT_NO_DEBUG_OUTPUT', d)}" + +RDEPENDS:${PN} += " \ + libqtappfw \ + agl-service-audiomixer \ + agl-service-bluetooth \ + agl-service-homescreen \ + agl-service-network \ + agl-service-weather \ + agl-service-voice-high \ +" diff --git a/_to_remove/recipes-demo/html5-background/html5-background_git.bb b/_to_remove/recipes-demo/html5-background/html5-background_git.bb new file mode 100644 index 000000000..4be560709 --- /dev/null +++ b/_to_remove/recipes-demo/html5-background/html5-background_git.bb @@ -0,0 +1,13 @@ +SUMMARY = "AGL HTML5 Background Application" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/AGL-web-applications/background.git;protocol=https;branch=master" +SRCREV = "3b8dae349d428c0230b9885f86d421d43cda5638" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-dashboard/html5-dashboard_git.bb b/_to_remove/recipes-demo/html5-dashboard/html5-dashboard_git.bb new file mode 100644 index 000000000..7f375670b --- /dev/null +++ b/_to_remove/recipes-demo/html5-dashboard/html5-dashboard_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 dashboard Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-dashboard/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-dashboard;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-homescreen/html5-homescreen_git.bb b/_to_remove/recipes-demo/html5-homescreen/html5-homescreen_git.bb new file mode 100644 index 000000000..f927cb70b --- /dev/null +++ b/_to_remove/recipes-demo/html5-homescreen/html5-homescreen_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 Homescreen Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-homescreen/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-homescreen;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-hvac/html5-hvac_git.bb b/_to_remove/recipes-demo/html5-hvac/html5-hvac_git.bb new file mode 100644 index 000000000..91654b42b --- /dev/null +++ b/_to_remove/recipes-demo/html5-hvac/html5-hvac_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 HVAC Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-hvac/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-hvac;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-launcher/html5-launcher_git.bb b/_to_remove/recipes-demo/html5-launcher/html5-launcher_git.bb new file mode 100644 index 000000000..ab99cf5f0 --- /dev/null +++ b/_to_remove/recipes-demo/html5-launcher/html5-launcher_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 Launcher Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-launcher/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-launcher;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-mediaplayer/html5-mediaplayer_git.bb b/_to_remove/recipes-demo/html5-mediaplayer/html5-mediaplayer_git.bb new file mode 100644 index 000000000..ddb2ee29f --- /dev/null +++ b/_to_remove/recipes-demo/html5-mediaplayer/html5-mediaplayer_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 Mediaplayer Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-mediaplayer/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-mediaplayer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-mixer/html5-mixer_git.bb b/_to_remove/recipes-demo/html5-mixer/html5-mixer_git.bb new file mode 100644 index 000000000..e643c59c7 --- /dev/null +++ b/_to_remove/recipes-demo/html5-mixer/html5-mixer_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 Mixer Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-mixer/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-mixer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/html5-settings/html5-settings_git.bb b/_to_remove/recipes-demo/html5-settings/html5-settings_git.bb new file mode 100644 index 000000000..010c69105 --- /dev/null +++ b/_to_remove/recipes-demo/html5-settings/html5-settings_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "AGL HTML5 Settings Application" +HOMEPAGE = "https://git.automotivelinux.org/apps/html5-settings/" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/html5-settings;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +DEPENDS = "nodejs-native" + +inherit aglwgt diff --git a/_to_remove/recipes-demo/hvac/hvac_git.bb b/_to_remove/recipes-demo/hvac/hvac_git.bb new file mode 100644 index 000000000..c7da0ef49 --- /dev/null +++ b/_to_remove/recipes-demo/hvac/hvac_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "HVAC application" +DESCRIPTION = "AGL demonstration HVAC application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/hvac" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + qtquickcontrols2 \ + libhomescreen \ + qttools-native \ + libqtappfw \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/hvac;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} = "agl-service-hvac libqtappfw" diff --git a/_to_remove/recipes-demo/inputeventmanager/inputeventmanager_git.bb b/_to_remove/recipes-demo/inputeventmanager/inputeventmanager_git.bb new file mode 100644 index 000000000..8718f1844 --- /dev/null +++ b/_to_remove/recipes-demo/inputeventmanager/inputeventmanager_git.bb @@ -0,0 +1,30 @@ +SUMMARY = "AGL InputEventManager Application" +DESCRIPTION = "InputEventManager" +HOMEPAGE = "http://docs.automotivelinux.org" +LICENSE = "Apache-2.0" +SECTION = "apps" +S = "${WORKDIR}/git" + +inherit qmake5 systemd +DEPENDS = " qtbase " + +LIC_FILES_CHKSUM = "file://inputeventmanager/LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/inputeventmanager.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "b2f1646ac78cf61acd66c643b7638bd1b007d5a0" +# PV needs to be modified with SRCPV to work AUTOREV correctly +PV = "0.0+git${SRCPV}" + +PATH:prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:" + +do_install() { + install -d ${D}/usr/AGL/${PN} + install -m 0755 ${B}/inputeventmanager/InputEventManager ${D}/usr/AGL/${PN}/ + + install -d ${D}${systemd_user_unitdir} + install -m 0644 ${S}/inputeventmanager/conf/InputEventManager.service ${D}${systemd_user_unitdir} +} + +FILES:${PN} += "/usr/AGL/${PN}/ ${systemd_user_unitdir}" +FILES:${PN}-dbg += "/usr/AGL/${PN}/.debug" + diff --git a/_to_remove/recipes-demo/launcher/launcher_git.bb b/_to_remove/recipes-demo/launcher/launcher_git.bb new file mode 100644 index 000000000..d2de209a1 --- /dev/null +++ b/_to_remove/recipes-demo/launcher/launcher_git.bb @@ -0,0 +1,32 @@ +SUMMARY = "AGL Launcher Application" +DESCRIPTION = "AGL Launcher Application build with recipe method" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/launcher" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS = "\ + qtbase \ + qtdeclarative \ + qtquickcontrols2 \ + qtwebsockets \ + qlibhomescreen \ + wayland-native \ + wayland \ + qtwayland \ + qtwayland-native \ + agl-compositor \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/launcher;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 systemd pkgconfig aglwgt + +PATH:prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:" + +RDEPENDS:${PN} = "agl-service-homescreen" diff --git a/_to_remove/recipes-demo/mediaplayer/mediaplayer_git.bb b/_to_remove/recipes-demo/mediaplayer/mediaplayer_git.bb new file mode 100644 index 000000000..f6538fdcf --- /dev/null +++ b/_to_remove/recipes-demo/mediaplayer/mediaplayer_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "Media Player application" +DESCRIPTION = "AGL demonstration Media Player application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/mediaplayer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 libqtappfw" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/mediaplayer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} += "agl-service-mediaplayer libqtappfw" diff --git a/_to_remove/recipes-demo/messaging/messaging_git.bb b/_to_remove/recipes-demo/messaging/messaging_git.bb new file mode 100644 index 000000000..586996c75 --- /dev/null +++ b/_to_remove/recipes-demo/messaging/messaging_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "Messaging application" +DESCRIPTION = "AGL demonstration Messaging application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/messaging" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 libqtappfw" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/messaging;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} += "agl-service-bluetooth-map libqtappfw" diff --git a/_to_remove/recipes-demo/mixer/mixer_git.bb b/_to_remove/recipes-demo/mixer/mixer_git.bb new file mode 100644 index 000000000..c99c04420 --- /dev/null +++ b/_to_remove/recipes-demo/mixer/mixer_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "Mixer application" +DESCRIPTION = "AGL demonstration Mixer application for control of PipeWire mixer elements" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/mixer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + qtquickcontrols2 \ + qtwebsockets \ + libafb-helpers-qt \ +" + +PROVIDES += "virtual/mixer" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/mixer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake_qt5 aglwgt + +OECMAKE_CXX_FLAGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '' , '-DQT_NO_DEBUG_OUTPUT', d)}" + +RDEPENDS:${PN} = "agl-service-audiomixer" +RPROVIDES:${PN} += "virtual/mixer" diff --git a/_to_remove/recipes-demo/navigation/ondemandnavi-config/naviconfig.ini b/_to_remove/recipes-demo/navigation/ondemandnavi-config/naviconfig.ini new file mode 100644 index 000000000..f99c4483d --- /dev/null +++ b/_to_remove/recipes-demo/navigation/ondemandnavi-config/naviconfig.ini @@ -0,0 +1,9 @@ +{ + "mapAccessToken":"MAPBOX_ACCESS_TOKEN", + "speed":60, + "interval":100, + "latitude":36.1363, + "longitude":-115.151, + "mapStyleUrls":"styles/v1/mapbox/streets-v11", + "enableOSM":true +} diff --git a/_to_remove/recipes-demo/navigation/ondemandnavi-config_1.0.bb b/_to_remove/recipes-demo/navigation/ondemandnavi-config_1.0.bb new file mode 100644 index 000000000..212971f26 --- /dev/null +++ b/_to_remove/recipes-demo/navigation/ondemandnavi-config_1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "AGL Reference On Demand Navigation application config." +DESCRIPTION = "Config file for on-demand navigation app." +HOMEPAGE = "https://github.com/YoshitoMomiyama/aglqtnavigation.git" +SECTION = "apps" +LICENSE = "Proprietary" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" + +SRC_URI = "file://naviconfig.ini \ + " + +inherit allarch + +MAPBOX_ACCESS_TOKEN ?= "Please set mapbox access token" + +do_compile[noexec] = "1" + +do_install () { + install -D -m 644 ${WORKDIR}/naviconfig.ini ${D}${sysconfdir}/naviconfig.ini + sed -i -e 's/MAPBOX_ACCESS_TOKEN/${MAPBOX_ACCESS_TOKEN}/' ${D}${sysconfdir}/naviconfig.ini +} diff --git a/_to_remove/recipes-demo/navigation/ondemandnavi_git.bb b/_to_remove/recipes-demo/navigation/ondemandnavi_git.bb new file mode 100644 index 000000000..5264ba633 --- /dev/null +++ b/_to_remove/recipes-demo/navigation/ondemandnavi_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "Navigation application." +DESCRIPTION = "AGL demonstration Navigation application based on QtLocation widget." +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/ondemandnavi" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 qtlocation libqtappfw" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/ondemandnavi;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt pkgconfig + +RDEPENDS:${PN} += " \ + qtlocation \ + flite \ + libqtappfw \ + openjtalk \ + gstreamer1.0 \ + ondemandnavi-config \ + agl-service-navigation \ +" + +RPROVIDES:${PN} = "virtual/navigation" + diff --git a/_to_remove/recipes-demo/navigation/poiapp-api-key_1.0.bb b/_to_remove/recipes-demo/navigation/poiapp-api-key_1.0.bb new file mode 100644 index 000000000..d353d7dd5 --- /dev/null +++ b/_to_remove/recipes-demo/navigation/poiapp-api-key_1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "AGL Reference POI application API key." +DESCRIPTION = "Preload the API key for the AGL POI application." +HOMEPAGE = "https://github.com/AGLExport/genivi-navi-yelp-client" +SECTION = "apps" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM="file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" + +inherit allarch + +do_fetch[noexec] = "1" +do_unpack[noexec] = "1" +do_compile[noexec] = "1" + +POIAPP_CLIENT_ID ?= "" +POIAPP_API_KEY ?= "" + +do_install () { + install -d ${D}${sysconfdir} + echo "${POIAPP_CLIENT_ID}" > ${D}${sysconfdir}/poikey + echo "${POIAPP_API_KEY}" >> ${D}${sysconfdir}/poikey +} diff --git a/_to_remove/recipes-demo/navigation/poiapp/0001-add-display-permission.patch b/_to_remove/recipes-demo/navigation/poiapp/0001-add-display-permission.patch new file mode 100644 index 000000000..25a8fc313 --- /dev/null +++ b/_to_remove/recipes-demo/navigation/poiapp/0001-add-display-permission.patch @@ -0,0 +1,21 @@ +Add display permission + +Add display permission required to work with the running as non-root +change for applications. + +Upstream-Status: pending + +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +diff --git a/config.xml.in b/config.xml.in +index b8cfccd..bec206d 100755 +--- a/config.xml.in ++++ b/config.xml.in +@@ -13,6 +13,7 @@ + <feature name="urn:AGL:widget:required-permission"> + <param name="urn:AGL:permission::public:no-htdocs" value="required" /> + <param name="http://tizen.org/privilege/internal/dbus" value="required" /> ++ <param name="urn:AGL:permission::public:display" value="required" /> + </feature> + <license>GPL</license> + </widget> diff --git a/_to_remove/recipes-demo/navigation/poiapp_git.bb b/_to_remove/recipes-demo/navigation/poiapp_git.bb new file mode 100644 index 000000000..08e174f74 --- /dev/null +++ b/_to_remove/recipes-demo/navigation/poiapp_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "AGL Reference POI application." +DESCRIPTION = "This application provides the function of destination search to AGL. It uses the API provided by AGL Reference Navigation. This application uses yelp WebAPI." +HOMEPAGE = "https://github.com/AGLExport/genivi-navi-yelp-client" +SECTION = "apps" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4ee23c52855c222cba72583d301d2338" + +DEPENDS = " \ + qtbase \ + json-c \ + libhomescreen \ + libqtappfw \ +" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/poi-yelp;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake_qt5 pkgconfig aglwgt + +RDEPENDS:${PN} = "qtbase libqtappfw" diff --git a/_to_remove/recipes-demo/navigation/tbtnavi_git.bb b/_to_remove/recipes-demo/navigation/tbtnavi_git.bb new file mode 100644 index 000000000..a4f22545f --- /dev/null +++ b/_to_remove/recipes-demo/navigation/tbtnavi_git.bb @@ -0,0 +1,38 @@ +SUMMARY = "AGL Reference Navigation Cluster Streaming application" +DESCRIPTION = "Demo AGL turn by turn cluster navigation application based on QtLocation widget." +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/admin/repos/apps/tbtnavi" +SECTION = "apps" + +LICENSE = "Apache-2.0 & ISC & BSD-3-Clause & BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ + file://LICENSE.mapbox-cheap-ruler-cpp;md5=761263ee6bdc98e8697d9fbc897021ba \ + file://LICENSE.mapbox-geometry.hpp;md5=6e44f5d6aeec54f40fc84eebe3c6fc6c \ + file://LICENSE.mapbox-variant;md5=79558839a9db3e807e4ae6f8cd100c1c \ + file://include/mapbox/recursive_wrapper.hpp;beginline=4;endline=13;md5=cd3341aae76c0cf8345935abd20f0051 \ +" + +DEPENDS = " \ + qtbase \ + qtquickcontrols2 \ + qtlocation \ + libqtappfw \ + wayland-native \ + qtwayland-native \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/tbtnavi;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt pkgconfig + +RDEPENDS:${PN} += " \ + qtlocation \ + ondemandnavi-config \ + agl-service-navigation \ + agl-service-signal-composer \ + libqtappfw \ +" diff --git a/_to_remove/recipes-demo/onscreenapp/onscreenapp_git.bb b/_to_remove/recipes-demo/onscreenapp/onscreenapp_git.bb new file mode 100644 index 000000000..32a7a2db3 --- /dev/null +++ b/_to_remove/recipes-demo/onscreenapp/onscreenapp_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "onscreenapp for displaying popup windows" +DESCRIPTION = "AGL demonstration HMI Application for displaying popup windows" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/onscreenapp" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 libhomescreen qlibhomescreen" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/onscreenapp;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt diff --git a/_to_remove/recipes-demo/phone/phone_git.bb b/_to_remove/recipes-demo/phone/phone_git.bb new file mode 100644 index 000000000..71ef6ed7c --- /dev/null +++ b/_to_remove/recipes-demo/phone/phone_git.bb @@ -0,0 +1,24 @@ +SUMMARY = "Phone application" +DESCRIPTION = "AGL demonstration Phone application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/phone" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 libqtappfw gstreamer1.0" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/phone;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} += " \ + agl-service-telephony \ + agl-service-bluetooth-pbap \ + libqtappfw \ +" diff --git a/_to_remove/recipes-demo/radio/files/presets-ALS.conf b/_to_remove/recipes-demo/radio/files/presets-ALS.conf new file mode 100644 index 000000000..ff5592272 --- /dev/null +++ b/_to_remove/recipes-demo/radio/files/presets-ALS.conf @@ -0,0 +1,12 @@ +[fmPresets] +1\frequency=76100000 +1\title=Inter FM +2\frequency=77100000 +2\title=The Open University of Japan +3\frequency=80000000 +3\title=TOKYO FM +4\frequency=81300000 +4\title=J-WAVE +5\frequency=82500000 +5\title=NHK FM Tokyo +size=5 diff --git a/_to_remove/recipes-demo/radio/files/presets-CES.conf b/_to_remove/recipes-demo/radio/files/presets-CES.conf new file mode 100644 index 000000000..83caeffe1 --- /dev/null +++ b/_to_remove/recipes-demo/radio/files/presets-CES.conf @@ -0,0 +1,14 @@ +[fmPresets] +1\frequency=93100000 +1\title=93.1 The Mountain +2\frequency=94100000 +2\title=Mix 94.1 +3\frequency=96300000 +3\title=96.3 KKLZ +4\frequency=102700000 +4\title=102.7 THE COYOTE +5\frequency=88900000 +5\title=News 88.9 +6\frequency=91500000 +6\title=KUNV +size=6 diff --git a/_to_remove/recipes-demo/radio/files/presets-FOSDEM.conf b/_to_remove/recipes-demo/radio/files/presets-FOSDEM.conf new file mode 100644 index 000000000..b88364f72 --- /dev/null +++ b/_to_remove/recipes-demo/radio/files/presets-FOSDEM.conf @@ -0,0 +1,14 @@ +[fmPresets] +1\frequency=92100000 +1\title=92.1 Radio Campus +2\frequency=92500000 +2\title=92.5 RTBF La Première +3\frequency=93200000 +3\title=93.2 RTBF Classic 21 +4\frequency=98800000 +4\title=98.8 FM Brussel +5\frequency=103700000 +5\title=103.7 NRJ +6\frequency=104000000 +6\title=104.0 Bel RTL +size=6 diff --git a/_to_remove/recipes-demo/radio/radio_git.bb b/_to_remove/recipes-demo/radio/radio_git.bb new file mode 100644 index 000000000..c635f2c35 --- /dev/null +++ b/_to_remove/recipes-demo/radio/radio_git.bb @@ -0,0 +1,36 @@ +SUMMARY = "Radio application" +DESCRIPTION = "AGL demonstration Radio application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/radio" +SECTION = "apps" + +LICENSE = "Apache-2.0 & GPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "qtquickcontrols2 libqtappfw rtl-sdr" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/radio;protocol=https;branch=${AGL_BRANCH} \ + file://presets-ALS.conf \ + file://presets-CES.conf \ + file://presets-FOSDEM.conf \ +" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +# ALS, CES, FOSDEM available +AGL_RADIO_PRESETS_LOCALE ?= "CES" +do_install:append() { + install -d ${D}${sysconfdir}/xdg/AGL + install -m 0644 ${WORKDIR}/presets-CES.conf ${D}${sysconfdir}/xdg/AGL/radio-presets-CES.conf + install -m 0644 ${WORKDIR}/presets-ALS.conf ${D}${sysconfdir}/xdg/AGL/radio-presets-ALS.conf + install -m 0644 ${WORKDIR}/presets-FOSDEM.conf ${D}${sysconfdir}/xdg/AGL/radio-presets-FOSDEM.conf + install -m 0644 ${WORKDIR}/presets-${AGL_RADIO_PRESETS_LOCALE}.conf ${D}${sysconfdir}/xdg/AGL/radio-presets.conf +} + +FILES:${PN} += "${sysconfdir}/xdg/AGL/*" + +RDEPENDS:${PN} += "agl-service-radio libqtappfw" diff --git a/_to_remove/recipes-demo/settings/settings_git.bb b/_to_remove/recipes-demo/settings/settings_git.bb new file mode 100644 index 000000000..60cbdf595 --- /dev/null +++ b/_to_remove/recipes-demo/settings/settings_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "Settings application" +DESCRIPTION = "AGL demonstration Settings application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/settings" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + libqtappfw \ + qtquickcontrols2 \ + qt-qrcode \ + qtvirtualkeyboard \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/settings;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} += " \ + qt-qrcode \ + agl-service-bluetooth \ + agl-service-network \ + agl-service-voice-high \ + libqtappfw \ +" diff --git a/_to_remove/recipes-demo/simple-can-simulator/files/simple_can_simulator.py b/_to_remove/recipes-demo/simple-can-simulator/files/simple_can_simulator.py new file mode 100755 index 000000000..83f88706e --- /dev/null +++ b/_to_remove/recipes-demo/simple-can-simulator/files/simple_can_simulator.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 Alex Bencz +# Copyright (c) 2019 Konsulko Group, smurray@konsulko.com +# Copyright (c) 2020 The Linux Foundation, jsmoeller@linuxfoundation.org +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# of the Software, and to permit persons to whom the Software is furnished to do +# so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# +# CANSocket from: +# +# https://github.com/abencz/python_socketcan/blob/master/python_socketcan_example.py +# + +import sys +import socket +import argparse +import struct +import errno +import threading +import time + +class CANSocket(object): + FORMAT = "<IB3x8s" + FD_FORMAT = "<IB3x64s" + + def __init__(self, interface=None): + self.sock = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) + if interface is not None: + self.bind(interface) + + def bind(self, interface): + self.sock.bind((interface,)) + self.sock.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FD_FRAMES, 1) + + def send(self, can_id, data, flags=0): + can_id = can_id | flags + can_pkt = struct.pack(self.FORMAT, can_id, len(data), data) + self.sock.send(can_pkt) + + def sendfd(self, can_id, data, flags=0): + can_id = can_id | flags + datafd = data.ljust(64, b'\x00'); + can_pkt = struct.pack(self.FD_FORMAT, can_id, len(datafd), datafd) + self.sock.send(can_pkt) + + def recv(self, flags=0): + can_pkt = self.sock.recv(72) + + if len(can_pkt) == 16: + can_id, length, data = struct.unpack(self.FORMAT, can_pkt) + else: + can_id, length, data = struct.unpack(self.FD_FORMAT, can_pkt) + + can_id &= socket.CAN_EFF_MASK + return (can_id, data[:length]) + +class VehicleSimulator(object): + DEFAULT_IDLE_RPM = 600 + + def __init__(self): + self.CRUISEMODE = False + self.CRUISEACTIVE = False + self.CRUISESPEED = 0 + self.CRUISERPM = 0 + self.freq = 10 + self.vehicle_speed = 0 + self.engine_speed = self.DEFAULT_IDLE_RPM + self.thread = threading.Thread(target=self.run, daemon=True) + self.lock = threading.Lock() + + def reset(self): + with self.lock: + self.vehicle_speed = 0 + self.engine_speed = self.DEFAULT_IDLE_RPM + + def start(self): + self.thread.start() + + def get_engine_speed(self): + with self.lock: + return int(self.engine_speed) + + def get_vehicle_speed(self): + with self.lock: + return int(self.vehicle_speed) + + def accelerate(self, target_speed, target_rpm, duration, bycruise = False): + if target_speed <= self.vehicle_speed: + return + v = (target_speed - self.vehicle_speed) / (duration * self.freq) + r = (target_rpm - self.engine_speed) / (duration * self.freq) + while self.vehicle_speed < target_speed and (not self.CRUISEACTIVE or bycruise): + with self.lock: + self.vehicle_speed += v; + self.engine_speed += r; + time.sleep(1 / self.freq) + + def brake(self, target_speed, target_rpm, duration, bycruise = False): + if target_speed >= self.vehicle_speed: + return + v = (self.vehicle_speed - target_speed) / (duration * self.freq) + r = (self.engine_speed - target_rpm) / (duration * self.freq) + while self.vehicle_speed > target_speed and (not self.CRUISEACTIVE or bycruise): + with self.lock: + self.vehicle_speed -= v; + self.engine_speed -= r; + time.sleep(1 / self.freq) + + def increase(self, bycruise = True): + if self.CRUISEACTIVE: + target_speed = self.vehicle_speed + 5 + target_rpm = self.engine_speed * 1.1 + self.accelerate(target_speed, target_rpm, 2, bycruise) + + def decrease(self, bycruise = True): + if self.CRUISEACTIVE: + target_speed = self.vehicle_speed - 5 + target_rpm = self.engine_speed * 0.9 + self.brake(target_speed, target_rpm, 2, bycruise) + + def resume(self, bycruise = True): + target_speed = self.CRUISESPEED + target_rpm = self.CRUISERPM + current_speed = self.get_vehicle_speed() + if target_speed > current_speed: + self.accelerate(target_speed, target_rpm, 2, bycruise) + else: + self.brake(target_speed, target_rpm, 2, bycruise) + + def run(self): + while True: + if not self.CRUISEACTIVE: + self.accelerate(80, 3000, 5) + self.accelerate(104, 4000, 3) + self.brake(80, 3000, 3) + self.accelerate(104, 4000, 6) + self.brake(40, 2000, 4) + self.accelerate(90, 3000, 5) + self.brake(1, 650, 5) + if not self.CRUISEACTIVE: + self.reset() + time.sleep(5) + +class DiagnosticMessageHandler(object): + def __init__(self, can_sock, simulator, verbose=False): + self.can_sock = can_sock + self.simulator = simulator + self.verbose = verbose + self.thread = threading.Thread(target=self.run, daemon=True) + + def start(self): + self.thread.start() + + def run(self): + while True: + can_id, data = self.can_sock.recv() + #print('%03X#%s' % (can_id, ''.join(format(x, '02X') for x in data))) + if can_id == 0x7df: + # OBD-II request + if data[1] == 0x01 and data[2] == 0x0C: + # Engine speed + speed = self.simulator.get_engine_speed() + #print('engine speed = %d' % speed) + if speed > 16383.75: + speed = 16383.75 + reply = [ 0x04, 0x41, 0x0C ] + reply.append(4 * speed // 256) + reply.append(4 * speed % 256) + # pad remaining bytes to make 8 + reply.append(0) + reply.append(0) + reply.append(0) + self.can_sock.send(0x7e8, bytes(reply), 0) + elif data[1] == 0x01 and data[2] == 0x0D: + # Vehicle speed + speed = int(self.simulator.get_vehicle_speed()) % 256 + #print('vehicle speed = %d' % speed) + reply = [ 0x03, 0x41, 0x0D ] + reply.append(speed) + # pad remaining bytes to make 8 + reply.append(0) + reply.append(0) + reply.append(0) + reply.append(0) + self.can_sock.send(0x7e8, bytes(reply), 0) + +class SteeringWheelMessageHandler(object): + def __init__(self, can_sock, simulator, verbose=False): + self.can_sock = can_sock + self.simulator = simulator + self.verbose = verbose + self.thread = threading.Thread(target=self.run, daemon=True) + self.buttonpressed = False + self.buttonenabled = False + self.buttoncancel = False + self.buttondec = False + self.buttoninc = False + self.cruisemode = False + self.cruiseactive = False + + def start(self): + self.thread.start() + + def run(self): + while True: + can_id, data = self.can_sock.recv() + #print('%03X#%s' % (can_id, ''.join(format(x, '02X') for x in data))) + if can_id == 0x21: + #print('%03X#%s' % (can_id, ''.join(format(x, '02X') for x in data))) + if data: + #if data[6]: + #print('data6: %02X' % (data[6])) + if data[6] == 0x80 and not self.buttonpressed: + # we do skip any further lin messages + # two buttons at the same time won't work + # (aka unlikely w/o twisting fingers) + self.buttonpressed = True + self.buttonenabled = True + if data[6] == 0x08 and not self.buttonpressed: + self.buttonpressed = True + self.buttoncancel = True + if data[6] == 0x10 and not self.buttonpressed: + self.buttonpressed = True + self.buttondec = True + if data[6] == 0x40 and not self.buttonpressed: + self.buttonpressed = True + self.buttoninc = True + if data[6] == 0x00 and self.buttonpressed: + #now handle it as the button was released + if self.buttonenabled: + self.buttonenabled = False + self.cruisemode = not self.cruisemode + #print("set cruisemode to %s" % self.cruisemode) + self.simulator.CRUISEMODE = self.cruisemode + # disable/reset all if going off + if not self.cruisemode: + self.cruiseactive = False + self.simulator.CRUISEACTIVE = self.cruiseactive + self.simulator.CRUISESPEED = 0 + self.simulator.CRUISERPM = 0 + #print("set cruiseactive to %s" % self.cruiseactive) + if self.buttoncancel: + self.buttoncancel = False + self.simulator.CRUISESPEED = self.simulator.get_vehicle_speed() + self.simulator.CRUISERPM = self.simulator.get_engine_speed() + #print("set cruisespeed to %d" % self.simulator.CRUISESPEED ) + #print("set cruiserpm to %d" % self.simulator.CRUISERPM ) + self.cruiseactive = False + #print("set cruiseactive to %s" % self.cruiseactive ) + self.simulator.CRUISEACTIVE = self.cruiseactive + if self.buttondec: + self.buttondec = False + if self.cruiseactive: + #print("decrease") + self.simulator.decrease() + else: + # set speed + #print("set speed") + self.simulator.CRUISESPEED = self.simulator.get_vehicle_speed() + self.simulator.CRUISERPM = self.simulator.get_engine_speed() + #print("set cruisespeed to %d" % self.simulator.CRUISESPEED ) + #print("set cruiserpm to %d" % self.simulator.CRUISERPM ) + self.cruiseactive = not self.cruiseactive + #print("set cruiseactive to %s" % self.cruiseactive ) + self.simulator.CRUISEACTIVE = self.cruiseactive + if self.buttoninc: + self.buttoninc = False + if self.cruiseactive: + #print("increase") + self.simulator.increase() + else: + if self.simulator.CRUISESPEED > 0: + # resume + self.cruiseactive = not self.cruiseactive + self.simulator.CRUISEACTIVE = self.cruiseactive + #print("set cruiseactive to %s" % self.cruiseactive ) + #print("resume") + self.simulator.resume() + self.buttonpressed = False + + +class StatusMessageSender(object): + def __init__(self, can_sock, simulator, verbose=False): + self.can_sock = can_sock + self.simulator = simulator + self.verbose = verbose + self.thread = threading.Thread(target=self.run, daemon=True) + + def start(self): + self.thread.start() + + def run(self): + while True: + # Engine speed + speed = self.simulator.get_engine_speed() + if self.verbose: + print('engine speed = %d' % speed) + if speed > 16383.75: + speed = 16383.75 + # Message is 1 byte unknown, 1 byte fuel level, 2 bytes engine speed (4x), fuel low @ bit 55 + msg = [ 0, 0 ] + speed *= 4 + msg.append(speed // 256) + msg.append(speed % 256) + # pad remaining bytes to make 8 + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + self.can_sock.send(0x3d9, bytes(msg), 0) + + # Vehicle speed + speed = int(self.simulator.get_vehicle_speed()) % 256 + if self.verbose: + print('vehicle speed = %d' % speed) + # Message is 15 bits speed (64x), left aligned + msg = [ ] + # Note: extra 2x to yield required left-alignment + speed *= 128 + msg.append(speed // 256) + msg.append(speed % 256) + # pad remaining bytes to make 8 + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + msg.append(0) + self.can_sock.send(0x3e9, bytes(msg), 0) + + # Sleep 100 ms + time.sleep(0.1) + +def main(): + parser = argparse.ArgumentParser(description='Simple CAN vehicle simulator.') + parser.add_argument('interface', type=str, help='interface name (e.g. vcan0)') + parser.add_argument('-v', '--verbose', help='increase output verbosity', action='store_true') + args = parser.parse_args() + + try: + can_sock = CANSocket(args.interface) + diag_can_sock = CANSocket(args.interface) + steeringwheel_can_sock = CANSocket(args.interface) + except OSError as e: + sys.stderr.write('Could not listen on interface {0}\n'.format(args.interface)) + sys.exit(e.errno) + + print('Using {0}'.format(args.interface)) + sim = VehicleSimulator() + status_sender = StatusMessageSender(can_sock, sim, args.verbose) + diag_handler = DiagnosticMessageHandler(diag_can_sock, sim, args.verbose) + steeringwheel_handler = SteeringWheelMessageHandler(steeringwheel_can_sock, sim, args.verbose) + sim.start() + status_sender.start() + diag_handler.start() + steeringwheel_handler.start() + try: + while True: + time.sleep(60) + except (KeyboardInterrupt, SystemExit): + #sim.stop() + sys.exit(0) + +if __name__ == '__main__': + main() diff --git a/_to_remove/recipes-demo/simple-can-simulator/simple-can-simulator.bb b/_to_remove/recipes-demo/simple-can-simulator/simple-can-simulator.bb new file mode 100644 index 000000000..947e0c6a5 --- /dev/null +++ b/_to_remove/recipes-demo/simple-can-simulator/simple-can-simulator.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Simulator that generates CAN messages of a driving car" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${WORKDIR}/simple_can_simulator.py;beginline=2;endline=22;md5=9bb9c582301261d21460d2bc5bb8c225" + +SRC_URI = "file://simple_can_simulator.py" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/simple_can_simulator.py ${D}${sbindir} +} + +RDEPENDS:${PN} = "python3" diff --git a/_to_remove/recipes-demo/taskmanager/taskmanager_git.bb b/_to_remove/recipes-demo/taskmanager/taskmanager_git.bb new file mode 100644 index 000000000..96b6d270f --- /dev/null +++ b/_to_remove/recipes-demo/taskmanager/taskmanager_git.bb @@ -0,0 +1,26 @@ +SUMMARY = "Task Manager application" +DESCRIPTION = "AGL demonstration task visualization and management application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/taskmanager" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = " \ + qtquickcontrols2 \ + qtwebsockets \ + qtcharts \ + libqtappfw \ + libhomescreen \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/taskmanager;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit qmake5 aglwgt + +RDEPENDS:${PN} += "agl-service-taskmanager libqtappfw" diff --git a/_to_remove/recipes-demo/telematics-recorder/telematics-recorder_git.bb b/_to_remove/recipes-demo/telematics-recorder/telematics-recorder_git.bb new file mode 100644 index 000000000..322acc5c3 --- /dev/null +++ b/_to_remove/recipes-demo/telematics-recorder/telematics-recorder_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Telematics Recorder application" +DESCRIPTION = "AGL demonstration telematics recorder application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-telematics-demo-recorder" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +DEPENDS = "glib-2.0 mosquitto" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-telematics-demo-recorder;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AUTOREV}" + +S = "${WORKDIR}/git" + +inherit cmake aglwgt + +RDEPENDS:${PN} += " \ + agl-service-can-low-level \ + agl-service-gps \ + agl-service-network \ + libmosquitto1 \ +" diff --git a/_to_remove/recipes-demo/waltham-receiver/waltham-receiver_git.bb b/_to_remove/recipes-demo/waltham-receiver/waltham-receiver_git.bb new file mode 100644 index 000000000..75ada4dd1 --- /dev/null +++ b/_to_remove/recipes-demo/waltham-receiver/waltham-receiver_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "Waltham Receiver application" +DESCRIPTION = "AGL demonstration Waltham receiver interactive remote display application" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/waltham-receiver.git" +SECTION = "apps" + +LICENSE = "Apache-2.0 & MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=374fee6a7817f1e1a5a7bfb7b7989553" + +DEPENDS = " \ + waltham wayland wayland-native \ + gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad \ +" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/waltham-receiver.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig aglwgt + +RDEPENDS:${PN} += " \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + waltham \ +" diff --git a/_to_remove/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb b/_to_remove/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb new file mode 100644 index 000000000..4c0bda071 --- /dev/null +++ b/_to_remove/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Low level CAN generator" +DESCRIPTION = "Generator used to customize low level CAN service with customs signals" +SECTION = "devel" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake pkgconfig +BBCLASSEXTEND = "nativesdk" +DEPENDS = " cmake-apps-module" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/low-level-can-generator;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "0a3e354c3d81866e1a755367ab5592b3ced868bb" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + diff --git a/_to_remove/recipes-devtools/python/python3-asyncssh_2.3.0.bb b/_to_remove/recipes-devtools/python/python3-asyncssh_2.3.0.bb new file mode 100644 index 000000000..f764b5545 --- /dev/null +++ b/_to_remove/recipes-devtools/python/python3-asyncssh_2.3.0.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "\ +AsyncSSH is a Python package which provides an asynchronous client and \ +server implementation of the SSHv2 protocol on top of the Python \ +asyncio framework." +HOMEPAGE = "https://github.com/ronf/asyncssh" +LICENSE = "EPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d9fc0efef5228704e7f5b37f27192723" + +SRC_URI[sha256sum] = "44bda34c7123f00c3df95d24e2dc8d43c4d17b456fbb8c434ef4f4a7ebb5265e" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "${PYTHON_PN}-asyncio ${PYTHON_PN}-cryptography" + +BBCLASSEXTEND = "native" diff --git a/_to_remove/recipes-devtools/python/python3-pytest-dependency_0.5.1.bb b/_to_remove/recipes-devtools/python/python3-pytest-dependency_0.5.1.bb new file mode 100644 index 000000000..5ff2d4ecf --- /dev/null +++ b/_to_remove/recipes-devtools/python/python3-pytest-dependency_0.5.1.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "pytest-dependency manages dependencies of tests." +HOMEPAGE = "https://github.com/RKrahl/pytest-dependency" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://README.rst;md5=35b9938ae48d25e6b8306232e98463dd" + +SRC_URI[sha256sum] = "c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b" + +inherit pypi setuptools3 + +DEPENDS += "${PYTHON_PN}-pytest-native" + +BBCLASSEXTEND = "native" diff --git a/_to_remove/recipes-devtools/python/python3-pytest-reverse_1.0.1.bb b/_to_remove/recipes-devtools/python/python3-pytest-reverse_1.0.1.bb new file mode 100644 index 000000000..5ed9b1d9d --- /dev/null +++ b/_to_remove/recipes-devtools/python/python3-pytest-reverse_1.0.1.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "pytest-reverse is a pytest plugin to reverse test order" +HOMEPAGE = "https://github.com/adamchainz/pytest-reverse" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=caf1f407ae86ecd57ab721dff94079b7" + +SRC_URI[sha256sum] = "40cbc47df8a262fed778e500f4d0b17d2d08ef8b9fbf899c0bab9488be192aac" + +inherit pypi setuptools3 + +DEPENDS += "${PYTHON_PN}-pytest-native" + +BBCLASSEXTEND = "native" diff --git a/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts new file mode 100755 index 000000000..1d1a5a059 --- /dev/null +++ b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Copyright 2017 IoT.bzh. + +# Author: Ronan Le Martret <ronan.lemartret@iot.bzh> +# + +# The following script will run all the scriptlets found in #SYSCONFDIR#/agl-postinsts. + +agl_pi_dir="#SYSCONFDIR#/agl-postinsts" + +POSTINST_LOGGING=1 +LOGFILE=/var/log/agl-postinstall.log + +[ -e $LOGFILE ] && mv ${LOGFILE} ${LOGFILE}.old.$(date +%F--%H%M.%S) + +append_log=">>$LOGFILE 2>&1" + +exec_postinst_scriptlets() { + for i in `ls $agl_pi_dir`; do + i=$agl_pi_dir/$i + echo "Running postinst $i..." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log + if [ -x $i ]; then + eval sh -c $i $append_log + if [ $? -eq 0 ]; then + rm $i + else + echo "ERROR: postinst $i failed." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log + remove_agl_pi_dir=0 + fi + else + echo "ERROR: postinst $i do not exists or do not have execute permission." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i do not exists or do not have execute permission." $append_log + remove_agl_pi_dir=0 + fi + done +} + +remove_agl_pi_dir=1 +exec_postinst_scriptlets +systemctl daemon-reload + +# since all postinstalls executed successfully, remove the postinstalls directory +if [ $remove_agl_pi_dir = 1 ]; then + rm -rf $agl_pi_dir +fi diff --git a/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service new file mode 100644 index 000000000..8f8667db6 --- /dev/null +++ b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service @@ -0,0 +1,17 @@ +[Unit] +Description=Run pending agl postinsts +DefaultDependencies=no +After=#SYSTEMD_SERVICE_AFTER# +Before=#SYSTEMD_SERVICE_BEFORE# +ConditionPathExists=#SYSCONFDIR#/agl-postinsts + +[Service] +Type=oneshot +StandardOutput=journal+console +ExecStart=#SBINDIR#/run-agl-postinsts +ExecStartPost=#BASE_BINDIR#/systemctl disable run-agl-postinsts.service +RemainAfterExit=No +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target diff --git a/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb new file mode 100644 index 000000000..e7b916360 --- /dev/null +++ b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb @@ -0,0 +1,46 @@ +SUMMARY = "Runs AGL postinstall scripts on first boot of the target device" +SECTION = "devel" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://run-agl-postinsts \ + file://run-agl-postinsts.service" + +S = "${WORKDIR}" + +inherit allarch systemd + +SYSTEMD_SERVICE:${PN} = "run-agl-postinsts.service" + +SYSTEMD_SERVICE_AFTER ?= "dbus.service cynagora.service" + +SYSTEMD_SERVICE_BEFORE ?= "systemd-user-sessions.service" + +do_configure() { + : +} + +do_compile () { + : +} + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/run-agl-postinsts ${D}${sbindir}/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/run-agl-postinsts.service ${D}${systemd_unitdir}/system/ + + sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \ + -e 's:#SBINDIR#:${sbindir}:g' \ + -e 's:#BASE_BINDIR#:${base_bindir}:g' \ + -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \ + ${D}${sbindir}/run-agl-postinsts \ + ${D}${systemd_unitdir}/system/run-agl-postinsts.service + + sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \ + -e 's:#SYSTEMD_SERVICE_BEFORE#:${SYSTEMD_SERVICE_BEFORE}:g' \ + ${D}${systemd_unitdir}/system/run-agl-postinsts.service +} + diff --git a/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bbappend b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bbappend new file mode 100644 index 000000000..32e3d6b88 --- /dev/null +++ b/_to_remove/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bbappend @@ -0,0 +1 @@ +SYSTEMD_SERVICE_AFTER:append = " afm-system-daemon.service" diff --git a/_to_remove/recipes-graphics/hmi-debug/files/hmi-debug b/_to_remove/recipes-graphics/hmi-debug/files/hmi-debug new file mode 100644 index 000000000..fee9573b7 --- /dev/null +++ b/_to_remove/recipes-graphics/hmi-debug/files/hmi-debug @@ -0,0 +1,8 @@ +#You can select log level of HMI framework +#1 ERROR +#2 WARNING +#3 NOTICE +#4 INFO +#5 DEBUG +#If you want to output debug log about hmi-framework, please uncomment the following. +#USE_HMI_DEBUG=5 diff --git a/_to_remove/recipes-graphics/hmi-debug/hmi-debug_git.bb b/_to_remove/recipes-graphics/hmi-debug/hmi-debug_git.bb new file mode 100644 index 000000000..84dff74ae --- /dev/null +++ b/_to_remove/recipes-graphics/hmi-debug/hmi-debug_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Configurations for HMI framework" + +SECTION = "HMI" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = " \ + file://hmi-debug \ +" + +FILES:${PN} = " \ + ${sysconfdir}/afm/unit.env.d \ +" + +do_install() { + install -d ${D}${sysconfdir}/afm/unit.env.d + install -m 644 ${WORKDIR}/hmi-debug ${D}${sysconfdir}/afm/unit.env.d +} diff --git a/_to_remove/recipes-graphics/libhomescreen/libhomescreen_git.bb b/_to_remove/recipes-graphics/libhomescreen/libhomescreen_git.bb new file mode 100644 index 000000000..483b11eb7 --- /dev/null +++ b/_to_remove/recipes-graphics/libhomescreen/libhomescreen_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "AGL Home Screen Library" +DESCRIPTION = "libhomescreen" +HOMEPAGE = "http://docs.automotivelinux.org" +LICENSE = "Apache-2.0" +SECTION = "libs" + +BBCLASSEXTEND = " nativesdk" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "af-binder json-c" + +inherit cmake + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libhomescreen.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "0d65d54ba63508c0ef545d02e94d5702f9c8ecb3" +S = "${WORKDIR}/git" + +RDEPENDS:${PN} = "agl-service-homescreen" diff --git a/_to_remove/recipes-graphics/qlibhomescreen/qlibhomescreen_git.bb b/_to_remove/recipes-graphics/qlibhomescreen/qlibhomescreen_git.bb new file mode 100644 index 000000000..a9f1ccf37 --- /dev/null +++ b/_to_remove/recipes-graphics/qlibhomescreen/qlibhomescreen_git.bb @@ -0,0 +1,13 @@ +SUMMARY = "A wrapper library of libhomescreen for Qt Application in AGL" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +DEPENDS = "qtbase libhomescreen" +RDEPENDS:${PN} = "libhomescreen" + +inherit qmake5 + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libqthomescreen.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "b218476402bceda7eb42d41064552a7261ff3205" +S = "${WORKDIR}/git" diff --git a/_to_remove/recipes-graphics/wayland/weston-init.bbappend b/_to_remove/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 000000000..8af3184af --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'weston-init_agldemo.inc', '', d)} diff --git a/_to_remove/recipes-graphics/wayland/weston-init/tmpfiles.conf.in b/_to_remove/recipes-graphics/wayland/weston-init/tmpfiles.conf.in new file mode 100644 index 000000000..c4b302faf --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/tmpfiles.conf.in @@ -0,0 +1,6 @@ +# This file is distributed to create weston XDG_RUNTIME_DIR (/run/deamon/@WESTONUSER@) +# +# See tmpfiles.d(5) for details + +d /run/platform/ 0775 root root - +d /run/platform/@WESTONUSER@ 0770 @WESTONUSER@ @WESTONGROUP@ - diff --git a/_to_remove/recipes-graphics/wayland/weston-init/weston-dep.conf.in b/_to_remove/recipes-graphics/wayland/weston-init/weston-dep.conf.in new file mode 100644 index 000000000..2b8102096 --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/weston-dep.conf.in @@ -0,0 +1,3 @@ +[Unit] +Requires=@WESTON_DRM_DEVICE@ +After=@WESTON_DRM_DEVICE@ diff --git a/_to_remove/recipes-graphics/wayland/weston-init/weston.conf.in b/_to_remove/recipes-graphics/wayland/weston-init/weston.conf.in new file mode 100644 index 000000000..9c3df052d --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/weston.conf.in @@ -0,0 +1,12 @@ +[Service] +Type=notify +Environment="XDG_RUNTIME_DIR=@XDG_RUNTIME_DIR@" +# Note that clearing PAMName (thus not having PAMName=login) disables +# logind support for the session, which allows setting XDG_RUNTIME_DIR +# to something other than /run/user/% (as is done above). +# Without systemd-logind support, weston needs to be patched to allow +# its direct launcher to work for non-root users in this scenario. +PAMName= +ExecStart= +ExecStart=@WESTONSTART@ +SmackProcessLabel=System::Weston diff --git a/_to_remove/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in b/_to_remove/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in new file mode 100644 index 000000000..585db6be8 --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in @@ -0,0 +1,2 @@ +SUBSYSTEM=="gpu_class", MODE="0660", GROUP="@WESTONGROUP@", SECLABEL{smack}="*" + diff --git a/_to_remove/recipes-graphics/wayland/weston-init/zz-dri.rules.in b/_to_remove/recipes-graphics/wayland/weston-init/zz-dri.rules.in new file mode 100644 index 000000000..51c68c303 --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/zz-dri.rules.in @@ -0,0 +1 @@ +SUBSYSTEM=="drm", MODE="0660", GROUP="@WESTONGROUP@", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston@@WESTONUSER@.service" diff --git a/_to_remove/recipes-graphics/wayland/weston-init/zz-input.rules.in b/_to_remove/recipes-graphics/wayland/weston-init/zz-input.rules.in new file mode 100644 index 000000000..fb3e677f4 --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/zz-input.rules.in @@ -0,0 +1 @@ +SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston@@WESTONUSER@.service" diff --git a/_to_remove/recipes-graphics/wayland/weston-init/zz-tty.rules.in b/_to_remove/recipes-graphics/wayland/weston-init/zz-tty.rules.in new file mode 100644 index 000000000..e5ce4b553 --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/zz-tty.rules.in @@ -0,0 +1 @@ +SUBSYSTEM=="tty", KERNEL=="tty7", OWNER="@WESTONUSER@", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston@@WESTONUSER@.service" diff --git a/_to_remove/recipes-graphics/wayland/weston-init/zz-video.rules.in b/_to_remove/recipes-graphics/wayland/weston-init/zz-video.rules.in new file mode 100644 index 000000000..1dfa3c18c --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init/zz-video.rules.in @@ -0,0 +1 @@ +SUBSYSTEM=="video4linux", MODE="0660", KERNEL=="video*", GROUP="display", SECLABEL{smack}="*", TAG+="systemd" diff --git a/_to_remove/recipes-graphics/wayland/weston-init_agldemo.inc b/_to_remove/recipes-graphics/wayland/weston-init_agldemo.inc new file mode 100644 index 000000000..4815079f2 --- /dev/null +++ b/_to_remove/recipes-graphics/wayland/weston-init_agldemo.inc @@ -0,0 +1,81 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/weston-init:" + +inherit agl-graphical + +AGL_DEFAULT_WESTONSTART ??= "/usr/bin/agl-compositor --config ${sysconfdir}/xdg/weston/weston.ini" +WESTON_USE_PIXMAN ??= "0" + +WESTONSTART ??= "${AGL_DEFAULT_WESTONSTART} ${WESTONARGS}" +WESTONSTART:append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/compositor.log", "",d)}" +WESTONSTART:append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}" +WESTONSTART:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", " --use-pixman", "",d)}" + +# Systemd name of DRM device to have weston/agl-compositor startup depend +# upon, if required. Currently only x86-64 seems to need a dependency to +# avoid failures due to racing with i915 driver init on e.g. UpSquared. +# It seems safer for now to only apply it there rather than doing a blanket +# default everywhere that might then need to be over-ridden for vendor BSPs. +WESTON_DRM_DEVICE ?= "" + +WIFILES = " \ + file://weston.conf.in \ + file://weston-dep.conf.in \ + file://tmpfiles.conf.in \ + file://zz-dri.rules.in \ + file://zz-input.rules.in \ + file://zz-tty.rules.in \ + file://zz-video.rules.in \ +" + +WIFILES:append:imx = " \ + file://zz-dri-imx.rules.in \ +" + +SRC_URI:append = " ${WIFILES}" + +do_install:append() { + # Remove upstream weston udev rules just to be safe + rm -f ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules + + # Process ".in" files + files=$(echo ${WIFILES} | sed s,file://,,g) + for f in ${files}; do + g=${f%.in} + if [ "${f}" != "${g}" ]; then + sed -e "s,@WESTONUSER@,${WESTONUSER},g" \ + -e "s,@WESTONGROUP@,${WESTONGROUP},g" \ + -e "s,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g" \ + -e "s,@WESTONSTART@,${WESTONSTART},g" \ + -e "s,@WESTON_DRM_DEVICE@,${WESTON_DRM_DEVICE},g" \ + ${WORKDIR}/${f} > ${WORKDIR}/${g} + fi + done + + # Install weston drop-in + install -d ${D}${systemd_system_unitdir}/weston@.service.d + install -m644 ${WORKDIR}/weston.conf ${D}/${systemd_system_unitdir}/weston@.service.d/weston-init.conf + + # Install weston DRM device dependency drop-in if required + if [ -n "${WESTON_DRM_DEVICE}" ]; then + install -m 0644 ${WORKDIR}/weston-dep.conf ${D}/${systemd_system_unitdir}/weston@.service.d/ + fi + + # Install tmpfiles drop-in + install -d ${D}${libdir}/tmpfiles.d + install -m644 ${WORKDIR}/tmpfiles.conf ${D}${libdir}/tmpfiles.d/weston-init.conf + + # Install udev rules + install -d ${D}${sysconfdir}/udev/rules.d + for f in ${files}; do + g=${f%.in} + h=${g%.rules} + if [ "${g}" != "${h}" ]; then + install -m644 ${WORKDIR}/${g} ${D}${sysconfdir}/udev/rules.d + fi + done +} + +FILES:${PN} += " \ + ${libdir}/tmpfiles.d/ \ + ${systemd_system_unitdir}/weston@.service.d/ \ +" diff --git a/_to_remove/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch b/_to_remove/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch new file mode 100644 index 000000000..dd811c81b --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch @@ -0,0 +1,472 @@ +From 9cb7cb85f59509ac445116e9458c502cf6cb74e6 Mon Sep 17 00:00:00 2001 +From: Christian Gromm <christian.gromm@microchip.com> +Date: Thu, 9 Nov 2017 13:20:23 +0100 +Subject: [PATCH 2/2] src: most: add auto conf feature + +This patch adds the auto configuration feature to the driver +sources. It is needed to have the driver configured automatically +upon start up w/o the need for userspace to set up sysfs. + +Signed-off-by: Christian Gromm <christian.gromm@microchip.com> +--- + driver/Makefile | 3 + + driver/default_conf.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++ + driver/include/mostcore.h | 64 ++++++++++++++++++ + driver/mostcore/core.c | 120 ++++++++++++++++++++++++++++------ + 4 files changed, 331 insertions(+), 18 deletions(-) + create mode 100644 driver/default_conf.c + +diff --git a/Makefile b/Makefile +index e77a4b6..6d74ebe 100644 +--- a/Makefile ++++ b/Makefile +@@ -6,6 +6,9 @@ obj-m := mostcore.o + mostcore-y := mostcore/core.o + CFLAGS_core.o := -I$(src)/include/ + ++obj-m += default_conf.o ++CFLAGL_default_conf.o := -I$(src)/include ++ + obj-m += aim_cdev.o + aim_cdev-y := aim-cdev/cdev.o + CFLAGS_cdev.o := -I$(src)/include/ +diff --git a/default_conf.c b/default_conf.c +new file mode 100644 +index 0000000..adb1786 +--- /dev/null ++++ b/default_conf.c +@@ -0,0 +1,162 @@ ++/* ++ * default_conf.c - Default configuration for the MOST channels. ++ * ++ * Copyright (C) 2017, Microchip Technology Germany II GmbH & Co. KG ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * This file is licensed under GPLv2. ++ */ ++ ++#include "include/mostcore.h" ++#include <linux/module.h> ++ ++static struct most_config_probe config_probes[] = { ++ ++ /* OS81118 Control */ ++ { ++ .ch_name = "ep8f", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-crx", ++ }, ++ { ++ .ch_name = "ep0f", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-ctx", ++ }, ++ /* OS81118 Async */ ++ { ++ .ch_name = "ep8e", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-arx", ++ }, ++ { ++ .ch_name = "ep0e", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-atx", ++ }, ++ /* OS81210 Control */ ++ { ++ .ch_name = "ep87", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-crx", ++ }, ++ { ++ .ch_name = "ep07", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-ctx", ++ }, ++ /* OS81210 Async */ ++ { ++ .ch_name = "ep86", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-arx", ++ }, ++ { ++ .ch_name = "ep06", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-atx", ++ }, ++ /* Streaming channels (common for all INICs) */ ++ { ++ .ch_name = "ep01", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_SYNC, ++ .num_buffers = 8, ++ .buffer_size = 2 * 12 * 42, ++ .subbuffer_size = 12, ++ .packets_per_xact = 42, ++ }, ++ .aim_name = "sound", ++ .aim_param = "ep01-6ch.6x16", ++ }, ++ { ++ .ch_name = "ep02", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_ISOC, ++ .num_buffers = 8, ++ .buffer_size = 40 * 188, ++ .subbuffer_size = 188, ++ .packets_per_xact = 2, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-itx1", ++ }, ++ ++ /* sentinel */ ++ {} ++}; ++ ++static struct most_config_set config_set = { ++ .probes = config_probes ++}; ++ ++static int __init mod_init(void) ++{ ++ most_register_config_set(&config_set); ++ return 0; ++} ++ ++static void __exit mod_exit(void) ++{ ++ most_deregister_config_set(&config_set); ++} ++ ++module_init(mod_init); ++module_exit(mod_exit); ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Andrey Shvetsov <andrey.shvetsov@k2l.de>"); ++MODULE_DESCRIPTION("Default configuration for the MOST channels"); +diff --git a/include/mostcore.h b/include/mostcore.h +index dc87121..3c00efb 100644 +--- a/include/mostcore.h ++++ b/include/mostcore.h +@@ -145,6 +145,39 @@ struct most_channel_config { + u16 dbr_size; + }; + ++/** ++ * struct most_config_probe - matching rule, channel configuration and ++ * the optional AIM name used for the automatic configuration and linking ++ * of the channel ++ * @dev_name: optional matching device id ++ * ("usb_device 1-1:1.0," "dim2-12345678", etc.) ++ * @ch_name: matching channel name ("ep8f", "ca2", etc.) ++ * @cfg: configuration that will be applied for the found channel ++ * @aim_name: optional name of the AIM that will be linked to the channel ++ * ("cdev", "networking", "v4l", "sound") ++ * @aim_param: AIM dependent parameter (it is the character device name ++ * for the cdev AIM, PCM format for the audio AIM, etc.) ++ */ ++struct most_config_probe { ++ const char *dev_name; ++ const char *ch_name; ++ struct most_channel_config cfg; ++ const char *aim_name; ++ const char *aim_param; ++}; ++ ++/** ++ * struct most_config_set - the configuration set containing ++ * several automatic configurations for the different channels ++ * @probes: list of the matching rules and the configurations, ++ * that must be ended with the empty structure ++ * @list: list head used by the MostCore ++ */ ++struct most_config_set { ++ const struct most_config_probe *probes; ++ struct list_head list; ++}; ++ + /* + * struct mbo - MOST Buffer Object. + * @context: context for core completion handler +@@ -285,6 +318,37 @@ struct most_aim { + }; + + /** ++ * most_register_config_set - registers the configuration set ++ * ++ * @cfg_set: configuration set to be registered for the future probes ++ * ++ * The function registers the given configuration set. ++ * ++ * It is possible to register or deregister several configuration sets ++ * independently. Different configuration sets may contain the ++ * overlapped matching rules but later registered configuration set has ++ * the higher priority over the prior registered set. ++ * ++ * The only the first matched configuration is applied for each ++ * channel. ++ * ++ * The configuration for the channel is applied at the time of ++ * registration of the parent most_interface. ++ */ ++void most_register_config_set(struct most_config_set *cfg_set); ++ ++/** ++ * most_deregister_config_set - deregisters the prior registered ++ * configuration set ++ * ++ * @cfg_set: configuration set to be deregistered ++ * ++ * The calling of this function does not change the current ++ * configuration of the channels. ++ */ ++void most_deregister_config_set(struct most_config_set *cfg_set); ++ ++/** + * most_register_interface - Registers instance of the interface. + * @iface: Pointer to the interface instance description. + * +diff --git a/mostcore/core.c b/mostcore/core.c +index 9e0a352..6035cf0 100644 +--- a/mostcore/core.c ++++ b/mostcore/core.c +@@ -36,6 +36,8 @@ static struct class *most_class; + static struct device *core_dev; + static struct ida mdev_id; + static int dummy_num_buffers; ++static struct list_head config_probes; ++struct mutex config_probes_mt; /* config_probes */ + + struct most_c_aim_obj { + struct most_aim *ptr; +@@ -918,6 +920,30 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch) + return c; + } + ++static int link_channel_to_aim(struct most_c_obj *c, struct most_aim *aim, ++ char *aim_param) ++{ ++ int ret; ++ struct most_aim **aim_ptr; ++ ++ if (!c->aim0.ptr) ++ aim_ptr = &c->aim0.ptr; ++ else if (!c->aim1.ptr) ++ aim_ptr = &c->aim1.ptr; ++ else ++ return -ENOSPC; ++ ++ *aim_ptr = aim; ++ ret = aim->probe_channel(c->iface, c->channel_id, ++ &c->cfg, &c->kobj, aim_param); ++ if (ret) { ++ *aim_ptr = NULL; ++ return ret; ++ } ++ ++ return 0; ++} ++ + /** + * add_link_store - store() function for add_link attribute + * @aim_obj: pointer to AIM object +@@ -946,45 +972,33 @@ static ssize_t add_link_store(struct most_aim_obj *aim_obj, + size_t len) + { + struct most_c_obj *c; +- struct most_aim **aim_ptr; + char buffer[STRING_SIZE]; + char *mdev; + char *mdev_ch; +- char *mdev_devnod; ++ char *aim_param; + char devnod_buf[STRING_SIZE]; + int ret; + size_t max_len = min_t(size_t, len + 1, STRING_SIZE); + + strlcpy(buffer, buf, max_len); + +- ret = split_string(buffer, &mdev, &mdev_ch, &mdev_devnod); ++ ret = split_string(buffer, &mdev, &mdev_ch, &aim_param); + if (ret) + return ret; + +- if (!mdev_devnod || *mdev_devnod == 0) { ++ if (!aim_param || *aim_param == 0) { + snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, + mdev_ch); +- mdev_devnod = devnod_buf; ++ aim_param = devnod_buf; + } + + c = get_channel_by_name(mdev, mdev_ch); + if (IS_ERR(c)) + return -ENODEV; + +- if (!c->aim0.ptr) +- aim_ptr = &c->aim0.ptr; +- else if (!c->aim1.ptr) +- aim_ptr = &c->aim1.ptr; +- else +- return -ENOSPC; +- +- *aim_ptr = aim_obj->driver; +- ret = aim_obj->driver->probe_channel(c->iface, c->channel_id, +- &c->cfg, &c->kobj, mdev_devnod); +- if (ret) { +- *aim_ptr = NULL; ++ ret = link_channel_to_aim(c, aim_obj->driver, aim_param); ++ if (ret) + return ret; +- } + + return len; + } +@@ -1679,6 +1693,73 @@ int most_deregister_aim(struct most_aim *aim) + } + EXPORT_SYMBOL_GPL(most_deregister_aim); + ++void most_register_config_set(struct most_config_set *cfg_set) ++{ ++ mutex_lock(&config_probes_mt); ++ list_add(&cfg_set->list, &config_probes); ++ mutex_unlock(&config_probes_mt); ++} ++EXPORT_SYMBOL(most_register_config_set); ++ ++void most_deregister_config_set(struct most_config_set *cfg_set) ++{ ++ mutex_lock(&config_probes_mt); ++ list_del(&cfg_set->list); ++ mutex_unlock(&config_probes_mt); ++} ++EXPORT_SYMBOL(most_deregister_config_set); ++ ++static int probe_aim(struct most_c_obj *c, ++ const char *aim_name, const char *aim_param) ++{ ++ struct most_aim_obj *aim_obj; ++ char buf[STRING_SIZE]; ++ ++ list_for_each_entry(aim_obj, &aim_list, list) { ++ if (!strcmp(aim_obj->driver->name, aim_name)) { ++ strlcpy(buf, aim_param ? aim_param : "", sizeof(buf)); ++ return link_channel_to_aim(c, aim_obj->driver, buf); ++ } ++ } ++ return 0; ++} ++ ++static bool probe_config_set(struct most_c_obj *c, ++ const char *dev_name, const char *ch_name, ++ const struct most_config_probe *p) ++{ ++ int err; ++ ++ for (; p->ch_name; p++) { ++ if ((p->dev_name && strcmp(dev_name, p->dev_name)) || ++ strcmp(ch_name, p->ch_name)) ++ continue; ++ ++ c->cfg = p->cfg; ++ if (p->aim_name) { ++ err = probe_aim(c, p->aim_name, p->aim_param); ++ if (err) ++ pr_err("failed to autolink %s to %s: %d\n", ++ ch_name, p->aim_name, err); ++ } ++ return true; ++ } ++ return false; ++} ++ ++static void find_configuration(struct most_c_obj *c, const char *dev_name, ++ const char *ch_name) ++{ ++ struct most_config_set *plist; ++ ++ mutex_lock(&config_probes_mt); ++ list_for_each_entry(plist, &config_probes, list) { ++ if (probe_config_set(c, dev_name, ch_name, plist->probes)) ++ break; ++ } ++ mutex_unlock(&config_probes_mt); ++} ++ + /** + * most_register_interface - registers an interface with core + * @iface: pointer to the instance of the interface description. +@@ -1777,6 +1858,7 @@ struct kobject *most_register_interface(struct most_interface *iface) + mutex_init(&c->start_mutex); + mutex_init(&c->nq_mutex); + list_add_tail(&c->list, &inst->channel_list); ++ find_configuration(c, iface->description, channel_name); + } + pr_info("registered new MOST device mdev%d (%s)\n", + inst->dev_id, iface->description); +@@ -1880,6 +1962,8 @@ static int __init most_init(void) + pr_info("init()\n"); + INIT_LIST_HEAD(&instance_list); + INIT_LIST_HEAD(&aim_list); ++ INIT_LIST_HEAD(&config_probes); ++ mutex_init(&config_probes_mt); + ida_init(&mdev_id); + + err = bus_register(&most_bus); +-- +2.7.4 + diff --git a/_to_remove/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch b/_to_remove/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch new file mode 100644 index 000000000..4703844a1 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch @@ -0,0 +1,26 @@ +From b269994be937cbb31c0d73ecc899ca8a545a6a4a Mon Sep 17 00:00:00 2001 +From: Christian Gromm <christian.gromm@microchip.com> +Date: Mon, 4 Sep 2017 11:09:17 +0200 +Subject: [PATCH 3/5] core: remove kernel log for MBO status + +Signed-off-by: Christian Gromm <christian.gromm@microchip.com> +--- + driver/mostcore/core.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/mostcore/core.c b/mostcore/core.c +index 931efb9..595becc 100644 +--- a/mostcore/core.c ++++ b/mostcore/core.c +@@ -1348,8 +1348,6 @@ static void most_write_completion(struct mbo *mbo) + BUG_ON((!mbo) || (!mbo->context)); + + c = mbo->context; +- if (mbo->status == MBO_E_INVAL) +- pr_info("WARN: Tx MBO status: invalid\n"); + if (unlikely(c->is_poisoned || (mbo->status == MBO_E_CLOSE))) + trash_mbo(mbo); + else +-- +2.7.4 + diff --git a/_to_remove/recipes-kernel/most/files/0004-most-video-set-device_caps.patch b/_to_remove/recipes-kernel/most/files/0004-most-video-set-device_caps.patch new file mode 100644 index 000000000..010d4b0d0 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0004-most-video-set-device_caps.patch @@ -0,0 +1,25 @@ +From a5fd2ae8d4a3b2a8f7a33a4ea469ea7ee0d946ef Mon Sep 17 00:00:00 2001 +From: Christian Gromm <christian.gromm@microchip.com> +Date: Mon, 4 Sep 2017 15:36:38 +0200 +Subject: [PATCH 4/5] most: video: set device_caps + +Signed-off-by: Christian Gromm <christian.gromm@microchip.com> +--- + driver/aim-v4l2/video.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/aim-v4l2/video.c b/aim-v4l2/video.c +index e074841..6405a03 100644 +--- a/aim-v4l2/video.c ++++ b/aim-v4l2/video.c +@@ -263,6 +263,7 @@ static int vidioc_querycap(struct file *file, void *priv, + snprintf(cap->bus_info, sizeof(cap->bus_info), + "%s", mdev->iface->description); + ++ cap->device_caps = + cap->capabilities = + V4L2_CAP_READWRITE | + V4L2_CAP_TUNER | +-- +2.7.4 + diff --git a/_to_remove/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch b/_to_remove/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch new file mode 100644 index 000000000..ebaee9e14 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch @@ -0,0 +1,25 @@ +From 7518453386ad3e82008186a6c9ca86ed8c136801 Mon Sep 17 00:00:00 2001 +From: Christian Gromm <christian.gromm@microchip.com> +Date: Mon, 4 Sep 2017 16:08:38 +0200 +Subject: [PATCH 5/5] most: video: set V4L2_CAP_DEVICE_CAPS flag + +Signed-off-by: Christian Gromm <christian.gromm@microchip.com> +--- + driver/aim-v4l2/video.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/aim-v4l2/video.c b/aim-v4l2/video.c +index 6405a03..db75d4d 100644 +--- a/aim-v4l2/video.c ++++ b/aim-v4l2/video.c +@@ -265,6 +265,7 @@ static int vidioc_querycap(struct file *file, void *priv, + + cap->device_caps = + cap->capabilities = ++ V4L2_CAP_DEVICE_CAPS | + V4L2_CAP_READWRITE | + V4L2_CAP_TUNER | + V4L2_CAP_VIDEO_CAPTURE; +-- +2.7.4 + diff --git a/_to_remove/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch b/_to_remove/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch new file mode 100644 index 000000000..59c6ae671 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch @@ -0,0 +1,186 @@ +From 63bcd9b421ae7927948bffec9566db47f40ea290 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov <andrey.shvetsov@k2l.de> +Date: Tue, 30 Jan 2018 17:34:09 +0100 +Subject: [PATCH] staging: most: dim2: fix startup sequence + +Platform specific initializations (pdata->init) must be done before DIM2 +IP module startup (dim_startup). + +Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> +--- + hdm-dim2/dim2_hdm.c | 90 +++++++++++++++++++++++++++++++++++++++--------------------------------------------------- + 1 file changed, 39 insertions(+), 51 deletions(-) + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 893b8e4..e4629a5 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -155,38 +155,6 @@ void dimcb_on_error(u8 error_id, const char *error_message) + } + + /** +- * startup_dim - initialize the dim2 interface +- * @pdev: platform device +- */ +-static int startup_dim(struct platform_device *pdev) +-{ +- struct dim2_hdm *dev = platform_get_drvdata(pdev); +- struct dim2_platform_data *pdata = pdev->dev.platform_data; +- u8 hal_ret; +- int ret; +- +- if (!pdata) { +- pr_err("missing platform data\n"); +- return -EINVAL; +- } +- +- ret = pdata->init ? pdata->init(pdata, dev->io_base) : 0; +- if (ret) +- return ret; +- +- pr_info("sync: num of frames per sub-buffer: %u\n", fcnt); +- hal_ret = dim_startup(dev->io_base, pdata->clk_speed, fcnt); +- if (hal_ret != DIM_NO_ERROR) { +- pr_err("dim_startup failed: %d\n", hal_ret); +- if (pdata && pdata->destroy) +- pdata->destroy(pdata); +- return -ENODEV; +- } +- +- return 0; +-} +- +-/** + * try_start_dim_transfer - try to transfer a buffer on a channel + * @hdm_ch: channel specific data + * +@@ -727,10 +695,12 @@ static void dma_free(struct mbo *mbo, u32 size) + */ + static int dim2_probe(struct platform_device *pdev) + { ++ struct dim2_platform_data *pdata = pdev->dev.platform_data; + struct dim2_hdm *dev; + struct resource *res; + int ret, i; + struct kobject *kobj; ++ u8 hal_ret; + int irq; + + dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); +@@ -745,38 +715,59 @@ static int dim2_probe(struct platform_device *pdev) + if (IS_ERR(dev->io_base)) + return PTR_ERR(dev->io_base); + ++ if (!pdata) { ++ dev_err(&pdev->dev, "missing platform data\n"); ++ return -EINVAL; ++ } ++ ++ ret = pdata->init ? pdata->init(pdata, dev->io_base) : 0; ++ if (ret) ++ return ret; ++ ++ dev_info(&pdev->dev, "sync: num of frames per sub-buffer: %u\n", fcnt); ++ hal_ret = dim_startup(dev->io_base, pdata->clk_speed, fcnt); ++ if (hal_ret != DIM_NO_ERROR) { ++ dev_err(&pdev->dev, "dim_startup failed: %d\n", hal_ret); ++ ret = -ENODEV; ++ goto err_bsp_destroy; ++ } ++ + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get ahb0_int irq: %d\n", irq); +- return irq; ++ ret = irq; ++ goto err_shutdown_dim; + } + + ret = devm_request_irq(&pdev->dev, irq, dim2_ahb_isr, 0, + "dim2_ahb0_int", dev); + if (ret) { + dev_err(&pdev->dev, "failed to request ahb0_int irq %d\n", irq); +- return ret; ++ goto err_shutdown_dim; + } + + irq = platform_get_irq(pdev, 1); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get mlb_int irq: %d\n", irq); +- return irq; ++ ret = irq; ++ goto err_shutdown_dim; + } + + ret = devm_request_irq(&pdev->dev, irq, dim2_mlb_isr, 0, + "dim2_mlb_int", dev); + if (ret) { + dev_err(&pdev->dev, "failed to request mlb_int irq %d\n", irq); +- return ret; ++ goto err_shutdown_dim; + } + + init_waitqueue_head(&dev->netinfo_waitq); + dev->deliver_netinfo = 0; +- dev->netinfo_task = kthread_run(&deliver_netinfo_thread, (void *)dev, ++ dev->netinfo_task = kthread_run(&deliver_netinfo_thread, dev, + "dim2_netinfo"); +- if (IS_ERR(dev->netinfo_task)) +- return PTR_ERR(dev->netinfo_task); ++ if (IS_ERR(dev->netinfo_task)) { ++ ret = PTR_ERR(dev->netinfo_task); ++ goto err_shutdown_dim; ++ } + + for (i = 0; i < DMA_CHANNELS; i++) { + struct most_channel_capability *cap = dev->capabilities + i; +@@ -833,20 +824,17 @@ static int dim2_probe(struct platform_device *pdev) + if (ret) + goto err_unreg_iface; + +- ret = startup_dim(pdev); +- if (ret) { +- dev_err(&pdev->dev, "failed to initialize DIM2\n"); +- goto err_destroy_bus; +- } +- + return 0; + +-err_destroy_bus: +- dim2_sysfs_destroy(&dev->bus); + err_unreg_iface: + most_deregister_interface(&dev->most_iface); + err_stop_thread: + kthread_stop(dev->netinfo_task); ++err_shutdown_dim: ++ dim_shutdown(); ++err_bsp_destroy: ++ if (pdata && pdata->destroy) ++ pdata->destroy(pdata); + + return ret; + } +@@ -863,6 +851,10 @@ static int dim2_remove(struct platform_device *pdev) + struct dim2_platform_data *pdata = pdev->dev.platform_data; + unsigned long flags; + ++ dim2_sysfs_destroy(&dev->bus); ++ most_deregister_interface(&dev->most_iface); ++ kthread_stop(dev->netinfo_task); ++ + spin_lock_irqsave(&dim_lock, flags); + dim_shutdown(); + spin_unlock_irqrestore(&dim_lock, flags); +@@ -870,10 +862,6 @@ static int dim2_remove(struct platform_device *pdev) + if (pdata && pdata->destroy) + pdata->destroy(pdata); + +- dim2_sysfs_destroy(&dev->bus); +- most_deregister_interface(&dev->most_iface); +- kthread_stop(dev->netinfo_task); +- + /* + * break link to local platform_device_id struct + * to prevent crash by unload platform device module +-- +libgit2 0.26.0 diff --git a/_to_remove/recipes-kernel/most/files/0007-dim2-use-device-tree.patch b/_to_remove/recipes-kernel/most/files/0007-dim2-use-device-tree.patch new file mode 100644 index 000000000..679fab79c --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0007-dim2-use-device-tree.patch @@ -0,0 +1,378 @@ +From 8e16207392cd715ea88f6780981a3d55ab005588 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov <andrey.shvetsov@k2l.de> +Date: Mon, 12 Feb 2018 12:23:37 +0100 +Subject: [PATCH] staging: most: dim2: use device tree + +Current dim2 driver expects the existence of a platform driver that +implements the platform specific initialization and delivery of the irq +numbers. + +This patch integrates the device tree activity and platform specific +code into the driver. + +Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> +--- + hdm-dim2/dim2_hdm.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- + hdm-dim2/dim2_hdm.h | 28 ---------------------------- + hdm-dim2/platform/dim2_arwen_mlb3.c | 165 --------------------------------------------------------------------------------------------------------------------------------------------------------------------- + hdm-dim2/platform/dim2_arwen_mlb6.c | 169 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + hdm-dim2/platform/dim2_h2_dt.c | 227 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + hdm-dim2/platform/dim2_mx6q.c | 192 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + hdm-dim2/platform/dim2_mx6q_dt.c | 224 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 7 files changed, 193 insertions(+), 1034 deletions(-) + delete mode 100644 hdm-dim2/dim2_hdm.h + delete mode 100644 hdm-dim2/platform/dim2_arwen_mlb3.c + delete mode 100644 hdm-dim2/platform/dim2_arwen_mlb6.c + delete mode 100644 hdm-dim2/platform/dim2_h2_dt.c + delete mode 100644 hdm-dim2/platform/dim2_mx6q.c + delete mode 100644 hdm-dim2/platform/dim2_mx6q_dt.c + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index e4629a5..2dba917 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -14,6 +14,7 @@ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include <linux/module.h> ++#include <linux/of_platform.h> + #include <linux/printk.h> + #include <linux/kernel.h> + #include <linux/init.h> +@@ -21,13 +22,13 @@ + #include <linux/interrupt.h> + #include <linux/slab.h> + #include <linux/io.h> ++#include <linux/clk.h> + #include <linux/dma-mapping.h> + #include <linux/sched.h> + #include <linux/kthread.h> + + #include <mostcore.h> + #include "dim2_hal.h" +-#include "dim2_hdm.h" + #include "dim2_errors.h" + #include "dim2_sysfs.h" + +@@ -93,6 +94,9 @@ struct dim2_hdm { + struct most_interface most_iface; + char name[16 + sizeof "dim2-"]; + void __iomem *io_base; ++ u8 clk_speed; ++ struct clk *clk; ++ struct clk *clk_pll; + struct task_struct *netinfo_task; + wait_queue_head_t netinfo_waitq; + int deliver_netinfo; +@@ -102,6 +106,12 @@ struct dim2_hdm { + struct medialb_bus bus; + void (*on_netinfo)(struct most_interface *, + unsigned char, unsigned char *); ++ void (*disable_platform)(struct platform_device *); ++}; ++ ++struct dim2_platform_data { ++ int (*enable)(struct platform_device *); ++ void (*disable)(struct platform_device *); + }; + + #define iface_to_hdm(iface) container_of(iface, struct dim2_hdm, most_iface) +@@ -686,6 +696,8 @@ static void dma_free(struct mbo *mbo, u32 size) + dma_free_coherent(NULL, size, mbo->virt_address, mbo->bus_address); + } + ++static const struct of_device_id dim2_of_match[]; ++ + /* + * dim2_probe - dim2 probe handler + * @pdev: platform device structure +@@ -695,7 +707,7 @@ static void dma_free(struct mbo *mbo, u32 size) + */ + static int dim2_probe(struct platform_device *pdev) + { +- struct dim2_platform_data *pdata = pdev->dev.platform_data; ++ const struct dim2_platform_data *pdata; + struct dim2_hdm *dev; + struct resource *res; + int ret, i; +@@ -703,6 +715,8 @@ static int dim2_probe(struct platform_device *pdev) + u8 hal_ret; + int irq; + ++ enum { MLB_INT_IDX, AHB0_INT_IDX }; ++ + dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); + if (!dev) + return -ENOMEM; +@@ -710,29 +724,30 @@ static int dim2_probe(struct platform_device *pdev) + dev->atx_idx = -1; + + platform_set_drvdata(pdev, dev); ++ ++ dev->clk_speed = CLK_4096FS; ++ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + dev->io_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(dev->io_base)) + return PTR_ERR(dev->io_base); + +- if (!pdata) { +- dev_err(&pdev->dev, "missing platform data\n"); +- return -EINVAL; +- } +- +- ret = pdata->init ? pdata->init(pdata, dev->io_base) : 0; ++ pdata = of_match_node(dim2_of_match, pdev->dev.of_node)->data; ++ ret = pdata && pdata->enable ? pdata->enable(pdev) : 0; + if (ret) + return ret; + ++ dev->disable_platform = pdata ? pdata->disable : 0; ++ + dev_info(&pdev->dev, "sync: num of frames per sub-buffer: %u\n", fcnt); +- hal_ret = dim_startup(dev->io_base, pdata->clk_speed, fcnt); ++ hal_ret = dim_startup(dev->io_base, dev->clk_speed, fcnt); + if (hal_ret != DIM_NO_ERROR) { + dev_err(&pdev->dev, "dim_startup failed: %d\n", hal_ret); + ret = -ENODEV; +- goto err_bsp_destroy; ++ goto err_disable_platform; + } + +- irq = platform_get_irq(pdev, 0); ++ irq = platform_get_irq(pdev, AHB0_INT_IDX); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get ahb0_int irq: %d\n", irq); + ret = irq; +@@ -746,7 +761,7 @@ static int dim2_probe(struct platform_device *pdev) + goto err_shutdown_dim; + } + +- irq = platform_get_irq(pdev, 1); ++ irq = platform_get_irq(pdev, MLB_INT_IDX); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get mlb_int irq: %d\n", irq); + ret = irq; +@@ -832,9 +847,9 @@ static int dim2_probe(struct platform_device *pdev) + kthread_stop(dev->netinfo_task); + err_shutdown_dim: + dim_shutdown(); +-err_bsp_destroy: +- if (pdata && pdata->destroy) +- pdata->destroy(pdata); ++err_disable_platform: ++ if (dev->disable_platform) ++ dev->disable_platform(pdev); + + return ret; + } +@@ -848,7 +863,6 @@ static int dim2_probe(struct platform_device *pdev) + static int dim2_remove(struct platform_device *pdev) + { + struct dim2_hdm *dev = platform_get_drvdata(pdev); +- struct dim2_platform_data *pdata = pdev->dev.platform_data; + unsigned long flags; + + dim2_sysfs_destroy(&dev->bus); +@@ -859,37 +873,187 @@ static int dim2_remove(struct platform_device *pdev) + dim_shutdown(); + spin_unlock_irqrestore(&dim_lock, flags); + +- if (pdata && pdata->destroy) +- pdata->destroy(pdata); ++ if (dev->disable_platform) ++ dev->disable_platform(pdev); ++ ++ return 0; ++} ++ ++/* platform specific functions [[ */ ++ ++static int fsl_mx6_enable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ int ret; ++ ++ dev->clk = devm_clk_get(&pdev->dev, "mlb"); ++ if (IS_ERR_OR_NULL(dev->clk)) { ++ dev_err(&pdev->dev, "unable to get mlb clock\n"); ++ return -EFAULT; ++ } ++ ++ ret = clk_prepare_enable(dev->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "%s\n", "clk_prepare_enable failed"); ++ return ret; ++ } ++ ++ if (dev->clk_speed >= CLK_2048FS) { ++ /* enable pll */ ++ dev->clk_pll = devm_clk_get(&pdev->dev, "pll8_mlb"); ++ if (IS_ERR_OR_NULL(dev->clk_pll)) { ++ dev_err(&pdev->dev, "unable to get mlb pll clock\n"); ++ clk_disable_unprepare(dev->clk); ++ return -EFAULT; ++ } ++ ++ writel(0x888, dev->io_base + 0x38); ++ clk_prepare_enable(dev->clk_pll); ++ } ++ ++ return 0; ++} ++ ++static void fsl_mx6_disable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ ++ if (dev->clk_speed >= CLK_2048FS) ++ clk_disable_unprepare(dev->clk_pll); ++ ++ clk_disable_unprepare(dev->clk); ++} ++ ++static int rcar_h2_enable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ int ret; ++ ++ dev->clk = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(dev->clk)) { ++ dev_err(&pdev->dev, "cannot get clock\n"); ++ return PTR_ERR(dev->clk); ++ } ++ ++ ret = clk_prepare_enable(dev->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "%s\n", "clk_prepare_enable failed"); ++ return ret; ++ } ++ ++ if (dev->clk_speed >= CLK_2048FS) { ++ /* enable MLP pll and LVDS drivers */ ++ writel(0x03, dev->io_base + 0x600); ++ /* set bias */ ++ writel(0x888, dev->io_base + 0x38); ++ } else { ++ /* PLL */ ++ writel(0x04, dev->io_base + 0x600); ++ } ++ + +- /* +- * break link to local platform_device_id struct +- * to prevent crash by unload platform device module +- */ +- pdev->id_entry = NULL; ++ /* BBCR = 0b11 */ ++ writel(0x03, dev->io_base + 0x500); ++ writel(0x0002FF02, dev->io_base + 0x508); + + return 0; + } + +-static const struct platform_device_id dim2_id[] = { +- { "medialb_dim2" }, +- { }, /* Terminating entry */ ++static void rcar_h2_disable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ ++ clk_disable_unprepare(dev->clk); ++ ++ /* disable PLLs and LVDS drivers */ ++ writel(0x0, dev->io_base + 0x600); ++} ++ ++static int rcar_m3_enable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ u32 enable_512fs = dev->clk_speed == CLK_512FS; ++ int ret; ++ ++ dev->clk = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(dev->clk)) { ++ dev_err(&pdev->dev, "cannot get clock\n"); ++ return PTR_ERR(dev->clk); ++ } ++ ++ ret = clk_prepare_enable(dev->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "%s\n", "clk_prepare_enable failed"); ++ return ret; ++ } ++ ++ /* PLL */ ++ writel(0x04, dev->io_base + 0x600); ++ ++ writel(enable_512fs, dev->io_base + 0x604); ++ ++ /* BBCR = 0b11 */ ++ writel(0x03, dev->io_base + 0x500); ++ writel(0x0002FF02, dev->io_base + 0x508); ++ ++ return 0; ++} ++ ++static void rcar_m3_disable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ ++ clk_disable_unprepare(dev->clk); ++ ++ /* disable PLLs and LVDS drivers */ ++ writel(0x0, dev->io_base + 0x600); ++} ++ ++/* ]] platform specific functions */ ++ ++enum dim2_platforms { FSL_MX6, RCAR_H2, RCAR_M3 }; ++ ++static struct dim2_platform_data plat_data[] = { ++ [FSL_MX6] = { .enable = fsl_mx6_enable, .disable = fsl_mx6_disable }, ++ [RCAR_H2] = { .enable = rcar_h2_enable, .disable = rcar_h2_disable }, ++ [RCAR_M3] = { .enable = rcar_m3_enable, .disable = rcar_m3_disable }, ++}; ++ ++static const struct of_device_id dim2_of_match[] = { ++ { ++ .compatible = "fsl,imx6q-mlb150", ++ .data = plat_data + FSL_MX6 ++ }, ++ { ++ .compatible = "renesas,mlp", ++ .data = plat_data + RCAR_H2 ++ }, ++ { ++ .compatible = "rcar,medialb-dim2", ++ .data = plat_data + RCAR_M3 ++ }, ++ { ++ .compatible = "xlnx,axi4-os62420_3pin-1.00.a", ++ }, ++ { ++ .compatible = "xlnx,axi4-os62420_6pin-1.00.a", ++ }, ++ {}, + }; + +-MODULE_DEVICE_TABLE(platform, dim2_id); ++MODULE_DEVICE_TABLE(of, dim2_of_match); + + static struct platform_driver dim2_driver = { + .probe = dim2_probe, + .remove = dim2_remove, +- .id_table = dim2_id, + .driver = { + .name = "hdm_dim2", ++ .of_match_table = dim2_of_match, + }, + }; + + module_platform_driver(dim2_driver); + +-MODULE_AUTHOR("Jain Roy Ambi <JainRoy.Ambi@microchip.com>"); + MODULE_AUTHOR("Andrey Shvetsov <andrey.shvetsov@k2l.de>"); + MODULE_DESCRIPTION("MediaLB DIM2 Hardware Dependent Module"); + MODULE_LICENSE("GPL"); +libgit2 0.26.0 diff --git a/_to_remove/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch b/_to_remove/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch new file mode 100644 index 000000000..1b01fb156 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch @@ -0,0 +1,92 @@ +From 839ad403a2d8081a6c15f6fc2836b01919338f3c Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov <andrey.shvetsov@k2l.de> +Date: Mon, 12 Feb 2018 12:24:37 +0100 +Subject: [PATCH] staging: most: dim2: read clock speed from the device tree + +This implements reading of the clock speed parameter from the device +tree. + +Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> +--- + Documentation/devicetree/bindings/inic/microchip,inic-dim2.txt | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + hdm-dim2/dim2_hdm.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 113 insertions(+), 1 deletion(-) + create mode 100644 Documentation/devicetree/bindings/inic/microchip,inic-dim2.txt + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 2dba917..05e1896 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -698,6 +698,42 @@ static void dma_free(struct mbo *mbo, u32 size) + + static const struct of_device_id dim2_of_match[]; + ++static struct { ++ const char *clock_speed; ++ u8 clk_speed; ++} clk_mt[] = { ++ { "256fs", CLK_256FS }, ++ { "512fs", CLK_512FS }, ++ { "1024fs", CLK_1024FS }, ++ { "2048fs", CLK_2048FS }, ++ { "3072fs", CLK_3072FS }, ++ { "4096fs", CLK_4096FS }, ++ { "6144fs", CLK_6144FS }, ++ { "8192fs", CLK_8192FS }, ++}; ++ ++/** ++ * get_dim2_clk_speed - converts string to DIM2 clock speed value ++ * ++ * @clock_speed: string in the format "{NUMBER}fs" ++ * @val: pointer to get one of the CLK_{NUMBER}FS values ++ * ++ * By success stores one of the CLK_{NUMBER}FS in the *val and returns 0, ++ * otherwise returns -EINVAL. ++ */ ++static int get_dim2_clk_speed(const char *clock_speed, u8 *val) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(clk_mt); i++) { ++ if (!strcmp(clock_speed, clk_mt[i].clock_speed)) { ++ *val = clk_mt[i].clk_speed; ++ return 0; ++ } ++ } ++ return -EINVAL; ++} ++ + /* + * dim2_probe - dim2 probe handler + * @pdev: platform device structure +@@ -708,6 +744,7 @@ static const struct of_device_id dim2_of_match[]; + static int dim2_probe(struct platform_device *pdev) + { + const struct dim2_platform_data *pdata; ++ const char *clock_speed; + struct dim2_hdm *dev; + struct resource *res; + int ret, i; +@@ -725,7 +762,18 @@ static int dim2_probe(struct platform_device *pdev) + + platform_set_drvdata(pdev, dev); + +- dev->clk_speed = CLK_4096FS; ++ ret = of_property_read_string(pdev->dev.of_node, ++ "microchip,clock-speed", &clock_speed); ++ if (ret) { ++ dev_err(&pdev->dev, "missing dt property clock-speed\n"); ++ return ret; ++ } ++ ++ ret = get_dim2_clk_speed(clock_speed, &dev->clk_speed); ++ if (ret) { ++ dev_err(&pdev->dev, "bad dt property clock-speed\n"); ++ return ret; ++ } + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + dev->io_base = devm_ioremap_resource(&pdev->dev, res); +-- +libgit2 0.26.0 diff --git a/_to_remove/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch b/_to_remove/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch new file mode 100644 index 000000000..08cd6f99d --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch @@ -0,0 +1,47 @@ +From 756f2f1f90524c2620ed7951e436d13bdb929a6b Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov <andrey.shvetsov@k2l.de> +Date: Mon, 12 Feb 2018 12:25:37 +0100 +Subject: [PATCH] staging: most: dim2: use device for coherent memory allocation + +On several modern architectures the allocation of coherent memory needs +a device that has the dma_ops properly set. This patch enables use of +the DIM2 platform device for the allocation process. + +Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> +--- + hdm-dim2/dim2_hdm.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 05e1896..1847091 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -688,12 +688,16 @@ static int poison_channel(struct most_interface *most_iface, int ch_idx) + + static void *dma_alloc(struct mbo *mbo, u32 size) + { +- return dma_alloc_coherent(NULL, size, &mbo->bus_address, GFP_KERNEL); ++ struct device *dev = mbo->ifp->dev; ++ ++ return dma_alloc_coherent(dev, size, &mbo->bus_address, GFP_KERNEL); + } + + static void dma_free(struct mbo *mbo, u32 size) + { +- dma_free_coherent(NULL, size, mbo->virt_address, mbo->bus_address); ++ struct device *dev = mbo->ifp->dev; ++ ++ dma_free_coherent(dev, size, mbo->virt_address, mbo->bus_address); + } + + static const struct of_device_id dim2_of_match[]; +@@ -875,6 +879,7 @@ static int dim2_probe(struct platform_device *pdev) + dev->most_iface.poison_channel = poison_channel; + dev->most_iface.request_netinfo = request_netinfo; + dev->most_iface.extra_attrs = DBR_ATTRS; ++ dev->most_iface.dev = &pdev->dev; + + kobj = most_register_interface(&dev->most_iface); + if (IS_ERR(kobj)) { +-- +libgit2 0.26.0 diff --git a/_to_remove/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch b/_to_remove/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch new file mode 100644 index 000000000..ff21b2130 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch @@ -0,0 +1,35 @@ +From 8eaec876f732c7e4b238ada5f9304c6da2380eb1 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov <andrey.shvetsov@k2l.de> +Date: Fri, 8 Feb 2019 22:44:32 +0000 +Subject: [PATCH] backport: usb: setup_timer + +--- + driver/hdm-usb/hdm_usb.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/hdm-usb/hdm_usb.c b/hdm-usb/hdm_usb.c +index 5b0af88..9896835 100644 +--- a/hdm-usb/hdm_usb.c ++++ b/hdm-usb/hdm_usb.c +@@ -760,9 +760,9 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel, + * The handler runs in interrupt context. That's why we need to defer the + * tasks to a work queue. + */ +-static void link_stat_timer_handler(unsigned long data) ++static void link_stat_timer_handler(struct timer_list *t) + { +- struct most_dev *mdev = (struct most_dev *)data; ++ struct most_dev *mdev = from_timer(mdev, t, link_stat_timer); + + schedule_work(&mdev->poll_work_obj); + mdev->link_stat_timer.expires = jiffies + (2 * HZ); +@@ -1154,8 +1154,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) + num_endpoints = usb_iface_desc->desc.bNumEndpoints; + mutex_init(&mdev->io_mutex); + INIT_WORK(&mdev->poll_work_obj, wq_netinfo); +- setup_timer(&mdev->link_stat_timer, link_stat_timer_handler, +- (unsigned long)mdev); ++ timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0); + + mdev->usb_device = usb_dev; + mdev->link_stat_timer.expires = jiffies + (2 * HZ); diff --git a/_to_remove/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch b/_to_remove/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch new file mode 100644 index 000000000..d4383c4f6 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch @@ -0,0 +1,30 @@ +Handle snd_pcm_lib_mmap_vmalloc removal in 4.19 + +Add .mmap field back to pcm_ops for kernels older than 4.19. + +Upstream-Status: Inappropriate + +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +diff --git a/aim-sound/sound.c b/aim-sound/sound.c +index 4b3329b..c0a26be 100644 +--- a/aim-sound/sound.c ++++ b/aim-sound/sound.c +@@ -17,6 +17,7 @@ + #include <linux/printk.h> + #include <linux/kernel.h> + #include <linux/init.h> ++#include <linux/version.h> + #include <sound/core.h> + #include <sound/pcm.h> + #include <sound/pcm_params.h> +@@ -463,6 +464,9 @@ static const struct snd_pcm_ops pcm_ops = { + .trigger = pcm_trigger, + .pointer = pcm_pointer, + .page = snd_pcm_lib_get_vmalloc_page, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0) ++ .mmap = snd_pcm_lib_mmap_vmalloc, ++#endif + }; + + static int split_arg_list(char *buf, char **card_name, u16 *ch_num, diff --git a/_to_remove/recipes-kernel/most/files/0012-Fix-build-with-5.4-kernel.patch b/_to_remove/recipes-kernel/most/files/0012-Fix-build-with-5.4-kernel.patch new file mode 100644 index 000000000..02eca27d2 --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0012-Fix-build-with-5.4-kernel.patch @@ -0,0 +1,68 @@ +From 877d7475413bb787deb07aa83bafac03efa399fa Mon Sep 17 00:00:00 2001 +From: Paul Barker <paul.barker@sancloud.co.uk> +Date: Mon, 24 Feb 2020 14:58:52 +0000 +Subject: [PATCH] Fix build with 5.4 kernel + +Signed-off-by: Paul Barker <paul.barker@sancloud.co.uk> +--- + driver/Makefile | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 281241d..609e692 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,6 +5,7 @@ SRC := $(shell pwd) + obj-m := mostcore.o + mostcore-y := mostcore/core.o + CFLAGS_core.o := -I$(src)/include/ ++CFLAGS_mostcore/core.o := -I$(src)/include/ + + obj-m += default_conf.o + CFLAGL_default_conf.o := -I$(src)/include +@@ -12,33 +13,41 @@ CFLAGL_default_conf.o := -I$(src)/include + obj-m += aim_cdev.o + aim_cdev-y := aim-cdev/cdev.o + CFLAGS_cdev.o := -I$(src)/include/ ++CFLAGS_aim-cdev/cdev.o := -I$(src)/include/ + + obj-m += aim_network.o + aim_network-y := aim-network/networking.o + CFLAGS_networking.o := -I$(src)/include/ ++CFLAGS_aim-network/networking.o := -I$(src)/include/ + + obj-m += aim_sound.o + aim_sound-y := aim-sound/sound.o + CFLAGS_sound.o := -I$(src)/include/ ++CFLAGS_aim-sound/sound.o := -I$(src)/include/ + + obj-m += aim_v4l2.o + aim_v4l2-y := aim-v4l2/video.o + CFLAGS_video.o := -Idrivers/media/video -I$(src)/include/ ++CFLAGS_aim-v4l2/video.o := -Idrivers/media/video -I$(src)/include/ + + obj-m += hdm_i2c.o + hdm_i2c-y := hdm-i2c/hdm_i2c.o + CFLAGS_hdm_i2c.o := -I$(src)/include/ ++CFLAGS_hdm-i2c/hdm_i2c.o := -I$(src)/include/ + + ifdef CONFIG_OF + obj-m += hdm_dim2.o + hdm_dim2-y := hdm-dim2/dim2_hdm.o hdm-dim2/dim2_hal.o hdm-dim2/dim2_sysfs.o + CFLAGS_dim2_hdm.o := -I$(src)/include/ ++CFLAGS_hdm-dim2/dim2_hdm.o := -I$(src)/include/ ++CFLAGS_hdm-dim2/dim2_hal.o := -I$(src)/include/ ++CFLAGS_hdm-dim2/dim2_sysfs.o := -I$(src)/include/ + endif + + obj-m += hdm_usb.o + hdm_usb-y := hdm-usb/hdm_usb.o + CFLAGS_hdm_usb.o := -I$(src)/include/ +- ++CFLAGS_hdm-usb/hdm_usb.o := -I$(src)/include/ + + all: + $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules +-- +2.20.1 + diff --git a/_to_remove/recipes-kernel/most/files/0013-Fix-build-with-5.7-kernel.patch b/_to_remove/recipes-kernel/most/files/0013-Fix-build-with-5.7-kernel.patch new file mode 100644 index 000000000..85e38857c --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0013-Fix-build-with-5.7-kernel.patch @@ -0,0 +1,54 @@ +Fix building against 5.7 or newer kernels + +VFL_TYPE_GRABBER was renamed VFL_TYPE_VIDEO in 5.7. Marking as +inappropriate for upstream for now, as it seems the standalone +version of the driver has been superceded by the version in the +staging tree in the mainline kernel, and there are no obvious +signs of maintenance. + +Upstream-Status: Inappropriate [no upstream] +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +--- +diff --git a/aim-v4l2/video.c b/aim-v4l2/video.c +index db75d4d..fbf7139 100644 +--- a/aim-v4l2/video.c ++++ b/aim-v4l2/video.c +@@ -14,6 +14,7 @@ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include <linux/module.h> ++#include <linux/version.h> + #include <linux/slab.h> + #include <linux/init.h> + #include <linux/device.h> +@@ -31,6 +32,11 @@ + + #define V4L2_AIM_MAX_INPUT 1 + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,7,0) ++/* Handle pre-5.7 naming */ ++#define VFL_TYPE_VIDEO VFL_TYPE_GRABBER ++#endif ++ + static struct most_aim aim_info; + + struct most_video_dev { +@@ -82,7 +88,7 @@ static int aim_vdev_open(struct file *filp) + v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); + + switch (vdev->vfl_type) { +- case VFL_TYPE_GRABBER: ++ case VFL_TYPE_VIDEO: + break; + default: + return -EINVAL; +@@ -461,7 +467,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) + + /* Register the v4l2 device */ + video_set_drvdata(mdev->vdev, mdev); +- ret = video_register_device(mdev->vdev, VFL_TYPE_GRABBER, -1); ++ ret = video_register_device(mdev->vdev, VFL_TYPE_VIDEO, -1); + if (ret) { + v4l2_err(&mdev->v4l2_dev, "video_register_device failed (%d)\n", + ret); diff --git a/_to_remove/recipes-kernel/most/files/0014-Fix-build-with-5.9-kernel.patch b/_to_remove/recipes-kernel/most/files/0014-Fix-build-with-5.9-kernel.patch new file mode 100644 index 000000000..fd430c9df --- /dev/null +++ b/_to_remove/recipes-kernel/most/files/0014-Fix-build-with-5.9-kernel.patch @@ -0,0 +1,39 @@ +Fix building against 5.9 or newer kernels + +DECLARE_TASKLET was replaced with DECLARE_TASKLET_OLD in 5.9. +Marking as inappropriate for upstream for now, as it seems the +standalone version of the driver has been superceded by the version +in the staging tree in the mainline kernel, and there are no obvious +signs of maintenance. + +Upstream-Status: Inappropriate [no upstream] +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +--- + driver/hdm-dim2/dim2_hdm.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 1847091..fc02c6b 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -14,6 +14,7 @@ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include <linux/module.h> ++#include <linux/version.h> + #include <linux/of_platform.h> + #include <linux/printk.h> + #include <linux/kernel.h> +@@ -53,7 +54,11 @@ MODULE_PARM_DESC(fcnt, "Num of frames per sub-buffer for sync channels as a powe + static DEFINE_SPINLOCK(dim_lock); + + static void dim2_tasklet_fn(unsigned long data); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) + static DECLARE_TASKLET(dim2_tasklet, dim2_tasklet_fn, 0); ++#else ++static DECLARE_TASKLET_OLD(dim2_tasklet, dim2_tasklet_fn); ++#endif + + /** + * struct hdm_channel - private structure to keep channel specific data diff --git a/_to_remove/recipes-kernel/most/most.bb b/_to_remove/recipes-kernel/most/most.bb new file mode 100644 index 000000000..f709a6d9a --- /dev/null +++ b/_to_remove/recipes-kernel/most/most.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Build MOST driver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://mostcore/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +inherit module + +PV = "0.1" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https;branch=${AGL_BRANCH}" + +S = "${WORKDIR}/git/driver" +SRCREV = "e4dbbaf9e7652efaed0df3e0aab4464f5f228573" + +KERNEL_MODULE_AUTOLOAD += "aim_cdev aim_sound aim_network aim_v4l2 hdm_i2c hdm_dim2 hdm_usb mostcore" diff --git a/_to_remove/recipes-kernel/most/most.bbappend b/_to_remove/recipes-kernel/most/most.bbappend new file mode 100644 index 000000000..af7ea687e --- /dev/null +++ b/_to_remove/recipes-kernel/most/most.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " \ + file://0002-src-most-add-auto-conf-feature.patch \ + file://0003-core-remove-kernel-log-for-MBO-status.patch \ + file://0004-most-video-set-device_caps.patch \ + file://0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch \ + file://0006-dim2-fix-startup-sequence.patch \ + file://0007-dim2-use-device-tree.patch \ + file://0008-dim2-read-clock-speed-from-the-device-tree.patch \ + file://0009-dim2-use-device-for-coherent-memory-allocation.patch \ + file://0010-backport-usb-setup-timer.patch \ + file://0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch \ + file://0012-Fix-build-with-5.4-kernel.patch \ + file://0013-Fix-build-with-5.7-kernel.patch \ + file://0014-Fix-build-with-5.9-kernel.patch \ +" diff --git a/_to_remove/recipes-kernel/sllin/files/0001-Disable-sllin-driver-debug-log.patch b/_to_remove/recipes-kernel/sllin/files/0001-Disable-sllin-driver-debug-log.patch new file mode 100644 index 000000000..99d6183ab --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/0001-Disable-sllin-driver-debug-log.patch @@ -0,0 +1,27 @@ +From 04ffb4b8f828c19e914987e271aaf3aa7eab28bf Mon Sep 17 00:00:00 2001 +From: Yuichi Kusakabe <yuichi.kusakabe@denso-ten.com> +Date: Thu, 29 Nov 2018 22:12:00 +0900 +Subject: [PATCH] Disable sllin driver debug log + +Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@denso-ten.com> +--- + sllin/sllin.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sllin/sllin.c b/sllin/sllin.c +index 77b2cb8..133d6e9 100644 +--- a/sllin/sllin.c ++++ b/sllin/sllin.c +@@ -41,7 +41,9 @@ + * Funded by: Volkswagen Group Research + */ + ++#if 0 + #define DEBUG 1 /* Enables pr_debug() printouts */ ++#endif + + #include <linux/module.h> + #include <linux/moduleparam.h> +-- +2.7.4 + diff --git a/_to_remove/recipes-kernel/sllin/files/0001_update_makefile.patch b/_to_remove/recipes-kernel/sllin/files/0001_update_makefile.patch new file mode 100644 index 000000000..7db57802b --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/0001_update_makefile.patch @@ -0,0 +1,21 @@ +diff --git a/sllin/Makefile b/sllin/Makefile +index 8ae7510..037846f 100644 +--- a/sllin/Makefile ++++ b/sllin/Makefile +@@ -1,10 +1,11 @@ + obj-m += sllin.o +-KPATH=/lib/modules/$(shell uname -r)/build ++KPATH=$(KERNEL_SRC) + #KPATH=/mnt/data/_dokumenty_/_w_/_dce_can_/src/can-benchmark/kernel/build/shark/3.0.4 + #KPATH=/mnt/data/_dokumenty_/_w_/_dce_can_/src/can-benchmark/kernel/build/shark/2.6.36 +- ++SRC := $(shell pwd) + all: +- make -C ${KPATH} M=$(PWD) modules +- ++ make -C ${KPATH} M=$(SRC) modules ++modules_install: ++ make -C ${KPATH} M=$(SRC) modules_install + clean: +- make -C ${KPATH} M=$(PWD) clean ++ make -C ${KPATH} M=$(SRC) clean diff --git a/_to_remove/recipes-kernel/sllin/files/0002_fix_null_operation_check.patch b/_to_remove/recipes-kernel/sllin/files/0002_fix_null_operation_check.patch new file mode 100644 index 000000000..896e2680d --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/0002_fix_null_operation_check.patch @@ -0,0 +1,176 @@ +diff --git a/sllin/sllin.c b/sllin/sllin.c +index 2db896f..2969448 100644 +--- a/sllin/sllin.c ++++ b/sllin/sllin.c +@@ -869,7 +869,6 @@ static int sllin_send_tx_buff(struct sllin *sl) + #else + remains = sl->tx_lim - sl->tx_cnt; + #endif +- + res = tty->ops->write(tty, sl->tx_buff + sl->tx_cnt, remains); + if (res < 0) + goto error_in_write; +@@ -916,10 +915,25 @@ static int sllin_send_break(struct sllin *sl) + unsigned long break_baud; + int res; + ++ netdev_dbg(sl->dev, "%s()#<BREAK_BY_BAUD> invoke.\n", __func__); ++ if (tty == NULL) { ++ netdev_dbg(sl->dev, "%s() tty == NULL.\n", __func__); ++ sl->lin_state = SLSTATE_IDLE; ++ return -1; ++ } ++ if (tty->ops == NULL) { ++ netdev_dbg(sl->dev, "%s() tty->ops == NULL.\n", __func__); ++ sl->lin_state = SLSTATE_IDLE; ++ return -1; ++ } + break_baud = ((sl->lin_baud * 2) / 3); + sltty_change_speed(tty, break_baud); + +- tty->ops->flush_buffer(tty); ++ if (tty->ops->flush_buffer) { ++ tty->ops->flush_buffer(tty); ++ } else { ++ netdev_dbg(sl->dev, "%s() tty->ops->flush_buffer is NULL.\n", __func__); ++ } + sl->rx_cnt = SLLIN_BUFF_BREAK; + + sl->rx_expect = SLLIN_BUFF_BREAK + 1; +@@ -943,6 +957,17 @@ static int sllin_send_break(struct sllin *sl) + unsigned long usleep_range_min; + unsigned long usleep_range_max; + ++ netdev_dbg(sl->dev, "%s() invoke.\n", __func__); ++ if (tty == NULL) { ++ netdev_dbg(sl->dev, "%s() tty == NULL.\n", __func__); ++ sl->lin_state = SLSTATE_IDLE; ++ return -1; ++ } ++ if (tty->ops == NULL) { ++ netdev_dbg(sl->dev, "%s() tty->ops == NULL.\n", __func__); ++ sl->lin_state = SLSTATE_IDLE; ++ return -1; ++ } + break_baud = ((sl->lin_baud * 2) / 3); + sl->rx_cnt = SLLIN_BUFF_BREAK; + sl->rx_expect = SLLIN_BUFF_BREAK + 1; +@@ -950,21 +975,31 @@ static int sllin_send_break(struct sllin *sl) + + /* Do the break ourselves; Inspired by + http://lxr.linux.no/#linux+v3.1.2/drivers/tty/tty_io.c#L2452 */ +- retval = tty->ops->break_ctl(tty, -1); +- if (retval) +- return retval; ++ if (tty->ops->break_ctl) { ++ retval = tty->ops->break_ctl(tty, -1); ++ if (retval) ++ return retval; ++ } else { ++ netdev_dbg(sl->dev, "%s() tty->ops->break_ctl is NULL.\n", __func__); ++ } + + /* udelay(712); */ + usleep_range_min = (1000000l * SLLIN_SAMPLES_PER_CHAR) / break_baud; + usleep_range_max = usleep_range_min + 50; + usleep_range(usleep_range_min, usleep_range_max); + +- retval = tty->ops->break_ctl(tty, 0); ++ if(tty->ops->break_ctl) { ++ retval = tty->ops->break_ctl(tty, 0); ++ } + usleep_range_min = (1000000l * 1 /* 1 bit */) / break_baud; + usleep_range_max = usleep_range_min + 30; + usleep_range(usleep_range_min, usleep_range_max); + +- tty->ops->flush_buffer(tty); ++ if ( tty->ops->flush_buffer) { ++ tty->ops->flush_buffer(tty); ++ } else { ++ netdev_dbg(sl->dev, "%s() tty->ops->flush_buffer is NULL.\n", __func__); ++ } + + sl->tx_cnt = SLLIN_BUFF_SYNC; + +@@ -1028,6 +1063,12 @@ static int sllin_kwthread(void *ptr) + int lin_dlc; + u8 lin_data_buff[SLLIN_DATA_MAX]; + ++ if (sl == NULL) { ++ pr_err("sllin: sl is NULL\n"); ++ } ++ if (sl->dev == NULL) { ++ pr_err("sllin: sl->dev is NULL\n"); ++ } + + if ((sl->lin_state == SLSTATE_IDLE) && sl->lin_master && + sl->id_to_send) { +@@ -1036,6 +1077,7 @@ static int sllin_kwthread(void *ptr) + } + } + ++ netdev_dbg(sl->dev, "sllin_kthread <WAIT_EVENT>\n"); + wait_event_killable(sl->kwt_wq, kthread_should_stop() || + test_bit(SLF_RXEVENT, &sl->flags) || + test_bit(SLF_TXEVENT, &sl->flags) || +@@ -1046,6 +1088,7 @@ static int sllin_kwthread(void *ptr) + (sl->lin_state == SLSTATE_RESPONSE_WAIT)) + && test_bit(SLF_MSGEVENT, &sl->flags))); + ++ netdev_dbg(sl->dev, "sllin_kthread <WAKEUPED>\n"); + if (test_and_clear_bit(SLF_RXEVENT, &sl->flags)) { + netdev_dbg(sl->dev, "sllin_kthread RXEVENT\n"); + } +@@ -1078,21 +1121,25 @@ static int sllin_kwthread(void *ptr) + sl->lin_state = SLSTATE_IDLE; + } + ++ netdev_dbg(sl->dev, "sllin_kthread: lin_state <%08x>\n",sl->lin_state); + switch (sl->lin_state) { + case SLSTATE_IDLE: + if (!test_bit(SLF_MSGEVENT, &sl->flags)) + break; +- ++ if (sl->tx_req_skb == NULL) ++ netdev_dbg(sl->dev, "sl->tx_req_skb == NULL\n"); ++ if (sl->tx_req_skb->data == NULL) ++ netdev_dbg(sl->dev, "sl->tx_req_skb->data == NULL\n"); + cf = (struct can_frame *)sl->tx_req_skb->data; + + /* SFF RTR CAN frame -> LIN header */ + if (cf->can_id & CAN_RTR_FLAG) { + struct sllin_conf_entry *sce; + +- netdev_dbg(sl->dev, "%s: RTR SFF CAN frame, ID = %x\n", +- __func__, cf->can_id & LIN_ID_MASK); + + sce = &sl->linfr_cache[cf->can_id & LIN_ID_MASK]; ++ netdev_dbg(sl->dev, "%s: RTR SFF CAN frame, ID = %x dlc=%d\n", ++ __func__, cf->can_id & LIN_ID_MASK, sce->dlc); + spin_lock_irqsave(&sl->linfr_lock, flags); + + /* Is there Slave response in linfr_cache to be sent? */ +@@ -1114,8 +1161,8 @@ static int sllin_kwthread(void *ptr) + spin_unlock_irqrestore(&sl->linfr_lock, flags); + + } else { /* SFF NON-RTR CAN frame -> LIN header + LIN response */ +- netdev_dbg(sl->dev, "%s: NON-RTR SFF CAN frame, ID = %x\n", +- __func__, (int)cf->can_id & LIN_ID_MASK); ++ netdev_dbg(sl->dev, "%s: NON-RTR SFF CAN frame, ID = %x\n dlc=%d", ++ __func__, (int)cf->can_id & LIN_ID_MASK, cf->can_dlc); + + lin_data = cf->data; + lin_dlc = cf->can_dlc; +@@ -1140,6 +1187,7 @@ static int sllin_kwthread(void *ptr) + hrtimer_start(&sl->rx_timer, + ktime_add(ktime_get(), sl->rx_timer_timeout), + HRTIMER_MODE_ABS); ++ netdev_dbg(sl->dev, "sllin_kthread: SLSTATE finish\n"); + break; + + case SLSTATE_BREAK_SENT: +@@ -1654,3 +1702,4 @@ static void __exit sllin_exit(void) + + module_init(sllin_init); + module_exit(sllin_exit); ++ diff --git a/_to_remove/recipes-kernel/sllin/files/0003-Allow-recent-kernels-newer-4.11.x-to-build.patch b/_to_remove/recipes-kernel/sllin/files/0003-Allow-recent-kernels-newer-4.11.x-to-build.patch new file mode 100644 index 000000000..c8f2f9268 --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/0003-Allow-recent-kernels-newer-4.11.x-to-build.patch @@ -0,0 +1,69 @@ +From fcebb8f510bbb5c681f1f9af4506b4de241837dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <jsmoeller@linuxfoundation.org> +Date: Wed, 31 Oct 2018 20:48:20 +0000 +Subject: [PATCH] Allow recent kernels newer 4.11.x to build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +API changes enforce porting. + +Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> +--- + sllin/sllin.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/sllin/sllin.c b/sllin/sllin.c +index 2969448..7e17127 100644 +--- a/sllin/sllin.c ++++ b/sllin/sllin.c +@@ -56,7 +56,12 @@ + #include <linux/rtnetlink.h> + #include <linux/if_arp.h> + #include <linux/if_ether.h> ++#include <linux/version.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) + #include <linux/sched.h> ++#else ++#include <uapi/linux/sched/types.h> ++#endif + #include <linux/delay.h> + #include <linux/init.h> + #include <linux/can.h> +@@ -447,7 +451,9 @@ static int sll_open(struct net_device *dev) + static void sll_free_netdev(struct net_device *dev) + { + int i = dev->base_addr; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,9) + free_netdev(dev); ++#endif + sllin_devs[i] = NULL; + } + +@@ -460,7 +466,12 @@ static const struct net_device_ops sll_netdev_ops = { + static void sll_setup(struct net_device *dev) + { + dev->netdev_ops = &sll_netdev_ops; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,9) + dev->destructor = sll_free_netdev; ++#else ++ dev->needs_free_netdev = true; ++ dev->priv_destructor = sll_free_netdev; ++#endif + + dev->hard_header_len = 0; + dev->addr_len = 0; +@@ -1685,8 +1696,10 @@ static void __exit sllin_exit(void) + sl = netdev_priv(dev); + if (sl->tty) { + netdev_dbg(sl->dev, "tty discipline still running\n"); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,9) + /* Intentionally leak the control block. */ + dev->destructor = NULL; ++#endif + } + + unregister_netdev(dev); +-- +2.13.7 + diff --git a/_to_remove/recipes-kernel/sllin/files/0004-Fix-build-with-5.9-kernel.patch b/_to_remove/recipes-kernel/sllin/files/0004-Fix-build-with-5.9-kernel.patch new file mode 100644 index 000000000..f3bcda9fe --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/0004-Fix-build-with-5.9-kernel.patch @@ -0,0 +1,48 @@ +Use sched_set_fifo on newer kernels + +The 5.9 kernel removed the export of sched_setscheduler, use +the new sched_set_fifo API if building on 5.9 or newer. There +is a slight difference in resulting priority level, the new +API will yield a priority of 50 instead of the explicit value +of 40 being used with sched_setscheduler, but this should not +be an issue. + +Upstream-Status: Inappropriate [no upstream] +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +--- +diff --git a/sllin/sllin.c b/sllin/sllin.c +index 133d6e9..92c52ad 100644 +--- a/sllin/sllin.c ++++ b/sllin/sllin.c +@@ -1059,14 +1059,20 @@ static int sllin_kwthread(void *ptr) + { + struct sllin *sl = (struct sllin *)ptr; + struct tty_struct *tty = sl->tty; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) + struct sched_param schparam = { .sched_priority = 40 }; ++#endif + int tx_bytes = 0; /* Used for Network statistics */ + unsigned long flags; + int lin_id; + struct sllin_conf_entry *sce; + + netdev_dbg(sl->dev, "sllin_kwthread started.\n"); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) + sched_setscheduler(current, SCHED_FIFO, &schparam); ++#else ++ sched_set_fifo(current); ++#endif + + clear_bit(SLF_ERROR, &sl->flags); + sltty_change_speed(tty, sl->lin_baud); +@@ -1274,8 +1280,8 @@ slstate_response_wait: + sl->lin_state = SLSTATE_RESPONSE_WAIT_BUS; + } + } ++ fallthrough; + +- /* Be aware, no BREAK here */ + case SLSTATE_RESPONSE_WAIT_BUS: + if (sl->rx_cnt < sl->rx_expect) + continue; diff --git a/_to_remove/recipes-kernel/sllin/files/lin_config.conf b/_to_remove/recipes-kernel/sllin/files/lin_config.conf new file mode 100644 index 000000000..9775b8b39 --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/lin_config.conf @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--PCAN-LIN CT profile.--> +<PCLIN_PROFILE Version="1"> + <LIN Group="2"> + <Scheduler_Entries Count="1"> + <!-- Poll steering wheel adapter at address 0x21 every 100 ms --> + <Entry Time="100">33</Entry> + </Scheduler_Entries> + </LIN> +</PCLIN_PROFILE> diff --git a/_to_remove/recipes-kernel/sllin/files/sllin-demo.service b/_to_remove/recipes-kernel/sllin/files/sllin-demo.service new file mode 100644 index 000000000..e3e7432f3 --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/sllin-demo.service @@ -0,0 +1,14 @@ +[Unit] +Description=LIN demo configuration +ConditionPathExists=/dev/ttyUSB0 +After=afm-system-daemon.service +Before=can-dev-mapping-helper.service + +[Service] +Type=forking +PIDFile=/run/lin_config/lin_config.pid +ExecStart=/usr/bin/start_lin_demo.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh b/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh new file mode 100755 index 000000000..c7627ca74 --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# Attach serial LIN->CAN bridge and set up LIN polling +if [ -c /dev/ttyUSB0 ]; then + sleep 1 + /usr/bin/lin_config -c /etc/lin_config.conf -a sllin:/dev/ttyUSB0 + mkdir -p /run/lin_config/ + pidof lin_config > /run/lin_config/lin_config.pid + sleep 1 +else + ip link add dev sllin0 type vcan +fi +ip link set sllin0 up + +# Initialize HVAC controller +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 02A# +usleep 100000 +cansend sllin0 02B# +usleep 100000 +cansend sllin0 032#F0F8FFFFFFFFFFFF +usleep 100000 +cansend sllin0 032#F0F8FFFFFFFFFFFF +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 030# +usleep 100000 +cansend sllin0 02D# +usleep 100000 +cansend sllin0 02C# +usleep 100000 +cansend sllin0 02D# +usleep 100000 +cansend sllin0 02C# +usleep 100000 + diff --git a/_to_remove/recipes-kernel/sllin/sllin.bb b/_to_remove/recipes-kernel/sllin/sllin.bb new file mode 100644 index 000000000..cc72b3095 --- /dev/null +++ b/_to_remove/recipes-kernel/sllin/sllin.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "slLIN driver module" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://sllin.c;beginline=7;endline=37;md5=6408e14dba951f8cbe3c2a003a0d89d2" + +inherit module systemd + +DEPENDS = "virtual/kernel" + +SRC_URI = "git://github.com/trainman419/linux-lin.git;protocol=https" +SRCREV = "155d885e8ccc907a56f6c86c4b159fac27ef6fec" +S = "${WORKDIR}/git/sllin" + +PV = "0.1+git${SRCPV}" + +SRC_URI:append = " \ + file://0001_update_makefile.patch;pnum=2 \ + file://0002_fix_null_operation_check.patch;pnum=2 \ + file://0003-Allow-recent-kernels-newer-4.11.x-to-build.patch;pnum=2 \ + file://0001-Disable-sllin-driver-debug-log.patch;pnum=2 \ + file://0004-Fix-build-with-5.9-kernel.patch;pnum=2 \ + file://sllin-demo.service \ + file://start_lin_demo.sh \ + file://lin_config.conf \ +" + +KERNEL_MODULE_AUTOLOAD:append = " sllin" +KERNEL_MODULE_PROBECONF:append = " sllin" + +SLLINBAUDRATE ??= "9600" +module_conf_sllin = "options sllin baudrate=${SLLINBAUDRATE}" + +SYSTEMD_SERVICE:${PN} = "sllin-demo.service" + +do_install:append () { + install -d 644 ${D}/${bindir} + install -m 755 ${WORKDIR}/start_lin_demo.sh ${D}/${bindir}/start_lin_demo.sh + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/sllin-demo.service ${D}${systemd_system_unitdir}/ + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/lin_config.conf ${D}${sysconfdir}/ +} + +FILES:${PN} += "${bindir}/start_lin_demo.sh ${sysconfdir}/lin_config.conf" + +RDEPENDS:${PN} += "lin-config" diff --git a/_to_remove/recipes-qt/qt-cluster/qtcompositor-conf_1.0.bb b/_to_remove/recipes-qt/qt-cluster/qtcompositor-conf_1.0.bb new file mode 100644 index 000000000..131210897 --- /dev/null +++ b/_to_remove/recipes-qt/qt-cluster/qtcompositor-conf_1.0.bb @@ -0,0 +1,40 @@ +SUMMARY = "Configuration files for running wayland with a non-weston compositor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit allarch agl-graphical + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + # Add a rule to ensure the 'display' user has permissions to + # open the graphics device + 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}="*" +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}="^" +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}="*" +SUBSYSTEM=="video4linux", MODE="0660", GROUP="display", SECLABEL{smack}="*" +KERNEL=="uvcs", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*" +KERNEL=="rgnmm", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*" +EOF +} + +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 + +} + +RCONFLICTS:${PN} = "weston-init" diff --git a/_to_remove/recipes-qt/qt-qrcode/qt-qrcode/0001-rework-library-build.patch b/_to_remove/recipes-qt/qt-qrcode/qt-qrcode/0001-rework-library-build.patch new file mode 100644 index 000000000..76795268c --- /dev/null +++ b/_to_remove/recipes-qt/qt-qrcode/qt-qrcode/0001-rework-library-build.patch @@ -0,0 +1,181 @@ +Rework library build + +Rework qmake files to build libraries out of the quickitem and widget +code instead of sample programs. This allows using the associated +classes without copying the source and running afoul of the LGPL +licensing. Also add pkgconfig file generation to simplify usage, fix +header installation, and use pkgconfig to pull in libqrencode instead +of having to clone a copy in-tree and building it. + +Upstream-Status: inappropriate [embedded-specific] + +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +diff --git a/lib/lib.pro b/lib/lib.pro +index d046bc4..6b6c199 100644 +--- a/lib/lib.pro ++++ b/lib/lib.pro +@@ -1,6 +1,9 @@ + TARGET = qtqrcode + TEMPLATE = lib + ++CONFIG += link_pkgconfig create_pc create_prl no_install_prl ++PKGCONFIG += libqrencode ++ + DEFINES += \ + QTQRCODE_LIBRARY \ + QTQRCODE_PLUS_FEATURES +@@ -12,7 +15,8 @@ contains(DEFINES, QTQRCODE_PLUS_FEATURES) { + qtqrcodepainter.cpp + + HEADERS +=\ +- qtqrcodepainter.h ++ qtqrcodepainter.h \ ++ QtQrCodePainter + + } else { + QT -= gui +@@ -23,16 +27,29 @@ SOURCES += \ + + HEADERS +=\ + qtqrcode_global.h \ +- qtqrcode.h ++ qtqrcode.h \ ++ QtQrCode + + INCLUDEPATH += $$PWD + + include(../defaults.pri) +-include(libqrencode.pri) + # Default rules for deployment. + include(deployment.pri) + + unix { ++ headers.path = /usr/include + target.path = /usr/lib +- INSTALLS += target + } ++ ++headers.files = $$HEADERS ++ ++INSTALLS += headers ++ ++QMAKE_PKGCONFIG_NAME = qtqrcode ++QMAKE_PKGCONFIG_FILE = $${QMAKE_PKGCONFIG_NAME} ++QMAKE_PKGCONFIG_VERSION = $${VERSION} ++QMAKE_PKGCONFIG_DESCRIPTION = A wrapper interface for qrencode for Qt ++QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib ++QMAKE_PKGCONFIG_INCDIR = ${prefix}/include ++QMAKE_PKGCONFIG_REQUIRES = libqrencode ++QMAKE_PKGCONFIG_DESTDIR = pkgconfig +diff --git a/lib/qtqrcode.h b/lib/qtqrcode.h +index 2a7a1ff..0830826 100644 +--- a/lib/qtqrcode.h ++++ b/lib/qtqrcode.h +@@ -31,7 +31,7 @@ + #include <QByteArray> + #include <QSharedDataPointer> + +-#include "libqrencode/qrencode.h" ++#include <qrencode.h> + + class QtQrCodeData; + +diff --git a/quickitem/quickitem.pro b/quickitem/quickitem.pro +index ecfef1b..067dc46 100644 +--- a/quickitem/quickitem.pro ++++ b/quickitem/quickitem.pro +@@ -1,5 +1,7 @@ +-TEMPLATE = app +-TARGET = QuickItem ++TEMPLATE = lib ++TARGET = qtqrcode-quickitem ++ ++CONFIG += create_pc create_prl no_install_prl + + QT += qml quick widgets + +@@ -7,7 +9,7 @@ LIBS += -L../lib -lqtqrcode + + DEFINES += + +-SOURCES += main.cpp \ ++SOURCES += \ + QtQrCodeQuickItem.cpp + + HEADERS += \ +@@ -21,3 +23,21 @@ QML_IMPORT_PATH = + include(../defaults.pri) + # Default rules for deployment. + include(deployment.pri) ++ ++unix { ++ headers.path = /usr/include ++ target.path = /usr/lib ++} ++ ++headers.files = $$HEADERS ++ ++INSTALLS += headers ++ ++QMAKE_PKGCONFIG_NAME = qtqrcode-quickitem ++QMAKE_PKGCONFIG_FILE = $${QMAKE_PKGCONFIG_NAME} ++QMAKE_PKGCONFIG_VERSION = $${VERSION} ++QMAKE_PKGCONFIG_DESCRIPTION = Qt QuickItem wrapper for qt-qrcode library ++QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib ++QMAKE_PKGCONFIG_INCDIR = ${prefix}/include ++QMAKE_PKGCONFIG_REQUIRES = qtqrcode ++QMAKE_PKGCONFIG_DESTDIR = pkgconfig +diff --git a/widget/widget.pro b/widget/widget.pro +index 2e26a8c..63add50 100644 +--- a/widget/widget.pro ++++ b/widget/widget.pro +@@ -1,5 +1,7 @@ +-TEMPLATE = app +-TARGET = Widget ++TEMPLATE = lib ++TARGET = qtqrcode-widget ++ ++CONFIG += create_pc create_prl no_install_prl + + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +@@ -9,18 +11,28 @@ LIBS += -L../lib -lqtqrcode + + DEFINES += + +-SOURCES += main.cpp\ +- MainWindow.cpp \ +- QtQrCodeWidget.cpp +- +-HEADERS += MainWindow.hpp \ +- QtQrCodeWidget.hpp ++SOURCES += QtQrCodeWidget.cpp + +-FORMS += MainWindow.ui +- +-CONFIG += mobility +-MOBILITY = ++HEADERS += QtQrCodeWidget.hpp + + include(../defaults.pri) + # Default rules for deployment. + include(deployment.pri) ++ ++unix { ++ headers.path = /usr/include ++ target.path = /usr/lib ++} ++ ++headers.files = $$HEADERS ++ ++INSTALLS += headers ++ ++QMAKE_PKGCONFIG_NAME = qtqrcode-widget ++QMAKE_PKGCONFIG_FILE = $${QMAKE_PKGCONFIG_NAME} ++QMAKE_PKGCONFIG_VERSION = $${VERSION} ++QMAKE_PKGCONFIG_DESCRIPTION = Qt widget wrapper for qt-qrcode library ++QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib ++QMAKE_PKGCONFIG_INCDIR = ${prefix}/include ++QMAKE_PKGCONFIG_REQUIRES = qtqrcode ++QMAKE_PKGCONFIG_DESTDIR = pkgconfig diff --git a/_to_remove/recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch b/_to_remove/recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch new file mode 100644 index 000000000..489a49edb --- /dev/null +++ b/_to_remove/recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch @@ -0,0 +1,25 @@ +From 5fc5a92e3568674a08a6e7594d050e963d0d854b Mon Sep 17 00:00:00 2001 +From: Raquel Medina <raquel.medina@konsulko.com> +Date: Mon, 18 May 2020 19:18:00 +0200 +Subject: [PATCH] fix dangling pointer + +Bug-AGL: SPEC-3664 +Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> +--- + lib/qtqrcode.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/qtqrcode.cpp b/lib/qtqrcode.cpp +index a7000f0..825c354 100644 +--- a/lib/qtqrcode.cpp ++++ b/lib/qtqrcode.cpp +@@ -116,8 +116,7 @@ void QtQrCode::setBaseQrCodeData(QRcode *qrCode) + { + d->width = qrCode->width; + d->data.clear(); +- // TODO: Beware it here +- d->data = (const char *) qrCode->data; ++ d->data = QByteArray(reinterpret_cast<const char *>(qrCode->data), d->width*d->width); + QRcode_free(qrCode); + } + diff --git a/_to_remove/recipes-qt/qt-qrcode/qt-qrcode_git.bb b/_to_remove/recipes-qt/qt-qrcode/qt-qrcode_git.bb new file mode 100644 index 000000000..fcc71390d --- /dev/null +++ b/_to_remove/recipes-qt/qt-qrcode/qt-qrcode_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Qt QR code library" +DESCRIPTION = "Qt/C++ library for encoding and visualization of data in a \ +QR Code symbol. This library consists of a Qt wrapper for libqrencode, and \ +Qt components that are able to visualize the result." +LICENSE = "LGPLv3+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94a3f3bdf61243b5e5cf569fbfbbea52" + +DEPENDS = "qtbase qtdeclarative qtquickcontrols2 qtsvg qrencode" + +SRC_URI = "git://github.com/danielsanfr/qt-qrcode.git;protocol=https \ + file://0001-rework-library-build.patch \ + file://0002-fix-dangling-pointer.patch \ + " +SRCREV = "2d57d9c6e2341689d10f9360a16a08831a4a820b" + +PV = "git${SRCPV}" +S = "${WORKDIR}/git" + +inherit qmake5 diff --git a/_to_remove/recipes-support/lin-config/files/0001-Change-Makefile-to-use-pkg-config-for-libxml-2.0.patch b/_to_remove/recipes-support/lin-config/files/0001-Change-Makefile-to-use-pkg-config-for-libxml-2.0.patch new file mode 100644 index 000000000..fe08b7d81 --- /dev/null +++ b/_to_remove/recipes-support/lin-config/files/0001-Change-Makefile-to-use-pkg-config-for-libxml-2.0.patch @@ -0,0 +1,33 @@ +From 59acd73ba3bd6cc4151b890d135c6d690a83374d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <jsmoeller@linuxfoundation.org> +Date: Tue, 1 Oct 2019 15:24:07 +0000 +Subject: [PATCH] Change Makefile to use pkg-config for libxml-2.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +instead of xml2-config. + +Upstream-Status: Pending + +Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> +--- + lin_config/src/Makefile | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index cf5c515..3fc4df1 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,5 @@ +-CC=gcc +-CFLAGS=-std=gnu99 -Wall -pedantic $(DEBUG) `xml2-config --cflags` `pkg-config --cflags libnl-route-3.0` -I$(INCLUDE) +-LIBS=`xml2-config --libs` `pkg-config --libs libnl-route-3.0` ++CFLAGS=-std=gnu99 -Wall -pedantic $(DEBUG) `pkg-config --cflags libxml-2.0` `pkg-config --cflags libnl-route-3.0` -I$(INCLUDE) ++LIBS=`pkg-config --libs libxml-2.0` `pkg-config --libs libnl-route-3.0` + INCLUDE=../../sllin + DEBUG=-ggdb + +-- +2.16.4 + diff --git a/_to_remove/recipes-support/lin-config/files/0002-Change-Makefile-to-use-LDFLAGS.patch b/_to_remove/recipes-support/lin-config/files/0002-Change-Makefile-to-use-LDFLAGS.patch new file mode 100644 index 000000000..26364455a --- /dev/null +++ b/_to_remove/recipes-support/lin-config/files/0002-Change-Makefile-to-use-LDFLAGS.patch @@ -0,0 +1,20 @@ +Use LDFLAGS when linking + +Use LDFLAGS when linking the output binary to quiet QA warnings due to +missing link flags. + +Upstream-Status: Pending + +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +--- a/Makefile 2019-11-05 11:08:11.060565285 +0000 ++++ b/Makefile 2019-11-05 11:09:38.663570084 +0000 +@@ -6,7 +6,7 @@ + objects = linc_parse_xml.o pcl_config.o sllin_config.o lin_config.o + + lin_config: $(objects) +- $(CC) $(objects) $(LIBS) -o lin_config ++ $(CC) $(LDFLAGS) $(objects) $(LIBS) -o lin_config + + %.o : %.c %.h + $(CC) $(CFLAGS) $(LIBS) -c $< -o $@ diff --git a/_to_remove/recipes-support/lin-config/lin-config_git.bb b/_to_remove/recipes-support/lin-config/lin-config_git.bb new file mode 100644 index 000000000..7585156f2 --- /dev/null +++ b/_to_remove/recipes-support/lin-config/lin-config_git.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "lin-config tool for the sllin driver module" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://lin_config.c;beginline=4;endline=9;md5=196a29df19a30dbc752937bdfc819d7a" + +DEPENDS += "libnl libxml2" + +SRC_URI = "git://github.com/trainman419/linux-lin.git;protocol=https" +SRCREV = "155d885e8ccc907a56f6c86c4b159fac27ef6fec" +S = "${WORKDIR}/git/lin_config/src" + +SRC_URI:append = " \ + file://0001-Change-Makefile-to-use-pkg-config-for-libxml-2.0.patch \ + file://0002-Change-Makefile-to-use-LDFLAGS.patch \ + " + +inherit pkgconfig + +PV = "0.1+git${SRCPV}" + +do_configure[noexec] = "1" + +do_install:append() { + install -d ${D}/${bindir} + install -m 755 ${S}/lin_config ${D}/${bindir} +} diff --git a/_to_remove/recipes-support/opencv/opencv_4.%.bbappend b/_to_remove/recipes-support/opencv/opencv_4.%.bbappend new file mode 100644 index 000000000..a1016a6d0 --- /dev/null +++ b/_to_remove/recipes-support/opencv/opencv_4.%.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'opencv_agldemo.inc', '', d)} diff --git a/_to_remove/recipes-support/opencv/opencv_agldemo.inc b/_to_remove/recipes-support/opencv/opencv_agldemo.inc new file mode 100644 index 000000000..16640023e --- /dev/null +++ b/_to_remove/recipes-support/opencv/opencv_agldemo.inc @@ -0,0 +1 @@ +PACKAGECONFIG:poky = "jpeg png v4l libv4l gstreamer" diff --git a/_to_remove/recipes-test/gcovr-wrapper/gcovr-wrapper/gcovr-wrapper b/_to_remove/recipes-test/gcovr-wrapper/gcovr-wrapper/gcovr-wrapper new file mode 100644 index 000000000..12580237d --- /dev/null +++ b/_to_remove/recipes-test/gcovr-wrapper/gcovr-wrapper/gcovr-wrapper @@ -0,0 +1,320 @@ +#!/bin/bash +# +# Copyright (C) 2020 Konsulko Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# gcovr wrapper for generating coverage reports against AGL bindings +# on target. With a given binding name or coverage widget file, the +# coverage version will be installed, and the pyagl tests for the +# binding run before generating a report with gcovr. The afm-test +# test widget or a user-supplied command may be run instead of the +# pyagl tests, see usage below, or run with "--help". +# + +usage() { + cat <<-EOF + Usage: + $(basename $0) [options] <binding name | widget file> + + Options: + -h, --help + Print this help and exit + + -k, --keep + Do not remove temporary files/directories + + -o, --gcovr-options + Additional gcovr options, multiple options should be quoted + + -w, --workdir + gcov/gcovr temporary working directory, defaults to /tmp/gcov + The directory will be removed after running without --keep if it + is empty, use caution if specifying existing system directories! + + --pyagl + Run pyagl tests for binding, enabled by default + + --afm-test + Run afm-test test widget tests for binding. + If specified, disables pyagl tests; note that the last argument in + the command-line will take precedence. + + -c, --command + Test command to use in place of pyagl or afm-test, should be quote + If specified, disables pyagl and afm-test tests. + + EOF +} + +# Helper to validate widget install dir +check_wgt_install() { + if [ ! \( -d $1 -o -f $1/config.xml \) ]; then + echo "ERROR: No widget install at $1" + exit 1 + elif [ ! -d $1/src ]; then + echo "ERROR: No source in $1/src" + exit 1 + fi +} + +# Helper to run gcovr inside mount namespace environment +gcovr_runner() { + wgt_install_dir=/var/local/lib/afm/applications/$1 + check_wgt_install ${wgt_install_dir} + + if [ ! -d $workdir/$1 ]; then + echo "ERROR: No coverage data in $workdir/$1" + exit 1 + fi + + # Get original source path + gcno=$(cd $workdir/$1 && find -name '*.gcno' | head -n 1 | cut -d/ -f2-) + if [ -z "$gcno" ]; then + echo "ERROR: no gcno file found in $workdir/$1" + exit 1 + fi + srcfile=$(strings $workdir/$1/${gcno} | grep "$(basename ${gcno%.gcno})$" | uniq) + srcdir=$(echo $srcfile | sed "s|/${gcno%%/*}/.*$||") + + # Set up mounts for chroot to run gcovr in + # NOTE: We do not unmount these later, as we assume we are in a + # private mount namespace and they will go away on exit from + # it. + echo "Setting up mounts" + tmpdir=$(mktemp -d) + echo $tmpdir > $workdir/.runner_tmpdir + mkdir -p $tmpdir/{lower,upper,work,merged} + # NOTE: Could potentially use rbind here, but explicitly mounting + # just what we need seems safer + mount --bind / $tmpdir/lower + mount -t overlay -o lowerdir=$tmpdir/lower,upperdir=$tmpdir/upper,workdir=$tmpdir/work overlay $tmpdir/merged + mount --bind /proc $tmpdir/merged/proc + mount --bind /sys $tmpdir/merged/sys + mount --bind /dev $tmpdir/merged/dev + mount --bind /tmp $tmpdir/merged/tmp + # Bind in the data files + # NOTE: $workdir is bound instead of specifically just $workdir/$1, + # so that e.g. html output to another directory in /tmp will + # work as expected. A determined user may be able to shoot + # themselves in the foot, but for now the trade off seems + # acceptable. + mkdir -p $tmpdir/merged/$workdir + mount --bind $workdir $tmpdir/merged/$workdir + # Bind the source files to their expected location + mkdir -p $tmpdir/merged/$srcdir + mount --bind ${wgt_install_dir}/src $tmpdir/merged/$srcdir + + echo "Entering chroot" + echo + exec chroot $tmpdir/merged \ + /usr/bin/gcovr -r $srcdir --object-directory $workdir/$1 --gcov-filter-source-errors -s ${GCOV_RUNNER_GCOVR_OPTIONS} +} + +# Helper to clean up after runner +gcovr_runner_cleanup() { + rm -rf $workdir/$1 + if [ -f $workdir/.runner_tmpdir ]; then + tmpdir=$(cat $workdir/.runner_tmpdir) + rm -rf $tmpdir + rm -f $workdir/.runner_tmpdir + fi + if [ "$workdir" != "/tmp" ]; then + rmdir $workdir 2>/dev/null || true + fi +} + +# Parse arguments +OPTS=$(getopt -o +hko:pw:c: --longoptions gcovr-runner,afm-test,command:,help,keep,gcovr-options:,pyagl,workdir: -n "$(basename $0)" -- "$@") +if [ $? -ne 0 ]; then + exit 1 +fi +eval set -- "$OPTS" + +runner=false +keep=false +wgt="" +cmd="" +options="" +afmtest=false +pyagl=true +workdir="/tmp/gcov" + +while true; do + case "$1" in + --gcovr-runner) runner=true; shift;; + --afm-test) afmtest=true; pyagl=false; shift;; + -c|--command) cmd="$2"; shift; shift;; + -h|--help) usage; exit 0;; + -k|--keep) keep=true; shift;; + -o|--gcovr-options) options="$2"; shift; shift;; + -p|--pyagl) pyagl=true; afmtest=false; shift;; + -w|--workdir) workdir="$2"; shift; shift;; + --) shift; break;; + *) break;; + esac +done + +# Encode the assumption that a specified command means it runs instead +# of any other tests. +if [ -s "$cmd" ]; then + pyagl=false + afmtest=false +fi + +if [ $# -ne 1 ]; then + # Always expect widget name as single non-option argument + usage + exit 1 +fi + +# Rationalize workdir just in case +workdir=$(realpath "$workdir") + +if [ "$runner" = "true" ]; then + if [ "${GCOV_RUNNER_READY}" != "true" ]; then + echo "ERROR: gcovr environment not ready!" + exit 1 + fi + gcovr_runner $1 + # If we get here, it'd be an error, so return 1 + exit 1 +fi + +binding=$1 +if [ "${1%.wgt}" != "$1" ]; then + # User has specified path to a widget file + wgt=$(realpath $1) + binding=$(basename "${1%-coverage.wgt}") +else + wgt=/usr/AGL/apps/coverage/${binding}-coverage.wgt +fi +if [ ! -f $wgt ]; then + echo "ERROR: No widget $wgt" + exit 1 +elif [ "$afmtest" = "true" -a ! -f /usr/AGL/apps/test/${binding}-test.wgt ]; then + echo "ERROR: No test widget for $binding" + exit 1 +fi + +# Determine starting systemd unit name +service=$(systemctl --all |grep afm-service-$binding |sed 's/^[ *] \([^ ]*\).*/\1/') +if [ -z "$service" ]; then + echo "ERROR: Could not determine systemd service unit for $binding" + exit 1 +fi + +# Install coverage widget +echo "Removing $binding widget" +systemctl stop $service +afm-util remove $binding +echo +echo "Installing $binding coverage widget" +afm-util install $wgt +echo + +wgt_install_dir=/var/local/lib/afm/applications/$binding +check_wgt_install ${wgt_install_dir} +gcov_src=${wgt_install_dir}/coverage +if [ ! -d ${gcov_src} ]; then + echo "ERROR: No coverage information in ${gcov_src}" + exit 1 +elif [ ! -f ${gcov_src}/gcov.env ]; then + echo "ERROR: No gcov environment file at ${gcov_src}/gcov.env" + exit 1 +fi + +# +# NOTE: In theory, the coverage data collection could be done inside +# the mount namespace / chroot, but the potential for issues +# when doing that seems higher than just running gcovr there, +# so a conservative approach is taken. +# + +# Set up things for the binary to write out gcda data files +# +# Having the matching build directory hierarchy in place and +# writeable by the target binary before any restart and testing is +# key to things working. +# +# As well, the environment file with the GCOV_PREFIX and +# GCOV_PREFIX_STRIP values needs to be present before running so the +# gcda files will get written into the relocated build hierarchy. +# +echo "Installing coverage information for $binding" +mkdir -p $workdir +rm -rf $workdir/$binding +cp -dr ${gcov_src} $workdir/$binding +chsmack -r -a System::Log $workdir +chmod -R go+w $workdir + +# Install the gcov environment file +mkdir -p /etc/afm/widget.env.d/$binding +if [ "${workdir}" = "/tmp/gcov" ]; then + cp ${gcov_src}/gcov.env /etc/afm/widget.env.d/$binding/gcov +else + # Update GCOV_PREFIX to point into workdir + sed "s|^GCOV_PREFIX=.*|GCOV_PREFIX=${workdir}/$binding|" ${gcov_src}/gcov.env > /etc/afm/widget.env.d/$binding/gcov +fi +chsmack -r -a _ /etc/afm/widget.env.d/$binding + +# Determine new systemd unit name (version may now be different) +service=$(systemctl --all |grep afm-service-$binding |sed 's/^[ *] \([^ ]*\).*/\1/') +if [ -z "$service" ]; then + echo "ERROR: Could not determine systemd service unit for $binding" + exit 1 +fi + +# Restart the binding +systemctl start $service +echo + +# Run tests or given command +if [ -n "$cmd" ]; then + echo "Running command: $cmd" + export AGL_AVAILABLE_INTERFACES=${AGL_AVAILABLE_INTERFACES:-ethernet} + eval $cmd +elif [ "$pyagl" = "true" ]; then + echo "Running $binding pyagl tests" + export AGL_AVAILABLE_INTERFACES=${AGL_AVAILABLE_INTERFACES:-ethernet} + pytest -k "${binding#agl-service-} and not hwrequired" /usr/lib/python3.?/site-packages/pyagl +else + echo "Running $binding test widget" + # NOTE: su to agl-driver is required here to avoid fallout from + # the "afm-util run" in afm-test seemingly triggering the + # start of other per-user bindings for the root user. + su -l -c "/usr/bin/afm-test /usr/AGL/apps/test/${binding}-test.wgt" agl-driver +fi + +# Restart again to trigger data file writing +systemctl restart $service +echo + +# Run ourselves in gcovr runner mode inside a private mount namespace +export GCOV_RUNNER_READY=true +# NOTE: Passing gcovr options in the environment to avoid quoting hassles +export GCOV_RUNNER_GCOVR_OPTIONS="$options" +runner_options="--workdir ${workdir}" +unshare -m $0 --gcovr-runner ${runner_options} $binding +rc=$? + +if [ "$keep" != "true" ]; then + # Clean up after ourselves + gcovr_runner_cleanup $1 + rm -f /etc/afm/widget.env.d/$1/gcov + rmdir /etc/afm/widget.env.d/$1 2>/dev/null || true +fi + +exit $rc + diff --git a/_to_remove/recipes-test/gcovr-wrapper/gcovr-wrapper_1.0.bb b/_to_remove/recipes-test/gcovr-wrapper/gcovr-wrapper_1.0.bb new file mode 100644 index 000000000..8cb228d50 --- /dev/null +++ b/_to_remove/recipes-test/gcovr-wrapper/gcovr-wrapper_1.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "AGL gcovr wrapper" +DESCRIPTION = "This wrapper script enables running gcovr against a \ +AGL binding to generate a coverage report of running pyagl tests, \ +the afm-test test widget, or a user-supplied command." + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI += "file://gcovr-wrapper" + +inherit allarch + +do_install() { + install -D -m 0755 ${WORKDIR}/gcovr-wrapper ${D}${bindir}/gcovr-wrapper +} + +RDEPENDS:${PN} = "bash gcovr" diff --git a/_to_remove/recipes-test/gcovr/gcovr/0001-add-gcov-filter-source-errors-option.patch b/_to_remove/recipes-test/gcovr/gcovr/0001-add-gcov-filter-source-errors-option.patch new file mode 100644 index 000000000..be1dcf829 --- /dev/null +++ b/_to_remove/recipes-test/gcovr/gcovr/0001-add-gcov-filter-source-errors-option.patch @@ -0,0 +1,68 @@ +Add option to filter gcov source errors + +Add "--gcov-filter-source-errors" to apply filters to the source +files in the errors from gcov. If all source files in the errors +are filtered, then the error is ignored so that the file will be +processed. This enables the usecase of running on a target where +only the source tree for a binary is available, but not all of the +external source headers are. + +Upstream-Status: pending + +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +diff --git a/gcovr/configuration.py b/gcovr/configuration.py +index 1356097..083532c 100644 +--- a/gcovr/configuration.py ++++ b/gcovr/configuration.py +@@ -915,6 +915,14 @@ GCOVR_CONFIG_OPTIONS = [ + "Default: {default!s}.", + action="store_true", + ), ++ GcovrConfigOption( ++ "gcov_filter_source_errors", ['--gcov-filter-source-errors'], ++ group="gcov_options", ++ help="Apply filters to missing source file errors in GCOV files " ++ "instead of exiting with an error. " ++ "Default: {default!s}.", ++ action="store_true", ++ ), + GcovrConfigOption( + "objdir", ['--object-directory'], + group="gcov_options", +diff --git a/gcovr/gcov.py b/gcovr/gcov.py +index de79215..171d68d 100644 +--- a/gcovr/gcov.py ++++ b/gcovr/gcov.py +@@ -667,11 +667,27 @@ def run_gcov_and_process_files( + chdir=chdir, + tempdir=tempdir) + ++ skip = False + if source_re.search(err): +- # gcov tossed errors: try the next potential_wd +- error(err) +- done = False +- else: ++ ignore = False ++ if options.gcov_filter_source_errors: ++ # Check if errors are all from source that is filtered ++ ignore = True ++ for line in err.splitlines(): ++ src_fname = line.split()[-1] ++ filtered, excluded = apply_filter_include_exclude( ++ src_fname, options.filter, options.exclude) ++ if not (filtered or excluded): ++ ignore = False ++ break ++ ++ if not ignore: ++ # gcov tossed errors: try the next potential_wd ++ error(err) ++ skip = True ++ ++ done = False ++ if not skip: + # Process *.gcov files + for fname in active_gcov_files: + process_gcov_data(fname, covdata, abs_filename, options) diff --git a/_to_remove/recipes-test/gcovr/gcovr_%.bbappend b/_to_remove/recipes-test/gcovr/gcovr_%.bbappend new file mode 100644 index 000000000..699aea214 --- /dev/null +++ b/_to_remove/recipes-test/gcovr/gcovr_%.bbappend @@ -0,0 +1,2 @@ +# Add not yet upstreamed patch that enables on target gcov usage +SRC_URI += "file://0001-add-gcov-filter-source-errors-option.patch" diff --git a/_to_remove/recipes-test/gcovr/gcovr_git.bb b/_to_remove/recipes-test/gcovr/gcovr_git.bb new file mode 100644 index 000000000..d302c0f63 --- /dev/null +++ b/_to_remove/recipes-test/gcovr/gcovr_git.bb @@ -0,0 +1,32 @@ +SUMMARY = "Generate GCC code coverage reports" +DESCRIPTION = "Gcovr provides a utility for managing the use of the GNU gcov \ +utility and generating summarized code coverage results." +HOMEPAGE = "https://gcovr.com" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=221e634a1ceafe02ef74462cbff2fb16" + +PV = "4.2+git${SRCPV}" +SRC_URI = "git://github.com/gcovr/gcovr.git;protocol=https" +SRCREV = "1bc72e3bb59b9296e962b350691732ddafbd3195" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-core \ + python3-crypt \ + python3-datetime \ + python3-difflib \ + python3-io \ + python3-jinja2 \ + python3-json \ + python3-lxml \ + python3-multiprocessing \ + python3-pygments \ + python3-pytest \ + python3-shell \ + python3-threading \ + python3-typing \ +" diff --git a/_to_remove/recipes-test/pyagl/pyagl_git.bb b/_to_remove/recipes-test/pyagl/pyagl_git.bb new file mode 100644 index 000000000..ee01ce52f --- /dev/null +++ b/_to_remove/recipes-test/pyagl/pyagl_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "Python bindings and tests for Automotive Grade Linux services" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/pyagl" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/pyagl;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "137a32d3b0068e2141ed9aab23d8a8956c0cb094" +PV = "${AGL_BRANCH}+git${SRCPV}" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +do_install:append() { + install -D -m 0755 ${S}/pyagl/scripts/pyagl ${D}${bindir}/pyagl +} + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-asyncssh \ + python3-core \ + python3-json \ + python3-logging \ + python3-math \ + python3-parse \ + python3-pprint \ + python3-pytest \ + python3-pytest-asyncio \ + python3-pytest-dependency \ + python3-pytest-reverse \ + python3-typing \ + python3-websockets \ +" diff --git a/_to_remove/recipes-wam/chromium/chromium-browser-service.bb b/_to_remove/recipes-wam/chromium/chromium-browser-service.bb new file mode 100644 index 000000000..d9a4206d5 --- /dev/null +++ b/_to_remove/recipes-wam/chromium/chromium-browser-service.bb @@ -0,0 +1,19 @@ +SUMMARY = "Chromium browser widget" +DESCRIPTION = "Wgt packaging for running chromium installed browser" +HOMEPAGE = "https://webosose.org" +SECTION = "apps" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/chromium;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +#build-time dependencies +DEPENDS += "af-binder af-main-native chromium84" + +inherit cmake aglwgt + +RDEPENDS:${PN} += "chromium84-browser" diff --git a/_to_remove/recipes-wam/chromium/chromium.inc b/_to_remove/recipes-wam/chromium/chromium.inc new file mode 100644 index 000000000..722ba9a34 --- /dev/null +++ b/_to_remove/recipes-wam/chromium/chromium.inc @@ -0,0 +1,354 @@ +# Copyright (c) 2018 LG Electronics, Inc. + +SUMMARY = "Chromium webruntime for webOS" +AUTHOR = "Lokesh Kumar Goel <lokeshkumar.goel@lge.com>" +SECTION = "webos/apps" +LICENSE = "Apache-2.0 & BSD-3-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = "\ + file://src/LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d \ + file://src/third_party/blink/renderer/core/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ + file://src/third_party/blink/renderer/core/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ +" + +require gn-utils.inc + +inherit gettext qemu pythonnative + +DEPENDS = "virtual/gettext wayland wayland-native pixman freetype glib-2.0 fontconfig openssl pango cairo icu libxkbcommon libexif dbus pciutils udev libcap alsa-lib virtual/egl elfutils-native libdrm atk at-spi2-atk gperf-native gconf nss nss-native nspr nspr-native bison-native qemu-native" + +PROVIDES = "${BROWSER_APPLICATION}" + +SRCREV_v8 = "1e3af71f1ff3735e8a5b639c48dfca63a7b8a647" + +# we don't include SRCPV in PV, so we have to manually include SRCREVs in do_fetch vardeps +do_fetch[vardeps] += "SRCREV_v8" +SRCREV_FORMAT = "main_v8" + +S = "${WORKDIR}/git" + +SRC_DIR = "${S}/src" +BUILD_TYPE = "Release" + +B = "${WORKDIR}/build" +OUT_DIR = "${B}/${BUILD_TYPE}" + +WEBRUNTIME_BUILD_TARGET = "webos:weboswebruntime" +BROWSER_APP_BUILD_TARGET = "chrome" +BROWSER_APPLICATION = "chromium84-browser" +BROWSER_APPLICATION_DIR = "/opt/chromium84" + +TARGET = "${WEBRUNTIME_BUILD_TARGET} ${BROWSER_APP_BUILD_TARGET}" + +# Skip do_install:append of webos_system_bus. It is not compatible with this component. +WEBOS_SYSTEM_BUS_FILES_LOCATION = "${S}/files/sysbus" + +PACKAGECONFIG ?= "jumbo use-upstream-wayland" + + +# Set a default value for jumbo file merge of 8. This should be good for build +# servers and workstations with a big number of cores. In case build is +# happening in a machine with less cores but still enough RAM a good value could +# be 50. +JUMBO_FILE_MERGE_LIMIT="8" +PACKAGECONFIG[jumbo] = "use_jumbo_build=true jumbo_file_merge_limit=${JUMBO_FILE_MERGE_LIMIT}, use_jumbo_build=false" + +PACKAGECONFIG[lttng] = "use_lttng=true,use_lttng=false,lttng-ust,lttng-tools lttng-modules babeltrace" + +# Chromium can use v4l2 device for hardware accelerated video decoding on such boards as Renesas R-car M3, for example. +# In case of R-car m3, additional patches are required for gstreamer and v4l2apps. +# See https://github.com/igel-oss/meta-browser-hwdecode/tree/igalia-chromium71. +PACKAGECONFIG[use-linux-v4l2] = "use_v4l2_codec=true use_v4lplugin=true use_linux_v4l2_only=true" + +PACKAGECONFIG[use-upstream-wayland] = " \ + ozone_platform_wayland_external=false ozone_platform_wayland=true, \ + ozone_platform_wayland_external=true ozone_platform_wayland=false \ +" + +GN_ARGS = "\ + enable_memorymanager_webapi=false\ + ffmpeg_branding=\"Chrome\"\ + host_os=\"linux\"\ + ozone_auto_platforms=false\ + proprietary_codecs=true\ + target_os=\"linux\"\ + treat_warnings_as_errors=false\ + is_agl=true\ + use_cbe=true\ + is_chrome_cbe=true\ + is_component_build=false\ + use_cups=false\ + use_custom_libcxx=false\ + use_kerberos=false\ + use_neva_media=false\ + use_ozone=true\ + use_xkbcommon=true\ + use_wayland_gbm=false\ + use_pmlog=false\ + use_system_debugger_abort=true\ + ${PACKAGECONFIG_CONFARGS}\ +" + +# From Chromium's BUILDCONFIG.gn: +# Set to enable the official build level of optimization. This has nothing +# to do with branding, but enables an additional level of optimization above +# release (!is_debug). This might be better expressed as a tri-state +# (debug, release, official) but for historical reasons there are two +# separate flags. +# See also: https://groups.google.com/a/chromium.org/d/msg/chromium-dev/hkcb6AOX5gE/PPT1ukWoBwAJ +GN_ARGS += "is_debug=false is_official_build=true" + +# is_cfi default value is true for x86-64 builds with is_official_build=true. +# As of M63, we explicitly need to set it to false, otherwise we fail the +# following assertion in //build/config/sanitizers/sanitizers.gni: +# assert(!is_cfi || is_clang, +# "is_cfi requires setting is_clang = true in 'gn args'") +GN_ARGS += "is_cfi=false" + +# By default, passing is_official_build=true to GN causes its symbol_level +# variable to be set to "2". This means the compiler will be passed "-g2" and +# we will end up with a very large chrome binary (around 5Gb as of M58) +# regardless of whether DEBUG_BUILD has been set or not. In addition, binutils, +# file and other utilities are unable to read a 32-bit binary this size, which +# causes it not to be stripped. +# The solution is two-fold: +# 1. Make sure -g is not passed on 32-bit architectures via DEBUG_FLAGS. -g is +# the same as -g2. -g1 generates an 800MB binary, which is a lot more +# manageable. +# 2. Explicitly pass symbol_level=0 to GN. This causes -g0 to be passed +# instead, so that if DEBUG_BUILD is not set GN will not create a huge debug +# binary anyway. Since our compiler flags are passed after GN's, -g0 does +# not cause any issues if DEBUG_BUILD is set, as -g1 will be passed later. +DEBUG_FLAGS:remove:arm = "-g" +DEBUG_FLAGS:append:arm = "-g1" +DEBUG_FLAGS:remove:x86 = "-g" +DEBUG_FLAGS:append:x86 = "-g1" +GN_ARGS += "symbol_level=0" + +# We do not want to use Chromium's own Debian-based sysroots, it is easier to +# just let Chromium's build system assume we are not using a sysroot at all and +# let Yocto handle everything. +GN_ARGS += "use_sysroot=false" + +# ARM builds need special additional flags (see ${S}/build/config/arm.gni). +# If we do not pass |arm_arch| and friends to GN, it will deduce a value that +# will then conflict with TUNE_CCARGS and CC. +# Note that as of M61 in some corner cases parts of the build system disable +# the "compiler_arm_fpu" GN config, whereas -mfpu is always passed via ${CC}. +# We might want to rework that if there are issues in the future. +def get_compiler_flag(params, param_name, d): + """Given a sequence of compiler arguments in |params|, returns the value of + an option |param_name| or an empty string if the option is not present.""" + for param in params: + if param.startswith(param_name): + return param.split('=')[1] + return '' + +ARM_FLOAT_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d)}" +ARM_FPU = "${@get_compiler_flag(d.getVar('TUNE_CCARGS').split(), '-mfpu', d)}" +ARM_TUNE = "${@get_compiler_flag(d.getVar('TUNE_CCARGS').split(), '-mcpu', d)}" +ARM_VERSION:aarch64 = "8" +ARM_VERSION:armv7a = "7" +ARM_VERSION:armv7ve = "7" +ARM_VERSION:armv6 = "6" + +# GN computes and defaults to it automatically where needed +# forcing it from cmdline breaks build on places where it ends up +# overriding what GN wants +TUNE_CCARGS:remove = "-mthumb" + +GN_ARGS:append:arm = " \ + arm_float_abi=\"${ARM_FLOAT_ABI}\" \ + arm_fpu=\"${ARM_FPU}\" \ + arm_tune=\"${ARM_TUNE}\" \ + arm_version=${ARM_VERSION} \ +" +# tcmalloc's atomicops-internals-arm-v6plus.h uses the "dmb" instruction that +# is not available on (some?) ARMv6 models, which causes the build to fail. +GN_ARGS:append:armv6 += 'use_allocator="none"' +# The WebRTC code fails to build on ARMv6 when NEON is enabled. +# https://bugs.chromium.org/p/webrtc/issues/detail?id=6574 +GN_ARGS:append:armv6 += 'arm_use_neon=false' + +# Disable glibc shims on musl +# tcmalloc does not play well with musl as of M62 (and possibly earlier). +# https://github.com/gperftools/gperftools/issues/693 +GN_ARGS:append:libc-musl = ' use_allocator_shim=false' + +# More options to speed up the build +GN_ARGS += "\ + enable_nacl=false\ + disable_ftp_support=true\ + enable_print_preview=false\ + enable_remoting=false\ + use_glib=true\ + use_gnome_keyring=false\ + use_pulseaudio=false\ +" + +# Doesn't build for armv[45]* +COMPATIBLE_MACHINE = "(-)" +COMPATIBLE_MACHINE:aarch64 = "(.*)" +COMPATIBLE_MACHINE:armv6 = "(.*)" +COMPATIBLE_MACHINE:armv7a = "(.*)" +COMPATIBLE_MACHINE:armv7ve = "(.*)" +COMPATIBLE_MACHINE:x86 = "(.*)" +COMPATIBLE_MACHINE:x86-64 = "(.*)" + +#CHROMIUM_PLUGINS_PATH = "${libdir}" +CBE_DATA_PATH = "${libdir}/cbe" +CBE_DATA_LOCALES_PATH = "${CBE_DATA_PATH}/locales" + +# The text relocations are intentional -- see comments in [GF-52468] +# TODO: check if we need INSANE_SKIP on ldflags +INSANE_SKIP:${PN} = "textrel ldflags" + + +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+" +do_compile() { + if [ ! -f ${OUT_DIR}/build.ninja ]; then + do_configure + fi + + export PATH="${S}/depot_tools:$PATH" + ${S}/depot_tools/ninja ${PARALLEL_MAKE} -v -C ${OUT_DIR} ${TARGET} +} + +do_configure() { + configure_env +} + +configure_env() { + export GYP_CHROMIUM_NO_ACTION=1 + export PATH="${S}/depot_tools:$PATH" + + GN_ARGS="${GN_ARGS}" + echo GN_ARGS is ${GN_ARGS} + echo BUILD_TARGETS are ${TARGET} + cd ${SRC_DIR} + gn gen ${OUT_DIR} --args="${GN_ARGS}" +} + +WINDOW_SIZE ?= "1920,1080" + +configure_browser_settings() { + USER_AGENT="Mozilla/5.0 (Linux; NetCast; U) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/${CHROMIUM_VERSION} Safari/537.31" + echo "${USER_AGENT}" > ${D_DIR}/user_agent_conf + #We can replace below WINDOW_SIZE values from build configuration if available + #echo "${WINDOW_SIZE}" > ${D_DIR}/window_size_conf +} + +install_chromium_browser() { + # Install browser files + ${S}/depot_tools/ninja ${PARALLEL_MAKE} -C ${OUT_DIR} webos/install/default_browser + + D_DIR=${D}${BROWSER_APPLICATION_DIR} + L_DIR=${D}${CBE_DATA_PATH} + install -d ${D_DIR} + install -d ${L_DIR} + + cp -R --no-dereference --preserve=mode,links -v ${OUT_DIR}/image/${BROWSER_APPLICATION_DIR}/* ${D_DIR} + + # AGL does not have PMLOG + sed -i.bak s/PmLogCtl.*// ${D_DIR}/run_webbrowser + + # To execute chromium in JAILER, Security Part needs permissions change + # run_webbrowser: Script file for launching chromium + chmod -v 755 ${D_DIR}/chrome + chmod -v 755 ${D_DIR}/kill_webbrowser + chmod -v 755 ${D_DIR}/run_webbrowser + + configure_browser_settings +} + +install_webruntime() { + + # # Generate install webos webview files + # ${S}/depot_tools/ninja ${PARALLEL_MAKE} -C ${OUT_DIR} webos/install/weboswebruntime + + # # Move installation files to D directory + # mv ${OUT_DIR}/image/* ${D} + # # Rename include and locale directories + # mv ${D}${includedir}/webruntime ${D}${includedir}/${BPN} + # mv ${D}${CBE_DATA_PATH}/neva_locales ${D}${CBE_DATA_LOCALES_PATH} + + # # move this to separate mksnapshot-cross recipe once we figure out how to build just cross mksnapshot from chromium repository + # install -d ${D}${bindir_cross} + # gzip -c ${OUT_DIR}/${MKSNAPSHOT_PATH}mksnapshot > ${D}${bindir_cross}/${HOST_SYS}-mksnapshot.gz + + install -d ${D}${libdir} + install -d ${D}${libdir}/swiftshader + install -d ${D}${includedir}/${BPN} + install -d ${D}${CBE_DATA_PATH} + install -d ${D}${CBE_DATA_LOCALES_PATH} + + # Install webos webview files + ${S}/depot_tools/ninja ${PARALLEL_MAKE} -C ${OUT_DIR} webos/install/weboswebruntime + + install -v -m 0644 ${OUT_DIR}/swiftshader/*.so ${D}${libdir}/swiftshader + + cp -R --no-dereference --preserve=mode,links -v ${OUT_DIR}/image/${includedir}/${BPN}/* ${D}${includedir}/${BPN}/ + install -v -m 0644 ${OUT_DIR}/image/${libdir}/*.so ${D}${libdir} + + install -v -m 0644 ${OUT_DIR}/image/${CBE_DATA_PATH}/icudtl.dat ${D}${CBE_DATA_PATH} + install -v -m 0644 ${OUT_DIR}/image/${CBE_DATA_PATH}/snapshot_blob.bin ${D}${CBE_DATA_PATH} + # app_runtime_content.pak, webos_content.pak, extensions_shell_and_test.pak + install -v -m 0644 ${OUT_DIR}/image/${CBE_DATA_PATH}/*.pak ${D}${CBE_DATA_PATH} + + cp -R --no-dereference --preserve=mode,links -v ${OUT_DIR}/image/${CBE_DATA_LOCALES_PATH}/*.pak ${D}${CBE_DATA_LOCALES_PATH} + + chown root:root -R ${D}${libdir} + chown root:root -R ${D}${includedir} + chown root:root -R ${D}${CBE_DATA_LOCALES_PATH} + + # move this to separate mksnapshot-cross recipe once we figure out how to build just cross mksnapshot from chromium repository + install -d ${D}${base_bindir} + gzip -c ${OUT_DIR}/${MKSNAPSHOT_PATH}mksnapshot > ${D}${base_bindir}/${HOST_SYS}-mksnapshot.gz + +} + +do_install() { + install_webruntime + install_chromium_browser +} + +WEBOS_SYSTEM_BUS_DIRS_LEGACY_BROWSER_APPLICATION = " \ + ${webos_sysbus_prvservicesdir}/${BROWSER_APPLICATION}.service \ + ${webos_sysbus_pubservicesdir}/${BROWSER_APPLICATION}.service \ + ${webos_sysbus_prvrolesdir}/${BROWSER_APPLICATION}.json \ + ${webos_sysbus_pubrolesdir}/${BROWSER_APPLICATION}.json \ +" + +SYSROOT_DIRS:append = " ${bindir_cross}" + +PACKAGES:prepend = " \ + ${PN}-cross-mksnapshot \ + ${BROWSER_APPLICATION} \ +" + +FILES:${BROWSER_APPLICATION} += " \ + ${BROWSER_APPLICATION_DIR} \ + ${WEBOS_SYSTEM_BUS_DIRS_LEGACY_BROWSER_APPLICATION} \ +" + +RDEPENDS:${BROWSER_APPLICATION} += "${PN}" + +VIRTUAL-RUNTIME_gpu-libs ?= "" +RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_gpu-libs}" + +# The text relocations are intentional -- see comments in [GF-52468] +# TODO: check if we need INSANE_SKIP on ldflags +INSANE_SKIP:${BROWSER_APPLICATION} += "libdir ldflags textrel" + +FILES:${PN} = " \ + ${libdir}/*.so \ + ${libdir}/swiftshader/*.so \ + ${CBE_DATA_PATH}/* \ + ${libdir}/${BPN}/*.so \ + ${WEBOS_SYSTEM_BUS_DIRS} \ +" + +FILES:${PN}-dev = " \ + ${includedir} \ +" + +FILES:${PN}-cross-mksnapshot = "${bindir_cross}/${HOST_SYS}-mksnapshot.gz" diff --git a/_to_remove/recipes-wam/chromium/chromium84_git.bb b/_to_remove/recipes-wam/chromium/chromium84_git.bb new file mode 100644 index 000000000..755c4ce92 --- /dev/null +++ b/_to_remove/recipes-wam/chromium/chromium84_git.bb @@ -0,0 +1,81 @@ +require chromium.inc + +SRC_URI = "\ + git://github.com/igalia/${PN};branch=koi;protocol=https;rev=${SRCREV_chromium84};name=chromium84 \ + git://github.com/webosose/chromium-v8;branch=@chromium84;destsuffix=git/src/v8;rev=${SRCREV_v8};name=v8 \ + file://add-a-delay-to-agl-ready-event.patch \ + file://chromium-quiche-invalid-offsetof.patch \ + file://chromium-skia-no_sanitize.patch \ +" + +# Needed by catapult +DEPENDS += "libhomescreen python-six-native python-beautifulsoup4-native python-lxml-native python-html5lib-native python-webencodings-native" + +SRCREV_chromium84 = "17ab9d58b9d5da9102b119d39cf49a002e61ea1b" +SRCREV_v8 = "5c1d89dd2945a10cf7a6a3458050b3177a870b09" + +BROWSER_APPLICATION = "chromium84-browser" +BROWSER_APPLICATION_DIR = "/opt/chromium84" +MKSNAPSHOT_PATH = "v8_snapshot/" + +PACKAGECONFIG:remove="jumbo" + +GN_ARGS += "use_gtk=false" + +# Disable closure_compile +# Else we need HOSTTOOLS += "java" +GN_ARGS += "closure_compile=false" + +# When using meta-clang, one can switch to using the lld linker +# by using the ld-is-lld distro feature otherwise use gold linker +GN_ARGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', 'use_lld=true use_gold=false', bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'use_lld=false use_gold=true', 'use_lld=false use_gold=false', d), d)}" + +# Toolchains we will use for the build. We need to point to the toolchain file +# we've created, set the right target architecture and make sure we are not +# using Chromium's toolchain (bundled clang, bundled binutils etc). +GN_ARGS += "\ + host_toolchain=\"//build/toolchain/cros:host\" \ + cros_host_is_clang=false \ + use_custom_libcxx_for_host=false \ + cros_host_ar=\"${BUILD_AR}\" \ + cros_host_cc=\"${BUILD_CC} ${BUILD_CFLAGS}\" \ + cros_host_cxx=\"${BUILD_CXX} ${BUILD_CXXFLAGS}\" \ + cros_host_extra_ldflags=\"${BUILD_LDFLAGS}\" \ + custom_toolchain=\"//build/toolchain/cros:target\" \ + is_clang=false \ + use_custom_libcxx=false \ + target_cpu=\"${@gn_arch_name('${TUNE_ARCH}')}\" \ + cros_target_ar=\"${AR}\" \ + cros_target_cc=\"${CC}\" \ + cros_target_cxx=\"${CXX}\" \ + cros_target_extra_ldflags=\"${LDFLAGS}\" \ + v8_snapshot_toolchain=\"//build/toolchain/cros:v8_snapshot\" \ + cros_v8_snapshot_is_clang=false \ + cros_v8_snapshot_ar=\"${BUILD_AR}\" \ + cros_v8_snapshot_cc=\"${BUILD_CC}\" \ + cros_v8_snapshot_cxx=\"${BUILD_CXX}\" \ + linux_use_bundled_binutils=false \ + gold_path=\"\" \ + v8_enable_embedded_builtins=false \ + use_v8_context_snapshot=false \ +" + +GN_ARGS:append = " \ + use_system_minigbm=false \ + use_wayland_gbm=false \ +" + +GN_ARGS:append = " \ + is_webos=false \ + is_agl=true \ +" + +# TODO: drop this after we migrate to ubuntu 16.04 or above +GN_ARGS += "\ + fatal_linker_warnings=false\ +" + +# TODO(rzanoni) copied from original recipe to fix qemux86 build. +# check if it can be removed in the future. +PACKAGECONFIG:remove:qemux86 = "gstreamer umediaserver neva-media gav neva-webrtc" +#END TODO diff --git a/_to_remove/recipes-wam/chromium/files/add-a-delay-to-agl-ready-event.patch b/_to_remove/recipes-wam/chromium/files/add-a-delay-to-agl-ready-event.patch new file mode 100644 index 000000000..20caccbf6 --- /dev/null +++ b/_to_remove/recipes-wam/chromium/files/add-a-delay-to-agl-ready-event.patch @@ -0,0 +1,70 @@ +From d2d09d3e13a3874961971d343553106a1f3d5ac7 Mon Sep 17 00:00:00 2001 +From: Roger Zanoni <rzanoni@igalia.com> +Date: Thu, 3 Jun 2021 10:53:40 +0200 +Subject: [PATCH] Add a delay to agl ready event + +Delay ready() to ensure that all the window and surfaces setup +is done before notifying the compositor +--- + .../ozone/platform/wayland/host/wayland_window.cc | 14 +++++++++++++- + .../ozone/platform/wayland/host/wayland_window.h | 5 +++++ + 2 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/src/ui/ozone/platform/wayland/host/wayland_window.cc b/src/ui/ozone/platform/wayland/host/wayland_window.cc +index d2a9b0dae5..27749fd70d 100644 +--- a/src/ui/ozone/platform/wayland/host/wayland_window.cc ++++ b/src/ui/ozone/platform/wayland/host/wayland_window.cc +@@ -299,7 +299,19 @@ WaylandWindow::SetAglReady(void) + if (!connection_->agl_shell_manager) { + return; + } +- connection_->agl_shell_manager->ready(); ++ ++ // Delay activation to ensure that all the setup is done ++ // TODO(rzanoni): find a more deterministic way of doing this ++ set_ready_timer_.Start(FROM_HERE, ++ base::TimeDelta::FromMilliseconds(500), ++ this, ++ &WaylandWindow::SetReadyCallback); ++} ++ ++ ++void WaylandWindow::SetReadyCallback() { ++ connection_->agl_shell_manager->ready(); ++ connection_->ScheduleFlush(); + } + + bool WaylandWindow::CanDispatchEvent(const PlatformEvent& event) { +diff --git a/src/ui/ozone/platform/wayland/host/wayland_window.h b/src/ui/ozone/platform/wayland/host/wayland_window.h +index 2acac98ae9..c10db38d21 100644 +--- a/src/ui/ozone/platform/wayland/host/wayland_window.h ++++ b/src/ui/ozone/platform/wayland/host/wayland_window.h +@@ -15,6 +15,7 @@ + #include "base/containers/flat_set.h" + #include "base/gtest_prod_util.h" + #include "base/memory/ref_counted.h" ++#include "base/timer/timer.h" + #include "ui/events/platform/platform_event_dispatcher.h" + #include "ui/gfx/geometry/rect.h" + #include "ui/gfx/native_widget_types.h" +@@ -232,6 +233,8 @@ class WaylandWindow : public PlatformWindow, public PlatformEventDispatcher { + // Returns a root parent window. + WaylandWindow* GetRootParentWindow(); + ++ void SetReadyCallback(); ++ + // Install a surface listener and start getting wl_output enter/leave events. + void AddSurfaceListener(); + +@@ -311,6 +314,8 @@ class WaylandWindow : public PlatformWindow, public PlatformEventDispatcher { + // The type of the current WaylandWindow object. + ui::PlatformWindowType type_ = ui::PlatformWindowType::kWindow; + ++ base::OneShotTimer set_ready_timer_; ++ + DISALLOW_COPY_AND_ASSIGN(WaylandWindow); + }; + +-- +2.32.0 + diff --git a/_to_remove/recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch b/_to_remove/recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch new file mode 100644 index 000000000..4fdd98de4 --- /dev/null +++ b/_to_remove/recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch @@ -0,0 +1,57 @@ +From 4cea86e76af28b28aa72cb7c69ff7cf242b2bd5d Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann <stha09@googlemail.com> +Date: Sat, 27 Jun 2020 12:18:05 +0000 +Subject: [PATCH] GCC: supress invalid-offsetof warning + +GCC emits a warning if offsetof is used for non-POD +types. However, GCC supports this and prints only +the warning, because it might be nonportable code. +Disable the warning for GCC with a pragma. +--- + src/net/third_party/quiche/src/quic/core/frames/quic_frame.h | 7 +++++++ + .../quiche/src/quic/core/frames/quic_inlined_frame.h | 7 +++++++ + 2 files changed, 14 insertions(+) + +diff --git a/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h b/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h +index 756b69f..aceba76 100644 +--- a/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h ++++ b/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h +@@ -110,8 +110,15 @@ struct QUIC_EXPORT_PRIVATE QuicFrame { + + static_assert(sizeof(QuicFrame) <= 24, + "Frames larger than 24 bytes should be referenced by pointer."); ++#if defined(__GNUC__) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Winvalid-offsetof" ++#endif + static_assert(offsetof(QuicStreamFrame, type) == offsetof(QuicFrame, type), + "Offset of |type| must match in QuicFrame and QuicStreamFrame"); ++#if defined(__GNUC__) ++#pragma GCC diagnostic pop ++#endif + + // A inline size of 1 is chosen to optimize the typical use case of + // 1-stream-frame in QuicTransmissionInfo.retransmittable_frames. +diff --git a/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h b/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h +index 08c4869..804e4bb 100644 +--- a/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h ++++ b/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h +@@ -17,8 +17,15 @@ namespace quic { + template <typename DerivedT> + struct QUIC_EXPORT_PRIVATE QuicInlinedFrame { + QuicInlinedFrame(QuicFrameType type) : type(type) { ++#if defined(__GNUC__) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Winvalid-offsetof" ++#endif + static_assert(offsetof(DerivedT, type) == 0, + "type must be the first field."); ++#if defined(__GNUC__) ++#pragma GCC diagnostic pop ++#endif + static_assert(sizeof(DerivedT) <= 24, + "Frames larger than 24 bytes should not be inlined."); + } +-- +2.26.2 + diff --git a/_to_remove/recipes-wam/chromium/files/chromium-skia-no_sanitize.patch b/_to_remove/recipes-wam/chromium/files/chromium-skia-no_sanitize.patch new file mode 100644 index 000000000..abfba57ab --- /dev/null +++ b/_to_remove/recipes-wam/chromium/files/chromium-skia-no_sanitize.patch @@ -0,0 +1,63 @@ +From 04765936a0a8dd3ac3f530786fce6b5cea826d3e Mon Sep 17 00:00:00 2001 +From: Roger Zanoni <rzanoni@igalia.com> +Date: Wed, 24 Feb 2021 13:50:27 +0100 +Subject: [PATCH] [skia][build] fix skia no_sanitize build issues for gcc + +Based on https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-skia-no_sanitize.patch + +--- + .../skia/include/private/SkFloatingPoint.h | 24 +++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/src/third_party/skia/include/private/SkFloatingPoint.h b/src/third_party/skia/include/private/SkFloatingPoint.h +index 110dda2ae4..8223e9b57d 100644 +--- a/src/third_party/skia/include/private/SkFloatingPoint.h ++++ b/src/third_party/skia/include/private/SkFloatingPoint.h +@@ -159,7 +159,15 @@ static inline int64_t sk_float_saturate2int64(float x) { + // Cast double to float, ignoring any warning about too-large finite values being cast to float. + // Clang thinks this is undefined, but it's actually implementation defined to return either + // the largest float or infinity (one of the two bracketing representable floats). Good enough! ++#if defined(__GNUC__) && __GNUC__ >= 8 ++__attribute__((no_sanitize("float-cast-overflow"))) ++#else ++# if defined(__GNUC__) ++__attribute__((no_sanitize_undefined)) ++# else + [[clang::no_sanitize("float-cast-overflow")]] ++# endif ++#endif + static inline float sk_double_to_float(double x) { + return static_cast<float>(x); + } +@@ -226,12 +234,28 @@ static inline float sk_float_rsqrt(float x) { + // IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not + // so we have a helper that suppresses the possible undefined-behavior warnings. + ++#if defined(__GNUC__) && __GNUC__ >= 8 ++__attribute__((no_sanitize("float-divide-by-zero"))) ++#else ++# if defined(__GNUC__) ++__attribute__((no_sanitize_undefined)) ++# else + [[clang::no_sanitize("float-divide-by-zero")]] ++# endif ++#endif + static inline float sk_ieee_float_divide(float numer, float denom) { + return numer / denom; + } + ++#if defined(__GNUC__) && __GNUC__ >= 8 ++__attribute__((no_sanitize("float-cast-overflow"))) ++#else ++# if defined(__GNUC__) ++__attribute__((no_sanitize_undefined)) ++# else + [[clang::no_sanitize("float-divide-by-zero")]] ++# endif ++#endif + static inline double sk_ieee_double_divide(double numer, double denom) { + return numer / denom; + } +-- +2.30.1 + diff --git a/_to_remove/recipes-wam/chromium/gn-utils.inc b/_to_remove/recipes-wam/chromium/gn-utils.inc new file mode 100644 index 000000000..156b56d2d --- /dev/null +++ b/_to_remove/recipes-wam/chromium/gn-utils.inc @@ -0,0 +1,32 @@ +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +def gn_arch_name(yocto_arch): + """Translates between Yocto's architecture values and the corresponding + ones used by GN.""" + translation_table = { + 'aarch64': 'arm64', + 'arm': 'arm', + 'i586': 'x86', + 'i686': 'x86', + 'x86_64': 'x64', + } + try: + return translation_table[yocto_arch] + except KeyError: + bb.fatal('"%s" is not a supported architecture.' % yocto_arch) diff --git a/_to_remove/recipes-wam/wam/files/WebAppMgr.env b/_to_remove/recipes-wam/wam/files/WebAppMgr.env new file mode 100644 index 000000000..c8ddc5173 --- /dev/null +++ b/_to_remove/recipes-wam/wam/files/WebAppMgr.env @@ -0,0 +1,202 @@ +##### AGL: not set in WebAppMgr@.service +#XDG_SESSION_ID="c2" + +##### AGL: set by WebAppMgr@.service (depends on user) +#XDG_RUNTIME_DIR="/run/user/%i" + +# Set wam executable file path +HOOK_SEGV=NO +WAM_EXE_PATH="/usr/bin/WebAppMgr" + +# Set wam name for user-agent +WAM_NAME="WebAppManager" + +# Only allow UTF8 encoding for luna-service messages. +LS_ENABLE_UTF8=1 + +# Set effective userid and groupid +#WAM_UID="wam" +#WAM_GID="compositor" + +# Set location of error page (will follow localization rules based on this path) +#WAM_ERROR_PAGE="file:///usr/share/localization/wam/loaderror.html" + +# suspending javascript execution delay for page visibility +WAM_SUSPEND_DELAY_IN_MS=250 + +#if [ -e "etc/wam/make_shm.sh" ] ; then +# /etc/wam/make_shm.sh +#fi + +# Set user data directory for WebAppMgr +##### AGL: set by WebAppMgr@.service (depends on user) +#WAM_DATA_PATH="/home/%i/wamdata" + +# ensure that wam data directories exist +#mkdir -p ${WAM_DATA_PATH} + +# set directories permission +#chown ${WAM_UID}:${WAM_GID} ${WAM_DATA_PATH} + +# setup 50 Mb maximum for ApplicationCache +WAM_APPCACHE_MAXSIZE=52428800 + +# setup 10 Mb maximum for ApplicationCache per domain +WAM_APPCACHE_DOMAINLIMIT=10485760 + +# setup 50 Mb maximum for DiskCache +WAM_DISKCACHE_MAXSIZE=52428800 + +# setup 256 Kb maximum for resource buffer allocation +WAM_RESOURCE_BUFFER_MAX_ALLOC_SIZE=262144 + +# setup 1 Mb for resource buffer +WAM_RESOURCE_BUFFER_SIZE=1048576 + +# setup 200 seconds for watchdog timeout of render process +WATCHDOG_RENDER_TIMEOUT=200 + +# setup nubmer of raster threads to 1 +BLINK_NUM_RASTER_THREADS=2 + +# use default tile width if not sed by recipe +#if [ "$BLINK_NUM_RASTER_THREADS" = "WEBOS${BLINK_NUM_RASTER_THREADS#WEBOS}" ]; then +BLINK_NUM_RASTER_THREADS=1 +#fi + +# setup 6 Mb maximum for the program GPU cache +GPU_PROGRAM_CACHE_SIZE=6144 + +# disable using enyo system app specfic optimization +# currently used optimizations : inline caching off +#USE_SYSTEM_APP_OPTIMIZATION="0" + +# Set location of NaCl modules +#CHROMIUM_PATH="/usr/palm/applications/com.lge.app.chromium" +#NACL_PLUGIN=${CHROMIUM_PATH}"/libppGoogleNaClPluginChrome.so" +#NACL_IRT_LIBRARY=${CHROMIUM_PATH}"/nacl_irt_arm.nexe" +#NACL_HELPER=${CHROMIUM_PATH}"/nacl_helper" +#NACL_HELPER_BOOTSTRAP=${CHROMIUM_PATH}"/nacl_helper_bootstrap" + +# Set location of NPAPI plugins for all Apps including default Apps +# This is for the flash plugin of Signage, webOS TV doesn't use it. +#PRIVILEGED_PLUGIN_PATH="" + +# Set location of NPAPI plugins for NetCast Apps +# NetCast Apps should access only the plugins in this path +#NETCAST_PLUGIN_PATH="/usr/lib/BrowserPlugins" + +# Set location of NPAPI plugins for HbbTV app. +#HBBTV_PLUGIN_PATH="/usr/lib/HbbtvPlugins" + +# Set InetTV player stored path +#INETTV_HTML_PLAYER_PATH="/usr/share/inettv/inettv_player/index.html" + +# Set location of extra libraries +#CDM_LIB_PATH="/usr/lib" + +# Set location of all NPAPI plugins +NPAPI_PLUGIN_PATH=${HBBTV_PLUGIN_PATH}":"${NETCAST_PLUGIN_PATH}":"${PRIVILEGED_PLUGIN_PATH} + +#if [ -e "etc/wam/make_shm.sh" ] ; then +# /etc/wam/make_shm.sh +#fi + +# setup 8 Mb minimum codecache capacity +JSC_minGlobalCodeCacheCapacity=8388608 + +# Enable more explicit logging of timing with regards to rendering +# export WAM2_ENABLE_DEBUG_RENDER_TIMING=1 + +# enable Web Inspector and Tellurium if in developer mode +TELLURIUM_NUB_PATH=/usr/palm/tellurium/telluriumnub.js +ENABLE_INSPECTOR=1 + +# Enable cursor by default +ENABLE_CURSOR_BY_DEFAULT=1 + +# Enable launch optimization +ENABLE_LAUNCH_OPTIMIZATION=1 + +# Set the duration(seconds) passed from last network activity (e.g. FMP Detector) +# If set to a positive value, adjust a custom timeout for a network stable timer in FMPDetector +NETWORK_STABLE_TIMEOUT=3 + +# please keep it in alphabetical order +#WAM_EXTRA_FLAGS="" +#WAM_JS_FLAGS="" +#WAM_COMMON_SWITCHES=" \ +# --application-cache-domain-limit=$WAM_APPCACHE_DOMAINLIMIT \ +# --application-cache-size=$WAM_APPCACHE_MAXSIZE \ +# --browser-subprocess-path=$WAM_EXE_PATH \ +# --disable-direct-npapi-requests \ +# --disable-extensions \ +# --disable-low-res-tiling \ +# --disable-new-video-renderer \ +# --disk-cache-size=$WAM_DISKCACHE_MAXSIZE \ +# --enable-aggressive-release-policy \ +# --enable-accelerated-plugin-rendering \ +# --accelerated-plugin-rendering-blacklist=device;drmAgent;sound;service \ +# --enable-gpu-rasterization \ +# --disable-gpu-rasterization-for-first-frame \ +# --enable-key-event-throttling \ +# --enable-threaded-compositing \ +# --enable-watchdog \ +# --hide-selection-handles \ +# --ignore-gpu-blacklist \ +# --ignore-netif=p2p \ +# --in-process-gpu \ +# --max-unused-resource-memory-usage-percentage=0 \ +# --network-stable-timeout=$NETWORK_STABLE_TIMEOUT \ +# --noerrdialogs \ +# --num-raster-threads=$BLINK_NUM_RASTER_THREADS \ +# --ozone-platform=wayland \ +# --remote-debugging-port=9998 \ +# --resource-buffer-max-allocation-size=$WAM_RESOURCE_BUFFER_MAX_ALLOC_SIZE \ +# --resource-buffer-size=$WAM_RESOURCE_BUFFER_SIZE \ +# --touch-events=disabled \ +# --ui-disable-opaque-shader-program \ +# --user-agent-suffix=SmartTV \ +# --user-data-dir=$WAM_DATA_PATH \ +# --enable-devtools-experiments \ +# --webos-wam \ " + +#WAM_LITE_SWITCHES=" --in-process-zygote " + +#export WAM_WEBOS_LITE=NO +#if [ "${WAM_WEBOS_LITE}" = "YES" ] ; then +# export WAM_SWITCHES=${WAM_COMMON_SWITCHES}${WAM_LITE_SWITCHES} +# export SKIA_FONT_CACHE_SIZE=1 +# export SKIA_IMAGE_CACHE_SIZE=40 +# export SKIA_BACKGROUND_FONT_CACHE_SIZE=0 +#else +# export WAM_SWITCHES=${WAM_COMMON_SWITCHES} +# export SKIA_FONT_CACHE_SIZE=8 +# export SKIA_IMAGE_CACHE_SIZE=80 +# export SKIA_BACKGROUND_FONT_CACHE_SIZE=512 +#fi + +#export WAM_EXTRA_SKIA_CACHE_SWITCHES=" \ +# --skia-font-cache-size-mb=$SKIA_FONT_CACHE_SIZE \ +# --skia-image-cache-size-mb=$SKIA_IMAGE_CACHE_SIZE \ +# --skia-background-font-cache-size-kb=$SKIA_BACKGROUND_FONT_CACHE_SIZE \ +# " + +#export WAM_EXTRA_GPU_TUNING_SWITCHES=" \ +# --gpu-program-cache-size-kb=$GPU_PROGRAM_CACHE_SIZE \ +# " +#export WAM_WATCHDOG_RENDER_TIMEOUT_SWITCHES=" \ +# --watchdog-render-timeout=$WATCHDOG_RENDER_TIMEOUT \ +# " + +#WEBOS_LOAD_ACCESSIBILITY_PLUGIN=1 + +#WAM_V8_CODE_CACHE_SWITCHES=" --enable-local-resource-code-cache --disallow-code-cache-from-file-uris-with-query-string " + +# Load any special configuration from plugins +#if [ -e "/etc/wam/plugins/conf.sh" ] ; then +# . /etc/wam/plugins/conf.sh || true +#fi + +#exec $WAM_EXE_PATH $WAM_SWITCHES $WAM_EXTRA_SKIA_CACHE_SWITCHES $WAM_EXTRA_GPU_TUNING_SWITCHES $WAM_WATCHDOG_RENDER_TIMEOUT_SWITCHES $WAM_EXTRA_FLAGS $WAM_V8_CODE_CACHE_SWITCHES --js-flags="$WAM_JS_FLAGS" + diff --git a/_to_remove/recipes-wam/wam/files/WebAppMgr@.service b/_to_remove/recipes-wam/wam/files/WebAppMgr@.service new file mode 100644 index 000000000..beffd114c --- /dev/null +++ b/_to_remove/recipes-wam/wam/files/WebAppMgr@.service @@ -0,0 +1,37 @@ +# @@@LICENSE +# +# Copyright (c) 2017-2018 LG Electronics, Inc. +# +# Confidential computer software. Valid license from LG required for +# possession, use or copying. Consistent with FAR 12.211 and 12.212, +# Commercial Computer Software, Computer Software Documentation, and +# Technical Data for Commercial Items are licensed to the U.S. Government +# under vendor's standard commercial license. +# +# LICENSE@@@ + +[Unit] +Description="WebAppMgr is responsible for running web apps and manage their lifecycle" +After=afm-service-homescreen-service--0.1--main@%i.service weston@display.service +Wants=afm-service-homescreen-service--0.1--main@%i.service +BindsTo=weston@display.service + +[Service] +Type=simple +User=%i +Slice=user-%i.slice +SmackProcessLabel=System +SupplementaryGroups=audio display +UMask=0077 +CapabilityBoundingSet= +OOMScoreAdjust=-1000 +EnvironmentFile=-/etc/default/WebAppMgr.env +Environment=XDG_RUNTIME_DIR=/run/user/%i +Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus +Environment=WAM_DATA_PATH="/home/%i/wamdata" +ExecStart=/usr/bin/WebAppMgr --enable-features=UseOzonePlatform --ozone-platform=wayland --no-sandbox --use-viz-fmp-with-timeout=0 --in-process-gpu --remote-debugging-port=9998 --user-data-dir="/home/%i/wamdata" --webos-wam +Restart=on-failure +RestartSec=50 + +[Install] +WantedBy=default.target diff --git a/_to_remove/recipes-wam/wam/files/trunc-webapp-roles.patch b/_to_remove/recipes-wam/wam/files/trunc-webapp-roles.patch new file mode 100644 index 000000000..829abe07f --- /dev/null +++ b/_to_remove/recipes-wam/wam/files/trunc-webapp-roles.patch @@ -0,0 +1,56 @@ +From f31e93261f34abaa3dcdc4959963f5b5a8983002 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <jsmoeller@linuxfoundation.org> +Date: Thu, 25 Jun 2020 19:47:24 +0200 +Subject: [PATCH] Set webapp roles that are max 12 characters long. + +From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= <jaragunde@igalia.com> + +This is a workaround for SPEC-3127. To prevent repeated roles as much +as possible, I'm using the appid as a basis instead of "Webapp-" + +host + port, which has many chances to be redundant in the first 12 +chars. + +Bug-AGL: SPEC-3127 + +--- + src/agl/WebRuntimeAGL.cpp | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/src/agl/WebRuntimeAGL.cpp b/src/agl/WebRuntimeAGL.cpp +index aed928b..efd2ee4 100644 +--- a/src/agl/WebRuntimeAGL.cpp ++++ b/src/agl/WebRuntimeAGL.cpp +@@ -274,7 +274,6 @@ int WebAppLauncherRuntime::run(int argc, const char** argv) { + + m_id = getAppId(args); + m_url = getAppUrl(args); +- m_role = "WebApp"; + + setup_signals(); + +@@ -326,15 +325,9 @@ bool WebAppLauncherRuntime::init() { + if (n != std::string::npos) { + std::string sport = authority.substr(n+1); + m_host = authority.substr(0, n); +- m_role.push_back('-'); +- m_role.append(m_host); +- m_role.push_back('-'); +- m_role.append(sport); + m_port = stringTo<int>(sport); + } else { + m_host = authority; +- m_role.push_back('-'); +- m_role.append(m_host); + } + } + +@@ -375,6 +368,9 @@ bool WebAppLauncherRuntime::init() { + m_role = "homescreen"; + else if (m_id.rfind("webapps-homescreen", 0) == 0) + m_role = "homescreen"; ++ else { ++ m_role = m_id.substr(0,12); ++ } + + LOG_DEBUG("id=[%s], name=[%s], role=[%s], url=[%s], host=[%s], port=%d, token=[%s], width=[%s], height[%s], surface_type[%d], panel_type[%d]", + m_id.c_str(), m_name.c_str(), m_role.c_str(), m_url.c_str(), diff --git a/_to_remove/recipes-wam/wam/files/wam-user-setup.sh b/_to_remove/recipes-wam/wam/files/wam-user-setup.sh new file mode 100755 index 000000000..515ea82ec --- /dev/null +++ b/_to_remove/recipes-wam/wam/files/wam-user-setup.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +uid="$1" +bdir=/run/user +udir="$bdir/$uid" +hdir="/home/$uid" + +dodir() { + local x smackset="$1" + shift + for x; do + test -e "$x" || mkdir -m 700 "$x" + chmod 700 "$x" + chown "$uid:$uid" "$x" + chsmack $smackset "$x" + done +} + +dodir '-t -a User::Home' "$hdir/wamdata" + +# Initialize lockfile, without this apps will be blocked by SMACK +touch "$udir/wamsocket.lock" +chmod 660 "$udir/wamsocket.lock" +chown "$uid:$uid" "$udir/wamsocket.lock" +chsmack -a User::App-Shared "$udir/wamsocket.lock" diff --git a/_to_remove/recipes-wam/wam/files/wam-user-setup@.service b/_to_remove/recipes-wam/wam/files/wam-user-setup@.service new file mode 100644 index 000000000..f4814787d --- /dev/null +++ b/_to_remove/recipes-wam/wam/files/wam-user-setup@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Set up WAM for user %i +Requires=afm-user-setup@i.service +After=user-runtime-dir@%i.service afm-user-setup@i.service +Before=user@%i.service + +[Service] +Type=oneshot +StartLimitInterval=0 +ExecStart=-/usr/libexec/wam/wam-user-setup.sh %i diff --git a/_to_remove/recipes-wam/wam/wam_git.bb b/_to_remove/recipes-wam/wam/wam_git.bb new file mode 100644 index 000000000..9de8573fa --- /dev/null +++ b/_to_remove/recipes-wam/wam/wam_git.bb @@ -0,0 +1,64 @@ +SUMMARY = "WAM" +AUTHOR = "Jani Hautakangas <jani.hautakangas@lge.com>" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake + +DEPENDS = "glib-2.0 jsoncpp boost chromium84 libhomescreen protobuf protobuf-native" + +EXTRA_OECMAKE = "\ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DPLATFORM_NAME=${@'${DISTRO}'.upper().replace('-', '_')} \ + -DCHROMIUM_SRC_DIR=${STAGING_INCDIR}/chromium84" + +PR="r0" + +PROVIDES += "virtual/webruntime" +RPROVIDES:${PN} += "virtual/webruntime" + +# Disable some of securit_flags +# Disable D_FORTIFY_SOURCE=2 and -fstack-protector-strong +# Refer conf/distro/include/security_flags.inc in meta-webos/conf/distro/include/webos.inc +lcl_maybe_fortify = "" +SECURITY_STACK_PROTECTOR = "" + +SRC_URI = "\ + git://github.com/igalia/${BPN}.git;branch=koi;protocol=https \ + file://WebAppMgr@.service \ + file://WebAppMgr.env \ + file://wam-user-setup.sh \ + file://wam-user-setup@.service \ + file://trunc-webapp-roles.patch \ +" +S = "${WORKDIR}/git" +SRCREV = "2a246d2ea79bd335b86942a5579d6de0c9ddce40" + +do_install:append() { + install -d ${D}${sysconfdir}/wam + install -v -m 644 ${S}/files/launch/security_policy.conf ${D}${sysconfdir}/wam/security_policy.conf + install -d ${D}${systemd_system_unitdir} + install -v -m 644 ${WORKDIR}/WebAppMgr@.service ${D}${systemd_system_unitdir}/WebAppMgr@.service + install -d ${D}${sysconfdir}/default/ + install -v -m 644 ${WORKDIR}/WebAppMgr.env ${D}${sysconfdir}/default/WebAppMgr.env + ln -snf WebAppMgr ${D}${bindir}/web-runtime + install -d ${D}${systemd_system_unitdir}/afm-user-session@.target.wants + ln -sf ../WebAppMgr@.service ${D}${systemd_system_unitdir}/afm-user-session@.target.wants/ + install -d ${D}${libexecdir}/wam/ + install -v -m 755 ${WORKDIR}/wam-user-setup.sh ${D}${libexecdir}/wam/wam-user-setup.sh + install -v -m 644 ${WORKDIR}/wam-user-setup@.service ${D}${systemd_system_unitdir}/wam-user-setup@.service + install -d ${D}${systemd_system_unitdir}/user-runtime-dir@.service.wants/ + ln -sf ../wam-user-setup@.service ${D}${systemd_system_unitdir}/user-runtime-dir@.service.wants/ +} + +FILES:${PN} += "${sysconfdir}/init ${sysconfdir}/wam ${libdir}/webappmanager/plugins/*.so ${systemd_system_unitdir}" + +CXXFLAGS:append:agl-devel = " -DAGL_DEVEL" + +do_install:append:agl-devel() { + # Enable remote inspector and dev mode + install -d ${D}${localstatedir}/agl-devel/preferences + touch ${D}${localstatedir}/agl-devel/preferences/debug_system_apps + touch ${D}${localstatedir}/agl-devel/preferences/devmode_enabled +} |