Skip to content

SC8280XP: Initial refactor from board to family config#9818

Open
HeyMeco wants to merge 4 commits into
armbian:mainfrom
HeyMeco:radxa-dragon-q8b
Open

SC8280XP: Initial refactor from board to family config#9818
HeyMeco wants to merge 4 commits into
armbian:mainfrom
HeyMeco:radxa-dragon-q8b

Conversation

@HeyMeco

@HeyMeco HeyMeco commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Description

In preparation for future boards using the sc8280xp / Snapdragon 8cx Gen 3 SoC I refactored the Thinkpad X13s to a family config similar to how we handle other boards and their families. What we need to do now is to test for regressions. @rpardini seems to be the active maintainer around this board / SoC so it would be nice if you could take a look over this too.

How Has This Been Tested?

  • Build vendor branch with new board and boot (Boot + GPU confirmed working)
  • Build Thinkpad X13s and test for regressions

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Radxa Dragon Q8B board support, including Bluetooth public MAC handling and automated SC8280XP firmware inclusion in the initramfs.
    • Added/defined the SC8280XP platform family configuration with kernel selection and default boot settings.
  • Improvements

    • Updated ThinkPad X13s to use the SC8280XP family, aligning DTB selection and tightening userspace/firmware gating.
    • Refined initramfs firmware payloads (LENOVO 21BX only) and adjusted included peripherals/userspace packages to match supported setups.

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR consolidates SC8280XP Snapdragon board support by extracting shared firmware, service, and userspace logic into a new family configuration. ThinkPad X13s is refactored to delegate duplicated concerns to the family level. Radxa Dragon Q8B board is added using the new family foundation with board-specific firmware variants and Bluetooth customization.

Changes

SC8280XP Family Consolidation

Layer / File(s) Summary
SC8280XP family foundation and shared hooks
config/sources/families/sc8280xp.conf
Establishes SC8280XP family with global build metadata (architecture, console, GRUB settings, kernel branches), initramfs firmware injection hook, pd-mapper systemd override, conditional userspace package installation for supported Debian releases, Armbian service disabling for UEFI, and snapd.seeded workaround for Ubuntu.
Radxa Dragon Q8B board with sc8280xp family
config/boards/radxa-dragon-q8b.conf
Introduces Radxa Dragon Q8B board metadata and three post-processing hooks: Bluetooth public MAC randomization with systemd override, sc8280xp firmware download from Radxa GitHub repository, and board-specific firmware files inclusion in initrd via hook script.
ThinkPad X13s refactoring to use sc8280xp family
config/boards/thinkpad-x13s.conf
Migrates ThinkPad X13s to use BOARDFAMILY=sc8280xp, switches conditional gates from x13s_is_userspace_supported to sc8280xp_is_userspace_supported, consolidates firmware setup via family-level hook, and removes now-redundant board-level implementations of pd-mapper override, snapd workaround, and firmware helpers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested labels

size/medium, BSP, Framework

Poem

🐰 A rabbit hops through boards so bright,
Extracting logic, making right,
SC8280XP finds its home—
No more duplication roam!
Dragons and ThinkPads dance as one.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: refactoring the ThinkPad X13s configuration from a board-specific setup to a family-level SC8280XP configuration for code reuse.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 05 Milestone: Second quarter release size/large PR with 250 lines or more Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels May 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
config/sources/families/sc8280xp.conf (2)

28-28: 💤 Low value

Factor out duplicate GRUB command line.

The same GRUB_CMDLINE_LINUX_DEFAULT value is defined for both branches. Consider declaring it once before or after the case statement to reduce duplication.

♻️ Proposed refactor
+declare -g GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth efi=noruntime"
+
 case $BRANCH in
 
 	sc8280xp)
 		declare -g KERNEL_MAJOR_MINOR="7.0"
 		declare -g KERNELSOURCE='https://github.com/steev/linux.git'
 		declare -g KERNELBRANCH='branch:lenovo-x13s-linux-7.0.y'
 		declare -g LINUXCONFIG="linux-${ARCH}-${BRANCH}"
-		declare -g GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth efi=noruntime"
 		;;
 
 	vendor)
 		declare -g KERNEL_MAJOR_MINOR="7.0"
 		declare -g KERNELSOURCE='https://github.com/radxa/kernel.git'
 		declare -g KERNELBRANCH='branch:linux-7.0.2'
-		declare -g GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth efi=noruntime"
 		;;
 
 esac

Also applies to: 35-35

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/sources/families/sc8280xp.conf` at line 28, The
GRUB_CMDLINE_LINUX_DEFAULT variable is duplicated in both case branches; to fix,
remove the duplicate assignments inside the case and declare a single
GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth
efi=noruntime" once (either before or after the case statement) so both branches
inherit the same value; update any branch-specific logic only if it needs to
augment that base value rather than reassign it.

51-54: 💤 Low value

Hardcoded release list requires manual maintenance.

The function checks for specific Debian/Ubuntu releases. This will need updates for each new release (e.g., when Debian 14 or Ubuntu 26.04 are released). Consider documenting this maintenance requirement or adding a comment explaining why specific releases are gated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/sources/families/sc8280xp.conf` around lines 51 - 54, The release
check in sc8280xp_is_userspace_supported() currently hardcodes specific releases
and requires manual updates for new OS versions; add an explanatory comment
above the function referencing why only these releases are supported, include a
TODO explaining that RELEASE must be updated when new Debian/Ubuntu releases are
added (e.g., Debian 14/Ubuntu 26.04), and optionally note where RELEASE is
defined so future maintainers know how to change it; keep the function body
unchanged but document the maintenance requirement and expected update
procedure.
config/boards/radxa-dragon-q8b.conf (1)

11-22: ⚡ Quick win

Move Bluetooth MAC initialization to family config to eliminate duplication.

This function is duplicated identically in thinkpad-x13s.conf. Both boards share the same logic for Bluetooth MAC address initialization and belong to the sc8280xp family. Move the function to config/sources/families/sc8280xp.conf as post_family_tweaks_bsp__sc8280xp_bluetooth_addr() and remove the board-specific versions. This follows the existing pattern used by post_family_tweaks_bsp__sc8280xp_always_start_pdmapper() in the same file.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/radxa-dragon-q8b.conf` around lines 11 - 22, The bluetooth MAC
init function is duplicated across boards; move the implementation into the
sc8280xp family file and remove the board-specific copies: create
post_family_tweaks_bsp__sc8280xp_bluetooth_addr() in the families sc8280xp
config with the same body (random_mac_address generation, display_alert and
add_file_from_stdin_to_bsp_destination override), delete
post_family_tweaks_bsp__radxa_dragon_q8b_bluetooth_addr() and the identical
thinkpad-x13s version, and ensure no board-specific callers need renaming (the
family hook name should match existing family-hook usage alongside
post_family_tweaks_bsp__sc8280xp_always_start_pdmapper()).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/boards/radxa-dragon-q8b.conf`:
- Line 1: The board config is missing a CI hint for which kernel branches to
test; add a global declaration for KERNEL_TEST_TARGET matching the board's
kernel choice (KERNEL_TARGET value "vendor") so CI will run kernel tests for the
vendor kernel—update the radxa-dragon-q8b.conf to declare the KERNEL_TEST_TARGET
variable as a global and set it to "vendor" (refer to KERNEL_TEST_TARGET and
existing KERNEL_TARGET="vendor" in the file).

---

Nitpick comments:
In `@config/boards/radxa-dragon-q8b.conf`:
- Around line 11-22: The bluetooth MAC init function is duplicated across
boards; move the implementation into the sc8280xp family file and remove the
board-specific copies: create post_family_tweaks_bsp__sc8280xp_bluetooth_addr()
in the families sc8280xp config with the same body (random_mac_address
generation, display_alert and add_file_from_stdin_to_bsp_destination override),
delete post_family_tweaks_bsp__radxa_dragon_q8b_bluetooth_addr() and the
identical thinkpad-x13s version, and ensure no board-specific callers need
renaming (the family hook name should match existing family-hook usage alongside
post_family_tweaks_bsp__sc8280xp_always_start_pdmapper()).

In `@config/sources/families/sc8280xp.conf`:
- Line 28: The GRUB_CMDLINE_LINUX_DEFAULT variable is duplicated in both case
branches; to fix, remove the duplicate assignments inside the case and declare a
single GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused
arm64.nopauth efi=noruntime" once (either before or after the case statement) so
both branches inherit the same value; update any branch-specific logic only if
it needs to augment that base value rather than reassign it.
- Around line 51-54: The release check in sc8280xp_is_userspace_supported()
currently hardcodes specific releases and requires manual updates for new OS
versions; add an explanatory comment above the function referencing why only
these releases are supported, include a TODO explaining that RELEASE must be
updated when new Debian/Ubuntu releases are added (e.g., Debian 14/Ubuntu
26.04), and optionally note where RELEASE is defined so future maintainers know
how to change it; keep the function body unchanged but document the maintenance
requirement and expected update procedure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3ea32700-b275-4c71-bc4d-f2b3b8475a7c

📥 Commits

Reviewing files that changed from the base of the PR and between 761d04e and fc5055e.

📒 Files selected for processing (5)
  • config/boards/radxa-dragon-q8b.conf
  • config/boards/thinkpad-x13s.conf
  • config/kernel/linux-sc8280xp-sc8280xp.config
  • config/kernel/linux-sc8280xp-vendor.config
  • config/sources/families/sc8280xp.conf

@github-actions

Copy link
Copy Markdown
Contributor

🚫 Missing required board assets

This PR adds new board configuration(s). Required assets must already exist in github/armbian/armbian.github.io.
They are required by Armbian Imager to ensure all boards are displayed with proper images.

  • Board images: board-images/<board>.png (1920x1080 px transparent)
  • Vendor logos: board-vendor-logos/<vendor>-logo.png (512x512 px transparent)

Missing items

  • Board image missing for radxa-dragon-q8b
    • Expected: board-images/radxa-dragon-q8b.png
    • Fix: add the file to armbian/armbian.github.io (folder board-images/)

Once the missing files are added (or a PR is opened in armbian/armbian.github.io), re-run this check.

@rpardini

Copy link
Copy Markdown
Member

This probably works, but goes in the opposite direction I intended: sc8280xp was just a different branch from the default UEFI with the hope that enough will be mainlined so that it could just use the standard UEFI kernel (eg just drop the custom BRANCH and use current/edge, plus grub-with-dtb (or recently the stubby thing). Actually this probably could already be done (save for camera and venus work being done in steev's branch). Fedora 44 has shipped with sc8280xp support via stubby and the plain mainline kernel.

With this move that gets further away, not closer, and I can't really tell what it buys us? In practice the dragon thing gets its own kernel, and so does the x13s.

Also, has "the other sc8280xp" ("Windows Dev Kit 2023", BOARD=wdk2023) been EOS'ed and thus forgotten?

@armbian armbian deleted a comment from github-actions Bot May 25, 2026
HeyMeco and others added 4 commits June 19, 2026 16:34
No sc8280xp board had an onboard MAC, so the family config left
CONFIG_ETHERNET off. The Dragon Q8B is the first with one: two Synopsys
GMACs behind a TC9563 PCIe switch. Enable the ethernet menu and the
stmmac dwmac-tc956x glue so both QCA8081 ports come up.

Signed-off-by: SuperKali <hello@superkali.me>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/boards/radxa-dragon-q8b.conf`:
- Around line 27-41: The function
post_family_tweaks_bsp__radxa_dragon_q8b_download_firmware downloads firmware
without security or stability safeguards. First, replace the hardcoded 'main'
branch in the fw_base_url variable with a specific commit SHA or release tag to
pin the version. Second, after each wget command (both in the for loop and the
separate radxa/dragon-q8b download), add SHA256 checksum validation by piping
the expected checksum and file path to sha256sum with the -c flag to verify
integrity. Third, optionally enhance the wget commands with retry logic using
--tries=3 and --timeout=10 parameters, and check the exit status ($?) to handle
network failures gracefully.
- Around line 11-22: The Bluetooth MAC address is generated at build time in the
post_family_tweaks_bsp__radxa_dragon_q8b_bluetooth_addr function, causing all
devices to share the same address. Move the random_mac_address generation from
build-time to runtime by creating a systemd service or script in
/etc/network/if-up.d/ that runs at first-boot or every-boot. Instead of using
RANDOM at build time, generate the MAC address at runtime using a
hardware-unique seed such as CPU serial or eMMC CID, or generate it once on
first boot and persist it in a dedicated file under /var/lib/ or
/etc/machine-id. Update the bluetooth.service.d/override.conf to source the MAC
from this persistent location.
- Line 1: The first-line comment in the radxa-dragon-q8b.conf file lacks
critical hardware specification details needed for interactive compilation.
Expand the existing comment that currently reads "# Qualcomm Snapdragon 8cx Gen
3 Adreno 690 Radxa Dragon Q8B" to include the SoC core count (number of CPU
cores), available RAM configurations/options, and key hardware features such as
WiFi version, Bluetooth support, USB port details, eMMC storage capacity, and
any other relevant connectivity or storage features specific to this board
model. Ensure the enhanced comment provides comprehensive hardware information
while remaining a single line comment at the start of the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bd1a6635-ded7-4545-afd6-d6cafba982df

📥 Commits

Reviewing files that changed from the base of the PR and between fc5055e and 122f42a.

📒 Files selected for processing (2)
  • config/boards/radxa-dragon-q8b.conf
  • config/boards/thinkpad-x13s.conf
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/boards/thinkpad-x13s.conf

@@ -0,0 +1,58 @@
# Qualcomm Snapdragon 8cx Gen 3 Adreno 690 Radxa Dragon Q8B

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Enhance the first-line comment with complete hardware specifications.

The first-line comment is missing critical hardware details. As per coding guidelines, it must specify core count, RAM options, and key connectivity/storage features (WiFi, BT, USB, eMMC, etc.) since this text is used during interactive compilation.

📋 Suggested enhancement
-# Qualcomm Snapdragon 8cx Gen 3 Adreno 690 Radxa Dragon Q8B
+# Qualcomm Snapdragon 8cx Gen 3 octa core 4GB-16GB eMMC WiFi BT USB3 Adreno 690 Radxa Dragon Q8B

(Adjust RAM range and features based on actual hardware specifications)

Based on learnings: In Armbian board configuration files, the first-line comment must contain a dedicated hardware feature description including SoC model, core count, RAM options, and key features (connectivity, storage, special features), as this text is used during interactive compilation.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Qualcomm Snapdragon 8cx Gen 3 Adreno 690 Radxa Dragon Q8B
# Qualcomm Snapdragon 8cx Gen 3 octa core 4GB-16GB eMMC WiFi BT USB3 Adreno 690 Radxa Dragon Q8B
🧰 Tools
🪛 GitHub Actions: Validate board configs / 0_Validate changed board configs.txt

[warning] 1-1: KERNEL_TEST_TARGET: recommended, comma-separated list of branches to test (e.g. current,edge)

🪛 GitHub Actions: Validate board configs / Validate changed board configs

[warning] 1-1: KERNEL_TEST_TARGET: recommended, comma-separated list of branches to test (e.g. current,edge).

🪛 GitHub Check: Validate changed board configs

[warning] 1-1:
KERNEL_TEST_TARGET: recommended, comma-separated list of branches to test (e.g. current,edge)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/radxa-dragon-q8b.conf` at line 1, The first-line comment in the
radxa-dragon-q8b.conf file lacks critical hardware specification details needed
for interactive compilation. Expand the existing comment that currently reads "#
Qualcomm Snapdragon 8cx Gen 3 Adreno 690 Radxa Dragon Q8B" to include the SoC
core count (number of CPU cores), available RAM configurations/options, and key
hardware features such as WiFi version, Bluetooth support, USB port details,
eMMC storage capacity, and any other relevant connectivity or storage features
specific to this board model. Ensure the enhanced comment provides comprehensive
hardware information while remaining a single line comment at the start of the
file.

Source: Learnings

Comment on lines +11 to +22
function post_family_tweaks_bsp__radxa_dragon_q8b_bluetooth_addr() {
### The bluetooth does not have a public MAC address set in DT, and BT won't start without one.
### Use a systemd override to hook up setting a public-addr before starting bluetoothd
declare random_mac_address="" # would be much better to rnd mac on board-side though
random_mac_address=$(printf '02:%02X:%02X:%02X:%02X:%02X' $((RANDOM % 256)) $((RANDOM % 256)) $((RANDOM % 256)) $((RANDOM % 256)) $((RANDOM % 256)))
display_alert "Adding systemd override for bluetooth public address init" "${BOARD} :: bt mac ${random_mac_address}" "info"

add_file_from_stdin_to_bsp_destination "/etc/systemd/system/bluetooth.service.d/override.conf" <<- EOD
[Service]
ExecStartPre=/bin/bash -c 'sleep 5 && yes | btmgmt public-addr ${random_mac_address}'
EOD
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Bluetooth MAC address collision: all devices will share the same MAC.

The random MAC is generated at BSP build time (line 15), meaning all devices flashed with the same image will have identical Bluetooth addresses. This will cause conflicts when multiple devices are powered on in the same area. While the inline comment on line 14 acknowledges this limitation, it remains a functional issue for production deployments.

💡 Recommended approach

Move MAC generation to first-boot or every-boot via a systemd service or script in /etc/network/if-up.d/, deriving the address from a hardware-unique seed (e.g., CPU serial, eMMC CID) or generating and persisting it on first boot in /etc/machine-id or a dedicated file under /var/lib/.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/radxa-dragon-q8b.conf` around lines 11 - 22, The Bluetooth MAC
address is generated at build time in the
post_family_tweaks_bsp__radxa_dragon_q8b_bluetooth_addr function, causing all
devices to share the same address. Move the random_mac_address generation from
build-time to runtime by creating a systemd service or script in
/etc/network/if-up.d/ that runs at first-boot or every-boot. Instead of using
RANDOM at build time, generate the MAC address at runtime using a
hardware-unique seed such as CPU serial or eMMC CID, or generate it once on
first boot and persist it in a dedicated file under /var/lib/ or
/etc/machine-id. Update the bluetooth.service.d/override.conf to source the MAC
from this persistent location.

Comment on lines +27 to +41
function post_family_tweaks_bsp__radxa_dragon_q8b_download_firmware() {
display_alert "Downloading sc8280xp firmware" "${BOARD}: radxa-pkg/radxa-firmware" "info"
declare fw_base_url="https://raw.githubusercontent.com/radxa-pkg/radxa-firmware/main/radxa-firmware-sc8280xp/lib/firmware/qcom/sc8280xp"
declare fw_dest="${destination}/lib/firmware/qcom/sc8280xp"

run_host_command_logged mkdir -pv "${fw_dest}" "${fw_dest}/radxa/dragon-q8b"

for fw in qccdsp8280.mbn qcdxkmsuc8280.mbn qcslpi8280.mbn qcvss8280.mbn; do
run_host_command_logged wget -q --show-progress "${fw_base_url}/${fw}" -O "${fw_dest}/${fw}"
done

run_host_command_logged wget -q --show-progress \
"${fw_base_url}/radxa/dragon-q8b/qcadsp8280.mbn" \
-O "${fw_dest}/radxa/dragon-q8b/qcadsp8280.mbn"
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Add checksum validation and version pinning for firmware downloads.

The firmware files are downloaded from the main branch without version pinning or integrity verification. This creates two risks:

  1. Security: No checksum validation means corrupted or tampered firmware could be silently included in the image.
  2. Stability: Pulling from main means upstream changes can break builds without warning.
🔒 Recommended improvements
  1. Pin to a specific commit SHA or release tag in the URL instead of main.
  2. Add SHA256 checksum verification after each wget:
    echo "<expected-sha256>  ${fw_dest}/${fw}" | sha256sum -c -
  3. Consider using wget --tries=3 --timeout=10 and checking $? to handle transient network failures gracefully.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/boards/radxa-dragon-q8b.conf` around lines 27 - 41, The function
post_family_tweaks_bsp__radxa_dragon_q8b_download_firmware downloads firmware
without security or stability safeguards. First, replace the hardcoded 'main'
branch in the fw_base_url variable with a specific commit SHA or release tag to
pin the version. Second, after each wget command (both in the for loop and the
separate radxa/dragon-q8b download), add SHA256 checksum validation by piping
the expected checksum and file path to sha256sum with the -c flag to verify
integrity. Third, optionally enhance the wget commands with retry logic using
--tries=3 and --timeout=10 parameters, and check the exit status ($?) to handle
network failures gracefully.

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, ... Needs review Seeking for review size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

3 participants