Skip to contentSkip to conversation

problem with 'ethaddr' env. variable in, DataFlash, at91rm9200dk

U-Boot-Users Aras Vaichas 2 participants 3 messages Aug 16, 2004 – Aug 17, 2004

lore
Share & tools
lore
#0 lore raw

My problem is that the network functions do not seem to pick up the environment variables "ethaddr" and "ipaddr".

e.g.

Uboot> setenv ethaddr 12:34:56:78:99:aa
Uboot> dhcp
*** ERROR: `ethaddr' not set
Uboot> echo $(ethaddr)
12:34:56:78:99:aa
Uboot> printenv
stdin=serial
stdout=serial
stderr=serial
ethaddr=12:34:56:78:99:aa

Environment size: 67/8188 bytes
Uboot> dhcp
*** ERROR: `ethaddr' not set
Uboot>

I've been going through the u-boot source code looking for where this problem could be occurring, but I can't find anything.

I recently setup my at91rm9200dk to boot from DataFlash as per the Atmel application note: "Booting u-boot from Atmel SPI Serial DataFlash on the AT91RM9200-DK Board"

I used u-boot-1.1.1 instead of patching u-boot-1.0.0.

I've set the environment configuration values in at91rm9200dk.h #define CFG_ENV_IS_IN_DATAFLASH
#define CONFIG_ENV_OVERWRITE

The system boots from the DataFlash OK, and then starts up u-boot-1.1.1 e.g.

-I- AT91F_LowLevelInit(): Debug channel initialized ESC[2J
ATMEL LOADER VER 1.01 May 03 2004 14:54:39
*--------------------------------------*
DataFlash:AT45DB642

Nb pages:   8192
Page Size:   1056

Size= 8650752 bytes
Logical address: 0xC0000000
*--------------------------------------*
1: Download Dataflash [addr]
2: Read Dataflash [addr]
3: Start U-BOOT [C0008000 => 21F00000]
*--------------------------------------*
Enter: Load U-BOOT from dataflash[c0008000] to SDRAM[21f00000] Set PLLA to 180Mhz and Master clock to 60Mhz and start U-BOOT?

U-Boot 1.1.1 (Aug 16 2004 - 12:34:47) U-Boot code: 21F00000 -> 21F14A4C BSS: -> 21F18EF0 RAM Configuration:
Bank #0: 00000000 0 kB
Atmel: AT49BV1614A (16Mbit)
...
Flash: 2 MB
DataFlash:AT45DB642

Nb pages:   8192
Page Size:   1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0007FFF (RO)
Area 1: C0008000 to C001FFFF (RO)
Area 2: C0020000 to C0027FFF
Area 3: C0028000 to C083FFFF
In:    serial
Out:   serial
Err:   serial

Any help would be good, thank you!

regards,

Aras

#1 lore raw

Dear Aras,

Quoted 6 lines · in message <[email protected]> you wrote:

My problem is that the network functions do not seem to pick up the environment variables "ethaddr" and "ipaddr".

e.g.

Uboot> setenv ethaddr 12:34:56:78:99:aa

This is NOT a valid MAC Address. Don't do this, not even for testing.

See http://www.denx.de/twiki/bin/view/DULG/EthernetDoesNotWork and
http://www.denx.de/twiki/bin/view/DULG/WhereCanIGetAValidMACAddress

Quoted 10 lines

Uboot> dhcp
*** ERROR: `ethaddr' not set
Uboot> echo $(ethaddr)
12:34:56:78:99:aa
Uboot> printenv
stdin=serial
stdout=serial
stderr=serial
ethaddr=12:34:56:78:99:aa

Quoted 4 lines

Environment size: 67/8188 bytes
Uboot> dhcp
*** ERROR: `ethaddr' not set
Uboot>

Does this problem persist even after a reset of the board?

Quoted 1 line

Any help would be good, thank you!

Check if the at91rm9200dk port initializes bd->bi_enetaddr or, if it should be using CONFIG_NET_MULTI, eth_get_dev()->enetaddr ...

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Men will always be men -- no matter where they are.
	-- Harry Mudd, "Mudd's Women", stardate 1329.8
#2 lore raw
Quoted 6 lines · Wolfgang Denk

Dear Aras,

Quoted 2 lines · in message <[email protected]> you wrote:

My problem is that the network functions do not seem to pick up the environment variables "ethaddr" and "ipaddr".

Does this problem persist even after a reset of the board?

yes

Quoted 1 line

Check if the at91rm9200dk port initializes bd->bi_enetaddr

It looks like gd and bd are being set up wrongly or are being "lost" somewhere.

e.g.
Set PLLA to 180Mhz and Master clock to 60Mhz and start U-BOOT?

U-Boot 1.1.1 (Aug 17 2004 - 16:39:28)

U-Boot code: 21F00000 -> 21F14A88 BSS: -> 21F18F2C RAM Configuration:
Bank #0: 00000000 0 kB
... snip ...
### main_loop entered: bootdelay=3

### main_loop: bootcmd="<UNDEFINED>"
Uboot> setenv ethaddr c2:65:66:f4:14:3e

gd = 00000000, bd = ffffffdc
Uboot> dhcp

at91rm9200_ether.c bd->bi_enetaddr = 0:0:0:0:0:0
*** ERROR: `ethaddr' not set
Uboot>

regards,

Aras