Skip to content

sun60iw2: add vendor kernel support for radxa cubie a7a/a7z#9145

Closed
EvilOlaf wants to merge 3 commits intoarmbian:mainfrom
EvilOlaf:a733
Closed

sun60iw2: add vendor kernel support for radxa cubie a7a/a7z#9145
EvilOlaf wants to merge 3 commits intoarmbian:mainfrom
EvilOlaf:a733

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Dec 29, 2025

borrowed from @NickAlilovic

How Has This Been Tested?

  • build kernel
  • build Trixie minimal image
  • boot - nope, no hw

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Added support for Radxa Cubie A7A and A7Z boards.
    • Added support for the Sun60iw2 processor family and enhanced build/boot tooling for those boards.
    • Included device-tree entries for the new boards and updated BSP version metadata.
  • Bug Fixes

    • Fixed kernel header include paths for more consistent builds and reliable tracing.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

Adds two Radxa Cubie board config files, a new sun60iw2 family script with U-Boot/BSP/device-source helpers, and three kernel patches (header include fixes, new DTBs, and a BSP autogen header).

Changes

Cohort / File(s) Summary
Board configurations
config/boards/radxa-cubie-a7a.csc, config/boards/radxa-cubie-a7z.csc
New declarative board files: board metadata, overlay/kernel/initrd/bootscript/FDT names, partition/FS settings, OVERLAY_PREFIX, enable radxa-aic8800 and set AIC8800_TYPE="usb".
Family build scripts
config/sources/families/sun60iw2.conf
New sun60iw2 family: sets LINUXFAMILY/ARCH/ATF_COMPILE; adds build_custom_uboot() (download/extract Radxa U-Boot .deb), kernel_copy_extra_sources__radxa_allwinner_bsp() and ...__radxa_allwinner_device() (clone/copy/patch BSP & device sources), and write_uboot_platform() (write boot0/boot_package to media). Includes error checks and patch generation.
Kernel patch — includes
patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
Fixes TRACE_INCLUDE_PATH and updates many #include paths across sunxi kernel drivers to correct relative header locations.
Kernel patch — device tree
patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch, arch/arm64/boot/dts/allwinner/Makefile
Adds DTBs for sun60i-a733-cubie-a7a, sun60i-a733-cubie-a7s, and sun60i-a733-cubie-a7z to the SUNXI dtb list.
Kernel patch — autogen header
patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch, bsp/include/sunxi-autogen.h
Adds sunxi-autogen.h defining AW_BSP_VERSION macro with BSP/version string.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CI as Build system
  participant GH as GitHub releases
  participant FS as Local source tree
  participant BSP as Allwinner BSP repo
  participant TARGET as Target media/device

  rect rgb(240,248,255)
  note left of CI: build_custom_uboot()
  CI->>GH: query Radxa U-Boot release (.deb)
  GH-->>CI: return .deb asset
  CI->>CI: extract u-boot binaries (boot0_sdcard.bin, boot0_ufs.bin, boot_package.fex)
  CI->>FS: place extracted binaries in staging
  end

  rect rgb(255,250,240)
  note left of CI: kernel_copy_extra_sources__*()
  CI->>BSP: clone/pull BSP and device repos
  BSP-->>CI: BSP/device tree files and configs
  CI->>FS: copy DTS/default configs, generate patches
  CI->>CI: record patch artifacts
  end

  rect rgb(240,255,240)
  note left of CI: write_uboot_platform()
  CI->>TARGET: write boot binaries to device partitions (dd)
  CI->>TARGET: relabel partition (sfdisk)
  TARGET-->>CI: success / failure
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • AGM1968
  • JohnTheCoolingFan
  • PanderMusubi
  • krachlatte
  • pyavitz
  • igorpecovnik

Poem

🐇 I dug a patch and found new roots,
A7A and A7Z hop to boot,
I fetch the blobs, I stitch the trees,
I write the bits and bless the keys,
Hooray — kernels wake and scoot!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding vendor kernel support for Radxa Cubie A7A/A7Z boards based on the sun60iw2 family.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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 size/large PR with 250 lines or more 02 Milestone: First quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Dec 29, 2025
@github-actions
Copy link
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-cubie-a7a

    • Expected: board-images/radxa-cubie-a7a.png
    • Fix: add the file to armbian/armbian.github.io (folder board-images/)
  • BOARD_VENDOR not found in config/boards/radxa-cubie-a7a.csc

    • Fix: add e.g. BOARD_VENDOR="radxa" (lowercase recommended)
  • Board image missing for radxa-cubie-a7z

    • Expected: board-images/radxa-cubie-a7z.png
    • Fix: add the file to armbian/armbian.github.io (folder board-images/)
  • BOARD_VENDOR not found in config/boards/radxa-cubie-a7z.csc

    • Fix: add e.g. BOARD_VENDOR="radxa" (lowercase recommended)

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
config/sources/families/sun60iw2.conf (6)

29-90: build_custom_uboot(): Potential reliability improvements.

A few observations:

  1. Line 40: grep -oP uses Perl regex which may not be available on all systems. Consider using jq for JSON parsing since it's mentioned as available.

  2. Line 54: curl without --max-time or --connect-timeout could hang indefinitely on network issues.

  3. Lines 78-79: Silent failure with 2>/dev/null || true means missing binaries won't be reported. Consider logging which files were actually copied.

🔎 Optional: Use jq for JSON parsing and add curl timeout
     # 1. Get the download URL for the latest .deb asset
-    # Requires 'curl' and 'jq'. If 'jq' is not available, uses grep/sed fallback.
     local DOWNLOAD_URL
-    DOWNLOAD_URL=$(curl -sL "${API_URL}" | grep -oP '"browser_download_url":\s*"\K[^"]+\.deb' | head -n 1)
+    DOWNLOAD_URL=$(curl -sL --connect-timeout 30 --max-time 120 "${API_URL}" | \
+        jq -r '.assets[].browser_download_url | select(endswith(".deb"))' | head -n 1)
     display_alert "Downloading ${DEB_NAME}..." "" "info"
-    curl -sL "${DOWNLOAD_URL}" -o "${DEB_VENDOR_BLOB}" || exit_with_error "Download from GitHub failed"
+    curl -sL --connect-timeout 30 --max-time 300 "${DOWNLOAD_URL}" -o "${DEB_VENDOR_BLOB}" || \
+        exit_with_error "Download from GitHub failed"

119-123: Busy-wait loop for source directory availability.

This pattern waits up to 120 seconds (60 iterations × 2s) for the BSP directory to appear. While functional, this could mask async issues with fetch_from_repo.

Consider adding a more descriptive log message indicating what operation is being waited on, or verifying if this wait is truly necessary after a synchronous fetch_from_repo call.


139-140: Unquoted variable expansions in cp commands.

The variables ${expected_dir} and ${kernel_work_dir} should be quoted to handle paths with spaces properly.

🔎 Proposed fix
-        run_host_command_logged cp ${expected_dir}/configs/linux-5.15/*.dtsi ${kernel_work_dir}/arch/arm64/boot/dts/allwinner
-        run_host_command_logged cp -r ${expected_dir}/include/dt-bindings/. ${kernel_work_dir}/include/dt-bindings
+        run_host_command_logged cp "${expected_dir}"/configs/linux-5.15/*.dtsi "${kernel_work_dir}"/arch/arm64/boot/dts/allwinner
+        run_host_command_logged cp -r "${expected_dir}"/include/dt-bindings/. "${kernel_work_dir}"/include/dt-bindings

233-236: Unquoted variable expansions in cp commands.

Same issue as in the BSP function - variables should be quoted for robustness.

🔎 Proposed fix
-        run_host_command_logged cp ${expected_dir}/configs/cubie_a7a/linux-5.15/board.dts ${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts
-        run_host_command_logged cp ${expected_dir}/configs/cubie_a7s/linux-5.15/board.dts ${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
-        run_host_command_logged cp ${expected_dir}/configs/cubie_a7z/linux-5.15/board.dts ${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts
-        run_host_command_logged cp ${expected_dir}/configs/default/linux-5.15/bsp_defconfig ${kernel_work_dir}/arch/arm64/configs/bsp.config
+        run_host_command_logged cp "${expected_dir}/configs/cubie_a7a/linux-5.15/board.dts" "${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts"
+        run_host_command_logged cp "${expected_dir}/configs/cubie_a7s/linux-5.15/board.dts" "${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts"
+        run_host_command_logged cp "${expected_dir}/configs/cubie_a7z/linux-5.15/board.dts" "${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts"
+        run_host_command_logged cp "${expected_dir}/configs/default/linux-5.15/bsp_defconfig" "${kernel_work_dir}/arch/arm64/configs/bsp.config"

241-242: Inconsistent git config email between BSP and device functions.

kernel_copy_extra_sources__radxa_allwinner_bsp() uses builder@armbian.com (line 166), while this function uses support@armbian.com. Consider using a consistent email address across both functions.


256-258: Consider adding status=none to dd commands.

Based on learnings, newer Armbian family implementations (e.g., rockchip64_common.inc, rk3506) include status=none in dd commands to suppress progress output. This aligns with the current Armbian family standard.

🔎 Proposed fix
-    dd conv=notrunc,fsync if="$SCRIPT_DIR/boot0_sdcard.bin" of="$DEVICE" bs=512 seek=256
-    dd conv=notrunc,fsync if="$SCRIPT_DIR/boot0_ufs.bin" of="$DEVICE" bs=512 seek=2064
-    dd conv=notrunc,fsync if="$SCRIPT_DIR/boot_package.fex" of="$DEVICE" bs=512 seek=24576
+    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot0_sdcard.bin" of="$DEVICE" bs=512 seek=256
+    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot0_ufs.bin" of="$DEVICE" bs=512 seek=2064
+    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot_package.fex" of="$DEVICE" bs=512 seek=24576
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 09f7b36 and eb6d3ee.

📒 Files selected for processing (9)
  • config/boards/radxa-cubie-a7a.csc
  • config/boards/radxa-cubie-a7z.csc
  • config/kernel/linux-sun60i-vendor.config
  • config/sources/families/sun60iw2.conf
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch
  • patch/kernel/archive/sunxi-5.15/0004-Add-BSP-support-files-e2be153c5c.patch
  • patch/kernel/archive/sunxi-5.15/0005-Add-Allwinner-Device-a733-86c628c575.patch
🧰 Additional context used
🧠 Learnings (34)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:10:25.610Z
Learning: In the Armbian build system, rk32xx and rk33xx Rockchip SoCs no longer have BSP-based (vendor) kernel branches. The rk3506 is the first 32-bit Rockchip SoC to use the vendor branch in the current codebase.
Learnt from: tabrisnet
Repo: armbian/build PR: 9058
File: config/sources/families/spacemit.conf:39-45
Timestamp: 2025-12-12T23:10:00.819Z
Learning: In the Armbian build system, vendor kernel forks can use "vendor-edge" branch naming for bleeding-edge or pre-release vendor kernels, as demonstrated in config/sources/families/k3.conf. The typical vendor branch naming pattern is: "vendor" or "vendor-rt" for stable vendor releases, and "vendor-edge" for bleeding-edge/pre-release vendor versions. The "edge" naming without "vendor-" prefix is reserved for mainline kernel branches.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch
  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch
  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch
  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch
  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files, .wip and .conf extensions require BOARD_MAINTAINER to be present and contain at least one maintainer. If no maintainer is present, the board support rules state it does not qualify for standard support and must be moved to community support (.csc extension). This is documented at https://docs.armbian.com/User-Guide_Board-Support-Rules/

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-07-17T04:12:33.125Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-07T17:39:32.272Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8586
File: config/boards/nanopi-r76s.conf:15-21
Timestamp: 2025-09-07T17:39:32.272Z
Learning: In the Armbian build system, the variables $BOARD and $SDCARD are always set by the build framework, so guard checks for these variables are unnecessary in board configuration files and hook functions.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
📚 Learning: 2025-08-30T04:13:16.457Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-11-13T14:50:44.662Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8925
File: lib/functions/host/docker.sh:141-141
Timestamp: 2025-11-13T14:50:44.662Z
Learning: In the Armbian build system, certain boards have U-Boot that doesn't build correctly on ubuntu:noble but works on ubuntu:jammy. For these boards, DOCKER_ARMBIAN_BASE_IMAGE can be set to "ubuntu:jammy" via an extension file loaded before docker_cli_prepare() runs, allowing legacy toolchains to work while the community works on proper fixes with limited resources.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-12T21:44:09.061Z
Learnt from: Grippy98
Repo: armbian/build PR: 8624
File: config/boards/sk-am62p.conf:8-8
Timestamp: 2025-09-12T21:44:09.061Z
Learning: For TI K3 family boards in Armbian, BOOT_FDT_FILE uses .dts extension (not .dtb) as the standard convention. The build system handles this correctly by automatically compiling .dts to .dtb during kernel build and using the BOOT_FDT_FILE value directly in bootloader configurations.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
📚 Learning: 2025-11-10T22:05:40.490Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-28T15:39:55.793Z
Learnt from: rpardini
Repo: armbian/build PR: 9119
File: config/boards/mixtile-core3588e.csc:1-1
Timestamp: 2025-12-28T15:39:55.793Z
Learning: In board configuration comments, e.g., a reference to Jetson SoM, treat it as indicating compatibility with the form factor/pin layout rather than implying the board uses an NVIDIA Jetson product. This helps reviewers avoid misclassifying boards as Jetson-based. Apply this understanding broadly to all .csc files under config/boards to ensure consistent interpretation of form-factor references.

Applied to files:

  • config/boards/radxa-cubie-a7z.csc
  • config/boards/radxa-cubie-a7a.csc
📚 Learning: 2025-12-13T11:45:02.422Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T11:37:35.089Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
📚 Learning: 2025-07-23T07:30:52.265Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-13T11:39:08.046Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch
  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-03-31T22:20:48.475Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.

Applied to files:

  • patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch
📚 Learning: 2025-06-25T03:42:09.086Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:42:09.086Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, KERNELSOURCE is explicitly declared when using unofficial or 3rd party kernel repositories (like the "dev" branch using https://github.com/apritzel/linux), but can be omitted when using the standard mainline kernel (like the "edge" branch) since it will fall back to the default mainline source.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-25T03:40:52.109Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-12T19:28:38.491Z
Learnt from: Grippy98
Repo: armbian/build PR: 8622
File: config/sources/families/k3.conf:66-66
Timestamp: 2025-09-12T19:28:38.491Z
Learning: In the Armbian k3 family build system (config/sources/families/k3.conf), builds do not fail when TIBOOT3_BOOTCONFIG is unset, even though tiboot3.bin is still listed in UBOOT_TARGET_MAP. The gating mechanism in pre_config_uboot_target__build_first_stage function works as intended to conditionally build/copy tiboot3.bin only when TIBOOT3_BOOTCONFIG is defined.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-11-06T15:36:04.682Z
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-27T21:50:04.845Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-edge.config:80-82
Timestamp: 2025-09-27T21:50:04.845Z
Learning: In the Armbian build system, kernel configuration files are generated through this automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-01T06:11:43.476Z
Learnt from: wei633
Repo: armbian/build PR: 8557
File: config/bootscripts/boot-xpressreal-t3.cmd:0-0
Timestamp: 2025-09-01T06:11:43.476Z
Learning: In Armbian boot scripts without initramfs support, UUID= and LABEL= style device paths cannot be used for rootdev as they require initramfs to resolve during boot. Only direct device paths (/dev/mmcblkXpY) or PARTUUID= references (which U-Boot can resolve) will work.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-08-11T12:39:22.861Z
Learnt from: pyavitz
Repo: armbian/build PR: 8481
File: config/kernel/linux-spacemit-edge.config:492-494
Timestamp: 2025-08-11T12:39:22.861Z
Learning: The SpacemiT platform requires esos.elf firmware to be embedded in the kernel image for boot. The Armbian build system handles this by copying esos.elf from $SRC/packages/blobs/riscv64/spacemit/ to ${kernel_work_dir}/firmware/ via the custom_kernel_config__spacemit_k1_firmware() function in config/sources/families/spacemit.conf, ensuring CONFIG_EXTRA_FIRMWARE="esos.elf" can successfully embed it during kernel build.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-12T23:09:56.813Z
Learnt from: tabrisnet
Repo: armbian/build PR: 9058
File: config/sources/families/spacemit.conf:39-45
Timestamp: 2025-12-12T23:09:56.813Z
Learning: In Armbian build configs for vendor kernel sources, prefer the following branch naming conventions: use 'vendor' or 'vendor-rt' for stable vendor releases, and 'vendor-edge' for bleeding-edge/pre-release vendor versions. The 'edge' naming without the 'vendor-' prefix is reserved for mainline kernel branches. Apply this pattern to family config files under config/sources/families (e.g., spacemit.conf) to ensure consistent vendor kernel sourcing naming across the repository.

Applied to files:

  • config/sources/families/sun60iw2.conf
🔇 Additional comments (8)
patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch (1)

1-4: LGTM - Auto-generated BSP version header.

This patch is dynamically regenerated by kernel_copy_extra_sources__radxa_allwinner_bsp() during builds. The static content here serves as an initial placeholder that gets updated based on the current BSP commit hash.

patch/kernel/archive/sunxi-5.15/0001-fix-use-the-correct-header-path.patch (1)

1-175: LGTM - Corrects header include paths for BSP build compatibility.

The patch properly fixes relative include paths across multiple BSP modules (g2d, gmac, sound, nand, usb, ve) to work with the Armbian build system's source tree layout. The TRACE_INCLUDE_PATH changes from . to full relative paths are necessary for kernel tracing infrastructure to locate headers correctly.

patch/kernel/archive/sunxi-5.15/0002-fix-add-device-tree.patch (1)

19-21: Verify: DTB for sun60i-a733-cubie-a7s.dtb added but no corresponding board config.

The Makefile adds three DTBs (a7a, a7s, a7z), but this PR only includes board configuration files for radxa-cubie-a7a.csc and radxa-cubie-a7z.csc. The a7s variant is missing a board config file.

Is this intentional (e.g., reserved for a future PR or hardware not yet available), or should a radxa-cubie-a7s.csc be included in this PR for completeness?

config/boards/radxa-cubie-a7z.csc (2)

14-14: Hardcoded kernel version in NAME_INITRD may cause boot failures on kernel updates.

The initrd filename initrd.img-5.15.147-vendor-sun60iw2 contains a specific kernel version. If the kernel is updated (even a minor patch bump), this static name will no longer match the actual initrd, potentially causing boot issues.

Consider whether the build framework can dynamically generate this value, or if this is an intentional constraint for this vendor kernel setup.


1-18: Board configuration follows Armbian conventions.

The configuration correctly uses:

  • .csc extension with empty BOARD_MAINTAINER (community supported)
  • KERNEL_TARGET="vendor" for non-mainline kernel
  • Appropriate DTB path matching the kernel patch additions
  • Extension enablement for AIC8800 WiFi chipset
config/sources/families/sun60iw2.conf (1)

10-26: Family configuration structure looks good.

The vendor branch configuration follows Armbian conventions:

  • LINUXFAMILY, ARCH, ATF_COMPILE properly declared
  • KERNEL_MAJOR_MINOR correctly set for 5.15 vendor kernel
  • BSP and device sources properly configured with branch specifications
  • KERNELPATCHDIR points to the correct patch archive location
config/boards/radxa-cubie-a7a.csc (2)

14-14: Hardcoded kernel version in NAME_INITRD - same concern as a7z.

See comment on radxa-cubie-a7z.csc regarding the static initrd filename containing version 5.15.147-vendor-sun60iw2.


1-18: Board configuration follows Armbian conventions.

Configuration is consistent with the a7z variant and correctly uses:

  • .csc extension with empty BOARD_MAINTAINER (community supported)
  • KERNEL_TARGET="vendor" for non-mainline kernel
  • Matching DTB path for the a7a variant
  • Same extension and boot parameters as a7z

@EvilOlaf
Copy link
Member Author

This is really weird. patches 0003, 0004 and 0005 are auto-generated while building?

@EvilOlaf
Copy link
Member Author

Why are there two branches? one for the kernel source 5.15.y and then one for everything that is merged into?
These auto-generated patches imho must not go to patches directory. Perhaps into output where they don't interfere with git.

@NickAlilovic
Copy link

NickAlilovic commented Dec 29, 2025

These patches are only generated when there’s a new update to the bsp or device repository . This is similar to the manufacturer container builds. They download the latest versions of bsp and device then apply them on top of their Allwinner kernel. Armbian kernel build changes need to be in patch format. I was going to add a way to temporarily disable the feature using a variable.

The last manufacturer update needed the latest u-boot then I had to create new patches for both BSP and Device. So I figured auto-generating the patches would be the easiest way around that.

https://github.com/radxa-pkg/linux-a733/blob/main/.github/local/Makefile.local

@NickAlilovic
Copy link

NickAlilovic commented Dec 29, 2025

I could stick with one initial BSP and Device patch then apply the updated manufacturer patches on top. This might fill up the patch directory pretty quick. Also, time-consuming. I prefer to keep the manufacturer patches in original form.

@EvilOlaf
Copy link
Member Author

Easiest is then I guess simply changing where those temporary patches are stored. Perhaps cache dir is an option.

@NickAlilovic
Copy link

Updated my branch. I'm now using cache/patch/ directory to store my updated BSP and Device patches. Also added coderabbitai changes.

Updated patches are now stored in cache/patch/ directory.
coderabbitai suggestions/nitpicks fixed.
@github-actions
Copy link
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-cubie-a7a

    • Expected: board-images/radxa-cubie-a7a.png
    • Fix: add the file to armbian/armbian.github.io (folder board-images/)
  • BOARD_VENDOR not found in config/boards/radxa-cubie-a7a.csc

    • Fix: add e.g. BOARD_VENDOR="radxa" (lowercase recommended)
  • Board image missing for radxa-cubie-a7z

    • Expected: board-images/radxa-cubie-a7z.png
    • Fix: add the file to armbian/armbian.github.io (folder board-images/)
  • BOARD_VENDOR not found in config/boards/radxa-cubie-a7z.csc

    • Fix: add e.g. BOARD_VENDOR="radxa" (lowercase recommended)

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (6)
config/sources/families/sun60iw2.conf (6)

163-164: Consider quoting the glob pattern.

While rm -f won't fail if the glob doesn't match, quoting glob patterns is a safer practice to prevent word splitting issues.

🔎 Proposed fix
-    rm -f ${PATCH_TARGET_DIR}/0003-BSP-Autogen-File.patch
-    rm -f "${PATCH_TARGET_DIR}/0004-Add-BSP-support-files-"*.patch
+    rm -f "${PATCH_TARGET_DIR}/0003-BSP-Autogen-File.patch"
+    rm -f "${PATCH_TARGET_DIR}"/0004-Add-BSP-support-files-*.patch

139-143: Consider using display_alert for consistency.

The waiting loop uses echo for status messages, while the rest of the function uses display_alert. Using display_alert would provide consistent logging format.

🔎 Proposed fix
     while [[ ! -d "${expected_dir}/configs" ]] && [[ $wait_count -lt 60 ]]; do
-        echo "Waiting for Device files to appear in ${expected_dir}... Wait time: $((wait_count * 2))s"
+        display_alert "Waiting for BSP files to appear" "Wait time: $((wait_count * 2))s" "info"
         sleep 2
         wait_count=$((wait_count + 1))
     done

184-206: Use exit_with_error for consistent error handling.

Line 193 uses exit 1 within a subshell, which will terminate the subshell but may not properly terminate the main build process. For consistency with Armbian conventions, consider using exit_with_error or checking the subshell's exit status.

🔎 Proposed fix
         display_alert "$BOARD" "Generating ${PATCH_NAME}" "info"
         (
-            cd "${kernel_work_dir}" || exit 1
+            cd "${kernel_work_dir}" || exit_with_error "Failed to cd to kernel_work_dir"
             git config user.email "support@armbian.com"
             git config user.name "Armbian Builder"

             git add Makefile
             git add arch/arm64/boot/dts/allwinner/*.dtsi
             git add include/dt-bindings/
             
             git commit -m "Add BSP support files ${CURRENT_BSP_HASH}"
             git format-patch -1 --stdout > "${FULL_PATCH_PATH}"
             
             git reset --hard HEAD~1
             git clean -fd
-        )
+        ) || exit_with_error "BSP patch generation failed"

239-239: Consider quoting the glob pattern.

Same minor style issue as in the BSP function: unquoted glob pattern in rm -f.

🔎 Proposed fix
-    rm -f "${PATCH_TARGET_DIR}/0005-Add-Allwinner-Device-a733"*.patch
+    rm -f "${PATCH_TARGET_DIR}"/0005-Add-Allwinner-Device-a733*.patch

262-267: Consider using display_alert for consistency.

Same as in the BSP function: the waiting loop uses echo instead of display_alert.

🔎 Proposed fix
     while [[ ! -d "${expected_dir}/configs" ]] && [[ $wait_count -lt 60 ]]; do
-        echo "Waiting for Device files... $((wait_count * 2))s"
+        display_alert "Waiting for Device files" "Wait time: $((wait_count * 2))s" "info"
         sleep 2
         wait_count=$((wait_count + 1))
     done

276-286: Use exit_with_error for consistent error handling.

Same issue as in the BSP function: line 277 uses exit 1 within a subshell.

🔎 Proposed fix
         display_alert "$BOARD" "Generating ${PATCH_NAME}" "info"
         (
-            cd "${kernel_work_dir}" || exit 1
+            cd "${kernel_work_dir}" || exit_with_error "Failed to cd to kernel_work_dir"
             git config user.email "support@armbian.com"
             git config user.name "Armbian Builder"
             git add .
             git commit -m "Add Allwinner Device a733 ${CURRENT_REMOTE_HASH}"
             git format-patch -1 --stdout > "${FULL_PATCH_PATH}"
             
             git reset --hard HEAD~1
             git clean -fd
-        )
+        ) || exit_with_error "Device patch generation failed"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between eb6d3ee and 7e45dd4.

📒 Files selected for processing (1)
  • config/sources/families/sun60iw2.conf
🧰 Additional context used
🧠 Learnings (19)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-25T03:42:09.086Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:42:09.086Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, KERNELSOURCE is explicitly declared when using unofficial or 3rd party kernel repositories (like the "dev" branch using https://github.com/apritzel/linux), but can be omitted when using the standard mainline kernel (like the "edge" branch) since it will fall back to the default mainline source.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-25T03:40:52.109Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-12T19:28:38.491Z
Learnt from: Grippy98
Repo: armbian/build PR: 8622
File: config/sources/families/k3.conf:66-66
Timestamp: 2025-09-12T19:28:38.491Z
Learning: In the Armbian k3 family build system (config/sources/families/k3.conf), builds do not fail when TIBOOT3_BOOTCONFIG is unset, even though tiboot3.bin is still listed in UBOOT_TARGET_MAP. The gating mechanism in pre_config_uboot_target__build_first_stage function works as intended to conditionally build/copy tiboot3.bin only when TIBOOT3_BOOTCONFIG is defined.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-07-17T04:12:33.125Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-11-06T15:36:04.682Z
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-13T11:39:08.046Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-07-23T07:30:52.265Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-01T06:11:43.476Z
Learnt from: wei633
Repo: armbian/build PR: 8557
File: config/bootscripts/boot-xpressreal-t3.cmd:0-0
Timestamp: 2025-09-01T06:11:43.476Z
Learning: In Armbian boot scripts without initramfs support, UUID= and LABEL= style device paths cannot be used for rootdev as they require initramfs to resolve during boot. Only direct device paths (/dev/mmcblkXpY) or PARTUUID= references (which U-Boot can resolve) will work.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-13T11:45:02.422Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-08-11T12:39:22.861Z
Learnt from: pyavitz
Repo: armbian/build PR: 8481
File: config/kernel/linux-spacemit-edge.config:492-494
Timestamp: 2025-08-11T12:39:22.861Z
Learning: The SpacemiT platform requires esos.elf firmware to be embedded in the kernel image for boot. The Armbian build system handles this by copying esos.elf from $SRC/packages/blobs/riscv64/spacemit/ to ${kernel_work_dir}/firmware/ via the custom_kernel_config__spacemit_k1_firmware() function in config/sources/families/spacemit.conf, ensuring CONFIG_EXTRA_FIRMWARE="esos.elf" can successfully embed it during kernel build.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-04T23:45:38.860Z
Learnt from: djurny
Repo: armbian/build PR: 8272
File: config/bootscripts/boot-mvebu.cmd:182-186
Timestamp: 2025-06-04T23:45:38.860Z
Learning: In config/bootscripts/boot-mvebu.cmd, the `fdtfile` variable is mandatory for booting and is pre-set by U-Boot, but can be overridden via armbianEnv.txt. If `fdtfile` is empty, the subsequent device tree file search logic will eventually fail and trigger the critical error "Cannot find DT!" with proper error handling.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-12T23:09:56.813Z
Learnt from: tabrisnet
Repo: armbian/build PR: 9058
File: config/sources/families/spacemit.conf:39-45
Timestamp: 2025-12-12T23:09:56.813Z
Learning: In Armbian build configs for vendor kernel sources, prefer the following branch naming conventions: use 'vendor' or 'vendor-rt' for stable vendor releases, and 'vendor-edge' for bleeding-edge/pre-release vendor versions. The 'edge' naming without the 'vendor-' prefix is reserved for mainline kernel branches. Apply this pattern to family config files under config/sources/families (e.g., spacemit.conf) to ensure consistent vendor kernel sourcing naming across the repository.

Applied to files:

  • config/sources/families/sun60iw2.conf
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Verify assets for newly added boards
🔇 Additional comments (3)
config/sources/families/sun60iw2.conf (3)

1-26: LGTM! Clean family configuration setup.

The header, variable declarations, and vendor branch configuration follow Armbian conventions correctly. The use of "vendor" branch naming for the Radxa kernel fork aligns with project standards.


292-302: LGTM! Standard bootloader write implementation.

The write_uboot_platform() function follows the established Armbian pattern for writing bootloader components to the target device with appropriate dd parameters and partition labeling.


148-149: Improve glob pattern handling for existing patch detection.

The ls command with a glob pattern inside command substitution can fail if no matching files exist, causing basename to process an error message rather than a filename. This could lead to incorrect hash comparison logic.

🔎 Proposed fix
-    local EXISTING_BSP_FILE=$(basename $(ls "${PATCH_ARCHIVE_DIR}/0004-Add-BSP-support-files-"*.patch 2>/dev/null | head -n 1))
-    local EXISTING_BSP_HASH=$(echo "${EXISTING_BSP_FILE}" | grep -oP 'files-\K[a-f0-9]+(?=\.patch)')
+    local EXISTING_BSP_FILE=""
+    local EXISTING_BSP_HASH=""
+    if compgen -G "${PATCH_ARCHIVE_DIR}/0004-Add-BSP-support-files-"*.patch > /dev/null; then
+        EXISTING_BSP_FILE=$(basename "$(ls "${PATCH_ARCHIVE_DIR}/0004-Add-BSP-support-files-"*.patch 2>/dev/null | head -n 1)")
+        EXISTING_BSP_HASH=$(echo "${EXISTING_BSP_FILE}" | grep -oP 'files-\K[a-f0-9]+(?=\.patch)')
+    fi
⛔ Skipped due to learnings
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T06:48:09.091Z
Learning: In lib/functions/compilation/armbian-kernel.sh, the user prefers flexible grep patterns over anchored ones for BTRFS configuration checks, but agrees to use quiet grep (-q) to avoid polluting build logs.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Learnt from: tabrisnet
Repo: armbian/build PR: 8661
File: lib/functions/compilation/armbian-kernel.sh:194-199
Timestamp: 2025-09-25T18:37:00.330Z
Learning: In PR armbian/build#8661, line 235 of lib/functions/compilation/armbian-kernel.sh already contains the corrected comment "BPF link support for netfilter hooks" for NETFILTER_BPF_LINK, not the misleading "BPF_SYSCALL" comment that was flagged during review.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.

@EvilOlaf
Copy link
Member Author

Now build fails https://paste.armbian.com/wijeniroko

@NickAlilovic
Copy link

deleted:    patch/kernel/archive/sunxi-5.15/0003-BSP-Autogen-File.patch
deleted:    patch/kernel/archive/sunxi-5.15/0004-Add-BSP-support-files-e2be153c5c.patch
deleted:    patch/kernel/archive/sunxi-5.15/0005-Add-Allwinner-Device-a733-86c628c575.patch

You Still need these three patches. Sorry I forgot to add your vendor changes. 

@NickAlilovic
Copy link

NickAlilovic commented Dec 29, 2025

I cloned your a733 branch
https://github.com/NickAlilovic/build/tree/a733

I fixed the issues pointed out by coderabbitai.

I also added KMSCON (KMS/DRM-based system console). Without it the frame buffer console will not work properly.

	if [ -d "/etc/systemd/system/kmsconvt@tty1.service.d" ] && [ -f "/etc/systemd/system/kmsconvt@tty1.service.d/override.conf" ]; then
    		rm -f /etc/systemd/system/kmsconvt@tty1.service.d/override.conf
	fi

I could inject this code into armbian-firstlogin‎ using family tweaks.

I’ll upload the kmscon sources and deb configuration onto my repository so others can compile their own packages.

@EvilOlaf
Copy link
Member Author

EvilOlaf commented Dec 30, 2025

I’ll upload the kmscon sources and deb configuration onto my repository so others can compile their own packages.

This cannot simply be installed by apt, no?

You Still need these three patches.

Why? I thought they are auto-generated and moved into cache?

Improve glob pattern handling for existing patch detection.
Fix error when no boot binaries are found.
Remove the leading slash from GIT_FIXED_WORKDIR.
Use exit_with_error for consistent error handling.
@armbian armbian deleted a comment from github-actions bot Dec 30, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
config/sources/families/sun60iw2.conf (4)

173-174: Consider adding existence checks for source files before copying.

Lines 173-174 copy .dtsi and dt-bindings files using wildcards without first verifying that source files exist. While the || exit_with_error on line 212 will catch failures, adding explicit checks would provide clearer error messages if source files are missing.

🔎 Suggested improvement
     if [[ -d "${expected_dir}" ]]; then
+        if ! compgen -G "${expected_dir}/configs/linux-5.15/*.dtsi" > /dev/null; then
+            exit_with_error "No .dtsi files found in BSP configs/linux-5.15/"
+        fi
         run_host_command_logged cp "${expected_dir}"/configs/linux-5.15/*.dtsi "${kernel_work_dir}"/arch/arm64/boot/dts/allwinner
         run_host_command_logged cp -r "${expected_dir}"/include/dt-bindings/. "${kernel_work_dir}"/include/dt-bindings

176-182: Sed multi-line insert pattern may be fragile across environments.

The Makefile modification uses a complex sed pattern with multi-line text insertion. While this likely works in the Armbian build environment, consider using printf or here-docs for more portable multi-line text handling if issues arise in the future.


290-290: Prefer specific git add over broad wildcard.

Line 290 uses git add . which stages all modified/new files in the kernel work directory. This is overly broad and could inadvertently stage unintended files. Consider explicitly listing the paths being added (DTS files and bsp.config) for more predictable behavior.

🔎 Proposed change
-            git add .
+            git add arch/arm64/boot/dts/allwinner/sun60i-a733-*.dts
+            git add arch/arm64/configs/bsp.config

302-312: Add existence checks and error handling for boot file writes.

The function writes boot binaries to the device without verifying that the source files exist or that the dd operations succeed. Adding checks would prevent silent failures during image creation.

🔎 Proposed improvements
 function write_uboot_platform() {
     local SCRIPT_DIR="$1"
     local DEVICE="$2"
+    
+    # Verify required boot files exist
+    local required_files=("boot0_sdcard.bin" "boot0_ufs.bin" "boot_package.fex")
+    for file in "${required_files[@]}"; do
+        [[ -f "${SCRIPT_DIR}/${file}" ]] || exit_with_error "Required boot file not found: ${SCRIPT_DIR}/${file}"
+    done
 
-    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot0_sdcard.bin" of="$DEVICE" bs=512 seek=256
-    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot0_ufs.bin" of="$DEVICE" bs=512 seek=2064
-    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot_package.fex" of="$DEVICE" bs=512 seek=24576
+    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot0_sdcard.bin" of="$DEVICE" bs=512 seek=256 || exit_with_error "Failed to write boot0_sdcard.bin"
+    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot0_ufs.bin" of="$DEVICE" bs=512 seek=2064 || exit_with_error "Failed to write boot0_ufs.bin"
+    dd conv=notrunc,fsync status=none if="$SCRIPT_DIR/boot_package.fex" of="$DEVICE" bs=512 seek=24576 || exit_with_error "Failed to write boot_package.fex"
     sync "${DEVICE}"
     
     sfdisk --part-label "$DEVICE" 1 "primary"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7e45dd4 and 8a9a047.

📒 Files selected for processing (1)
  • config/sources/families/sun60iw2.conf
🧰 Additional context used
🧠 Learnings (33)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-25T03:42:09.086Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:42:09.086Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, KERNELSOURCE is explicitly declared when using unofficial or 3rd party kernel repositories (like the "dev" branch using https://github.com/apritzel/linux), but can be omitted when using the standard mainline kernel (like the "edge" branch) since it will fall back to the default mainline source.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-25T03:40:52.109Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-12T19:28:38.491Z
Learnt from: Grippy98
Repo: armbian/build PR: 8622
File: config/sources/families/k3.conf:66-66
Timestamp: 2025-09-12T19:28:38.491Z
Learning: In the Armbian k3 family build system (config/sources/families/k3.conf), builds do not fail when TIBOOT3_BOOTCONFIG is unset, even though tiboot3.bin is still listed in UBOOT_TARGET_MAP. The gating mechanism in pre_config_uboot_target__build_first_stage function works as intended to conditionally build/copy tiboot3.bin only when TIBOOT3_BOOTCONFIG is defined.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-11-06T15:36:04.682Z
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-07-17T04:12:33.125Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-14T11:37:35.089Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-08-30T06:48:09.091Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T06:48:09.091Z
Learning: In lib/functions/compilation/armbian-kernel.sh, the user prefers flexible grep patterns over anchored ones for BTRFS configuration checks, but agrees to use quiet grep (-q) to avoid polluting build logs.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-08-29T18:44:47.732Z
Learnt from: leggewie
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-29T18:44:47.732Z
Learning: When creating GitHub issues for code improvements in the Armbian build project, include the relevant patches/diffs in the issue description or open a PR directly instead of just describing the changes. This makes it more efficient for the assignee to handle the improvements.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-05-16T15:34:34.672Z
Learnt from: Grippy98
Repo: armbian/build PR: 8202
File: config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh:2-3
Timestamp: 2025-05-16T15:34:34.672Z
Learning: The shell scripts in the Armbian build system's desktop configuration files, such as config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh, rely on environment variables like $SRC and $destination that are expected to be set externally before the script is executed.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-11-11T20:56:20.303Z
Learnt from: glneo
Repo: armbian/build PR: 8913
File: config/sources/families/include/k3_common.inc:57-60
Timestamp: 2025-11-11T20:56:20.303Z
Learning: In config/sources/families/include/k3_common.inc, the OP-TEE build command at line 59 should be updated in a future PR to explicitly set CROSS_COMPILE64=aarch64-linux-gnu- and CROSS_COMPILE32=arm-linux-gnueabihf- instead of relying on OP-TEE's internal defaults, for better clarity and maintainability. User glneo agreed to address this in a separate PR.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-01T02:34:37.451Z
Learnt from: tabrisnet
Repo: armbian/build PR: 9000
File: config/desktop/questing/environments/xfce/debian/postinst:17-18
Timestamp: 2025-12-01T02:34:37.451Z
Learning: In the Armbian build system shell scripts, the sed pattern with -i flag placed after the script argument (e.g., `sed "s/.../.../" -i file`) is intentional and correct. While non-POSIX, this GNU sed extension is used throughout the codebase and works correctly in the Armbian build environment. This pattern should not be flagged as incorrect.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-16T13:40:07.649Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 9087
File: .github/workflows/pr-check-pictures.yml:138-146
Timestamp: 2025-12-16T13:40:07.649Z
Learning: In the Armbian build repository, when introducing new requirements or checks (like the board assets verification workflow), the project prefers an initial educational-only period where violations post helpful PR comments and warnings but don't block merges. This allows contributors to become familiar with new requirements before enforcement is enabled (typically after ~6 months).

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-10-24T04:46:22.901Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-10-04T17:59:19.369Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8705
File: .github/workflows/rewrite-kernel-configs.yml:217-220
Timestamp: 2025-10-04T17:59:19.369Z
Learning: In the Armbian build repository's kernel config rewrite workflow (.github/workflows/rewrite-kernel-configs.yml), the workflow is designed to rewrite existing kernel configs only. New/untracked files can be safely ignored, so using `git diff --quiet` (which ignores untracked files) is the correct approach for detecting changes rather than `git status --porcelain`.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-13T11:39:08.046Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-07-23T07:30:52.265Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-13T11:45:02.422Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-09-01T06:11:43.476Z
Learnt from: wei633
Repo: armbian/build PR: 8557
File: config/bootscripts/boot-xpressreal-t3.cmd:0-0
Timestamp: 2025-09-01T06:11:43.476Z
Learning: In Armbian boot scripts without initramfs support, UUID= and LABEL= style device paths cannot be used for rootdev as they require initramfs to resolve during boot. Only direct device paths (/dev/mmcblkXpY) or PARTUUID= references (which U-Boot can resolve) will work.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-08-11T12:39:22.861Z
Learnt from: pyavitz
Repo: armbian/build PR: 8481
File: config/kernel/linux-spacemit-edge.config:492-494
Timestamp: 2025-08-11T12:39:22.861Z
Learning: The SpacemiT platform requires esos.elf firmware to be embedded in the kernel image for boot. The Armbian build system handles this by copying esos.elf from $SRC/packages/blobs/riscv64/spacemit/ to ${kernel_work_dir}/firmware/ via the custom_kernel_config__spacemit_k1_firmware() function in config/sources/families/spacemit.conf, ensuring CONFIG_EXTRA_FIRMWARE="esos.elf" can successfully embed it during kernel build.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-06-04T23:45:38.860Z
Learnt from: djurny
Repo: armbian/build PR: 8272
File: config/bootscripts/boot-mvebu.cmd:182-186
Timestamp: 2025-06-04T23:45:38.860Z
Learning: In config/bootscripts/boot-mvebu.cmd, the `fdtfile` variable is mandatory for booting and is pre-set by U-Boot, but can be overridden via armbianEnv.txt. If `fdtfile` is empty, the subsequent device tree file search logic will eventually fail and trigger the critical error "Cannot find DT!" with proper error handling.

Applied to files:

  • config/sources/families/sun60iw2.conf
📚 Learning: 2025-12-12T23:09:56.813Z
Learnt from: tabrisnet
Repo: armbian/build PR: 9058
File: config/sources/families/spacemit.conf:39-45
Timestamp: 2025-12-12T23:09:56.813Z
Learning: In Armbian build configs for vendor kernel sources, prefer the following branch naming conventions: use 'vendor' or 'vendor-rt' for stable vendor releases, and 'vendor-edge' for bleeding-edge/pre-release vendor versions. The 'edge' naming without the 'vendor-' prefix is reserved for mainline kernel branches. Apply this pattern to family config files under config/sources/families (e.g., spacemit.conf) to ensure consistent vendor kernel sourcing naming across the repository.

Applied to files:

  • config/sources/families/sun60iw2.conf
🔇 Additional comments (3)
config/sources/families/sun60iw2.conf (3)

10-26: LGTM: Family configuration follows Armbian conventions.

The global declarations and vendor branch configuration are correctly structured. The use of vendor branch naming for the Radxa non-mainline kernel is appropriate per Armbian standards.


29-112: LGTM: Custom U-Boot build function is well-implemented.

The function correctly downloads pre-built U-Boot binaries from GitHub, validates required assets, handles errors appropriately with exit_with_error, and performs cleanup before exiting. The error handling improvements from the previous review have been properly addressed.


134-139: No action required. The GIT_FIXED_WORKDIR path handling is consistent and correct between the BSP and device functions. Both use the same mechanism where GIT_FIXED_WORKDIR is prefixed with ${SRC}/cache/sources/ by fetch_from_repo, and both expected_dir variables correctly match their corresponding worktree locations.

Likely an incorrect or invalid review comment.

Comment on lines +280 to +283
run_host_command_logged cp "${expected_dir}/configs/cubie_a7a/linux-5.15/board.dts" "${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts"
run_host_command_logged cp "${expected_dir}/configs/cubie_a7s/linux-5.15/board.dts" "${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts"
run_host_command_logged cp "${expected_dir}/configs/cubie_a7z/linux-5.15/board.dts" "${kernel_work_dir}/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts"
run_host_command_logged cp "${expected_dir}/configs/default/linux-5.15/bsp_defconfig" "${kernel_work_dir}/arch/arm64/configs/bsp.config"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Hard-coded board names limit family config reusability.

Lines 280-283 hard-code specific board DTS file paths (cubie_a7a, cubie_a7s, cubie_a7z). This tightly couples the sun60iw2 family configuration to these exact boards. If this family is used with other sun60iw2-based boards in the future, these hard-coded paths would need modification. Consider whether this should be parameterized via board config variables or if this family config is intentionally scoped to only these specific Radxa Cubie boards.

🤖 Prompt for AI Agents
config/sources/families/sun60iw2.conf around lines 280-283: the DTS copy
commands hard-code cubie_a7a/cubie_a7s/cubie_a7z paths which prevents reusing
this family for other sun60iw2 boards; change them to use a board-config
variable or a list of board identifiers (e.g. ${board} or ${boards[*]}) and
iterate/copy dynamically, falling back to a default if not provided, or document
that this family intentionally targets only those three boards and keep the
explicit paths if so.

@NickAlilovic
Copy link

NickAlilovic commented Dec 30, 2025

apt doesn't have kmscon for newer debian builds. I couldn't find them.

We need these initial patches to build the kernel. Radxa doesn't have a repo with all these changes applied. It's done using a container and Makefiles.
https://docs.radxa.com/en/cubie/a7a/low-level-dev/system-build/kernel

The script I wrote checks to see if there are any changes to the bsp and device repositories. If the repositories have been changed then my script will generate a new set of patches.

We can always replace the initial patches with these new ones. It's there in case we need them.

@EvilOlaf
Copy link
Member Author

tbh I feel totally uncomfortable having this dynamicly generated patches weirdness. We never had such a behaviour before.

@NickAlilovic
Copy link

It's not doing anything right now. Just sitting in a cache. Shouldn't affect the build.

@NickAlilovic
Copy link

I can remove it. No big deal.

@NickAlilovic
Copy link

I was going to disable it. Turn it on when there's a major update then edit the Armbian custom patches. Like we do with kernel version updates.

@NickAlilovic
Copy link

NickAlilovic commented Dec 30, 2025

Removed the dynamicly generated patch script. I also removed the u-boot radxa logo and replaced it with the Armbian boot.bmp. The Plymouth splash worked.

U-Boot expects an image in 32-bit TrueColor format. Also, it expects the name "logo.bmp" in the gpt partition named "primary". The Armbian boot.bmp is a 4-bit (16-color) indexed BMP. So I converted the boot.bmp and renamed it to logo.bmp. Works fine now.

@NickAlilovic
Copy link

NickAlilovic commented Dec 30, 2025

Here are my KMSCON sources. I built them directly on my radxa board. Apt could not find kmscon or the required libtsm. I think I was using trixie at the time. I updated the instructions to make it easier for others to build and install.
https://github.com/NickAlilovic/libtsm
https://github.com/NickAlilovic/kmscon

@NickAlilovic
Copy link

NickAlilovic commented Dec 30, 2025

I'm looking at Orangepi 4a pro right now. They have their own kernel. Also, they already applied their own sunxi-autogen.h, bsp and device patches.
https://github.com/orangepi-xunlong/linux-orangepi/commits/orange-pi-5.15-sun60iw2/?before=dcbc45962e8891731d7b821fb40950a1e905705b+35

Radxa is using the Official Allwinner Kernel (Tina Linux). The sunxi-autogen.h, bsp and device patches are applied in a container build.
https://github.com/radxa/kernel/commits/allwinner-aiot-linux-5.15/

I think to support Orangepi 4a pro BSP we need two separate patch directories and kernel downloads. It will be too complicated to merge them into one kernel and patch directory.

@EvilOlaf
Copy link
Member Author

EvilOlaf commented Jan 3, 2026

Is for 6.6 bsp kernel still this patching weirdness necessary?

@NickAlilovic
Copy link

NickAlilovic commented Jan 3, 2026

I’ll add 6.6 to your a733 repository soon. I’m going to remove the code from my branch. Radxa doesn’t update that often.

@NickAlilovic
Copy link

NickAlilovic commented Jan 3, 2026

My Radxa-A7A and a733 branches should be identical now. I’ll keep the Radxa-A7A branch in case there's something I missed.

Kernel 6.6 is still a work in progress. It can start and load Armbian, though the initial boot takes some time.

Using AI to find answers..
"Based on your systemd-analyze output, your first boot is taking 4 minutes and 20 seconds, with the vast majority of that time (4 minutes and 2 seconds) being consumed by a single service:
The Root Cause: armbian-resize-filesystem.service"

There are also Wi-Fi connection issues, but the Ethernet connection works.

Kernel 6.6 and the new BSP fixed the console issue. I'll have to look into it more to see if I can backport the fix.

@EvilOlaf
Copy link
Member Author

EvilOlaf commented Jan 4, 2026

I abandon the idea to port this to the framework. Too much effort for very little gain. Allwinner bsp has too much weirdness and its overall quality is probably as poor as we're used to already. On the bottom line any vendor kernel is doomed to be abandoned at some point anyway.

Perhaps somebody else want to take this over (and do it better than I tried lol).

@EvilOlaf EvilOlaf closed this Jan 4, 2026
@EvilOlaf EvilOlaf deleted the a733 branch February 2, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

2 participants