1.总述
上一篇总结了uhttpd的工作方式,openwrt中利用它作为web服务器,实现客户端web页面配置功能。对于request处理方式,采用的是cgi,而所用的cgi程序就是luci,工作框架如下图所示:
上一篇总结了uhttpd的工作方式,openwrt中利用它作为web服务器,实现客户端web页面配置功能。对于request处理方式,采用的是cgi,而所用的cgi程序就是luci,工作框架如下图所示:
“uci"是"Unified Configuration Interface”(统一配置界面)的缩写,用于OpenWrt整个系统的配置集中化。
git checkout --orphan latest_branch
git add -A
git commit -am 'initial commit'
登录后复制
The fatal: refusing to merge histories
error is a fairly common Git error. It appears when a developer tries to merge two unrelated projects into a single branch.
This error appears when the branch has its commit histories and tags incompatible with the pull request or clone.
在openwrt文件系统中,lua语言的代码不要编译,类似一种脚本语言被执行,还有一些uhttpd服务器的主目录,它们是:
/www/index.html
cgi-bin/luci
luci-static/xxx/xx.css、js、gif
/usr/lib/lua/nixio.so、uci.so
luci/http.lua、dispatcher.lua、core…
controller/xxx.lua
model/xxx.lua
view/xxx.lua
网页请求格式基本都如下所示:,说明处理都在服务器的默认网站下的/cgi-bin/luci文件进行处理。
有些同学可能想学习openwrt系统,但手头又没有嵌入式板子,是编译和运行系统,然后再增加自己的功能。下面介绍如何编译openwrt系统后再虚拟机下运行。
选择vmdk目标文件格式
- ① 启动脚本 /etc/init.d/xxx;
- ② 启动脚本通过UCI分析库从 /etc/config/xxx 获得启动参数;
- ③ 启动脚本完成正常启动。