Friday 6 September 2013

Local source for LUCI on OpenWRT

OpenWRT is the most popular development platform for Wireless routers. The first thing that one can find for GUI based configuration is LUCI package. Integration of LUCI into your OpenWRT workspace is 3-step process.
  • Download
  • Install 
  • Build 

OpenWRT provides a convenient way to perform the above 3 steps easily.

To download and install, you need to specify the source and execute the download and install scripts. You can specify the source in feeds.conf.default. Open the file and check if there already exists a line which contains ""src-svn luci". If one exists, check whether the source repository is valid. As of this writing, valid source repository is  http://svn.luci.subsignal.org/luci/trunk.  You can specify this repository in your file.

Now that specifying the sources is done, execute the commands, "./scripts/feeds update luci; ./scripts/feeds install -a -p luci". This will download the LUCI sources and install them into your workspace.

To integrate this installed package in your binaries, you need to build again(Issue make) .

Maintaining a local copy

Once you get the LUCI source, there are chances that you don't want to download it again and instead want to make changes to the existing repository and use it.You can use the modified repository as your IP too :)

When you download LUCI initially, it is downloaded into the directory called feeds. You can use it as a local repository. Following is one of the clean ways of doing it.

  • Create a directory for the local repository, say nearhop in your base OpenWRT directory (mkdir nearhop).
  • Copy feeds/luci into the direcotry, nearhop (cp -r feeds/luci nearhop).
  • In feeds.conf.default, change luci source to your local repository. ie comment the line containing "src-svn luci" (Just place a # at the beginning of this line.
  • In the same file, add  the line "src-cpy luci nearhop/luci" and save.

Now you can customize your GUI, by editing the files in the local repository (nearhop/luci in our case). Whenever you modify/add/delete any of the files, you need to install the modified package and build it using the commands, ./scripts/feeds update luci
./scripts/feeds install -a -p luci
make

Thats it. Enjoy your customized GUI.

1 comment:

  1. Hello Sir,
    As I am new to OpenWrt. I have many doubts in communication between GUI to hostapd. (uhttpd->uci->wireless) correct me if i am wrong. How exactly the communication will happened? please help me out

    ReplyDelete