How to set the IP address in a customized OpenWRT compilation

0

I have been struggling today customizing OpenWRT. I checkout the stable using SVN, "make menuconfig" to customize the image, "make" it and run it on a router. Almost all my modifications work, except for the (Seemingly trivial) task of changing the default 192.168.1.1 address.

I tried numerous files (scripts as well as config files) but I can't seem to change it (I can change it for a brief moment after boot using the "preinit" file, but after a few seconds it reverts to default).

I suspect I should be setting it in the /etc/network file, but modifications there seem to be overwritten during boot. Maybe it has something to do with the br-lan interface?

Does anybody have some thoughts on the subject? Thanks!

Berdus

Posted 2012-09-20T18:34:12.377

Reputation: 121

Answers

2

So... Found out how the cookie crumbles via the OpenWRT Forum.

You have to make a "files" folder in your build dir eg. "~OpenWRT/trunk/files". You can then add files and folders as is were the root folder of your build.

Example:

"/files/etc/banner" 

would enable you to make a custom banner (for telnet or SSH)

Article on OpenWRT Forum

Alternatively you can use the buildroot's menuconfig to set specific configuration options as well under the Image Configuration submenu. Image Configuration

Berdus

Posted 2012-09-20T18:34:12.377

Reputation: 121