[Letux-kernel] jz4730 Ethernet - works now (unreliable and with some deficiencies)

H. Nikolaus Schaller hns at goldelico.com
Fri Mar 12 20:12:09 CET 2021

> Am 12.03.2021 um 14:58 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> * where do we get the MAC address from?
> 	- is there some EEPROM or NVRAM encoding the MAC address?
> 	- the devices have a sticker with an individual MAC address printed on it - but that may just be the WiFI MAC
> 	- in our good old l400-2.6 kernel there was a hack to call get_ethernet_addr() - have to research what it was doing

Have looked into the old tree. It comes from U-Boot.
But that code makes no sense to be ported.

Better is this:

U-Boot has an ethaddr environment variable which seems to be initialized
by U-Boot to the MAC address printed on the sticker. Likely it is stored
somewhere in a NAND partition which U-Boot knows how to read.

Now the next question is if this is (was) only in the vendor-U-Boot or
also in the new second phase U-Boot by Lubomir.

Yes, it is available there as well.

So all we have to do is to modify the bootargs to include ethaddr=${ethaddr}
and pass it to the kernel.

The driver already recognizes the ethaddr kernel module parameter, so
everything should be fine.

I have tried to modify our Letux boot.scr and the bootargs.scr and
the kernel config to use the u-boot provided CMDLINE with ethaddr=${ethaddr}
but that makes the kernel get stuck. Maybe some mistake in CONFIG...

Anyways, the idea is clear and just needs debugging to give the Alpha400
units individual MAC addresses.


More information about the Letux-kernel mailing list