diff options
author | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2018-12-07 15:50:58 +0100 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2018-12-07 18:46:04 +0000 |
commit | fd78578b11990bc885651c52690dbcf9169bd7ac (patch) | |
tree | 8e71e64871a41d0f7e3724ecc19063011c56e8c8 /meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample | |
parent | 3ba897c7b0638797d639f98723bfdb8b4eade2b4 (diff) |
Move hal configuration files into own repository
... and own recipe
This allows to manage the various types of configuration files
independently of the source code as these might not always fit
into the git repo context-wise.
Initial recipe is 4a-hal-device-config.bb .
This is re-using the same mechanism as previously used.
Samples for alternative implementations and vendor hals are
included as well to explore improved ways of handling
the multipe configuration files possible.
Bug-AGL: SPEC-2011
Change-Id: Ib04b5c4e7b764bed85dbceb50a62a8c6fd031c5a
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample')
-rw-r--r-- | meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample new file mode 100644 index 00000000..3bafc3bb --- /dev/null +++ b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample @@ -0,0 +1,57 @@ +SUMMARY = "4A - Generic HAL device configuration" +DESCRIPTION = "Generic HAL device configuration in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-configs/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-configs;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "45f205076573a858348c10a52d31382f31deaf55" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +# The package is machine-specific due to variable config content +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit afb-system update-alternative +# This defines INSTALL_PREFIX = "/usr/libexec/agl/" + +# no configure needed +do_configure[noexec] = "1" +# no compile needed +do_compile[noexec] = "1" + + +# when no specific HAL is defined, use a generic usb one +4A_DEFAULT_HAL ??= "2ch-generic-usb" + +# for specific machines, activate only known HAL +4A_DEFAULT_HAL_m3ulcb ?= "rcar-m3" +# Downside: only one file at a time! +4A_DEFAULT_HAL_h3ulcb ?= "rcar-m3" +4A_DEFAULT_HAL_intel-corei7-64 ?= "intel-minnow" +4A_DEFAULT_HAL_qemux86-64 ?= "intel-qemu" + +# Due to bug SPEC-1610, default hal for RPI3 is not active yet +# 4A_DEFAULT_HAL_raspberrypi3 ?= "raspberry-pi-3" + +do_install () { + # get pkgdir for 4a-hal + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + install -d -m 0755 ${PKGDIR}/etc.available + cp -ar ${S}/*/*.json ${PKGDIR}/etc.available/ + chown -R root:root ${PKGDIR}/ +} + +# we define a '4a-default-hal' alternative with a low default priority +# you can deploy your own hal with a higher prio +ALTERNATIVE_${PN} = "4a-default-hal" +ALTERNATIVE_PRIORITY = "10" +ALTERNATIVE_LINK_NAME[4a-default-hal] = "${INSTALL_PREFIX}/4a-hal/etc/4a-default-hal.json" +ALTERNATIVE_TARGET[4a-default-hal] = "${INSTALL_PREFIX}/4a-hal/etc.available/hal-4a-${4A_DEFAULT_HAL}.json" + + +RPROVIDES_${PN} += "virtual/4a-default-hal"
\ No newline at end of file |