Ambiorix / prplOS 官方示例怎么读:从 120 行的 wait_for 开始
prplOS 的中文资料极少,硬啃源码很容易劝退。更快的路径是从官方 examples 里最小的一个读起:baapi/wait_for 只有约 120 行,却把 amxrt 运行时、事件循环、总线 API 三件事一次讲清。本文给出逐段拆解、在普通 Linux PC 上的实测方法,以及后续的阅读路线。
Engineering notes and ranked practice on OpenWrt / Yocto / NVIDIA Tegra and edge AI gateways: understand by reading, grow through practice; traceable, reproducible, bounded.
Practice and exams · routing/bridging/debugging
138 questions cover ip addr / ip link / ip route / bridge, VLANs, policy routing, NAT, raw IP and iPerf3 throughput. Exams grade at the end; practice gives instant feedback.
This is not command memorization; it builds a troubleshooting order: link → bridge → rule → table → route → NAT → capture.
Draw 25 random questions from the 100 / 38 bank; 20 to pass. Submit at the end.
PracticeGrade immediately; previous, skip and jump to any question.
Attention, FFN, positional encoding, training and inference
OpenWrtUCI, netifd, ubus, fw4, ImageBuilder
OpenWrtUCI, netifd, bridge/VLAN, static routes, PPPoE
VLAN802.1Q, PVID, access/trunk, bridge vlan filtering
ACLgetfacl/setfacl, mask, default ACLs, inheritance and backup
prplOS / AMXData model, transactions, NetModel, USP
YoctoLayers, recipes, BitBake, images
PPPoEpppd, LCP, auth, DNS, teardown
iPerf3TCP/UDP, reverse, loss, trustworthy results
prplOS 的中文资料极少,硬啃源码很容易劝退。更快的路径是从官方 examples 里最小的一个读起:baapi/wait_for 只有约 120 行,却把 amxrt 运行时、事件循环、总线 API 三件事一次讲清。本文给出逐段拆解、在普通 Linux PC 上的实测方法,以及后续的阅读路线。
A dedicated AMX / prplOS development environment: build libubox/ubus/libamx*/amxrt/amxb_ubus from source, on a PC or as a Docker base image, with a ubus ACL (the file must be root:root 0644). Every example article then only clones and compiles on top of it.
greeter_plugin is the most complete AMX data-model example: 4 ODL files define objects/instances/events/persistence, 4 C files implement methods/actions/events/entry point. Walk through ODL→C→build/run, including the state machine, transactions, dynamic Statistics and the PC build result.
UCI itself is small: at runtime it is /sbin/uci → libuci → libubox; at build time it is CMake + C99 + libubox headers/libs (Lua optional). ubus/procd belong to the OpenWrt integration layer, not to UCI. With a dependency table, CMake options, a PC build, and verified ldd/CLI/C-API results.
UCI turns configuration under /etc/config into a three-level package/section/option tree, with the uci command and libuci. This article follows “file → command → commit → scripts → pitfalls → boundaries” to explain what it does — and what it does not.
UCI centralizes configuration into package/section/option; Ambiorix unifies configuration, state, methods and events into a runtime data model. This article compares their boundaries and adds persistence: where ODL, the runtime object tree, %persistent save files and UCI actually live.
Subscribe via RSS to get new posts automatically.
Technical questions, feedback and leads: use the guestbook.