OpenWrt 的配置体系:menuconfig、target/subtarget/device 与 feeds
OpenWrt 用 Kconfig + .config + target/subtarget/device + feeds 描述一次构建。本文把 menuconfig、defconfig、DEVICE_PACKAGES、feeds 与 ImageBuilder 的关系讲清,并说明为什么 prplOS 还要在它上面加一层 profile。
共 32 篇
OpenWrt 用 Kconfig + .config + target/subtarget/device + feeds 描述一次构建。本文把 menuconfig、defconfig、DEVICE_PACKAGES、feeds 与 ImageBuilder 的关系讲清,并说明为什么 prplOS 还要在它上面加一层 profile。
OpenWrt 已经有一套 Kconfig/.config/feeds,为什么 prplOS 还要加 profiles + gen_config.py?因为 .config 是构建输出,不是可组合的产品配方。本文论述 prplOS 加这一层要解决什么、代价是什么,以及什么时候 OpenWrt 原生就够了。
官方 profiles 不是 26 块板子:一组是 prpl 功能包(prpl_core/prpl/lcm/mgmt/security/debug),一组是 target/board(x86_64/ipq/mtk/mvebu/mxl/airoha)。本文分层列出 26 个官方 profile,说明 include/feeds/diffconfig,并指出没有 armsr——为下一篇 GEN_CONFIG 做铺垫。
prplOS 的 README 没讲清 GEN_CONFIG:官方 profiles 里没有 armsr,需要自己写 qemu_armsr.yml,再跑 scripts/gen_config.py。本文以 QEMU ARM SystemReady(armsr/armv8)为目标,给出可复现的 profile、生成出的 .config、QEMU 启动命令和边界。
OpenWrt ubus 有两层模型:对象/方法/签名,以及每次调用的 blob/blobmsg 载荷。官方 examples/server.c、client.c 用 hello/watch/count 演示 policy 解析、异步回复和订阅通知。本文拆数据模型,并附 PC 实跑结果。
UCI 本体很小:运行时是 /sbin/uci → libuci → libubox;编译时是 CMake + C99 + libubox 头/库(Lua 可选)。ubus/procd 是 OpenWrt 集成层的依赖,不是 UCI 的运行时依赖。附依赖表、CMake 选项与 libuci 开发链接方式。
用 RSS 阅读器订阅,有新文章会自动出现。
技术问题、文章反馈、合作线索,去留言板。