From TR-181 routes to UCI: a minimal mapping implementation
A complete, runnable mapping from an AMX data model to UCI: ODL, event callback, libuci writes, and a GitHub demo repository.
34 posts
A complete, runnable mapping from an AMX data model to UCI: ODL, event callback, libuci writes, and a GitHub demo repository.
Using tr181-routing and mod-routing-uci as an example, follow a static route from the AMX data model to UCI and then netifd.
Three levels of UCI integration: the shell uci command, libuci in C, and an AMX UCI backend module. Includes code skeletons and the uloop blocking pitfall.
The AMX amxd_dm is first an in-memory object tree. Only %persistent objects/parameters are saved by amxrt as an ODL file. UCI remains a separate /etc/config persistence layer. This article separates the four layers and who saves what.
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.
Subscribe via RSS to get new posts automatically.
Technical questions, feedback and leads: use the guestbook.