bluetooth-init: expand BT_GPIO in installed scripts

Expand the BT_GPIO placeholder after installing the init script, so
optional scripts such as bluetooth-init_atheros are handled the same way.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
Isaac Hermida 2026-05-14 11:06:08 +02:00
parent bcf4883d60
commit 57a87c4000
1 changed files with 6 additions and 3 deletions

View File

@ -26,9 +26,6 @@ inherit update-rc.d systemd
do_install() {
# INITSCRIPT
install -d ${D}${sysconfdir}/init.d/
# Set BT GPIO
sed -i -e "s,##BT_GPIO##,${BT_GPIO},g" \
${WORKDIR}/${BT_INIT_FILE}
install -m 0755 ${WORKDIR}/${BT_INIT_FILE} ${D}${sysconfdir}/bluetooth-init
ln -sf /etc/bluetooth-init ${D}${sysconfdir}/init.d/bluetooth-init
# Set BT UART device
@ -43,6 +40,12 @@ do_install:append:ccimx6sbc() {
install -m 0755 ${WORKDIR}/bluetooth-init_atheros ${D}${sysconfdir}/bluetooth-init_atheros
}
do_install:append() {
# Set BT GPIO
sed -i -e "s,##BT_GPIO##,${BT_GPIO},g" \
${D}${sysconfdir}/bluetooth-init*
}
pkg_postinst_ontarget:${PN}:ccimx6sbc() {
# Only execute the script on wireless ccimx6 platforms
if [ -e "/proc/device-tree/bluetooth/mac-address" ]; then