Skip to content

Commit 4cd04e6

Browse files
SuperKaliigorpecovnik
authored andcommitted
arduino-uno-q: install USB gadget scripts unconditionally in BSP
The BSP package is built once per board+branch and cached across all distributions. Conditioning the installation on DISTRIBUTION inside a post_family_tweaks_bsp__ hook causes the CI to cache a BSP built for Debian (without gadget files), then reuse it for Ubuntu builds where systemctl enable usbgadget-rndis.service fails because the service file is missing. Install the files unconditionally in the BSP and keep the service enablement conditional in post_family_tweaks__ where DISTRIBUTION can be reliably checked per-image.
1 parent a74b8a8 commit 4cd04e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/boards/arduino-uno-q.csc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function post_family_tweaks__arduino-uno-q() {
4141
}
4242

4343
function post_family_tweaks_bsp__arduino-uno-q_usb_gadget() {
44-
[[ "${DISTRIBUTION}" != "Ubuntu" ]] && return 0
44+
# BSP is built once and cached across distros, so install files unconditionally.
45+
# The usbgadget-rndis service is enabled in post_family_tweaks__ only when adbd is unavailable.
4546
display_alert "Installing USB gadget network scripts" "${BOARD}" "info"
4647
install -Dm755 "$SRC/packages/bsp/usb-gadget-network/setup-usbgadget-network.sh" "$destination/usr/local/bin/setup-usbgadget-network.sh"
4748
install -Dm755 "$SRC/packages/bsp/usb-gadget-network/remove-usbgadget-network.sh" "$destination/usr/local/bin/remove-usbgadget-network.sh"

0 commit comments

Comments
 (0)