Skip to content
Contents
GuidesOpenWrt

OpenWrt kernel build stops at PERSISTENT_HUGE_ZERO_FOLIO (NEW): which config should you check?

Locate new Kconfig prompts in the Linux 6.18 build, and compare them against OpenWrt's top-level selections and the actual configuration of the target kernel.

When compiling a sunxi/cortexa53 snapshot for the Olimex A64-OLinuXino, transparent huge pages (THP) are enabled, but the build stalls at the (NEW) prompt for PERSISTENT_HUGE_ZERO_FOLIO. This issue occurs during the phase of generating the target kernel configuration. Existing routers typically still run older images, and modifying the transparent huge page policy in their /sys directory does not resolve this issue on the build machine.

Record the build configuration and find the option in the source tree

Save git rev-parse HEAD, git status --short, and the full build log in the original OpenWrt source directory. Also save the top-level .config, then execute ./scripts/diffconfig.sh to export a minimal configuration. Verify the same commit, feeds versions, and local modifications in a separate working directory; this ensures the original usable image and configuration are preserved.

git rev-parse --short HEAD
grep -nE 'CONFIG_TARGET_sunxi|CONFIG_KERNEL_.*(TRANSPARENT_HUGEPAGE|PERSISTENT_HUGE_ZERO_FOLIO)' .config
git grep -n 'PERSISTENT_HUGE_ZERO_FOLIO' -- config target/linux
find build_dir -path '*/linux-6.18*/.config' -print

Record the target directory where errors are generated. Use the CONFIG_KERNEL_ prefix at the top level, and the CONFIG_ prefix in the generated Linux .config file. The build tree may contain multiple targets and old builds; select the one that matches the log path, target, and kernel version. Check the presence of CONFIG_TRANSPARENT_HUGEPAGE and CONFIG_PERSISTENT_HUGE_ZERO_FOLIO, and simultaneously search for symbol definitions, help text, and dependencies in mm/Kconfig of that tree.

What to do once you find the symbol

  • If only the x86/64 config-6.18 file mentions the option, you have found a choice made for that target. Check the THP requirements and dependencies on sunxi/cortexa53 before choosing a value. Do not copy the entire x86 configuration.
  • OpenWrt commit 7c69452c added configuration entries for kernel 6.18 and later. Check whether your checkout contains it. If so, use that tree's configuration entry and regenerate the kernel configuration. If not, evaluate a compatible later version and matching feeds in a separate worktree, or maintain a documented target-specific change.
  • If the log actually reports download, patch, or compiler errors first, prioritize handling the first error. When the only exit code at the end is syncconfig, rerun the build in a separate build directory using the same input with single-threaded execution, retaining all interactive prompts and previous content.

In the copy, first run make defconfig, then use make -j1 V=s target/linux/compile to verify the same path. A successful signal is that the target no longer stalls at the same symbol, the generated Linux .config matches the selected options, and the kernel compilation target completes normally. Additional full firmware delivery requires completing full device compilation and boot validation for the board. When encountering more (NEW) prompts, refer to the help individually; bulk answering "yes" will alter the behavior of unevaluated kernels. To rollback experiments, simply return to the original worktree and restore the saved configuration. This document verified the snapshot source code against subsequent commits, and no self-compiled kernel was booted on the A64 board.Applicability of ImageBuilder and source code compilation

Explore hardware

Devices mentioned

Comments