From 849843fe618cbee5f5d31c4bdfaa2ca4deadb518 Mon Sep 17 00:00:00 2001 From: Priouzeau Christophe Date: Mon, 3 Feb 2020 14:56:00 +0100 Subject: [PATCH] ALSA-STATE: support of several board packages Signed-off-by: Priouzeau Christophe --- recipes-bsp/alsa/alsa-state-stm32mp1.bb | 22 +++++++++++++++---- ...57c-dk.conf => asound-stm32mp15yx-dk.conf} | 0 ...c-dk.state => asound-stm32mp15yx-dk.state} | 0 ...57c-ev.conf => asound-stm32mp15yx-ev.conf} | 0 ...c-ev.state => asound-stm32mp15yx-ev.state} | 0 5 files changed, 18 insertions(+), 4 deletions(-) rename recipes-bsp/alsa/alsa-state-stm32mp1/{asound-stm32mp157c-dk.conf => asound-stm32mp15yx-dk.conf} (100%) rename recipes-bsp/alsa/alsa-state-stm32mp1/{asound-stm32mp157c-dk.state => asound-stm32mp15yx-dk.state} (100%) rename recipes-bsp/alsa/alsa-state-stm32mp1/{asound-stm32mp157c-ev.conf => asound-stm32mp15yx-ev.conf} (100%) rename recipes-bsp/alsa/alsa-state-stm32mp1/{asound-stm32mp157c-ev.state => asound-stm32mp15yx-ev.state} (100%) diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1.bb b/recipes-bsp/alsa/alsa-state-stm32mp1.bb index 63479e3..8cba905 100644 --- a/recipes-bsp/alsa/alsa-state-stm32mp1.bb +++ b/recipes-bsp/alsa/alsa-state-stm32mp1.bb @@ -12,11 +12,11 @@ PV = "1.0" # Machine generic SRC_URI = " \ - file://asound-stm32mp157c-ev.conf \ - file://asound-stm32mp157c-dk.conf \ + file://asound-stm32mp15yx-ev.conf \ + file://asound-stm32mp15yx-dk.conf \ \ - file://asound-stm32mp157c-ev.state \ - file://asound-stm32mp157c-dk.state \ + file://asound-stm32mp15yx-ev.state \ + file://asound-stm32mp15yx-dk.state \ \ file://system-generator-alsa-states \ file://system-generator-alsa-conf \ @@ -33,6 +33,20 @@ do_install() { install -d ${D}/${localstatedir}/lib/alsa install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa + # create link to support all packages configuration + for p in a b c; + do + for n in 1 3 7; + do + cd ${D}${sysconfdir}/ + ln -sf asound-stm32mp15yx-ev.conf asound-stm32mp15$n$p-ev.conf + ln -sf asound-stm32mp15yx-dk.conf asound-stm32mp15$n$p-dk.conf + cd ${D}${localstatedir}/lib/alsa + ln -sf asound-stm32mp15yx-ev.state asound-stm32mp15$n$p-ev.state + ln -sf asound-stm32mp15yx-dk.state asound-stm32mp15$n$p-dk.state + done + done + # Enable systemd automatic selection if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${systemd_unitdir}/system-generators/ diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.conf b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-dk.conf similarity index 100% rename from recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.conf rename to recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-dk.conf diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.state b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-dk.state similarity index 100% rename from recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-dk.state rename to recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-dk.state diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.conf b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-ev.conf similarity index 100% rename from recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.conf rename to recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-ev.conf diff --git a/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.state b/recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-ev.state similarity index 100% rename from recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp157c-ev.state rename to recipes-bsp/alsa/alsa-state-stm32mp1/asound-stm32mp15yx-ev.state