Skip to content

docs: document PREFER_NATIVE_ARMHF and enrich arm64-compat-vdso entry#921

Open
iav wants to merge 1 commit into
armbian:mainfrom
iav:docs/native-armhf-switch
Open

docs: document PREFER_NATIVE_ARMHF and enrich arm64-compat-vdso entry#921
iav wants to merge 1 commit into
armbian:mainfrom
iav:docs/native-armhf-switch

Conversation

@iav
Copy link
Copy Markdown
Contributor

@iav iav commented May 26, 2026

Summary

Documents the new PREFER_NATIVE_ARMHF build switch landed in armbian/build#9820 and enriches the existing arm64-compat-vdso entry in the Extensions reference so the two cross-link sensibly.

  • Developer-Guide_Build-Switches.md — new PREFER_NATIVE_ARMHF entry (default yes, opt-out no). Explains when it kicks in (arm64 host with CONFIG_COMPAT), what it changes (rootfs/chroot/post-install armhf steps run native instead of qemu, ~10× faster), and how to inspect the host kernel (zcat /proc/config.gz | grep ...) with sample output. Cross-links the arm64-compat-vdso extension and the arm64 Kconfig.
  • Developer-Guide_Extensions-List.md — replaces the one-liner for arm64-compat-vdso with a description of the practical effect (native armhf userspace via CONFIG_COMPAT / CONFIG_COMPAT_VDSO / CONFIG_ARM64_32BIT_EL0), the build-time benefit, and the Apple-M-series limitation. Cross-links the switch.

Test plan

  • MkDocs build (mkdocs build --strict) — no broken links / anchors.
  • Visual check: Build-Switches PREFER_NATIVE_ARMHF → Extensions-List #arm64-compat-vdso round-trip resolves.

@github-actions github-actions Bot added the size/small PR with less then 50 lines label May 26, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Review Change Stack

Walkthrough

This pull request adds documentation for native armhf binary execution on arm64 build hosts. It introduces a new build switch PREFER_NATIVE_ARMHF with yes/no options, explains native execution when the host kernel has CONFIG_COMPAT (and notes CONFIG_COMPAT_VDSO), documents enabling that support via the arm64-compat-vdso extension, and provides a zcat /proc/config.gz check and a runtime limitation for platforms without 32-bit EL0 userspace support.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly documents the addition of PREFER_NATIVE_ARMHF build switch documentation and enrichment of arm64-compat-vdso extension entry, with specific file changes and cross-references detailed.
Title check ✅ Passed The title accurately describes the main changes: documentation for PREFER_NATIVE_ARMHF build switch and enriched arm64-compat-vdso extension entry.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added the Needs review Seeking for review label May 26, 2026
Copy link
Copy Markdown
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

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

Inline comments:
In `@docs/Developer-Guide_Build-Switches.md`:
- Around line 348-351: Update the markdown code fence that wraps the example
lines "CONFIG_COMPAT=y" and "CONFIG_COMPAT_VDSO=y" to include a language tag
(e.g., use ```text) so the block is fenced as ```text ... ``` and satisfies
markdownlint MD040; locate the fenced block containing those two CONFIG_* lines
and prepend the opening backticks with the chosen tag.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6b6d8181-63eb-447e-a823-d5da9e22d60c

📥 Commits

Reviewing files that changed from the base of the PR and between 2365684 and 7b4f000.

📒 Files selected for processing (2)
  • docs/Developer-Guide_Build-Switches.md
  • docs/Developer-Guide_Extensions-List.md

Comment thread docs/Developer-Guide_Build-Switches.md Outdated
@iav iav force-pushed the docs/native-armhf-switch branch from 6717cd1 to 1d23ce6 Compare May 26, 2026 02:24
@EvilOlaf
Copy link
Copy Markdown
Member

Why the ARMBIAN_ prefix of this switch?

@iav
Copy link
Copy Markdown
Contributor Author

iav commented May 26, 2026

Agreed, dropping the prefix. Renaming to PREFER_NATIVE_ARMHF in armbian/build#9820, will update this PR.

@iav
Copy link
Copy Markdown
Contributor Author

iav commented May 26, 2026

While I was doing this, I was thinking about large hosting machines and how best to determine whether they've included COMPAT in their kernels...

iav added a commit to iav/armbian that referenced this pull request May 26, 2026
Match the naming convention of sibling build switches in the same section
(KERNEL_BTF, USE_CCACHE, ARTIFACT_IGNORE_CACHE, …) which carry no prefix.
Suggested in armbian/documentation#921.

Assisted-by: Claude:claude-opus-4.7
@iav iav force-pushed the docs/native-armhf-switch branch from 1d23ce6 to 649937c Compare May 26, 2026 04:01
Add a Build-Switches entry for the new opt-out switch (default yes) that gates
native armhf execution on arm64 hosts with CONFIG_COMPAT, with an inline check
recipe and a link to the arm64 Kconfig.

Expand the arm64-compat-vdso entry in the Extensions reference to cover the
practical effect (native armhf userspace at full speed, ~10× faster Armbian
rootfs builds) and the Apple-M-series limitation, and cross-link the switch.

Assisted-by: Claude:claude-opus-4.7
@iav iav force-pushed the docs/native-armhf-switch branch from 649937c to bd0f976 Compare May 26, 2026 04:02
@iav iav changed the title docs: document ARMBIAN_PREFER_NATIVE_ARMHF and enrich arm64-compat-vdso entry docs: document PREFER_NATIVE_ARMHF and enrich arm64-compat-vdso entry May 26, 2026
@EvilOlaf
Copy link
Copy Markdown
Member

Just look for the config entry in /proc/config?

@iav
Copy link
Copy Markdown
Contributor Author

iav commented May 26, 2026

Just look for the config entry in /proc/config?

Yes, as a possible method.
Am I wrong?

@EvilOlaf
Copy link
Copy Markdown
Member

Unless there is a method having this present in kernel but be blocked on userspace level. No clue. Needs research

@iav
Copy link
Copy Markdown
Contributor Author

iav commented May 26, 2026

Unless there is a method having this present in kernel but be blocked on userspace level. No clue. Needs research

Then just remove there lines 340-354?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants