From 79fd84f812ea8af8bf5f8a5ee3f0a0d94ec9741b Mon Sep 17 00:00:00 2001 From: Andreas Reis <887320+twwn@users.noreply.github.com> Date: Tue, 19 Aug 2025 21:38:30 +0200 Subject: [PATCH] Radxa Cubie A5E & Kickpi K2B: Pull CodeRabbit nitpicks Same as for Radxa Zero 3 --- config/boards/kickpik2b.csc | 17 +++++++++++------ config/boards/radxa-cubie-a5e.csc | 17 +++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/config/boards/kickpik2b.csc b/config/boards/kickpik2b.csc index 782330ea2..8b693947a 100644 --- a/config/boards/kickpik2b.csc +++ b/config/boards/kickpik2b.csc @@ -36,16 +36,21 @@ function post_family_tweaks_bsp__aic8800_wireless() { EOT # Add AIC8800 Bluetooth Service and Script if [[ -d "$SRC/packages/bsp/aic8800" ]]; then - mkdir -p "${destination}"/etc/systemd/system - mkdir -p "${destination}"/usr/bin - cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth" "${destination}"/usr/bin - chmod +x "${destination}"/usr/bin/aic-bluetooth - cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth.service" "${destination}"/etc/systemd/system + install -d -m 0755 "${destination}/usr/bin" + install -m 0755 "$SRC/packages/bsp/aic8800/aic-bluetooth" "${destination}/usr/bin/aic-bluetooth" + install -d -m 0755 "${destination}/usr/lib/systemd/system" + install -m 0644 "$SRC/packages/bsp/aic8800/aic-bluetooth.service" "${destination}/usr/lib/systemd/system/aic-bluetooth.service" + else + display_alert "$BOARD" "Skipping AIC8800 BT assets (packages/bsp/aic8800 not found)" "warn" fi } # Enable AIC8800 Bluetooth Service function post_family_tweaks__enable_aic8800_bluetooth_service() { display_alert "$BOARD" "Enabling AIC8800 Bluetooth Service" "info" - chroot_sdcard systemctl --no-reload enable aic-bluetooth.service + if chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then + chroot_sdcard systemctl --no-reload enable aic-bluetooth.service + else + display_alert "$BOARD" "aic-bluetooth.service not found in image; skipping enable" "warn" + fi } diff --git a/config/boards/radxa-cubie-a5e.csc b/config/boards/radxa-cubie-a5e.csc index dcec6d547..b038977a6 100644 --- a/config/boards/radxa-cubie-a5e.csc +++ b/config/boards/radxa-cubie-a5e.csc @@ -39,17 +39,22 @@ function post_family_tweaks_bsp__aic8800_wireless() { EOT # Add AIC8800 Bluetooth Service and Script if [[ -d "$SRC/packages/bsp/aic8800" ]]; then - mkdir -p "${destination}"/etc/systemd/system - mkdir -p "${destination}"/usr/bin - cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth" "${destination}"/usr/bin - chmod +x "${destination}"/usr/bin/aic-bluetooth - cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth.service" "${destination}"/etc/systemd/system + install -d -m 0755 "${destination}/usr/bin" + install -m 0755 "$SRC/packages/bsp/aic8800/aic-bluetooth" "${destination}/usr/bin/aic-bluetooth" + install -d -m 0755 "${destination}/usr/lib/systemd/system" + install -m 0644 "$SRC/packages/bsp/aic8800/aic-bluetooth.service" "${destination}/usr/lib/systemd/system/aic-bluetooth.service" + else + display_alert "$BOARD" "Skipping AIC8800 BT assets (packages/bsp/aic8800 not found)" "warn" fi } # Enable AIC8800 Bluetooth Service function post_family_tweaks__enable_aic8800_bluetooth_service() { display_alert "$BOARD" "Enabling AIC8800 Bluetooth Service" "info" - chroot_sdcard systemctl --no-reload enable aic-bluetooth.service + if chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then + chroot_sdcard systemctl --no-reload enable aic-bluetooth.service + else + display_alert "$BOARD" "aic-bluetooth.service not found in image; skipping enable" "warn" + fi }