From 602966ea9205b5bc2c29946952afb54b7fdbcf47 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 6 Jan 2021 18:35:50 -0500 Subject: Add dev-mapping-ci recipe Add a dev-mapping-ci recipe that installs a CI specific version of /etc/dev-mapping.conf for the agl-service-can-low-level binding. Additionally, the dev-mapping-demo recipe files have been moved to recipes-config/dev-mapping so all the dev-mapping* recipes are in the same place, and the now required "j1939" bus mapping has been added to the various dev-mapping files. To enable use of the new recipe, a definition of the variable PREFERRED_RPROVIDER_virtual/low-can-dev-mapping has been added to the agl-demo feature definition that enables it based on the AGLCI DISTRO_FEATURE. This is intended to replace the definition in poky-agl.conf, which will be removed in subsequent cleanup. Bug-AGL: SPEC-3756 Signed-off-by: Scott Murray Change-Id: Ieb80a7f4b76ddd7851acca521dea1a8dd104cf86 --- conf/include/agl-demo.inc | 3 +++ .../dev-mapping-demo/dev-mapping.conf.demo | 6 ------ .../dev-mapping-demo/dev-mapping-demo_1.0.bb | 18 ------------------ .../dev-mapping/dev-mapping-ci/dev-mapping.conf.ci | 7 +++++++ recipes-config/dev-mapping/dev-mapping-ci_1.0.bb | 18 ++++++++++++++++++ .../dev-mapping/dev-mapping-demo/dev-mapping.conf.demo | 7 +++++++ recipes-config/dev-mapping/dev-mapping-demo_1.0.bb | 18 ++++++++++++++++++ .../dev-mapping/dev-mapping/dev-mapping.conf.default | 1 + 8 files changed, 54 insertions(+), 24 deletions(-) delete mode 100644 recipes-config/dev-mapping-demo/dev-mapping-demo/dev-mapping.conf.demo delete mode 100644 recipes-config/dev-mapping-demo/dev-mapping-demo_1.0.bb create mode 100644 recipes-config/dev-mapping/dev-mapping-ci/dev-mapping.conf.ci create mode 100644 recipes-config/dev-mapping/dev-mapping-ci_1.0.bb create mode 100644 recipes-config/dev-mapping/dev-mapping-demo/dev-mapping.conf.demo create mode 100644 recipes-config/dev-mapping/dev-mapping-demo_1.0.bb diff --git a/conf/include/agl-demo.inc b/conf/include/agl-demo.inc index c3c051d8..7d6db8ce 100644 --- a/conf/include/agl-demo.inc +++ b/conf/include/agl-demo.inc @@ -12,6 +12,9 @@ FEATURE_PACKAGES_agl-voiceagent-alexa_append = " alexa-viewer" # enable the layer AGL_FEATURES_append = " agldemo" +# Set preferred provider for low-can device mapping configuration +PREFERRED_RPROVIDER_virtual/low-can-dev-mapping ?= "${@bb.utils.contains('DISTRO_FEATURES', 'AGLCI', 'dev-mapping-ci', 'dev-mapping', d)}" + # voice api inclusion PREFERRED_RPROVIDER_virtual/voice-high-config = "default-voice-high-config" FEATURE_PACKAGES_agl-speech-framework = "packagegroup-agl-speech-services" diff --git a/recipes-config/dev-mapping-demo/dev-mapping-demo/dev-mapping.conf.demo b/recipes-config/dev-mapping-demo/dev-mapping-demo/dev-mapping.conf.demo deleted file mode 100644 index 93b0a020..00000000 --- a/recipes-config/dev-mapping-demo/dev-mapping-demo/dev-mapping.conf.demo +++ /dev/null @@ -1,6 +0,0 @@ -; Default CAN device mapping -; Format has to follow ini rules key="value", notice " around value. - -[CANbus-mapping] -hs="can0" -ls="sllin0" diff --git a/recipes-config/dev-mapping-demo/dev-mapping-demo_1.0.bb b/recipes-config/dev-mapping-demo/dev-mapping-demo_1.0.bb deleted file mode 100644 index 4a04ce13..00000000 --- a/recipes-config/dev-mapping-demo/dev-mapping-demo_1.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -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/recipes-config/dev-mapping/dev-mapping-ci/dev-mapping.conf.ci b/recipes-config/dev-mapping/dev-mapping-ci/dev-mapping.conf.ci new file mode 100644 index 00000000..bd5c2135 --- /dev/null +++ b/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/recipes-config/dev-mapping/dev-mapping-ci_1.0.bb b/recipes-config/dev-mapping/dev-mapping-ci_1.0.bb new file mode 100644 index 00000000..cbba5730 --- /dev/null +++ b/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/recipes-config/dev-mapping/dev-mapping-demo/dev-mapping.conf.demo b/recipes-config/dev-mapping/dev-mapping-demo/dev-mapping.conf.demo new file mode 100644 index 00000000..1fd12ad0 --- /dev/null +++ b/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/recipes-config/dev-mapping/dev-mapping-demo_1.0.bb b/recipes-config/dev-mapping/dev-mapping-demo_1.0.bb new file mode 100644 index 00000000..4a04ce13 --- /dev/null +++ b/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/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default b/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default index 7bd8bf2e..8519a587 100644 --- a/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default +++ b/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default @@ -4,3 +4,4 @@ [CANbus-mapping] hs="can0" ls="can0" +j1939="can0" -- cgit 1.2.3-korg