轉載有道:http://blog.csdn.net/u013131156/article/details/45824203
說明:目前先保留來下自己使用,尚未親測、。
LuCI 頁面修改
簡單的檔案配置,路由上路徑主要是下子目錄:
/usr/lib/lua/luci/
、
/controller/
、
/model/cbi/
,或者根目錄下的
/view/
/www/
中.可以在路上修改檢視效果.
如果想要編譯自定義LuCI頁面的固件,請嘗試修改如下OpenWRT源碼結構路徑内的LuCI檔案.
xxx/package/feeds/luci/luci/luci/libs/web/root/etc/config/luci --- AA 版本pakages/feeds/luci/中
xxx\feeds\luci\luci\luci\libs\web\root\etc\config\luci --- AA 版本的feeds/luci檔案夾中
xxx/feeds/luci/modules/base/root/etc/config/luci --- BB 版本中feeds中,bb版本open修改了luci配置檔案路徑,并且pakages/feeds路徑中也沒有luci配置檔案了.不知道這個路徑是不是正确的.
再者就是修改 xxx/dl/ 下的源碼壓縮包,或者 xxx/build_dir/$target/下源碼
注意
:如果在xxx/feeds 修改可能需要執行 ./scripts/feeds install luci 更新
主題Logo替換
源碼路徑:
xxx/feeds/luci/luci/luci/themes/bootstrap/htdocs/luci-static/bootstrap/logo.jpg
路由路徑:
/www/luci-static/bootstrap/logo.jpg
Tips:
由于版本的更新,檔案路徑可能變更,此處列出的為BB版本的例子.如果找不到可以用指令手動在/feeds/中查找:find ./ -name logo.jpg.此處為bootstrap主題Logo,其他主題的Logo修改類似.
頁面腳标資訊
源碼路徑:
xxx/feeds/luci/luci/luci/themes/bootstrap/luasrc/view/themes/bootstrap/footer.htm
路由路徑:
/usr/lib/lua/luci/view/themes/bootstrap/footer.htm
修改位置:
Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %>
<%=luci.version.distversion%>
status狀态欄資訊
源碼路徑:
xxx/feeds/luci/modules/admin-full/luasrc/view/admin_status/index.htm
路由路徑:
/usr/lib/lua/luci/view/admin_status/index.html
修改位置:找到類似的代碼段修改.
<%:System%>
<%:Hostname%><%=luci.sys.hostname() or "?"%>
<%:Model%><%=pcdata(model or "?")%>
<%:Firmware Version%>
<%=pcdata(luci.version.distname)%> <%=pcdata(luci.version.distversion)%> /
<%=pcdata(luci.version.luciname)%> (<%=pcdata(luci.version.luciversion)%>)
<%:Kernel Version%><%=luci.sys.exec("uname -r")%>
<%:Local Time%>-
<%:Uptime%>-
<%:Load Average%>-