From: Ulf Samuelsson Date: Sat, 21 Apr 2007 01:58:23 +0200 Subject: [U-Boot-Users] Proposal for patch to configure networkparameters References: <20070420232905.A8BD2352650@atlas.denx.de> Message-ID: <030501c783a8$3ccbebd0$01c4af0a@Glamdring> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >> Could you post a list of configuration parameters that you'd rather not >> see in a board >> header file? When I created MPC8349ITX.h, I just followed the example of >> other 83xx >> boards. I defined the network CONFIG_ options, because I thought that a >> flash-default >> setting would be useful. > > At least partially it's a matter of taste. I tend to rather make sure > that a user of the board sees that he must provide his own network > configuration by providing no default setting, rather then having to > deal with nasty network issues because several boards share the same > IP or - even worse - MAC addresses. > > > Just use common sense. Anything that is board-specific should never > be set in the board config file because that would mean that all > boards would share this property in the default configuration. > > An absolute no-no is CONFIG_ETH*ADDR. > > Similar, attempts to define a standard setting for "serial#" are > seriously broken. > > I also consider it bad design to set CONFIG_IPADDR an CONFIG_HOSTNAME > > > Note that you *can* do all these things, if you know exactly what you > are doing - that's whey the feature is there. But shipping boards to > customer with all set to the same MAC address is a felony and > deserves serious punishment (hello Andrea!). I am not shipping *any* boards to anyone, so I dont have the problem... If you want to avoid misuse of the feature, you could actually reserve a specific ethaddr for production use in a point to point configuration and check for this ethaddr when you boot. If you have this ethaddr, then you will not boot, and will instead print an error message... > > Ulf was (originally) asking for a customization feature; of course it > makes sense to customize boards during production, for example to set > board-specific values for MAC address, serial number, etc. But this > can, and should, be done without creating different U-Boot images. > Again, none of these values are BOARD specific. The board specific values are set using "autoscr" but you can't tftp down a script without an ethaddr, can you? Again, very little of the discussion is still about the patch itself. The reason for the patch , is that I would want to be able to generate some arbitrary configuration items using scripts (or even by a simple copy) and I do not want to modify any board.h files to do this. Is this really a bad thing? > Best regards, > > Wolfgang Denk > > -- Best Regards Ulf Samuelsson ulf at atmel.com Atmel Nordic AB Mail: Box 2033, 174 02 Sundbyberg, Sweden Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29 GSM +46 (706) 22 44 57 Technical support when I am not available: AT89 C51 Applications Group: mailto:micro.hotline at nto.atmel.com AT90 AVR Applications Group: mailto:avr at atmel.com AT91 ARM Applications Group: mailto:at91support at atmel.com FPSLIC Application Group: mailto:fpslic at atmel.com Best AVR link: www.avrfreaks.net