diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-07-10 18:39:09 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-07-10 18:56:03 +0200 |
commit | 2b849ef2943a2fb71ef8eddf50f4a6efcd120653 (patch) | |
tree | b78b12ef241d6c289d1ddd4958a31de84ed1ab8e /meta-audio-4a-framework/recipes-multimedia | |
parent | 55684d54d511708aaa79c34e375e86d35a03e3c4 (diff) |
4a-hal-generic: MACHINE-specific HAL config files
This patch adds a postinstall step to 4a-hal-generic recipe
to define HALs to be enabled/disabled depending on $MACHINE
As a consequence, 4a-hal-generic package is now machine specific.
Bug-AGL: SPEC-1405
Change-Id: Ibf418d71e898c3f9a2640b2ad4c8f4907bc5cb90
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'meta-audio-4a-framework/recipes-multimedia')
-rw-r--r-- | meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb b/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb index 5981261c..0bff58ad 100644 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb +++ b/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb @@ -21,3 +21,31 @@ inherit afb-system-cmake #FILES_${PN}-dev += "${INSTALL_PREFIX}/4a-hal/htdocs" #FILES_${PN} += "${INSTALL_PREFIX}/afb-aaaa" #FILES_${PN} += "${INSTALL_PREFIX}/lib" + +# The package is machine-specific due to variable config content +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# when no specific HAL is defined, use a generic usb one +4A_HAL_LIST ??= "2ch-generic-usb" + +# for specific machines, activate only known HALs +4A_HAL_LIST_m3ulcb ?= "rcar-m3 rcar-m3kf" +4A_HAL_LIST_h3ulcb ?= "rcar-m3 rcar-m3kf" +4A_HAL_LIST_intel-corei7-64 ?= "intel-minnow" +4A_HAL_LIST_qemux86-64 ?= "intel-qemu" +### TODO: this list should be completed for more machines + +do_install_append () { + # get pkgdir - note that '4a-hal' comes from project ${project_git_repo}/conf.d/cmake/config.cmake + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + # move all config files to a 'available' dir + mv $PKGDIR/etc $PKGDIR/etc.available + + # then install only required hals files in the etc folder + mkdir -p $PKGDIR/etc + for x in ${4A_HAL_LIST}; do + hal=hal-4a-$x.json + mv -v $PKGDIR/etc.available/${hal}.json $PKGDIR/etc/ + done +} |