Skip to content

Conversation

@vidplace7
Copy link
Member

@vidplace7 vidplace7 commented Oct 22, 2025

Description

Adds new family Rockchip RV1106, which includes the RV1103 and RV1106 SoCs from Rockchip.
RV1106 family includes a single-core armv7l processor with 64-256MB of RAM.

Adds first board in "RV1106" family, Luckfox Pico Mini. This is an RV1103 board with 64MB of DRAM 🥔.

Depends on:

Relates to:

I intend to add support for these other boards in this family in the future:

What works:

  • Booting with Rockchip uboot 2017.9 next-dev-buildroot
    • Using idblock.img (Rockchip ddr.bin; U-Boot spl/u-boot-spl.bin) + u-boot.itb (Rockchip tee.bin; U-Boot u-boot.dtb,u-boot-nodtb.bin)
  • initramfs
  • Onboard RMII Ethernet (via 5 pins on the bottom)
  • GPIO
  • spidev
  • USB-OTG
  • USB WiFi

Kernel optimizations

  • Use distinct kernelconfig linux-rv1106-vendor.config with optimizations for the platform.
  • Camera / Display features have been disabled (kernel modules removed, video=off cma=0, etc). This is an extremely memory constrained platform, if you need multimedia support, use buildroot/yocto.

Userland optimizations

I'd absolutely welcome critique of any of these optimizations, especially tuning linux-rv1106-vendor.config ❤️

Why use this potato? 🥔

⚡ Power Consumption!! These little guys draw ~0.4W at idle. In the Meshtastic LoRa mesh community we're using these for solar-powered BBSs 👴

How Has This Been Tested?

  • ./compile.sh DOCKER_ARMBIAN_BASE_IMAGE="ubuntu:jammy" BOARD=luckfox-pico-mini BRANCH=vendor KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=full INSTALL_HEADERS=yes INSTALL_ARMBIAN_FIRMWARE=yes BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=bookworm
  • ./compile.sh DOCKER_ARMBIAN_BASE_IMAGE="ubuntu:jammy" BOARD=luckfox-pico-mini BRANCH=vendor KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=full INSTALL_HEADERS=yes INSTALL_ARMBIAN_FIRMWARE=yes BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=trixie
  • ./compile.sh DOCKER_ARMBIAN_BASE_IMAGE="ubuntu:jammy" BOARD=luckfox-pico-mini BRANCH=vendor KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=full INSTALL_HEADERS=yes INSTALL_ARMBIAN_FIRMWARE=yes BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=jammy
  • ./compile.sh DOCKER_ARMBIAN_BASE_IMAGE="ubuntu:jammy" BOARD=luckfox-pico-mini BRANCH=vendor KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=full INSTALL_HEADERS=yes INSTALL_ARMBIAN_FIRMWARE=yes BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=noble

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

@github-actions github-actions bot added size/large PR with 250 lines or more 11 Milestone: Fourth quarter release labels Oct 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Walkthrough

Adds support for the Luckfox Pico Mini board by introducing a board CSC file with hardware metadata and vendor blob references, a vendor kernel config for Rockchip RV1106, and a Rockchip RV1106 family source that implements SoC-specific build logic (BOOT_SOC handling, default blob selection, U-Boot postprocessing hooks, FIT/idblock generation, BSP asset installation, and low-memory tweaks for 64MB RAM devices). Exports new board configuration literals for use by the build system.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • u-boot post-processing functions: uboot_custom_postprocess, pre_config_uboot_target__copy_tee, post_config_uboot_target__downgrade_gcc_errors_to_warnings.
  • BOOT_SOC and blob selection logic (rv1103 vs rv1106 defaults and error path).
  • Low-memory extension and family tweaks (impact on build/time/partition layout).
  • Kernel config file: verify critical CONFIG flags for RV1106 vendor usage and 64MB constraint.
  • BSP asset installation and file paths referenced by family_tweaks_bsp.

Possibly related PRs

Suggested reviewers

  • rpardini
  • igorpecovnik
  • prahal
  • paolosabatino
  • joekhoobyar
  • lanefu
  • amazingfate
  • chainsx

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a new Rockchip RV1106 family with RV1103/RV1106 SoCs and the first board (Luckfox Pico Mini).
Description check ✅ Passed The pull request description clearly describes the addition of Rockchip RV1106 family support with the Luckfox Pico Mini board, including hardware specifications, working features, kernel optimizations, and testing details.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@github-actions github-actions bot added Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... BSP Board Support Packages labels Oct 22, 2025
@vidplace7 vidplace7 requested a review from amazingfate October 22, 2025 16:02
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: 1

🧹 Nitpick comments (6)
packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1)

24-32: Consider the partial failure scenario.

If mkswap or swapon fails after fallocate succeeds, the script exits (due to set -e) leaving a 256 MiB file that's not properly configured as swap. The service then self-disables at lines 35-36, so it won't retry on the next boot.

This is likely acceptable for a first-boot script on a constrained device, but you may want to add cleanup logic in a trap handler to remove the incomplete swapfile on failure.

Example improvement:

+trap 'rm -f "$SWAPFILE"' ERR
+
 # Create swapfile, set permissions, and enable it
 fallocate -l "${SIZE_MB}M" "$SWAPFILE"
 chmod 600 "$SWAPFILE"
 mkswap "$SWAPFILE"
 # Add to fstab if not present
 if ! grep -qE '^[^#]*\s+/swapfile\s+swap\s' /etc/fstab; then
   echo "/swapfile swap swap defaults,nofail,pri=0 0 0" >> /etc/fstab
 fi
 
 swapon -p 0 "$SWAPFILE"
+trap - ERR
config/kernel/linux-rv1106-vendor.config (1)

460-460: Consider disabling DEBUG_INFO for memory-constrained device.

CONFIG_DEBUG_INFO=y significantly increases kernel image size (can add 100+ MB). On a device with only 64-256 MB RAM, this impacts available memory and boot time.

Unless kernel debugging is essential, consider disabling this for production builds.

-CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_INFO is not set
config/boards/luckfox-pico-mini.csc (1)

1-7: Naming inconsistency between RV1103 and RV1106 may cause confusion.

The board is RV1103 hardware (lines 1, 7: DTB file is rv1103g-luckfox-pico-mini.dtb) but uses:

  • U-Boot config named luckfox_rv1106_uboot_defconfig (line 4)
  • RV1106 blobs (line 11-14)

While lines 10-11 document that "RV1103 but uses RV1106 blobs (doesn't work with RV1103 blobs)", this naming inconsistency could lead to confusion during maintenance or when adding more boards.

Consider whether the U-Boot defconfig or documentation should be clarified to make this unusual configuration more obvious to future maintainers.

config/sources/families/rockchip.conf (3)

268-272: Add explicit return statement for consistency.

While bash functions return 0 by default, other functions in this file explicitly return 0 (e.g., lines 265, 317, 326, 345). Add an explicit return 0 for consistency.

 function pre_config_uboot_target__copy_tee() {
   # Makefiles expect 'tee.bin' in the uboot build directory
   display_alert "Copy TEE blob" "info"
   run_host_command_logged cp ${RKBIN_DIR}/${TEE_BLOB} tee.bin
+  return 0
 }

274-295: Improve logging and error handling for U-Boot post-processing.

Several issues with logging and robustness:

  1. Line 277: Output redirection bypasses run_host_command_logged, so the command's stderr isn't captured in logs
  2. Line 286: cp command should use run_host_command_logged for consistency
  3. Lines 287-292: sed commands don't verify pattern matching succeeded; if the INI file format changes, substitutions might silently fail, causing boot_merger to use wrong paths

Consider wrapping the critical operations in logged commands and verifying sed succeeded:

 	display_alert "Generate u-boot.its" "info"
-	run_host_command_logged $SPL_FIT_GENERATOR -t 0x03d00000 -c lzma > u-boot.its
+	$SPL_FIT_GENERATOR -t 0x03d00000 -c lzma > u-boot.its 2>&1 | tee -a "${DEST}/${LOG_SUBPATH}/output.log"
 
 	display_alert "Generate u-boot.itb" "info"
 	# Remove uboot-generated itb if exists
 	rm -f u-boot.itb
 	run_host_command_logged tools/mkimage -f u-boot.its -E u-boot.itb
 
 	display_alert "Generate idblock.img with u-boot SPL" "debug"
 	RKBOOT_INI_FILE=rv1106.ini
-	cp $RKBIN_DIR/rv11/RV1106MINIALL.ini $RKBOOT_INI_FILE
+	run_host_command_logged cp $RKBIN_DIR/rv11/RV1106MINIALL.ini $RKBOOT_INI_FILE
 	sed -i "s|Path1=.*rv1106_ddr.*$|Path1=${RKBIN_DIR}/${DDR_BLOB}|g" $RKBOOT_INI_FILE
+	grep -q "${RKBIN_DIR}/${DDR_BLOB}" $RKBOOT_INI_FILE || exit_with_error "Failed to update DDR_BLOB path in INI file"

320-327: Fix indentation inconsistency.

Line 324 uses spaces for indentation while the rest of the file uses tabs. Maintain consistent indentation style.

 	function post_family_tweaks__rv1106_mkswap() {
 		local service_name="rv1106-firstboot-makeswap"
 		display_alert "Enabling ${service_name}.service" "debug"
 		# This service disables itself after running once
-    	chroot_sdcard systemctl enable "${service_name}.service"
+		chroot_sdcard systemctl enable "${service_name}.service"
 
 		return 0
 	}
📜 Review details

Configuration used: CodeRabbit UI

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 189bcaf and d8c6df7.

⛔ Files ignored due to path filters (7)
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/0000.patching_config.yaml is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/defconfig/luckfox_rv1106_uboot_defconfig is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/dt/rv1106-luckfox.dts is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-malloc_8_hide_optee.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-mem_layout.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-sysboot-extlinux.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/use-armv7a-for-modern-toolchain.patch is excluded by !patch/**
📒 Files selected for processing (5)
  • config/boards/luckfox-pico-mini.csc (1 hunks)
  • config/kernel/linux-rv1106-vendor.config (1 hunks)
  • config/sources/families/rockchip.conf (2 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
PR: armbian/build#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/rockchip.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip.conf
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip.conf
🧬 Code graph analysis (4)
config/boards/luckfox-pico-mini.csc (2)
lib/functions/configuration/main-config.sh (1)
  • write_config_summary_output_file (488-541)
.github/generate_CODEOWNERS.sh (1)
  • generate_for_board (18-68)
config/sources/families/rockchip.conf (2)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (3)
  • post_family_config__meko_use_mainline_uboot (22-42)
  • post_family_config__vendor_uboot_mekotronics (8-16)
  • write_uboot_platform (39-41)
lib/functions/compilation/uboot.sh (3)
  • patch_uboot_target (22-48)
  • compile_uboot_target (52-299)
  • uboot_postinst_base (544-562)
config/kernel/linux-rv1106-vendor.config (1)
lib/functions/compilation/armbian-kernel.sh (4)
  • armbian_kernel_config_apply_opts_from_arrays (577-607)
  • armbian_kernel_config__enable_config_access_in_live_system (508-514)
  • armbian_kernel_config__disable_various_options (71-88)
  • armbian_kernel_config__extrawifi_enable_wifi_opts_80211 (24-36)
packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1)
lib/functions/bsp/armbian-bsp-cli-deb.sh (2)
  • board_side_bsp_cli_preinst (360-415)
  • board_side_bsp_cli_postinst_finish (448-471)
🔇 Additional comments (9)
packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1)

35-36: LGTM: Self-disabling service pattern is appropriate.

The service correctly disables and masks itself after successful completion, preventing re-execution. The || true fallback ensures the script doesn't fail if systemctl commands encounter issues.

packages/bsp/rv1106/rv1106-firstboot-makeswap.service (1)

1-14: LGTM: Systemd unit is properly configured.

The service correctly:

  • Uses ConditionPathExists=!/swapfile to run only when swapfile doesn't exist
  • Orders itself after filesystem resize and before basic.target
  • Uses oneshot type with RemainAfterExit for one-time execution
  • Matches the script installation path in rockchip.conf (line 314)
config/boards/luckfox-pico-mini.csc (1)

10-14: LGTM: RV1106 blob usage is well-documented.

The comment at line 10 clearly explains that despite being RV1103 hardware, RV1106 blobs must be used. The BOOT_SOC="rv1106" setting correctly triggers the appropriate code paths in the rockchip.conf family configuration.

config/sources/families/rockchip.conf (4)

62-79: LGTM: RV1106 boot configuration follows established patterns.

The RV1106 configuration block properly mirrors the structure used for other Rockchip SoCs (e.g., rk3506). The LINUXCONFIG="linux-rv1106-${BRANCH}" correctly references the new kernel config file added in this PR.


254-266: GCC 13+ compatibility workaround is correctly implemented.

This function appropriately handles the vendor U-Boot incompatibility with GCC 13+ by downgrading enum-int-mismatch errors to warnings. The approach of detecting GCC version and conditionally adding CFLAGS is correct and follows the pattern used elsewhere in the build system.


297-304: LGTM: write_uboot_platform follows Rockchip standards.

The implementation correctly:

  • Detects if running in build environment or live system (line 300)
  • Writes idblock.img and u-boot.itb at proper offsets for RV1106
  • Uses status=none parameter in dd commands per current Rockchip family standard

Based on learnings


329-346: LGTM: Memory optimizations are appropriate for constrained device.

The function appropriately:

  • Disables ramlog to save memory (line 333)
  • Disables zram swap in favor of zswap (line 336), aligning with PR objectives
  • Increases /run tmpfs to 20M (line 343) to prevent systemd daemon-reload errors on low-memory devices

The fstab append (line 343) is safe since this hook runs once during image creation.

config/kernel/linux-rv1106-vendor.config (2)

113-114: Enable CONFIG_NET_CORE to match CONFIG_NETDEVICES=y.

CONFIG_NET_CORE is defined inside the NETDEVICES block and should default to y when NETDEVICES is enabled. The configuration at lines 113-114 explicitly disables it, which contradicts having CONFIG_NETDEVICES=y. Change line 114 to CONFIG_NET_CORE=y.

⛔ Skipped due to learnings
Learnt from: lanefu
PR: armbian/build#8377
File: config/kernel/linux-uefi-arm64-cloud.config:165-170
Timestamp: 2025-07-19T00:03:42.995Z
Learning: CONFIG_NETKIT was introduced in Linux kernel 4.14.330 (November 2023) and enables BPF-programmable network devices that can operate in Layer 3 or Layer 2 mode. It's a valid configuration option in modern kernels including 6.12.

14-14: CONFIG_BUG is disabled as part of the vendor-provided board configuration, which is standard for this embedded platform.

The technical facts in the review are correct: disabling CONFIG_BUG saves ~70-100 KB and reduces kernel diagnostics. However, this is a vendor-provided configuration for the RV1106 SoC (a camera/embedded platform where CONFIG_BUG disabled is standard practice, as evidenced by OpenIPC's RV1106 configurations).

This is not a development choice being proposed in the PR but rather the initial board support configuration for a specific embedded platform. No action is needed unless the board-specific requirements differ from the vendor baseline.

Likely an incorrect or invalid review comment.

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 (7)
config/sources/families/rockchip.conf (4)

62-79: Allow board-level BOOTBRANCH override (keeps family default, enables per‑board escape hatch).

Use BOOTBRANCH_BOARD as a fallback-aware override.

Based on learnings

-    BOOTBRANCH="branch:next-dev-buildroot"
+    BOOTBRANCH="${BOOTBRANCH_BOARD:-branch:next-dev-buildroot}"

268-273: Harden tee.bin copy and standardize logging.

Guard missing blobs and use a consistent 3‑arg display_alert.

-    function pre_config_uboot_target__copy_tee() {
-        # Makefiles expect 'tee.bin' in the uboot build directory
-        display_alert "Copy TEE blob" "info"
-        run_host_command_logged cp ${RKBIN_DIR}/${TEE_BLOB} tee.bin
-    }
+    function pre_config_uboot_target__copy_tee() {
+        # Makefiles expect 'tee.bin' in the U‑Boot build directory
+        display_alert "$BOARD" "Copying TEE blob ${TEE_BLOB}" "info"
+        [[ -f "${RKBIN_DIR}/${TEE_BLOB}" ]] || { display_alert "$BOARD" "TEE blob not found: ${RKBIN_DIR}/${TEE_BLOB}" "err"; return 1; }
+        run_host_command_logged install -m 0644 "${RKBIN_DIR}/${TEE_BLOB}" tee.bin
+    }

274-296: Add existence checks around generator/tools for clearer failures.

Small robustness boost; no behavioral change.

-    run_host_command_logged $SPL_FIT_GENERATOR -t 0x03d00000 -c lzma > u-boot.its
+    [[ -x "$SPL_FIT_GENERATOR" ]] || { display_alert "$BOARD" "Missing SPL FIT generator: $SPL_FIT_GENERATOR" "err"; return 1; }
+    run_host_command_logged "$SPL_FIT_GENERATOR" -t 0x03d00000 -c lzma > u-boot.its
...
-    run_host_command_logged tools/mkimage -f u-boot.its -E u-boot.itb
+    [[ -x tools/mkimage ]] || { display_alert "$BOARD" "Missing tools/mkimage" "err"; return 1; }
+    run_host_command_logged tools/mkimage -f u-boot.its -E u-boot.itb
...
-    run_host_x86_binary_logged $RKBIN_DIR/tools/boot_merger $RKBOOT_INI_FILE
+    run_host_x86_binary_logged "$RKBIN_DIR/tools/boot_merger" "$RKBOOT_INI_FILE"

306-318: Use install -D for idempotent service/script deployment (ensures dirs exist).

Avoids failures when target dirs are missing and removes a plain cp.

-        install -m 755 $SRC/packages/bsp/rv1106/${service_name}.sh $destination/usr/bin/${service_name}.sh
-        cp $SRC/packages/bsp/rv1106/${service_name}.service $destination/lib/systemd/system/${service_name}.service
+        install -D -m 0755 "$SRC/packages/bsp/rv1106/${service_name}.sh" \
+            "$destination/usr/bin/${service_name}.sh"
+        install -D -m 0644 "$SRC/packages/bsp/rv1106/${service_name}.service" \
+            "$destination/lib/systemd/system/${service_name}.service"
config/kernel/linux-rv1106-vendor.config (3)

460-465: Trim debug features for low‑RAM boards (optional but recommended).

Disable DEBUG_INFO/DEBUG_FS to reduce image size and memory footprint.

-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set

339-347: Consider making SND_USB_AUDIO modular or disabling entirely.

Saves memory/boot time on headless/embedded use; USB audio can be uncommon on these SBCs.

-CONFIG_SND_USB_AUDIO=y
+# CONFIG_SND_USB_AUDIO is not set
# or
+# CONFIG_SND_USB_AUDIO=m

80-110: Large Bluetooth/Wi‑Fi matrix — consider slimming to tested chipsets only.

Many drivers are enabled; pruning to tested ones reduces size/RAM.

Also applies to: 156-247

📜 Review details

Configuration used: CodeRabbit UI

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 d8c6df7 and 508b3a0.

⛔ Files ignored due to path filters (7)
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/0000.patching_config.yaml is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/defconfig/luckfox_rv1106_uboot_defconfig is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/dt/rv1106-luckfox.dts is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-malloc_8_hide_optee.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-mem_layout.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-sysboot-extlinux.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/use-armv7a-for-modern-toolchain.patch is excluded by !patch/**
📒 Files selected for processing (5)
  • config/boards/luckfox-pico-mini.csc (1 hunks)
  • config/kernel/linux-rv1106-vendor.config (1 hunks)
  • config/sources/families/rockchip.conf (2 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • config/boards/luckfox-pico-mini.csc
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip.conf
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
PR: armbian/build#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/rockchip.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip.conf
🧬 Code graph analysis (2)
config/kernel/linux-rv1106-vendor.config (2)
lib/functions/compilation/armbian-kernel.sh (1)
  • armbian_kernel_config__disable_various_options (71-88)
lib/functions/compilation/kernel-config.sh (1)
  • kernel_config_export (132-146)
config/sources/families/rockchip.conf (3)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (2)
  • post_family_config__meko_use_mainline_uboot (22-42)
  • write_uboot_platform (39-41)
lib/functions/compilation/uboot.sh (2)
  • compile_uboot_target (52-299)
  • uboot_postinst_base (544-562)
lib/functions/configuration/main-config.sh (1)
  • write_config_summary_output_file (488-541)
🔇 Additional comments (3)
config/sources/families/rockchip.conf (2)

297-304: dd offsets and status=none look correct.

Matches modern standard for Rockchip families; good.

Based on learnings


320-327: Enable first-boot swap service — OK.

Service is idempotent and self-disabling; looks fine.

config/kernel/linux-rv1106-vendor.config (1)

491-495: zswap enabled without explicit backend configuration; modern kernels auto-select default.

By default, a zpool of type selected in CONFIG_ZSWAP_ZPOOL_DEFAULT Kconfig option is created. The current config specifies CONFIG_ZSWAP=y and CONFIG_ZSWAP_DEFAULT_ON=y but lacks an explicit zpool backend flag. zsmalloc is the kernel default in kernels after 6.3 and a zpool of type zsmalloc is created by default.

However, the recommendation to add CONFIG_ZBUD=y is outdated: z3fold was deprecated and disabled by default since 6.13 and zbud was removed in 6.15. For vendor kernels (typically based on 5.10), ZBUD remains functional. Since CONFIG_ZSWAP_ZPOOL_DEFAULT is not explicitly set in this config, the kernel will auto-select its compiled-in default or use the first available backend at runtime.

Set CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y to explicitly declare the modern, recommended backend:

 CONFIG_SWAP=y
 CONFIG_ZSWAP=y
 CONFIG_ZSWAP_DEFAULT_ON=y
+CONFIG_ZSMALLOC=y
+CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y
 CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD=y
 CONFIG_ZSWAP_COMPRESSOR_DEFAULT="zstd"

@EvilOlaf
Copy link
Member

I would at least try to get it to work without having to rely on Jammy since it won't be there forever. That's more a general task rather than specific to this PR.

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: 1

♻️ Duplicate comments (2)
config/sources/families/rockchip.conf (2)

254-266: GCC version check uses host gcc; prefer target compiler.

Cross builds may mis-detect gcc version and miss the -Wno-error, breaking vendor U-Boot with GCC 13+. Use ${CC} or ${CROSS_COMPILE}gcc when available. This was raised previously.

-        declare -i gcc_major_version=0
-        gcc_major_version=$(gcc -dumpversion | cut -d. -f1)
+        declare -i gcc_major_version=0
+        # Prefer target compiler; fall back to host gcc
+        local gcc_cmd="${CC:-${CROSS_COMPILE}gcc}"
+        if command -v "${gcc_cmd}" >/dev/null 2>&1; then
+            gcc_major_version=$("${gcc_cmd}" -dumpfullversion -dumpversion | cut -d. -f1)
+        else
+            gcc_major_version=$(gcc -dumpfullversion -dumpversion | cut -d. -f1)
+        fi

331-348: Guard sed targets and make /run fstab change idempotent.

As noted earlier, sed fails if files are absent and echo appends duplicates on rebuilds. Please add file checks and idempotency.

-        sed -i "s/^ENABLED=.*/ENABLED=false/" "${MOUNT}"/etc/default/armbian-ramlog
+        if [[ -f "${MOUNT}/etc/default/armbian-ramlog" ]]; then
+            sed -i 's/^ENABLED=.*/ENABLED=false/' "${MOUNT}/etc/default/armbian-ramlog"
+        fi
@@
-        sed -i "s/^#\?\s*SWAP=.*/SWAP=false/" "${MOUNT}"/etc/default/armbian-zram-config
+        if [[ -f "${MOUNT}/etc/default/armbian-zram-config" ]]; then
+            sed -i 's/^#\?\s*SWAP=.*/SWAP=false/' "${MOUNT}/etc/default/armbian-zram-config"
+        fi
@@
-        echo "tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=20M,mode=755 0 0" >> "${MOUNT}"/etc/fstab
+        if ! grep -qE '^[[:space:]]*tmpfs[[:space:]]+/run[[:space:]]+tmpfs' "${MOUNT}/etc/fstab"; then
+            echo 'tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=20M,mode=755 0 0' >> "${MOUNT}/etc/fstab"
+        fi
🧹 Nitpick comments (4)
config/boards/luckfox-pico-mini.csc (1)

12-14: Avoid per-board blob pinning; rely on family defaults.

These rv11 blob paths are already defaulted in the rv1106 family block. Keeping them here increases maintenance burden if blob versions change.

-DDR_BLOB="rv11/rv1106_ddr_924MHz_v1.15.bin"
-TEE_BLOB="rv11/rv1106_tee_ta_v1.13.bin"
-USBPLUG_BLOB="rv11/rv1106_usbplug_v1.09.bin"
+# Use family defaults; override here only if this board needs different blobs
config/sources/families/rockchip.conf (3)

268-275: Quote and check TEE blob before copying.

Guard against missing blob and spaces in paths; keep logging uniform.

-        run_host_command_logged cp ${RKBIN_DIR}/${TEE_BLOB} tee.bin
+        local tee_src="${RKBIN_DIR}/${TEE_BLOB}"
+        if [[ -f "${tee_src}" ]]; then
+            run_host_command_logged cp "${tee_src}" tee.bin
+        else
+            display_alert "TEE blob not found" "${tee_src}" "err"
+            return 1
+        fi

276-297: Make FIT/ITB/idblock generation fully logged and robust.

  • Wrap redirection so output is captured and errors are visible.
  • Quote paths; check INI source exists before sed; use run_host_command_logged for rm.
-        run_host_command_logged $SPL_FIT_GENERATOR -t 0x03d00000 -c lzma > u-boot.its
+        run_host_command_logged bash -lc '"$SPL_FIT_GENERATOR" -t 0x03d00000 -c lzma > u-boot.its'
@@
-        rm -f u-boot.itb
+        run_host_command_logged rm -f u-boot.itb
@@
-        RKBOOT_INI_FILE=rv1106.ini
-        cp $RKBIN_DIR/rv11/RV1106MINIALL.ini $RKBOOT_INI_FILE
-        sed -i "s|Path1=.*rv1106_ddr.*$|Path1=${RKBIN_DIR}/${DDR_BLOB}|g" $RKBOOT_INI_FILE
-        sed -i "s|Path1=.*rv1106_usbplug.*$|Path1=${RKBIN_DIR}/${USBPLUG_BLOB}|g" $RKBOOT_INI_FILE
-        sed -i "s|FlashData=.*$|FlashData=${RKBIN_DIR}/${DDR_BLOB}|g" $RKBOOT_INI_FILE
+        RKBOOT_INI_FILE="rv1106.ini"
+        local ini_src="${RKBIN_DIR}/rv11/RV1106MINIALL.ini"
+        [[ -f "${ini_src}" ]] || { display_alert "Missing INI" "${ini_src}" "err"; return 1; }
+        cp "${ini_src}" "${RKBOOT_INI_FILE}"
+        sed -i "s|Path1=.*rv1106_ddr.*$|Path1=${RKBIN_DIR}/${DDR_BLOB}|g" "${RKBOOT_INI_FILE}"
+        sed -i "s|Path1=.*rv1106_usbplug.*$|Path1=${RKBIN_DIR}/${USBPLUG_BLOB}|g" "${RKBOOT_INI_FILE}"
+        sed -i "s|FlashData=.*$|FlashData=${RKBIN_DIR}/${DDR_BLOB}|g" "${RKBOOT_INI_FILE}"
-        sed -i "s|FlashBoot=.*$|FlashBoot=./spl/u-boot-spl.bin|g" $RKBOOT_INI_FILE
-        sed -i "s|PATH=.*$|PATH=download.bin|g" $RKBOOT_INI_FILE
-        sed -i "s|IDB_PATH=.*$|IDB_PATH=idblock.img|g" $RKBOOT_INI_FILE
-        run_host_x86_binary_logged $RKBIN_DIR/tools/boot_merger $RKBOOT_INI_FILE
-        rm -f $RKBOOT_INI_FILE
+        sed -i "s|FlashBoot=.*$|FlashBoot=./spl/u-boot-spl.bin|g" "${RKBOOT_INI_FILE}"
+        sed -i "s|PATH=.*$|PATH=download.bin|g" "${RKBOOT_INI_FILE}"
+        sed -i "s|IDB_PATH=.*$|IDB_PATH=idblock.img|g" "${RKBOOT_INI_FILE}"
+        run_host_x86_binary_logged "${RKBIN_DIR}/tools/boot_merger" "${RKBOOT_INI_FILE}"
+        run_host_command_logged rm -f "${RKBOOT_INI_FILE}"

315-318: Quote destinations and ensure directories exist.

Minor hardening for BSP installs.

-        install -m 755 $SRC/packages/bsp/rv1106/${service_name}.sh $destination/usr/bin/${service_name}.sh
-        cp $SRC/packages/bsp/rv1106/${service_name}.service $destination/lib/systemd/system/${service_name}.service
+        install -d "${destination}/usr/bin" "${destination}/lib/systemd/system"
+        install -m 755 "${SRC}/packages/bsp/rv1106/${service_name}.sh" "${destination}/usr/bin/${service_name}.sh"
+        install -m 644 "${SRC}/packages/bsp/rv1106/${service_name}.service" "${destination}/lib/systemd/system/${service_name}.service"
📜 Review details

Configuration used: CodeRabbit UI

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 508b3a0 and 2bd66da.

⛔ Files ignored due to path filters (7)
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/0000.patching_config.yaml is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/defconfig/luckfox_rv1106_uboot_defconfig is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/dt/rv1106-luckfox.dts is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-malloc_8_hide_optee.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-mem_layout.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-sysboot-extlinux.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/use-armv7a-for-modern-toolchain.patch is excluded by !patch/**
📒 Files selected for processing (5)
  • config/boards/luckfox-pico-mini.csc (1 hunks)
  • config/kernel/linux-rv1106-vendor.config (1 hunks)
  • config/sources/families/rockchip.conf (2 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service
  • config/kernel/linux-rv1106-vendor.config
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip.conf
📚 Learning: 2025-09-11T06:12:54.213Z
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.

Applied to files:

  • config/sources/families/rockchip.conf
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
PR: armbian/build#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/rockchip.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip.conf
🧬 Code graph analysis (1)
config/sources/families/rockchip.conf (3)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (2)
  • post_family_config__meko_use_mainline_uboot (22-42)
  • write_uboot_platform (39-41)
lib/functions/configuration/main-config.sh (1)
  • write_config_summary_output_file (488-541)
lib/functions/compilation/uboot.sh (4)
  • compile_uboot_target (52-299)
  • uboot_postinst_base (544-562)
  • patch_uboot_target (22-48)
  • compile_uboot (373-542)
🔇 Additional comments (2)
config/sources/families/rockchip.conf (2)

304-306: dd offsets align with Rockchip layout; status=none matches current standard.

Good choice of 0x40/0x440 sector seeks and status=none; postinst sync will flush writes.

If you want extra resilience on slow media, consider adding conv=fsync (optional).


62-79: Kernel config file confirmed to exist for rv1106-vendor branch; no issues found.

The file /home/jailuser/git/config/kernel/linux-rv1106-vendor.config is present, so LINUXCONFIG="linux-rv1106-${BRANCH}" will resolve correctly when BRANCH=vendor and build failures due to missing config are not a concern.

@rpardini
Copy link
Member

I intend to add support for these other boards in this family in the future:

Then defo get your own family.

@vidplace7
Copy link
Member Author

This PR has been redone to use it's own family, as suggested by the comments here 👍

@coderabbitai coderabbitai bot requested a review from rpardini October 26, 2025 01:32
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 (1)
config/sources/families/rockchip-rv1106.conf (1)

86-107: Consider documenting the FIT load address.

Line 89 uses a hardcoded load address 0x03d00000 without explanation. Consider adding a comment explaining why this specific address is used for the TEE load address in the FIT image.

Example:

+    # TEE load address for RV1106/RV1103 (vendor-specified)
     run_host_command_logged $SPL_FIT_GENERATOR -t 0x03d00000 -c lzma > u-boot.its

The INI template manipulation approach is reasonable given the constraints of the Rockchip tooling.

📜 Review details

Configuration used: CodeRabbit UI

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 2bd66da and bb4adc8.

⛔ Files ignored due to path filters (7)
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/0000.patching_config.yaml is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/defconfig/luckfox_rv1106_uboot_defconfig is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/dt/rv1106-luckfox.dts is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-malloc_8_hide_optee.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-mem_layout.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-sysboot-extlinux.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/use-armv7a-for-modern-toolchain.patch is excluded by !patch/**
📒 Files selected for processing (5)
  • config/boards/luckfox-pico-mini.csc (1 hunks)
  • config/kernel/linux-rockchip-rv1106-vendor.config (1 hunks)
  • config/sources/families/rockchip-rv1106.conf (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service
  • config/kernel/linux-rockchip-rv1106-vendor.config
  • config/boards/luckfox-pico-mini.csc
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-09-11T06:12:54.213Z
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.

Applied to files:

  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip-rv1106.conf
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip-rv1106.conf
📚 Learning: 2025-06-25T03:40:52.109Z
Learnt from: EvilOlaf
PR: armbian/build#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/rockchip-rv1106.conf
🧬 Code graph analysis (1)
config/sources/families/rockchip-rv1106.conf (2)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (2)
  • post_family_config__vendor_uboot_mekotronics (8-16)
  • post_family_config__meko_use_mainline_uboot (22-42)
lib/functions/configuration/main-config.sh (1)
  • do_main_configuration (12-358)
🔇 Additional comments (7)
config/sources/families/rockchip-rv1106.conf (7)

1-33: LGTM! Well-structured family initialization.

The basic configuration is well-organized with appropriate defaults for the memory-constrained RV1106 family. The BOOT_SOC fallback mechanism and the kernel command-line parameters (cma=0, video=off) align with the PR objectives for optimizing extremely low-memory devices.


35-47: LGTM! Solid BOOT_SOC handling with good error handling.

The conditional blob configuration is well-structured with appropriate error handling for unknown SoCs. The use of :- parameter expansion allows board configs to override these defaults while providing sensible fallbacks.


50-60: Verify whether additional kernel branches should be supported.

Currently, only the vendor branch is defined. For production use, consider whether current or edge branches should also be supported, or if vendor-only is intentional for this memory-constrained platform.

Based on learnings about Armbian family configurations potentially inheriting branches from common includes.


62-75: LGTM! Appropriate GCC 13+ compatibility fix.

This hook correctly handles the known enum-int-mismatch issue with Rockchip vendor U-Boot and GCC 13+. The implementation follows best practices for version detection and flag injection.


109-118: LGTM! Proper dual-context bootloader installation.

The write_uboot_platform implementation correctly handles both build-time and live-system upgrade scenarios. The dd commands follow current Rockchip family standards with proper status=none parameters.

Based on learnings about Rockchip family write_uboot_platform patterns.


120-138: LGTM! Appropriate system group and swap service setup.

The gpio/i2c group creation with specific GIDs is properly implemented for udev rule support, and the firstboot swap service is a practical solution for the extreme memory constraints of these devices.


140-172: LGTM! Comprehensive BSP asset installation.

The BSP tweaks properly install peripheral access rules, sound configuration, and optional firmware hooks. The swap service installation correctly coordinates with the earlier enablement hook.

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: 1

♻️ Duplicate comments (1)
config/sources/families/rockchip-rv1106.conf (1)

77-84: Fix display_alert call to include context parameter.

Line 80 calls display_alert with only 2 parameters, which is inconsistent with the 3-parameter pattern used elsewhere in this file (lines 45, 66, 70) and doesn't follow the feedback from the previous review suggesting the function name provides better context than $BOARD.

Apply this diff:

-    display_alert "Copy TEE blob" "info"
+    display_alert "pre_config_uboot_target" "Copy TEE blob" "info"
🧹 Nitpick comments (1)
config/sources/families/rockchip-rv1106.conf (1)

174-193: Consider more robust /run fstab handling and RuntimeDirectorySize tuning.

The current grep check (line 187) successfully prevents duplicate entries, which improves upon the initial implementation. However, the previous review discussion by tabrisnet suggested two alternative approaches that might be more robust:

  1. Delete-then-add pattern to ensure the entry is always correct:

    if grep -q "tmpfs /run tmpfs" "${MOUNT}/etc/fstab"; then
        sed -i -e 's#tmpfs /run.*##' "${MOUNT}/etc/fstab"
    fi
    echo "tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=20M,mode=755 0 0" >> "${MOUNT}/etc/fstab"
  2. Exit with error if an entry already exists (to catch race conditions and identify what else might be adding this entry):

    if grep -q "tmpfs /run tmpfs" "${MOUNT}/etc/fstab"; then
        exit_with_error "/run entry already exists in fstab - investigate source"
    fi

Additionally, tabrisnet mentioned adjusting /etc/systemd/logind.conf's RuntimeDirectorySize (or disabling it entirely) for these extremely memory-constrained devices, which isn't currently addressed.

Consider which approach best fits the build system's error-handling philosophy and whether the RuntimeDirectorySize tuning would provide meaningful benefits for 64-256MB RAM devices.

📜 Review details

Configuration used: CodeRabbit UI

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 bb4adc8 and 383bf70.

⛔ Files ignored due to path filters (7)
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/0000.patching_config.yaml is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/defconfig/luckfox_rv1106_uboot_defconfig is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/dt/rv1106-luckfox.dts is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-malloc_8_hide_optee.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-mem_layout.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-sysboot-extlinux.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/use-armv7a-for-modern-toolchain.patch is excluded by !patch/**
📒 Files selected for processing (5)
  • config/boards/luckfox-pico-mini.csc (1 hunks)
  • config/kernel/linux-rockchip-rv1106-vendor.config (1 hunks)
  • config/sources/families/rockchip-rv1106.conf (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service (1 hunks)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.service
  • config/boards/luckfox-pico-mini.csc
  • packages/bsp/rv1106/rv1106-firstboot-makeswap.sh
  • config/kernel/linux-rockchip-rv1106-vendor.config
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip-rv1106.conf
📚 Learning: 2025-10-26T10:41:35.107Z
Learnt from: HackingGate
PR: armbian/build#8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.107Z
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/rockchip-rv1106.conf
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
PR: armbian/build#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/rockchip-rv1106.conf
🧬 Code graph analysis (1)
config/sources/families/rockchip-rv1106.conf (2)
config/sources/vendors/mekotronics/mekotronics-rk3588.hooks.sh (2)
  • post_family_config__vendor_uboot_mekotronics (8-16)
  • post_family_config__meko_use_mainline_uboot (22-42)
lib/functions/configuration/main-config.sh (2)
  • write_config_summary_output_file (488-541)
  • do_main_configuration (12-358)
🔇 Additional comments (7)
config/sources/families/rockchip-rv1106.conf (7)

1-34: LGTM! Clean family configuration setup.

The header, extension enabling, BOOT_SOC defaulting, and basic configuration variables follow Armbian conventions correctly.


35-47: LGTM! Proper SOC-specific blob configuration.

The conditional blob defaults for RV1103 and RV1106 are well-structured with appropriate error handling for unknown BOOT_SOC values. The use of ${VAR:-default} allows board-level overrides while providing sensible defaults.


50-60: LGTM! Vendor kernel configuration follows established patterns.

The vendor branch configuration correctly uses shared vendor kernel tree settings (KERNELSOURCE, KERNELBRANCH, KERNELPATCHDIR) and declares KERNEL_MAJOR_MINOR, consistent with how other Rockchip families configure vendor branches. Based on learnings.


62-75: LGTM! Proper GCC 13+ compatibility workaround.

The function correctly detects GCC version and conditionally adds compiler flags to work around the enum-int-mismatch error in vendor U-Boot. The implementation is clean and properly documented.


109-118: LGTM! Proper bootloader installation implementation.

The write_uboot_platform() function correctly handles both build-time and board-side execution with conditional logging. The dd commands use appropriate parameters (conv=notrunc, status=none) consistent with current Rockchip family standards. Based on learnings.


120-138: LGTM! Appropriate system group and swap configuration.

The family tweaks correctly create gpio and i2c groups that pair with udev rules, and the mkswap firstboot service enablement is a sensible approach for addressing the extremely limited RAM (64-256MB) on these devices.


140-172: LGTM! Proper BSP file installation.

Both BSP tweak functions correctly install necessary files (udev rules, ALSA config, firmware hooks, swap service) to appropriate system locations with proper permissions. The conditional firmware installation is a good practice.

@EvilOlaf
Copy link
Member

In terms of saving memory as it is very limited, this might be a good opportunity to try dropbear as replacement for openssh-server. I did something similar not too long ago: EvilOlaf@e4a187c

@tabrisnet
Copy link
Collaborator

tabrisnet commented Oct 27, 2025 via email

@vidplace7
Copy link
Member Author

vidplace7 commented Oct 28, 2025

The userland memory optimizations have been moved to #8839 so they can be re-used per-board // independent of family. (Removed here)

- Adds support for "RV1106" family (RV1103 + RV1106)
- Adds support for Luckfox Pico Mini (RV1103)
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 (2)
config/sources/families/rockchip-rv1106.conf (2)

77-84: Add context parameter to display_alert call for consistency.

Line 80 uses only 2 parameters in the display_alert call, which is inconsistent with the 3-parameter pattern used elsewhere in this file (e.g., lines 66, 70, 45). Adding the function name as context improves debugging and follows the file's established pattern.

Apply this diff:

-    display_alert "Copy TEE blob" "info"
+    display_alert "pre_config_uboot_target__copy_tee" "Copy TEE blob" "info"

Based on learnings


86-107: Add context parameter to display_alert calls for consistency.

Lines 88, 91, and 96 use only 2 parameters in display_alert calls, inconsistent with the 3-parameter pattern used elsewhere in this file. Adding the function name as context improves debugging and log clarity.

Apply this diff:

-    display_alert "Generate u-boot.its" "info"
+    display_alert "uboot_custom_postprocess" "Generate u-boot.its" "info"
     run_host_command_logged $SPL_FIT_GENERATOR -t 0x03d00000 -c lzma > u-boot.its
 
-    display_alert "Generate u-boot.itb" "info"
+    display_alert "uboot_custom_postprocess" "Generate u-boot.itb" "info"
     # Remove uboot-generated itb if exists
     rm -f u-boot.itb
     run_host_command_logged tools/mkimage -f u-boot.its -E u-boot.itb
 
-    display_alert "Generate idblock.img with u-boot SPL" "debug"
+    display_alert "uboot_custom_postprocess" "Generate idblock.img with u-boot SPL" "debug"
     RKBOOT_INI_FILE=rv1106.ini

Based on learnings

📜 Review details

Configuration used: CodeRabbit UI

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 a5353a1 and 2d7794a.

⛔ Files ignored due to path filters (7)
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/0000.patching_config.yaml is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/defconfig/luckfox_rv1106_uboot_defconfig is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/dt/rv1106-luckfox.dts is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-malloc_8_hide_optee.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-mem_layout.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/rv1103-rv1106-sysboot-extlinux.patch is excluded by !patch/**
  • patch/u-boot/legacy/u-boot-rockchip-buildroot/use-armv7a-for-modern-toolchain.patch is excluded by !patch/**
📒 Files selected for processing (3)
  • config/boards/luckfox-pico-mini.csc (1 hunks)
  • config/kernel/linux-rockchip-rv1106-vendor.config (1 hunks)
  • config/sources/families/rockchip-rv1106.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/boards/luckfox-pico-mini.csc
🧰 Additional context used
🧠 Learnings (36)
📓 Common learnings
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: 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: 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: 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.
📚 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/kernel/linux-rockchip-rv1106-vendor.config
  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-09-27T21:47:58.020Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-bcm2711-edge.config:859-861
Timestamp: 2025-09-27T21:47:58.020Z
Learning: In the Armbian build system, kernel configuration files in config/kernel/ are generated through an 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/kernel/linux-rockchip-rv1106-vendor.config
📚 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/kernel/linux-rockchip-rv1106-vendor.config
  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-03-31T12:57:13.880Z
Learnt from: libiunc
Repo: armbian/build PR: 8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-09-27T21:49:55.796Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-current.config:78-80
Timestamp: 2025-09-27T21:49:55.796Z
Learning: In the Armbian build system, kernel configuration files are generated through an 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/kernel/linux-rockchip-rv1106-vendor.config
📚 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/kernel/linux-rockchip-rv1106-vendor.config
📚 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/kernel/linux-rockchip-rv1106-vendor.config
  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-09-27T21:50:15.915Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sunxi64-current.config:94-94
Timestamp: 2025-09-27T21:50:15.915Z
Learning: When kernel config files are generated through Armbian's automated process (previous config → armbian-kernel.sh changes → make oldconfig → Armbian machinery processing), manual config file edits are not appropriate since they would be overwritten. Deprecated option handling should be implemented in the automated tooling instead.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-07-27T15:53:30.629Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:805-825
Timestamp: 2025-07-27T15:53:30.629Z
Learning: In the Armbian build system, kernel configurations prioritize broad hardware compatibility over optimization concerns. Even when including numerous legacy/obsolete drivers causes technical issues like increased initramfs size and slower enumeration, the project philosophy is to "appease the masses" by ensuring maximum device compatibility rather than optimizing for specific use cases.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-10-03T11:42:46.660Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8705
File: .github/workflows/rewrite-kernel-configs.yml:96-169
Timestamp: 2025-10-03T11:42:46.660Z
Learning: In the Armbian build repository's kernel config rewrite workflow (.github/workflows/rewrite-kernel-configs.yml), deletion of kernel config files does not need to be handled. The workflow intentionally only captures ACMR (added/copied/modified/renamed) changes and does not need to propagate deletions to the aggregator.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-10-22T07:56:19.424Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:56:19.424Z
Learning: In Linux kernel configuration, some `=y` (builtin) options are infrastructure or feature flags that enable subsystems or features for modular drivers, rather than directly compiling code into the kernel. For example, in Armbian wireless configs, options like CONFIG_SPARD_WLAN_SUPPORT=y, CONFIG_SC23XX=y, CONFIG_WCN_BSP_DRIVER_BUILDIN=y, CONFIG_UNISOC_WIFI_PS=y are module infrastructure/feature enablers, while the actual drivers (CONFIG_WLAN_UWE5621=m, CONFIG_WLAN_UWE5622=m) remain as loadable modules. These infrastructure options don't cause kernel bloat.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-09-14T06:19:06.828Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/kernel/linux-rockchip-vendor.config:0-0
Timestamp: 2025-09-14T06:19:06.828Z
Learning: CONFIG_ZSWAP has an implicit kernel-level dependency on CONFIG_SWAP, so when CONFIG_ZSWAP=y is set in Armbian overlay configs, CONFIG_SWAP gets automatically enabled during kernel build configuration processing, even if not explicitly specified in the overlay file.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-08-30T06:56:33.372Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T06:56:33.372Z
Learning: In Armbian kernel configuration, the BTRFS configuration logic preserves existing settings (whether built-in 'y' or module 'm') and only sets BTRFS_FS to module when it was previously disabled or not set, achieving "allow but not require" flexibility while maintaining backward compatibility.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-07-26T11:14:41.697Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:82-83
Timestamp: 2025-07-26T11:14:41.697Z
Learning: In Linux kernel 6.13 and later, CONFIG_ZBUD was deprecated and is scheduled for removal in kernel 6.15. The zbud compressed page allocator was found to consume more memory than alternatives like zsmalloc. Therefore, CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD becomes obsolete in current kernels, and make defconfig will auto-correct by removing such deprecated options. This demonstrates how kernel defconfigs can be backwards compatible but not forward compatible.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-07-27T13:03:53.146Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:2664-2671
Timestamp: 2025-07-27T13:03:53.146Z
Learning: In the Armbian build system's kernel configuration, when CONFIG_EXT2_FS=y and CONFIG_EXT3_FS=y are both set to built-in, EXT4 filesystem support becomes automatically available/hard-coded without requiring an explicit CONFIG_EXT4_FS line in the configuration file. This is specific to how Armbian handles kernel configuration and differs from typical standalone Linux kernel configuration behavior.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 Learning: 2025-10-22T07:51:53.015Z
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.

Applied to files:

  • config/kernel/linux-rockchip-rv1106-vendor.config
📚 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/rockchip-rv1106.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/rockchip-rv1106.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/rockchip-rv1106.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/rockchip-rv1106.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/rockchip-rv1106.conf
📚 Learning: 2025-09-14T06:10:25.610Z
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.

Applied to files:

  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-05-05T12:35:07.143Z
Learnt from: Grippy98
Repo: armbian/build PR: 8152
File: lib/functions/configuration/interactive.sh:209-266
Timestamp: 2025-05-05T12:35:07.143Z
Learning: For the interactive kernel selection in Armbian, KERNEL_MAJOR_MINOR and KERNEL_DESCRIPTION are parsed from family.conf but deliberately not set as environment variables to avoid potential interference with other parts of the build system.

Applied to files:

  • config/sources/families/rockchip-rv1106.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/rockchip-rv1106.conf
📚 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/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-06-12T21:08:11.318Z
Learnt from: djurny
Repo: armbian/build PR: 8287
File: config/bootscripts/boot-sunxi.cmd:13-23
Timestamp: 2025-06-12T21:08:11.318Z
Learning: In config/bootscripts/boot-sunxi.cmd the variable name `align_overlap_oboe_avoidance` intentionally uses the acronym “OBOE” (Off-By-One Error); it is not a typo and should not be renamed.

Applied to files:

  • config/sources/families/rockchip-rv1106.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/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-09-25T18:37:00.330Z
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.

Applied to files:

  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-07-25T03:51:50.830Z
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.

Applied to files:

  • config/sources/families/rockchip-rv1106.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/rockchip-rv1106.conf
📚 Learning: 2025-07-25T03:51:50.830Z
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.

Applied to files:

  • config/sources/families/rockchip-rv1106.conf
📚 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:

  • config/sources/families/rockchip-rv1106.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/rockchip-rv1106.conf
📚 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:

  • config/sources/families/rockchip-rv1106.conf
📚 Learning: 2025-06-14T05:53:10.627Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8298
File: extensions/https_proxy.sh:1-9
Timestamp: 2025-06-14T05:53:10.627Z
Learning: Armbian build framework extensions are NOT designed to run standalone but are called by the supervisor. The framework provides environment variables like USERPATCHES_PATH and SDCARD, and commands are executed with protection via run_host_command_logged and chroot_sdcard functions that use bash -e -o pipefail.

Applied to files:

  • config/sources/families/rockchip-rv1106.conf
🔇 Additional comments (13)
config/kernel/linux-rockchip-rv1106-vendor.config (6)

14-15: Verify disabling BUG checks is appropriate for initial board support.

Disabling CONFIG_BUG removes kernel BUG() checks which saves memory but significantly hampers debugging of kernel panics and driver issues. For initial board bring-up, these checks typically help identify issues during development.

Is this intentional for production optimization, or should BUG support be enabled during initial development and testing?


37-37: Verify suspend support is intentionally disabled.

CONFIG_SUSPEND is disabled, preventing any suspend/resume functionality. While this reduces memory footprint and is appropriate for always-on embedded systems, it limits power management options.

Confirm this aligns with the intended use case for RV1106 boards (e.g., IP cameras, always-on IoT devices).


39-40: Security features disabled for memory optimization.

Both CONFIG_STACKPROTECTOR_STRONG (stack overflow protection) and CONFIG_STRICT_KERNEL_RWX (write-xor-execute memory protection) are disabled. This is a common tradeoff for extremely memory-constrained embedded systems (64MB RAM), but reduces security hardening against exploits.

Confirm this security/memory tradeoff is acceptable for the target use cases. Consider documenting this decision for future reference.


50-51: LGTM: CMA disabled consistently.

CMA (Contiguous Memory Allocator) is disabled, which is consistent with the boot parameter cma=0 set in the family configuration and appropriate for the memory-constrained platform without camera/display subsystems.


298-329: LGTM: Multimedia subsystems comprehensively disabled.

Media, camera, DRM, and display subsystems are thoroughly disabled, which is consistent with the PR objectives emphasizing minimal multimedia support for memory-constrained devices. This comprehensive approach avoids partial configurations that could waste memory.


491-495: LGTM: ZSWAP appropriately configured for low-memory devices.

ZSWAP with ZSTD compression is well-suited for the memory-constrained RV1106 platform (64MB RAM). This provides compressed swap in RAM before falling back to disk swap, which aligns with the PR's memory optimization goals.

config/sources/families/rockchip-rv1106.conf (7)

16-18: LGTM: Clear BOOT_SOC defaulting logic.

The defaulting pattern for BOOT_SOC is clear and allows board configs to override while providing a sensible default.


35-47: LGTM: Robust BOOT_SOC-specific blob configuration.

The conditional blob configuration properly supports both rv1103 and rv1106 SoCs with appropriate error handling for unknown values. The use of :- operator allows board configs to override defaults while providing sensible fallbacks.


50-60: LGTM: Vendor kernel configuration follows Armbian standards.

The vendor branch configuration follows the established pattern for Rockchip families, using the armbian/linux-rockchip repository with appropriate branch and patch directory naming.

Based on learnings


62-75: LGTM: Appropriate GCC 13+ compatibility workaround.

The function correctly detects GCC version and applies the necessary flag to work around enum-int-mismatch errors in the vendor U-Boot. This is a clean solution for the known Rockchip/Radxa U-Boot compatibility issue.


111-118: LGTM: write_uboot_platform follows modern Rockchip standard.

The function correctly implements the modern Rockchip pattern with status=none in dd commands and properly handles both build-time and board-side execution contexts through the logging_prelude mechanism.

Based on learnings


120-129: LGTM: Standard peripheral access group setup.

The function follows the standard Armbian pattern for creating system groups (gpio, i2c) with specific GIDs that match udev rules for non-root peripheral access.


131-149: LGTM: Clean BSP asset installation.

The function properly installs BSP assets (udev rules, ALSA config) from shared Rockchip packages and conditionally installs AP6330 firmware hooks only when INSTALL_ARMBIAN_FIRMWARE is enabled.

@vidplace7
Copy link
Member Author

vidplace7 commented Nov 4, 2025

Rebased now that the LowMem extension #8839 has been merged, and enabled lowmem by default.
Compile/run tested after rebase // working 👍

@github-actions github-actions bot removed the Needs review Seeking for review label Nov 4, 2025
@vidplace7
Copy link
Member Author

vidplace7 commented Nov 5, 2025

I would at least try to get it to work without having to rely on Jammy since it won't be there forever. That's more a general task rather than specific to this PR.

Just re-tested this and actually seems to be compiling fine with DOCKER_ARMBIAN_BASE_IMAGE="ubuntu:noble" as well 👍 The resulting image boots / behaves normally.
I previously set this to jammy while bringing up the family due to warnings from other community members but it seems in this case it's working fine.

@igorpecovnik
Copy link
Member

igorpecovnik commented Nov 5, 2025

I previously set this to jammy while bringing up the family due to warnings from other community members but it seems in this case it's working fine.

Good to know. In some cases, not sure why, probably some python library, u-boot compilation is not successful with Noble, thus Jammy is used. We will eventually need to drop Jammy as some modern stuff don't compile anymore. This for example: https://github.com/armbian/os/actions/runs/19094802871/job/54553641011#step:8:61498 and those for which we already define exception.

@EvilOlaf
Copy link
Member

EvilOlaf commented Nov 6, 2025

This for example: https://github.com/armbian/os/actions/runs/19094802871/job/54553641011#step:8:61498 and those for which we already define exception.

The usual rwx issue. I tried to fix it but for some reason the framework ignores when ATFPATCHDIR is set, therefore atf cannot be patched.

@igorpecovnik igorpecovnik merged commit dfe371a into armbian:main Nov 7, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release BSP Board Support Packages Hardware Hardware related like kernel, U-Boot, ... 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.

6 participants