From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Schmelzer Date: Wed, 15 Jul 2015 21:18:34 +0200 Subject: [U-Boot] net.c: question regarding commit: fd3056337e6fcc140f400e11edd33f6f1cb37de1 In-Reply-To: <14874.213.33.116.118.1434975811.squirrel@petermaier.org> References: <14874.213.33.116.118.1434975811.squirrel@petermaier.org> Message-ID: <55A6B20A.60500@schmelzer.or.at> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de hi joe, maybe my email got lost ... best regards, Hannes On 2015-06-22 14:23, Hannes Schmelzer wrote: > Hi joe, > > you did introduce callbacks on setting up ip,dns, ... in net.c > > Why it did become necessary to do following ? > > if (flags & H_PROGRAMMATIC) > return 0; > > I have actually trouble with this, because my code in > board/BuR/kwb/board.c doesn't work anymore as expected. > > /* setup default IP, in case if there is nothing in environment */ > if (!getenv("ipaddr")) { > setenv("ipaddr", "192.168.60.1"); > setenv("netmask", "255.255.255.0"); > setenv("serverip", "192.168.60.254"); > setenv("gatewayip", "192.168.60.254"); > puts("net: had no IP! made default setup.\n"); > } > > Purpose of this was/is to setup a default ip-address if nothing in > environment has been set yet. > > do you (or somebody else) have an idea how to work around this ? > > many thanks and best regards, > Hannes >