Deploy by using information from LuCI wiki on modules.
On OpenWRT 14 and earlier, may have to delete /tmp/luci-indexcache for the changes to be picked up.
Copy
lua/ to /usr/lib/lua/;
luasrc/ to /usr/lib/lua/luci/;
view/ to /usr/lib/lua/luci/view/;
htdocs/ to /www/.
Delete /tmp/luci-indexcache.
The following set of instruction tries to minimize the amount of downloading to build a single LuCI package from scratch. You can just use the SDK to build the package as the tools would already be precompiled, saving some time. Should work on any architecture.
When "getting a repository", just downloading an archived snapshot is sufficent, rather than a full Git clone.
- Get OpenWRT repository
- Get this repository integrated into LuCI
- Option 1: integrate
- get LuCI repository
- merge this repository into LuCI
luci-app-observatoryshould be directly insideapplicationsdirectory within LuCI
- Option 2: use placeholder and cherry-pick dependencies
- only needs 1 file from LuCI so can save lots of download
- create a placeholder feed directory that can be used to mimic LuCI layout
- add an
applicationsdirectory under placeholder directory
- add an
- get this repository
- place under
applications- should be
<placeholder>/applications/luci-app-observatory
- should be
- place under
- get
luci.mkfrom LuCI repository- place
luci.mkwithin placeholderapplicationsshould be its sibling
- place
- Create feed referencing this repository
- Example
feed.confentry, assumingluci-extra-appsis the placeholder directory
src-link luci-extra-apps-repo /home/builduser/openwrt/luci-extra-apps - Example
- Option 1: integrate
- Install feed into OpenWRT
- Assuming the feed is named 'luci-extra-apps-repo':
scripts/feeds update luci-extra-apps-repo scripts/feeds install -a -p luci-extra-apps-repo
- If integrated into LuCI, just simply update the LuCI feed.
- Assuming the feed is named 'luci-extra-apps-repo':
- Use
make menuconfigto select target and package- Can use any target
- Make sure to select package and make it a Module (marked with M)
- LuCI → Applications → luci-app-observatory
- Start building
Note the following targets are not made as we don't need to compile any binaries:
make tools/install make package/luci-app-observatory/install
toolchain/installpackage/luci-app-observatory/compile
- Retrieve IPK file and install into router
- should be under
bindirectory
- should be under
Although documentation states that lua and view directories under the module (assuming applications are handled the same way) should already be picked up and go to their respective locations, there is at least a version of luci.mk that doesn't (or, at least, the build steps above didn't put it in), so it might be necessary to hack it in.
To find out whether it is necessary, look in <openwrt_project_root>/build_dir/target-i386_i486_uClibc-0.9.33.2/luci-app-observatory/ipkg-all/luci-app-observatory/usr/lib/lua for both invalid and luci/view directories, adjusting the path to match your build as necessary. If not, change into the luci-app-observatory source directory, and hack it in:
mkdir -p root/usr/lib && cp -aR lua root/usr/lib/
cp -aR view luasrc/The above makes the lua and view directory contents available within the known directories.
Alternatively, can link instead of copy, but note that when trying to use a symbolic link, it must use absolute path, as the issue we're dealing with is that the lua and view directories are ignored and will not land in the build directory.
To retry, clean up first:
make package/cleanor more specifically, just the application that we're working with:
make package/luci-app-observatory/cleanand try to build package/luci-app-observatory/install again.
Troubleshoot issues by reviewing "How to build a single package" as a starting point.