[U-Boot-Users] [PATCH] ATSTK1002: Remove default ethernet addresses

Ulf Samuelsson
2007-10-29T11:45:54Z

> [re-adding mailing lists to Cc]
>
> On Mon, 29 Oct 2007 11:21:25 +0100
> "Ulf Samuelsson" <ulf@atmel.com> wrote:
>
>> Haavard,
>> For production use, you want to be able to set up a default address.
>
> I don't think this is necessary in our production setup at least.
>
>> All production PCs would have a dedicated Ethernet board, with a
>> predetemined IP address.
>> Nothing but the production PC and the board under production is connected
>> to
>> this Ethernet.
>> Thus there is not a problem to have a fixed ethernet address on the AVR32
>> board.
>
> If you want this, feel free to patch it back into your production
> images. But as soon as someone erases the pre-programmed environment on
> two or more boards, you'll have chaos on the network they're connected
> to.

Not if you do the check I propose at the end.

> Btw, why don't you just pre-program a default environment sector right
> after you program the u-boot image? That way, you can have all the
> custom settings you want.
>

It is easier to do it inside U-boot, than outside U-boot.
It is easier to download one file, instead of downloading two files.
The effect is the same.
If you happen to change the address of the Environment in U-Boot
you need a mechanism to check that this is taken care of..

Also: I am not proposing a "default" address
just that the user can, by running a command, set the ethaddr
to something which is useful for production.
If the user does not run the command, then the address will remain unset.
Once the ethaddr is set to a different value, it should, as usual, not be
possible to change it.

>> This way you can define a bootcmd which downloads an Autoscript
>> which in its turn programs the linux kernel and the address.
>> When everything is finished, then the etherent address should
>> be programmed with its real value.
>
> So you need to define other environment variables anyway? Why can't you
> patch in a default ethernet address at the same time?
>

Because I want to download the setting over Ethernet, and
I cannot get access to the "serverip", without an Ethernet address.

>> To avoid problems, the linux kernel should not be bootable
>> if the kernel address is this "special" address.
>
> No way. I'm not adding bogus special-casing in the Linux kernel to cope
> with a problem I'm not even sure exists. Besides, you don't have to
> boot the kernel to experience problems; running "dhcp" from u-boot is
> enough to wreak havoc on the network.
>

This would be an U-Boot check.

If the Ethernet address is the predefined ethernet address
then the bootm command will give an error message.

> We've tried using a default ethernet address on both STK1000 and NGW100
> for a while now, and it causes a lot more problems than it solves. I'm
> turning it off unless someone can point to a specific, valid use-case
> that breaks.

Best Regards
Ulf Samuelsson