affordablemobiles / openwrt-netgear-dm200-bridge

Files for the OpenWRT Image Builder, for an ADSL/VDSL Bridge, PlusNet UK
9 stars 4 forks source link

"No such file or directory" when "etc/init.d/macboot" runs #1

Open dough29 opened 4 years ago

dough29 commented 4 years ago

Hello !

I'm trying to build my own image with "openwrt-imagebuilder-18.06.5-lantiq-xrx200.Linux-x86_64.tar.xz".

Firmware is working fine but I have problems with the "a1comms" features, I can't see "System Info" or "xDSL Modem Status" and the "/cgi-bin/luci/a1comms/status/json" URL gives me :

/usr/lib/lua/luci/template.lua:97: Failed to execute template 'custom/status_json'. A runtime error occurred: [string "/usr/lib/lua/luci/view/custom/status_json.h..."]:5: module 'luci.tools.status' not found: no field package.preload['luci.tools.status'] no file './luci/tools/status.lua' no file '/usr/share/lua/luci/tools/status.lua' no file '/usr/share/lua/luci/tools/status/init.lua' no file '/usr/lib/lua/luci/tools/status.lua' no file '/usr/lib/lua/luci/tools/status/init.lua' no file './luci/tools/status.so' no file '/usr/lib/lua/luci/tools/status.so' no file '/usr/lib/lua/loadall.so' no file './luci.so' no file '/usr/lib/lua/luci.so' no file '/usr/lib/lua/loadall.so' stack traceback: [C]: in function 'require' [string "/usr/lib/lua/luci/view/custom/status_json.h..."]:5: in main chunk stack traceback: [C]: in function 'error' /usr/lib/lua/luci/template.lua:97: in function </usr/lib/lua/luci/template.lua:85> (tail call): ? /usr/lib/lua/luci/dispatcher.lua:913: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:440: in function </usr/lib/lua/luci/dispatcher.lua:439>

Maybe it is related to this when building :

Finalizing root filesystem... ./etc/init.d/macboot: line 6: /lib/functions/uci-defaults.sh: No such file or directory ./etc/init.d/macboot: line 7: /lib/functions/system.sh: No such file or directory ./etc/init.d/macboot: line 8: /lib/functions/lantiq.sh: No such file or directory

This is reference by the file "openwrt-netgear-dm200-bridge/files/etc/init.d/macboot".

dough29 commented 4 years ago

Hello !

I found in my firmware the file "/www/luci-static/resources/xhr.js" is empty : replaced by "luci.js" here : https://github.com/openwrt/luci/commit/843031f8197aa2c86585360c0f6d8a3b1ee02dee#diff-ffaf1bd0f36ef2dc451564a16a692a91

I replaced my "xhr.js" file with the previous version and then removed the line "local stat = require "luci.tools.status"" from file "files/usr/lib/lua/luci/view/custom/status_json.htm"

And it is now Ok.

iamacarpet commented 4 years ago

Thanks for the update @dough29 , appreciate you documenting your fix.

I'll look to fix this in the repo next time I rebuild our image internally.

Still no idea who it throws those macboot errros when building the file system, but I have to confess, I'm no OpenWRT expert.

dough29 commented 4 years ago

No problem, I'm quite new to OpenWRT too !

Everything is working fine now, I'm with the french ISP Orange (I forked your repo to do my own firmware).

Thank you for your work !