Skip to content

Conversation

@rpardini
Copy link
Member

@rpardini rpardini commented Jan 12, 2026

mixtile-core3588e: alias ethernet0 to gmac0 for stable MAC address

  • 🌱 mixtile-core3588e: u-boot: enable ramboot, add usb471/2 to targets
  • 🌿 mixtile-core3588e: alias ethernet0 to gmac0 for stable MAC address
    • phew. this was all it takes. u-boot does the rest of the magic
  • 🍃 mixtile-core3588e: u-boot: v2026.01: add patch for debugging fdt_fixup_ethernet()
    • a bit verbose but confirms missing ethernet0/1 alias was the cause of random MACs for at least a few boards
    • there's quite a few boards to fix, so we might want to pull this one level up later

Summary by CodeRabbit

  • New Features

    • Added bootloader support for multiple USB boot mode variants (USB471 and USB472)
    • Enabled RAMBoot image generation support
  • Configuration Updates

    • Configured Ethernet interface alias mappings across kernel and bootloader for improved device recognition
    • Enhanced diagnostic and debugging output for Ethernet MAC address configuration troubleshooting

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

This pull request extends the Mixtile Core3588E board's U-Boot configuration to support USB boot variants (usb471/usb472) alongside the primary U-Boot target, enables RAMBoot/Maskrom image support, adds ethernet0 alias definitions across kernel and U-Boot device trees, and introduces extensive logging instrumentation to the Ethernet FDT fixup flow for debugging purposes.

Changes

Cohort / File(s) Summary
Board Configuration
config/boards/mixtile-core3588e.csc
Declared UBOOT_TARGET_MAP as global variable and expanded target list to include u-boot-rockchip-usb471.bin and u-boot-rockchip-usb472.bin variants; added CONFIG_ROCKCHIP_MASKROM_IMAGE enablement for RAMBoot image support.
Kernel Device Trees
patch/kernel/archive/rockchip64-6.18/dt/rk3588-mixtile-core3588e.dts, patch/kernel/archive/rockchip64-6.19/dt/rk3588-mixtile-core3588e.dts
Added ethernet0 alias mapping to &gmac0 in the aliases section of each device tree.
U-Boot Device Trees
patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-mixtile-core3588e.dts
Added ethernet0 alias mapping to &gmac0 in the root aliases block.
U-Boot Logging Instrumentation
patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
Extended fdt_fixup_ethernet with comprehensive logging, counters (aliases, attempted, skipped, patched), defensive guards for missing aliases and disabled nodes, MAC resolution from environment variables, and call-site instrumentation in image-fdt.c and image_setup_libfdt.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • igorpecovnik
  • paolosabatino
  • pyavitz
  • joekhoobyar
  • krachlatte
  • catalinii
  • TheSnowfield

Poem

🐰 Hops of joy for USB booting,
Ethernet aliases now routing,
Maskrom images take flight,
With logging shining bright—
The Core3588E is bootiful! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: adding ethernet0 alias to gmac0 for stable MAC addressing on mixtile-core3588e, which is reflected across multiple device tree files and U-Boot configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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 02 Milestone: First quarter release size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 12, 2026
- phew. this was all it takes. u-boot does the rest of the magic
…p_ethernet()

- a bit verbose but confirms missing `ethernet0`/`1` alias was the cause of random MACs for at least a few boards
- there's quite a few boards to fix, so we might want to pull this one level up later
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 (3)
patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch (3)

19-19: #warning directives are helpful for debug visibility but noisy.

Multiple #warning directives throughout this patch will generate compiler warnings during every build. This is useful for confirming the instrumented code paths are being compiled, but should be removed or gated (e.g., #ifdef DEBUG_MAC_FIXUP) before this patch is promoted to a higher level, as noted in the PR description.


72-84: Duplicate status checks with differing semantics when FDT_SEQ_MACADDR_FROM_ENV is defined.

When FDT_SEQ_MACADDR_FROM_ENV is defined:

  1. Lines 77-81 skip nodes where status == "disabled"
  2. Lines 101-105 skip nodes where status != "okay"

These checks have different semantics—a node with status = "reserved" or no status property would pass check #1 but fail check #2. Additionally, nodeoff is computed twice (line 73 and line 95, with line 95 shadowing the outer declaration).

For a debug patch this may be intentional (stricter checking), but worth noting if this logic is promoted upstream.

Also applies to: 95-106


133-134: #warning placed before SPDX license header.

The #warning directive is inserted before the SPDX license identifier, which is unconventional. While this doesn't affect functionality, placing debug instrumentation after the license header maintains source file conventions.

📜 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 25f6eec and 8278a1d.

📒 Files selected for processing (5)
  • config/boards/mixtile-core3588e.csc
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-mixtile-core3588e.dts
  • patch/kernel/archive/rockchip64-6.19/dt/rk3588-mixtile-core3588e.dts
  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-mixtile-core3588e.dts
🧰 Additional context used
🧠 Learnings (31)
📓 Common learnings
Learnt from: rpardini
Repo: armbian/build PR: 9233
File: patch/u-boot/v2026.01/1000-rockchip-rk3588-stable-MAC-addresses-system-fixup-on-fdt-gmacX.patch:86-94
Timestamp: 2026-01-12T17:21:32.630Z
Learning: For U-Boot patches that implement custom MAC address injection into device tree nodes (such as for Rockchip RK3588 gmac interfaces), consider using U-Boot's standard fdt_fixup_ethernet() function instead. This function automatically walks /aliases looking for ethernet, ethernet0, ethernet1, etc., resolves each to a device node, and writes the corresponding environment MAC (ethaddr, eth1addr) into the mac-address or local-mac-address property. The standard approach requires: 1) adding ethernet aliases to board device trees (e.g., ethernet0 = &gmac0), 2) calling fdt_fixup_ethernet(blob) in ft_board_setup() or ft_system_setup(), and 3) ensuring ethaddr/eth1addr are set in the environment. This is simpler, well-tested, and easier to upstream than custom implementations.
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: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
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: 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: 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: 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: 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: 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: 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: 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.
📚 Learning: 2026-01-12T17:21:32.630Z
Learnt from: rpardini
Repo: armbian/build PR: 9233
File: patch/u-boot/v2026.01/1000-rockchip-rk3588-stable-MAC-addresses-system-fixup-on-fdt-gmacX.patch:86-94
Timestamp: 2026-01-12T17:21:32.630Z
Learning: For U-Boot patches that implement custom MAC address injection into device tree nodes (such as for Rockchip RK3588 gmac interfaces), consider using U-Boot's standard fdt_fixup_ethernet() function instead. This function automatically walks /aliases looking for ethernet, ethernet0, ethernet1, etc., resolves each to a device node, and writes the corresponding environment MAC (ethaddr, eth1addr) into the mac-address or local-mac-address property. The standard approach requires: 1) adding ethernet aliases to board device trees (e.g., ethernet0 = &gmac0), 2) calling fdt_fixup_ethernet(blob) in ft_board_setup() or ft_system_setup(), and 3) ensuring ethaddr/eth1addr are set in the environment. This is simpler, well-tested, and easier to upstream than custom implementations.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/dt/rk3588-mixtile-core3588e.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-mixtile-core3588e.dts
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-mixtile-core3588e.dts
📚 Learning: 2025-11-15T14:33:30.654Z
Learnt from: SuperKali
Repo: armbian/build PR: 8936
File: patch/kernel/archive/rockchip64-6.18/dt/rk3576-nanopi-r76s.dts:800-802
Timestamp: 2025-11-15T14:33:30.654Z
Learning: In RK3576 device tree files (like rk3576-nanopi-r76s.dts), the serial0 alias is already defined in the upstream kernel's rk3576.dtsi base file, so board-specific DTS files do not need to redeclare it when enabling &uart0 for serial console.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/dt/rk3588-mixtile-core3588e.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-mixtile-core3588e.dts
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-mixtile-core3588e.dts
📚 Learning: 2025-12-23T04:44:25.212Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9067
File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875
Timestamp: 2025-12-23T04:44:25.212Z
Learning: During code reviews of device tree changes (any .dts file), verify node properties against the official kernel device tree binding documentation (*.yaml) rather than relying solely on patterns observed in existing DTS files. This helps catch copy-paste or drift errors and ensures properties align with authoritative bindings for each device node type.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/dt/rk3588-mixtile-core3588e.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3588-mixtile-core3588e.dts
  • patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-mixtile-core3588e.dts
📚 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/boards/mixtile-core3588e.csc
📚 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/mixtile-core3588e.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/mixtile-core3588e.csc
  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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/boards/mixtile-core3588e.csc
  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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/mixtile-core3588e.csc
📚 Learning: 2026-01-03T20:46:29.189Z
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>

Applied to files:

  • config/boards/mixtile-core3588e.csc
  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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/boards/mixtile-core3588e.csc
📚 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/boards/mixtile-core3588e.csc
📚 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/mixtile-core3588e.csc
📚 Learning: 2025-06-12T21:14:36.024Z
Learnt from: djurny
Repo: armbian/build PR: 8287
File: config/bootscripts/boot-sunxi.cmd:38-44
Timestamp: 2025-06-12T21:14:36.024Z
Learning: In config/bootscripts/boot-sunxi.cmd the unconditional "+1" increment in func_align_addr_next (when align_overlap_oboe_avoidance="on") is intentional. It compensates for a known off-by-one error in U-Boot where the end address is calculated as start+size instead of start+size-1, so the extra page prevents overlap. This behavior should not be “optimized away”.

Applied to files:

  • config/boards/mixtile-core3588e.csc
📚 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/boards/mixtile-core3588e.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/mixtile-core3588e.csc
📚 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/boards/mixtile-core3588e.csc
  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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/mixtile-core3588e.csc
📚 Learning: 2025-06-12T21:03:39.686Z
Learnt from: djurny
Repo: armbian/build PR: 8287
File: config/bootscripts/boot-sunxi.cmd:148-161
Timestamp: 2025-06-12T21:03:39.686Z
Learning: In Armbian U-Boot bootscripts, the `${cpu}` environment variable is always pre-set by U-Boot (or defaults to a valid value), so additional guards against it being unset are unnecessary.

Applied to files:

  • config/boards/mixtile-core3588e.csc
📚 Learning: 2025-08-02T05:46:10.664Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the modern recommended approach for kernel configuration is to use the kernel-config command via "./compile.sh BOARD=boardname BRANCH=branchname kernel-config" instead of the deprecated KERNEL_CONFIGURE=yes flag. This provides a two-step workflow: configure using menuconfig, then build, with better transparency and control over configuration changes.

Applied to files:

  • config/boards/mixtile-core3588e.csc
📚 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/mixtile-core3588e.csc
📚 Learning: 2026-01-12T17:21:32.630Z
Learnt from: rpardini
Repo: armbian/build PR: 9233
File: patch/u-boot/v2026.01/1000-rockchip-rk3588-stable-MAC-addresses-system-fixup-on-fdt-gmacX.patch:86-94
Timestamp: 2026-01-12T17:21:32.630Z
Learning: When creating U-Boot patches that inject MAC addresses into device-tree nodes (e.g., for RK3588 GMAC), prefer using U-Boot's fdt_fixup_ethernet() instead of custom patch logic. This function scans /aliases (ethernet, ethernet0, ethernet1, ...), resolves each to a device node, and writes ethaddr/eth1addr into the mac-address or local-mac-address properties. Ensure the patch: 1) adds ethernet aliases to the board DT (e.g., ethernet0 = &gmac0), 2) calls fdt_fixup_ethernet(blob) in ft_board_setup() or ft_system_setup(), and 3) guarantees ethaddr/eth1addr are set in the environment. This approach is simpler, well-tested, and easier to upstream than bespoke code.

Applied to files:

  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.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/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.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/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.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/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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:

  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.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/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 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:

  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 Learning: 2025-08-03T15:21:20.148Z
Learnt from: pyavitz
Repo: armbian/build PR: 8455
File: config/sources/families/sun50iw1.conf:19-24
Timestamp: 2025-08-03T15:21:20.148Z
Learning: In the Armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware/updates/ instead of /lib/firmware/ to avoid conflicts with the Armbian firmware package. The /lib/firmware/updates directory takes precedence in Linux firmware loading hierarchy and is the proper location for user-installed firmware files.

Applied to files:

  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
📚 Learning: 2026-01-10T04:28:58.758Z
Learnt from: kasimling
Repo: armbian/build PR: 9177
File: patch/kernel/archive/rockchip64-6.18/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch:37-41
Timestamp: 2026-01-10T04:28:58.758Z
Learning: When reviewing Linux kernel device-tree bindings involving thermal cooling devices, THERMAL_NO_LIMIT can be used for both min_state (lower) and max_state (upper). If used as lower/min_state, the framework converts it to 0; if used as upper/max_state, it converts to the cooling device's max_state. Verify patch entries like: cooling-device = <&fan THERMAL_NO_LIMIT 1> are valid and correctly reflect the intended bounds. Ensure consistent interpretation of NO_LIMIT in both min and max contexts and that the resulting values align with the device's actual limits.

Applied to files:

  • patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch
🔇 Additional comments (7)
config/boards/mixtile-core3588e.csc (2)

42-42: LGTM!

Extending UBOOT_TARGET_MAP to include the USB boot variants (usb471, usb472) alongside the primary target is consistent with the PR objective to support Maskrom/RAMBoot.


66-67: LGTM!

Enabling CONFIG_ROCKCHIP_MASKROM_IMAGE allows building RAMBoot images for recovery scenarios. This complements the USB boot targets added to UBOOT_TARGET_MAP.

patch/u-boot/v2026.01/board_mixtile-core3588e/1001-fdt_fixup_ethernet-add-logs.patch (2)

149-161: Adding weak stubs for ft_board_setup() and ft_system_setup() with logging.

These weak stubs add log instrumentation for debugging the FDT fixup call chain. Since U-Boot already provides weak default implementations for these functions in common code, these additions should take precedence due to the linking order. Verify that board-specific strong implementations (if any) still override these stubs correctly.


1-200: Debug patch aligns with PR objective to diagnose missing ethernet aliases.

This instrumentation patch confirms the absence of ethernet0/ethernet1 aliases was causing random MAC addresses. The extensive logging in fdt_fixup_ethernet() and related call sites provides valuable diagnostic output. As the PR notes, this patch may need to be applied to multiple boards and potentially promoted—at that point, the #warning directives and redundant checks should be cleaned up. Based on learnings, using fdt_fixup_ethernet() with DT aliases is the correct upstream approach.

patch/kernel/archive/rockchip64-6.19/dt/rk3588-mixtile-core3588e.dts (1)

18-22: LGTM! Ethernet alias enables stable MAC address assignment.

Adding ethernet0 = &gmac0 allows U-Boot's fdt_fixup_ethernet() to automatically inject ethaddr from the environment into the device tree. This is the standard, well-tested approach for stable MAC addresses, consistent with the kernel 6.18 and U-Boot DTS changes in this PR. Based on learnings, this is preferred over custom MAC injection implementations.

patch/u-boot/v2026.01/dt_upstream_rockchip/rk3588-mixtile-core3588e.dts (1)

18-22: LGTM! U-Boot DTS alias completes the stable MAC address setup.

The ethernet0 = &gmac0 alias in the U-Boot device tree is essential—fdt_fixup_ethernet() walks /aliases to find ethernet nodes and inject MAC addresses from ethaddr/eth1addr environment variables. This change, combined with the kernel DTS updates, ensures consistent MAC address handling across boot stages.

patch/kernel/archive/rockchip64-6.18/dt/rk3588-mixtile-core3588e.dts (1)

18-22: LGTM! Consistent alias across kernel versions.

The ethernet0 = &gmac0 alias mirrors the change in the 6.19 kernel DTS, ensuring both supported kernel branches have stable MAC address assignment for the mixtile-core3588e board.

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Jan 13, 2026
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot removed the Needs review Seeking for review label Jan 13, 2026
@igorpecovnik igorpecovnik merged commit 1d91ae2 into armbian:main Jan 13, 2026
14 checks passed
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, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

2 participants