Move hal configuration files into own repository
[AGL/meta-agl-devel.git] / meta-audio-4a-framework / recipes-multimedia / 4a-hal-device-config / 4a-hal-device-config.bb
1 SUMMARY     = "4A - Generic HAL device configuration"
2 DESCRIPTION = "Generic HAL device configuration in 4A (AGL Advanced Audio Agent)"
3 HOMEPAGE    = "https://git.automotivelinux.org/src/4a-hal-configs/"
4 SECTION     = "apps"
5
6 LICENSE = "Apache-2.0"
7 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
8
9 SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-configs;protocol=https;branch=${AGL_BRANCH}"
10 SRCREV = "45f205076573a858348c10a52d31382f31deaf55"
11
12 PV = "0.1+git${SRCPV}"
13 S  = "${WORKDIR}/git"
14
15 # The package is machine-specific due to variable config content
16 PACKAGE_ARCH = "${MACHINE_ARCH}"
17
18 inherit afb-system
19 # This defines INSTALL_PREFIX = "/usr/libexec/agl/"
20
21 # no configure needed
22 do_configure[noexec] = "1"
23
24 # no compile needed
25 do_compile[noexec] = "1"
26
27 # when no specific HAL is defined, use a generic usb one
28 4A_HAL_LIST ??= "2ch-generic-usb"
29
30 # for specific machines, activate only known HALs
31 4A_HAL_LIST_m3ulcb          ?= "rcar-m3 rcar-m3kf"
32 4A_HAL_LIST_h3ulcb          ?= "rcar-m3 rcar-m3kf"
33 4A_HAL_LIST_intel-corei7-64 ?= "intel-minnow intel-upsquared-hdmi"
34 4A_HAL_LIST_qemux86-64      ?= "intel-qemu"
35
36 # Due to bug SPEC-1610, default hal for RPI3 is not active yet
37 # 4A_HAL_LIST_raspberrypi3    ?= "raspberry-pi-3"
38
39 do_install () {
40
41     # get pkgdir for 4a-hal
42     PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal
43
44     install -d -m 0755 ${PKGDIR}
45     install -d -m 0755 ${PKGDIR}/etc
46     install -d -m 0755 ${PKGDIR}/etc.available
47
48     cp -ar ${S}/*/*.json ${PKGDIR}/etc.available/
49     chown -R root:root ${PKGDIR}/etc.available
50
51     for x in ${4A_HAL_LIST}; do
52         hal=hal-4a-$x.json
53         cp -v $PKGDIR/etc.available/${hal} $PKGDIR/etc/
54     done
55 }
56
57
58 RPROVIDES_${PN} += "virtual/4a-default-hal"