OpenWrt Forum Archive

Topic: How to add web-interface files into firmware images.

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

HI all,
         I m newbie to openwrt firmware customization. I can create the firmware image with default configuration that are provided by kamikaze trunk. Now I am creating the web-interface for the firmware image, but I don't know how to add these files to firmware image.

        I think I need to create my own package, if it is correct I am not so good at writing my own packages( 'Writing own packages & not so familiar with the syntax of the Makefile). If I m wrong, I don't know how to  write the web-interface files to firmware image. Please anyone help.
       Note - I don't want to go with x-wrt.



Thanks in ADV.

Do you want "create" or "include"?

if you want include luci or webif web-interfaces you must do:
from trunk dir "make package/symlinks"
and after
"make menuconfig" and select packages
and finally
"make"

No. Wrong.

Right way is:

$ ./scripts/feeds update packages luci
$ ./scripts/feeds install -a -p luci
$ make menuconfig                        # Select at least Administration -> LuCI Components -> luci-admin-full: Y
$ make world

(Last edited by Yanira on 26 May 2009, 13:24)

HI all,
        Thanks for the instant  replies.

         Suppose If i write my own pages that will act as a web-interface - means suppose I create or write my own  .php or .sh pages to do the configuration settings, how should i include these written .php or .sh files into the firmware image.

        I don't want to just include the existing packages - like webif etc.



       Thanks again..

HI yanira,
        Thanks for the instant reply again.   

                  You might be thinking I don't know about uci & all. I know how to do the configuration settings using uci. Even I wrote some pages (.sh pages referring webif package )  to configure my own added package. But I don't know how to add those pages into the firmware image.
                  I will explain -  what i what in detail. I know how to write the web - interface pages. How to do the configurations ( not in details). So i can write a page that will use uci utility & do the configuration settings.  Suppose I wrote my own web - interface for my firmware image, how should i include it into firmware image. I think I need to create a package, that will include my all files into proper directory under cgi- bin.

                   In short how to package these pages into firmware image.

Thanks again.

(Last edited by ps_sach on 26 May 2009, 14:10)

Yanira wrote:

No. Wrong.

Right way is:

$ ./scripts/feeds update packages luci
$ ./scripts/feeds install -a -p luci
$ make menuconfig                        # Select at least Administration -> LuCI Components -> luci-admin-full: Y
$ make world

thanks for your correction

luck

ps_sach wrote:

HI yanira,
        Thanks for the instant reply again.   

                  You might be thinking I don't know about uci & all. I know how to do the configuration settings using uci. Even I wrote some pages (.sh pages referring webif package )  to configure my own added package. But I don't know how to add those pages into the firmware image.
                  I will explain -  what i what in detail. I know how to write the web - interface pages. How to do the configurations ( not in details). So i can write a page that will use uci utility & do the configuration settings.  Suppose I wrote my own web - interface for my firmware image, how should i include it into firmware image. I think I need to create a package, that will include my all files into proper directory under cgi- bin.

                   In short how to package these pages into firmware image.

Thanks again.

You can put your files inside base-files package and it will be included in firmware

Thanks t3l3m4k0,
                    Much appreciated  alternative.

            Another alternative is to create a package & write the Makefile that will do copying of the files from the package directory. I just referred Webif package given by X-wrt & how they have done it. Still it is hard to get, because I am not getting the makefile syntaxes ( Not getting the Makefile syntax of the openwrt packages)

Thanks.

(Last edited by ps_sach on 26 May 2009, 15:00)

Another option: you can create a "files" directory in the toplevel dir of the OpenWrt buildroot and put your files in a corresponding subfolder.

Hello All,

I followed the instructions as described below:-

$ ./scripts/feeds update packages luci
$ ./scripts/feeds install -a -p luci
$ make menuconfig                        # Select at least Administration -> LuCI Components -> luci-admin-full: Y
$ make

But still i am unable to run web interface page on openwrt... I am using Kamikaze r20348 + madwifi.
When i enter IP address of the harware in browser i.e. "192.168.1.1" a black screen opens which says - "Redirecting to Main Page" and after that "Page can not be dispalyed" with following address in browser "res://C:\WINDOWS\system32\shdoclc.dll/dnserror.htm#http://192.168.1.1/cgi-bin/webif/info.sh"


Please suggest what i am missing or is there any settings require in make menuconfig???/

Please note that i have enabled "luci-admin-full" option in LuCI -> Components... Please suggest


Thanks in Advance!!!

Regards,
WirelessUser

The discussion might have continued from here.