board: add BeagleBadge support & Bump TI K3 sources#9679
board: add BeagleBadge support & Bump TI K3 sources#9679Grippy98 wants to merge 1 commit intoarmbian:mainfrom
Conversation
📝 WalkthroughWalkthroughAdds a new BeagleBadge board definition with low-RAM post-image hooks, updates TMDS62LEVM board ATF/feature flags, tweaks K3 bootscript, advances K3 family sources (PSDK/kernel/ATF/OP-TEE), and applies broad kernel config changes across multiple K3 variants. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🚫 Missing required board assetsThis PR adds new board configuration(s). Required assets must already exist in github/armbian/armbian.github.io.
Missing items
Once the missing files are added (or a PR is opened in armbian/armbian.github.io), re-run this check. |
Adds initial Armbian standard build configuration and low-RAM optimizations for the TI AM62L-based BeagleBadge. Co-Authored-By: Jonas Wood <47963908+jonaswood01@users.noreply.github.com>
ec309c8 to
df6da70
Compare
|
Added missing photo and BOARD_VENDOR. |
🚫 Missing required board assetsThis PR adds new board configuration(s). Required assets must already exist in github/armbian/armbian.github.io.
Missing items
Once the missing files are added (or a PR is opened in armbian/armbian.github.io), re-run this check. |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/boards/beaglebadge.conf`:
- Line 1: Replace the incorrect header comment on the first line (currently
advertising "2xGBE OSPI HDMI") with an accurate one describing the BeagleBadge
hardware features used by interactive board selection: update the first-line
comment to mention "BeagleBadge Texas Instruments AM62L dual-core 256MB with
E-Ink display and CC33xx wireless" (remove references to 2xGBE, OSPI, HDMI) so
the board selector shows the correct hardware capabilities.
- Around line 164-170: Remove the two invalid/persistent-inappropriate sysctl
keys from the heredoc that writes the 99-lowram.conf: delete the lines setting
zswap.enabled and vm.compact_memory so only valid persistent sysctl keys remain
(e.g., vm.swappiness, vm.page-cluster, vm.watermark_scale_factor) in the block
that generates "${SDCARD}"/etc/sysctl.d/99-lowram.conf; do not add alternate
handling here for zswap (kernel cmdline/module param) or vm.compact_memory
(one-time compaction) — leave those to boot/kernel config instead.
In `@config/bootscripts/boot-k3.cmd`:
- Line 4: The current check_beaglebadge assignment overwrites name_overlays,
discarding user-supplied overlays; change it to append the BeagleBadge E-Ink
overlay to existing name_overlays instead of replacing it. Update the block that
checks fdtfile ("ti/k3-am62l3-badge.dtb") so it still sets rdaddr but builds
name_overlays by preserving any existing value (e.g., add the overlay to the
existing space-separated name_overlays when non-empty) and ensures the overlay
filename ti/k3-am62l3-badge-eink-gdey042t81.dtbo is included.
In `@config/kernel/linux-k3-beagle-edge.config`:
- Around line 97-98: The config contains a removed option
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD (with CONFIG_ZSWAP present); regenerate the
kernel config against the 6.18 tree instead of editing manually—run the Armbian
automated configuration/regeneration process to produce a config compatible with
6.18 so CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD is removed and CONFIG_ZSWAP remains
correctly set.
In `@config/kernel/linux-k3-beagle-vendor.config`:
- Line 947: The overlay setting `# CONFIG_FTRACE is not set` conflicts with the
build policy that force-enables FTRACE-related options (`FTRACE`,
`FUNCTION_TRACER`, `FTRACE_SYSCALLS`) when BTF/eBPF is enabled; either remove
this override so the overlay is minimal and matches the policy, or disable BTF
by setting `KERNEL_BTF=no` in the policy layer before regenerating the overlay;
after making the appropriate policy change, regenerate the kernel config overlay
using the kernel-config rewrite workflow (e.g., the compile.sh
rewrite-kernel-config step) so the overlay no longer flips back on rewrite.
In `@config/kernel/linux-k3-vendor.config`:
- Line 1078: The overlay currently forces CONFIG_FTRACE off with the line "#
CONFIG_FTRACE is not set", which will be overridden by the Armbian build policy
that enables CONFIG_FTRACE, CONFIG_FUNCTION_TRACER and CONFIG_FTRACE_SYSCALLS
for BTF/eBPF-capable kernels; either remove this explicit disable from the
kernel overlay (so the shipped config follows policy) or first change the build
policy to disable tracing and then regenerate the minimal overlay using the
build tool (use ./compile.sh rewrite-kernel-config BOARD=<board>
BRANCH=<branch>), and ensure any references to CONFIG_FTRACE,
CONFIG_FUNCTION_TRACER and CONFIG_FTRACE_SYSCALLS in the overlay reflect the new
policy rather than being locally forced.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 604f011d-c7c4-4d7a-8551-a2c9f3a2a69f
📒 Files selected for processing (12)
config/boards/beaglebadge.confconfig/boards/tmds62levm.confconfig/bootscripts/boot-k3.cmdconfig/kernel/linux-k3-beagle-edge.configconfig/kernel/linux-k3-beagle-vendor-rt.configconfig/kernel/linux-k3-beagle-vendor.configconfig/kernel/linux-k3-edge.configconfig/kernel/linux-k3-vendor-edge.configconfig/kernel/linux-k3-vendor-rt.configconfig/kernel/linux-k3-vendor.configconfig/sources/families/include/k3_common.incconfig/sources/families/k3.conf
| @@ -0,0 +1,191 @@ | |||
| # BeagleBadge Texas Instruments AM62L dual core 256MB 2xGBE OSPI HDMI | |||
There was a problem hiding this comment.
Fix the hardware description on Line 1.
This looks copied from another TI board and advertises 2xGBE OSPI HDMI, which does not match the badge-specific E-Ink/CC33xx setup introduced below. This string is shown during interactive board selection, so it needs to describe the actual hardware.
Based on learnings: in Armbian board configuration files, the first-line comment must be a proper hardware feature description because it is used during interactive compilation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@config/boards/beaglebadge.conf` at line 1, Replace the incorrect header
comment on the first line (currently advertising "2xGBE OSPI HDMI") with an
accurate one describing the BeagleBadge hardware features used by interactive
board selection: update the first-line comment to mention "BeagleBadge Texas
Instruments AM62L dual-core 256MB with E-Ink display and CC33xx wireless"
(remove references to 2xGBE, OSPI, HDMI) so the board selector shows the correct
hardware capabilities.
| cat <<-EOF > "${SDCARD}"/etc/sysctl.d/99-lowram.conf | ||
| # Memory management for 256MB system | ||
| vm.swappiness=100 | ||
| zswap.enabled=0 | ||
| vm.page-cluster=0 | ||
| vm.watermark_scale_factor=125 | ||
| vm.compact_memory=1 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Is zswap.enableda valid Linux sysctl key, or is it only configurable via kernel cmdline / module parameter? What does writingvm.compact_memory=1 via sysctl actually do?
💡 Result:
zswap.enabled is not a valid Linux sysctl key under /proc/sys/vm/. It is configurable via kernel command line (e.g., zswap.enabled=1) or module parameter (echo 1 > /sys/module/zswap/parameters/enabled). Writing vm.compact_memory=1 via sysctl triggers memory compaction across all zones (if CONFIG_COMPACTION is enabled), moving free memory into contiguous blocks to reduce fragmentation. This aids allocations like huge pages, though processes compact as needed.
Citations:
- 1: https://docs.kernel.org/6.4/admin-guide/mm/zswap.html
- 2: https://www.kernel.org/doc/html/v5.16/admin-guide/mm/zswap.html
- 3: https://docs.kernel.org/admin-guide/mm/zswap.html
- 4: https://www.kernel.org/doc/html/v5.15/admin-guide/sysctl/vm.html
- 5: https://kernel.org/doc/html/v6.18/admin-guide/sysctl/vm.html
- 6: https://docs.kernel.org/6.4/admin-guide/sysctl/vm.html
Remove zswap.enabled and vm.compact_memory from sysctl.d configuration.
zswap.enabled is not a valid sysctl key—it can only be configured via kernel command line or module parameter. vm.compact_memory triggers an immediate one-time compaction during boot rather than setting a persistent memory management policy.
Suggested fix
# Memory management for 256MB system
vm.swappiness=100
- zswap.enabled=0
vm.page-cluster=0
vm.watermark_scale_factor=125
- vm.compact_memory=1
vm.vfs_cache_pressure=150🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@config/boards/beaglebadge.conf` around lines 164 - 170, Remove the two
invalid/persistent-inappropriate sysctl keys from the heredoc that writes the
99-lowram.conf: delete the lines setting zswap.enabled and vm.compact_memory so
only valid persistent sysctl keys remain (e.g., vm.swappiness, vm.page-cluster,
vm.watermark_scale_factor) in the block that generates
"${SDCARD}"/etc/sysctl.d/99-lowram.conf; do not add alternate handling here for
zswap (kernel cmdline/module param) or vm.compact_memory (one-time compaction) —
leave those to boot/kernel config instead.
| bootpart=1:1 | ||
| bootdir= | ||
| finduuid=part uuid \${boot} 1:2 uuid | ||
| check_beaglebadge=if test "${fdtfile}" = "ti/k3-am62l3-badge.dtb"; then rdaddr=0x84900000; name_overlays=ti/k3-am62l3-badge-eink-gdey042t81.dtbo; fi |
There was a problem hiding this comment.
Append the badge overlay instead of replacing name_overlays.
This assignment discards any overlays already supplied by the user, so BeagleBadge owners can't combine the mandatory E-Ink overlay with their own add-ons.
🩹 Proposed fix
-check_beaglebadge=if test "${fdtfile}" = "ti/k3-am62l3-badge.dtb"; then rdaddr=0x84900000; name_overlays=ti/k3-am62l3-badge-eink-gdey042t81.dtbo; fi
+check_beaglebadge=if test "${fdtfile}" = "ti/k3-am62l3-badge.dtb"; then rdaddr=0x84900000; if test -n "${name_overlays}"; then name_overlays="${name_overlays} ti/k3-am62l3-badge-eink-gdey042t81.dtbo"; else name_overlays=ti/k3-am62l3-badge-eink-gdey042t81.dtbo; fi; fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| check_beaglebadge=if test "${fdtfile}" = "ti/k3-am62l3-badge.dtb"; then rdaddr=0x84900000; name_overlays=ti/k3-am62l3-badge-eink-gdey042t81.dtbo; fi | |
| check_beaglebadge=if test "${fdtfile}" = "ti/k3-am62l3-badge.dtb"; then rdaddr=0x84900000; if test -n "${name_overlays}"; then name_overlays="${name_overlays} ti/k3-am62l3-badge-eink-gdey042t81.dtbo"; else name_overlays=ti/k3-am62l3-badge-eink-gdey042t81.dtbo; fi; fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@config/bootscripts/boot-k3.cmd` at line 4, The current check_beaglebadge
assignment overwrites name_overlays, discarding user-supplied overlays; change
it to append the BeagleBadge E-Ink overlay to existing name_overlays instead of
replacing it. Update the block that checks fdtfile ("ti/k3-am62l3-badge.dtb") so
it still sets rdaddr but builds name_overlays by preserving any existing value
(e.g., add the overlay to the existing space-separated name_overlays when
non-empty) and ensures the overlay filename
ti/k3-am62l3-badge-eink-gdey042t81.dtbo is included.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
| CONFIG_ZSWAP=y | ||
| CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD=y |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In Linux kernel 6.18, does CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD still exist, or was it removed with zbud deprecation?
💡 Result:
In Linux kernel 6.18, CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD no longer exists. It was removed as part of changes where zswap now uses zsmalloc directly, eliminating the zpool layer and its configuration options like CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD. Zbud was deprecated and removed around this time (commit in Jan 2025 mentions removal after z3fold), and the zpool mechanism was simplified/removed in 6.18 per the Gentoo wiki and commit 2ccd9fecd916. Current master Kconfig for ZSWAP shows no choice for default zpool, only compressor choice and direct select ZSMALLOC.
Citations:
- 1: https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Kernel_Upgrade_from_6.17_to_6.18
- 2: https://gitlab.community.ispras.ru/lesf/linux/-/blob/7e74f756f5f643148ca5537bf2fee6767e4b0ed9/Documentation/admin-guide/mm/zswap.rst
- 3: https://en.wikipedia.org/wiki/Zswap
- 4: https://github.com/torvalds/linux/blob/master/mm/Kconfig
- 5: https://github.com/torvalds/linux/blob/9ed22ae6be817d7a3f5c15ca22cbc9d3963b481d/mm/Kconfig
Regenerate this config file; CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD was removed in 6.18.
This option no longer exists in the kernel 6.18 tree—it was removed entirely when the zpool layer was simplified. The file should be regenerated against the actual 6.18 kernel tree rather than manually edited, as the automated Armbian configuration process will overwrite manual changes.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@config/kernel/linux-k3-beagle-edge.config` around lines 97 - 98, The config
contains a removed option CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD (with CONFIG_ZSWAP
present); regenerate the kernel config against the 6.18 tree instead of editing
manually—run the Armbian automated configuration/regeneration process to produce
a config compatible with 6.18 so CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD is removed and
CONFIG_ZSWAP remains correctly set.
There was a problem hiding this comment.
🧹 Nitpick comments (3)
config/kernel/linux-k3-beagle-vendor.config (1)
887-887: Consider keeping Btrfs as a module to reduce kernel size.Changing
CONFIG_BTRFS_FSfrom=mto=ybuilds Btrfs into the kernel rather than as a loadable module. For a vendor kernel targeting resource-constrained devices (like the 256MB BeagleBadge), this increases the base kernel footprint. Unless Btrfs is required at early boot before modules can load, keeping it as a module is more memory-efficient.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/kernel/linux-k3-beagle-vendor.config` at line 887, The config currently builds Btrfs into the kernel (CONFIG_BTRFS_FS=y); change it back to a module (set CONFIG_BTRFS_FS=m) in the vendor kernel config to reduce base kernel size for resource-constrained devices like the BeagleBadge, unless Btrfs is required before initramfs/module loading—if so, leave it built-in and document that requirement; update CONFIG_BTRFS_FS accordingly and re-run config/kernel build checks.config/sources/families/include/k3_common.inc (2)
24-36: Inconsistent indentation: spaces vs tabs.Lines 27 and 35 use spaces for indentation while the rest of the file uses tabs. This creates visual inconsistency.
Suggested fix
if [[ "${GPU_SUPPORT}" == "yes" ]] ; then TI_PACKAGES+=("ti-img-rogue-driver-${SOC_ID}-dkms" "ti-img-rogue-umlibs-${SOC_ID}" "ti-img-rogue-tools-${SOC_ID}" "ti-img-rogue-firmware-${SOC_ID}") TI_PACKAGES+=("mesa-pvr-vulkan-drivers" "libgl1-mesa-pvr-dri") - TI_PACKAGES+=("gstreamer1.0-tools" "gstreamer1.0-plugins-good" "gstreamer1.0-plugins-bad" "gstreamer1.0-plugins-base") + TI_PACKAGES+=("gstreamer1.0-tools" "gstreamer1.0-plugins-good" "gstreamer1.0-plugins-bad" "gstreamer1.0-plugins-base") if [[ "${CHROMIUM_SUPPORT}" == "yes" ]] ; then TI_PACKAGES+=("chromium") fi fi if [[ "${DISPLAY_SUPPORT}" == "yes" ]] ; then - TI_PACKAGES+=("weston" "seatd") + TI_PACKAGES+=("weston" "seatd") fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/sources/families/include/k3_common.inc` around lines 24 - 36, The file has mixed tabs and spaces causing inconsistent indentation around the GPU and DISPLAY blocks; normalize indentation to use tabs consistently (matching the rest of the file) for the conditional blocks that reference GPU_SUPPORT, CHROMIUM_SUPPORT, DISPLAY_SUPPORT and the TI_PACKAGES+= lines so all indented lines use tabs instead of spaces; update the lines that currently use spaces (the TI_PACKAGES+= gstreamer line and the TI_PACKAGES+=("weston" "seatd") line) to use tabs to match the surrounding code.
46-48: Use-ninstead of! -zand quote the variable.The idiom
-nis cleaner than! -z, and the variable should be quoted for robustness even inside[[ ]].Suggested fix
-if [[ ! -z ${EXTRA_BOARD_PACKAGES} ]] ; then +if [[ -n "${EXTRA_BOARD_PACKAGES}" ]] ; then TI_PACKAGES+=("${EXTRA_BOARD_PACKAGES[@]}") fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/sources/families/include/k3_common.inc` around lines 46 - 48, Replace the conditional test that uses `! -z` with a quoted `-n` test for the EXTRA_BOARD_PACKAGES array: change the `if [[ ! -z ${EXTRA_BOARD_PACKAGES} ]]` check to `if [[ -n "${EXTRA_BOARD_PACKAGES[*]}" ]]` (or alternatively `if (( ${`#EXTRA_BOARD_PACKAGES`[@]} ));`), and keep the array append as `TI_PACKAGES+=("${EXTRA_BOARD_PACKAGES[@]}")` so the variable is quoted and robust.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@config/kernel/linux-k3-beagle-vendor.config`:
- Line 887: The config currently builds Btrfs into the kernel
(CONFIG_BTRFS_FS=y); change it back to a module (set CONFIG_BTRFS_FS=m) in the
vendor kernel config to reduce base kernel size for resource-constrained devices
like the BeagleBadge, unless Btrfs is required before initramfs/module
loading—if so, leave it built-in and document that requirement; update
CONFIG_BTRFS_FS accordingly and re-run config/kernel build checks.
In `@config/sources/families/include/k3_common.inc`:
- Around line 24-36: The file has mixed tabs and spaces causing inconsistent
indentation around the GPU and DISPLAY blocks; normalize indentation to use tabs
consistently (matching the rest of the file) for the conditional blocks that
reference GPU_SUPPORT, CHROMIUM_SUPPORT, DISPLAY_SUPPORT and the TI_PACKAGES+=
lines so all indented lines use tabs instead of spaces; update the lines that
currently use spaces (the TI_PACKAGES+= gstreamer line and the
TI_PACKAGES+=("weston" "seatd") line) to use tabs to match the surrounding code.
- Around line 46-48: Replace the conditional test that uses `! -z` with a quoted
`-n` test for the EXTRA_BOARD_PACKAGES array: change the `if [[ ! -z
${EXTRA_BOARD_PACKAGES} ]]` check to `if [[ -n "${EXTRA_BOARD_PACKAGES[*]}" ]]`
(or alternatively `if (( ${`#EXTRA_BOARD_PACKAGES`[@]} ));`), and keep the array
append as `TI_PACKAGES+=("${EXTRA_BOARD_PACKAGES[@]}")` so the variable is
quoted and robust.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d1d87deb-93c1-4278-9da7-113032e12e5e
📒 Files selected for processing (12)
config/boards/beaglebadge.confconfig/boards/tmds62levm.confconfig/bootscripts/boot-k3.cmdconfig/kernel/linux-k3-beagle-edge.configconfig/kernel/linux-k3-beagle-vendor-rt.configconfig/kernel/linux-k3-beagle-vendor.configconfig/kernel/linux-k3-edge.configconfig/kernel/linux-k3-vendor-edge.configconfig/kernel/linux-k3-vendor-rt.configconfig/kernel/linux-k3-vendor.configconfig/sources/families/include/k3_common.incconfig/sources/families/k3.conf
✅ Files skipped from review due to trivial changes (1)
- config/boards/tmds62levm.conf
🚧 Files skipped from review as they are similar to previous changes (7)
- config/bootscripts/boot-k3.cmd
- config/kernel/linux-k3-beagle-vendor-rt.config
- config/kernel/linux-k3-edge.config
- config/sources/families/k3.conf
- config/kernel/linux-k3-vendor-rt.config
- config/kernel/linux-k3-vendor-edge.config
- config/kernel/linux-k3-beagle-edge.config
Description
Adds initial Armbian standard build configuration and low-RAM optimizations for the TI AM62L-based BeagleBadge.
It also bumps new versions for latest TI kernel, uboot, ATF.
How Has This Been Tested?
./compile.sh build BOARD=beaglebadge BRANCH=vendor-edge BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=trixieChecklist:
Summary by CodeRabbit
New Features
Improvements