kenzok8 98d6823632 fix: pass CONFIG_DWARVES=y when building dwarves
tools/dwarves 的编译 target 只在它进 tools-y 时才生成,而进 tools-y
的条件是 CONFIG_DWARVES 或 CONFIG_BUILD_ALL_HOST_TOOLS;armv7 SDK
的 .config 里没开,所以光跑 make tools/dwarves/compile 会报
No rule to make target。命令行传 CONFIG_DWARVES=y:命令行变量
优先于 .config(全树无 override CONFIG_*),tools/Makefile
第 150 行的 $(if ...) 随之算成 y,target 规则生成;已编好时
构建系统直接跳过。本地已用同构的最小 Makefile 复现验证:
不带该变量报 No rule,带上则 target 出现。
2026-11-07 04:43:56 +08:00

🧬 vmlinux-btf

Supply kernel BTF to OpenWrt firmware built without it, so dae / daed start.

Build License Kernel

简体中文 | English


🤔 Why

dae / daed load CO-RE eBPF programs that need the running kernel's BTF.

Kernel /sys/kernel/btf/vmlinux daed starts
CONFIG_DEBUG_INFO_BTF enabled (ImmortalWrt 25.12, …) ✅ present ✅ yes
Not enabled (stock OpenWrt, online ImageBuilder images) ❌ absent ❌ fails

Many firmwares ship without BTF, so daed won't start. Installing this package fixes that.

⚙️ How it works

OpenWrt kernel source + .config
        │  enable DEBUG_INFO_BTF, build a shadow kernel
        ▼
   shadow vmlinux  ──pahole──▶  detached vmlinux.btf
        │  package & install
        ▼
/usr/lib/debug/boot/vmlinux-<release>
        │
        ▼
cilium/ebpf falls back here when
/sys/kernel/btf/vmlinux is absent → daed starts ✓

The package version tracks the kernel version (PKG_VERSION = LINUX_VERSION). BTF is compatible within a kernel minor series, so a 6.6.x package works on other 6.6.y firmware.

📦 Support matrix

Kernel SDK Pkg fmt Typical firmware
6.6.x ImmortalWrt 24.10 IPK Stock OpenWrt 24.10 and 24.10-based images
6.12.x ImmortalWrt 25.12 APK 25.12-based images that lack BTF

ImmortalWrt's own images usually ship BTF in-kernel and don't need this package.

🚀 Install

# 1. Confirm the firmware really lacks BTF
[ -e /sys/kernel/btf/vmlinux ] && echo "BTF present, skip" || echo "BTF missing, install"

# 2. Check kernel version + arch, download the matching package, install
uname -r            # e.g. 6.6.141  → pick the 6.6.x package
opkg install ./vmlinux-btf_*.ipk     # or: apk add ./vmlinux-btf-*.apk

# 3. Restart daed
/etc/init.d/daed restart

🔨 Build it yourself

gh workflow run build.yml

Builds all 9 architectures × {24.10 IPK, 25.12 APK} and publishes them to Releases.

🙏 Credit

Recipe adapted from sbwml / QiuSimons vmlinux-btf.


BTF support for openwrt-daede and other eBPF dependencies
S
Description
OpenWrt 固件补内核 BTF,vmlinux-btf
Readme
1.6 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 59.4%
Makefile 40.6%