RE: [U-Boot-Users] [PATCH] update-ethaddr-handling-on-cmc-pu2-board.patch

Hi Pantelis,
Pantelis Antoniou wrote on Wednesday, November 16, 2005 1:19 PM:
Martin Krause wrote:
If the environment variable 'ethaddr' is not set in flash it is read from EEPROM (if valid), set in RAM and now also saved to flash. The same applies for the variable 'serial#'. This is done to optimise series production. Now, no 'saveenv' command has to be applied over the serial line. And thus no serial connection is necessery at all. Setting ethaddr only in RAM is not sufficient, because 'ethaddr' and 'serial#' must be readable from linux with the fw_printenv tool.
I disagree. If you need this, pass the u-boot environment to the linux kernel, or add a serial# member in bd_t.
I'm also not very happy with this. 'ethaddr' is already passed to the linux kernel as boot parameter. But I didn' have access to it from user space. Our customer (which buys the CMC-PU2 board from us), runs an application which collects some board information from the u-boot environemt variables stored in flash (via a /dev/mtd device). I can't see, how a modified bd_t could help in this case.
Regards, Martin

In message 47F3F98010FF784EBEE6526EAAB078D1C05E9D@tq-mailsrv.tq-net.de you wrote:
I'm also not very happy with this. 'ethaddr' is already passed to the linux kernel as boot parameter. But I didn' have access to it from user space. Our customer (which buys the CMC-PU2 board from us), runs
Of course you can read the MAC address from user space.
Just use the standard tools:
bash-2.05b# uname -a Linux cmcpu2 2.4.27-vrs1 #1 Sat Oct 8 18:00:54 MEST 2005 armv4l armv4l armv4l GNU/Linux --------------^^^^^^ CMC-OU2 board bash-2.05b# ifconfig eth0 eth0 Link encap:Ethernet HWaddr F6:70:1D:61:B5:9D ----------------------------------------------^^^^^^^^^^^^^^^^^ MAC address. inet addr:192.168.20.1 Bcast:192.168.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14238 errors:0 dropped:0 overruns:0 frame:0 TX packets:8864 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12536644 (11.9 Mb) TX bytes:1382448 (1.3 Mb) Interrupt:24 Base address:0xc000
Best regards,
Wolfgang Denk
participants (2)
-
Martin Krause
-
Wolfgang Denk