Skip to content

arduino-uno-q: install USB gadget scripts unconditionally in BSP#9649

Merged
igorpecovnik merged 1 commit intoarmbian:mainfrom
OpenSource-YYT:fix-arduino-uno-q-bsp-usb-gadget
Apr 10, 2026
Merged

arduino-uno-q: install USB gadget scripts unconditionally in BSP#9649
igorpecovnik merged 1 commit intoarmbian:mainfrom
OpenSource-YYT:fix-arduino-uno-q-bsp-usb-gadget

Conversation

@SuperKali
Copy link
Copy Markdown
Member

@SuperKali SuperKali commented Apr 10, 2026

Summary

Fix Ubuntu builds failing with `Failed to enable unit, unit usbgadget-rndis.service does not exist` on CI.

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 in the cached BSP.

This is why no other board uses `DISTRIBUTION` checks in `post_family_tweaks_bsp__` — they only use them in `pre_customize_image__` which runs per-distro.

Fix

Install the USB gadget files unconditionally in the BSP (they're harmless if unused) and keep the service enablement conditional in `post_family_tweaks__` where `DISTRIBUTION` can be reliably checked per-image.

Test plan

Summary by CodeRabbit

  • Bug Fixes
    • Improved Arduino Uno USB gadget functionality to work more consistently across different Linux distributions.

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.
@SuperKali SuperKali requested a review from igorpecovnik as a code owner April 10, 2026 07:47
@github-actions github-actions bot added 05 Milestone: Second quarter release size/small PR with less then 50 lines labels Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

The post_family_tweaks_bsp__arduino-uno-q_usb_gadget() function in Arduino Uno Q board configuration was modified to install USB gadget network scripts and service unit files unconditionally rather than conditionally based on distribution type. Updated comments document that BSP artifacts are cached across distributions.

Changes

Cohort / File(s) Summary
Arduino Uno Q USB Gadget BSP
config/boards/arduino-uno-q.csc
Removed conditional return logic from post_family_tweaks_bsp__arduino-uno-q_usb_gadget() to unconditionally install USB gadget files. Updated comments clarifying BSP artifact caching across distros and service enabling behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A gadget takes flight without condition's string,
USB flows free across each distro wing,
Cached artifacts dance, no checks in between,
Arduino's now simpler—pure and serene!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: moving USB gadget script installation from conditional to unconditional in the BSP function for arduino-uno-q.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Apr 10, 2026
@igorpecovnik igorpecovnik merged commit 4cd04e6 into armbian:main Apr 10, 2026
13 checks passed
@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Apr 10, 2026
@SuperKali SuperKali deleted the fix-arduino-uno-q-bsp-usb-gadget branch April 10, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants