AFAIK you are right. The pre-existing device-specific /etc/config/network defconfig file stops the uci-defaults process, just as planned. The reason for that behaviour is that you might also have included a custom /etc/config/network in your image through the /files mechanism and also in that situation the uci-defaults would need to be stopped. WNDR3700/3800 is currently only router in the ar71xx target with a device-specific netowrk config file and thus deviating from the uci-defaults mechanism. Additionally, the uci-defaults file does not contain a config profile for WNDR3700. The reason for this exception is probably the versatile switch LED config & documentation for WNDR3700.

In another message in this thread Daniel wondered where the old IP address config option had disappeared. It was removed in April with r31258:
https://dev.openwrt.org/changeset/31258/
12 Apr 2012 [package] base-files: remove network preconfig, it collides with ar71xx network firstboot uci-defaults To supply custom network settings, it is better to embed a complete network config file using the files/ overlay, the old image lan preconfig options are also very limited in scope and actually collide with sysupgrade and firstboot hardware detection on at least ar71xx and possibly other targets, therfore drop this facility.



Quoting John Lauro <john.la...@covenanteyes.com>:

Not certain which config option for uci-defaults you are referring to, so perhaps I am not using the right one for it not to matter?

Not sure, but looks like network gets established from target/linux/ar71xx/base-files/etc/defconfig/wndr3700/network in the base filesystem (or not? it at least appears to be closer to my running /etc/config/network than most of the other copies of network) and this line is in /etc/uci-defaults/network:
[ -e /etc/config/network ] && exit 0
(and that would cause uci-defaults/network not to run)
(or is that not what runs at first boot that you were referring to?)

so I think that would keep the defaults from loading on first boot?

If nothing else, I have a few things to try. Will try the target/linux/ar71xx/base-files/etc/defconfig/wndr3700/network first as I think that sounds most promissing. Might be a few days before I gen a new firmware and test it. The flow of all these files/configurations is a bit hard to follow from build system to running system, etc... At least most of it just works, and adding to it is easy enough... just altering some of the defaults can be a bit hard to follow...


----- Original Message -----
From: "Daniel Dickinson" <dan...@powercloudsystems.com>
To: "OpenWrt Development List" <openwrt-devel@lists.openwrt.org>
Cc: "Hannu Nyman" <hannu.ny...@iki.fi>
Sent: Thursday, November 29, 2012 5:42:10 PM
Subject: Re: [OpenWrt-Devel] Change Default IP?

Actually shouldn't matter.  If using right config option (under Image
options IRC) then there will be an uci-defaults file that runs on
firstboot to set the ipaddr, which should occur after the defconfig
configuration.  At least that's the intended design; if the order of
scripts is wrong then that's a bug.

Regards,

Daniel

On 29/11/2012 5:21 PM, Hannu Nyman wrote:
You mentioned later in the thread that you are building for wndr3800.
That is the key info here.

Due to complex switch port LED defintions, WNDR3700/3800 has a
dedicated network file template that will be used:
https://dev.openwrt.org/browser/trunk/target/linux/ar71xx/base-files/etc/defconfig/wndr3700/network


It has the section:
config interface lan
        option ifname   eth0.1
        option type     bridge
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0


On 29.11.2012 1:38, John Lauro wrote:
Is there a place to change the default IP for a firmware build?

I tried setting under Image configuration -> Preinit configuration
options -> IP address for preinit network messages, but that  doesn't
seem to work (not that I expected to, but it's the only config
options I could find related to an IP address).  Doing a search of my
build tree, 192.168.1.1 seems to be embedded in several spots.



_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to