Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [AT91RM9200-DK] Can't overwrite "ethaddr"
PostPosted: Wed Mar 09, 2005 10:53 am 
Offline

Joined: Tue Mar 01, 2005 12:54 pm
Posts: 22
Location: Valence, France
hi all
being a newbie in the use of the AT91RM9200-DK, i have to install a linux distrib that support the ethernet connection and use an OSGI on he bord (and after make our selfboard)
so i build the kernel, use a ramdisk
all is right at this time
next, i tried to set up the eth0 interface and i have a problem:

Code:
[root@AT91RM9200DK /root]$ifconfig eth0 172.25.1.100 up
SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address


so i checked with ifconfig -a the interface

Code:
[root@AT91RM9200DK /root]$ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:24 Base address:0xc000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0


the interface have a slight problem with its adress Mac
next i checked it up under Uboot and I saw something strange

Code:
Uboot> printenv
bootdelay=3
baudrate=115200
env=ethaddr 01:02:03:04:05
ethaddr=01:02:03:04:05
filesize=5591e6
fileaddr=21100000
bootargs=root=/dev/ram rw initrd=0x21100000,6000000 ramdisk_size=15360 console=ttyS0,115200 mem=32M
serverip=172.25.1.11
ipaddr=172.25.1.100
stdin=serial
stdout=serial
stderr=serial


so
how can i delete "env=ethaddr 01:02:03:04:05" and after configure ethaddr because if i try a setenv on this variable, i have an errore
Code:
Uboot> setenv ethaddr = 00:0E:99:02:02:29
Can't overwrite "ethaddr"


excuse me for my lack of english and thanks for your help

katolecho


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 12:11 pm 
Offline
User avatar

Joined: Tue Feb 24, 2004 6:27 pm
Posts: 161
Hello,

to overwrite this variable "ethaddr", you must delete first all the environment variables!

> protect off 0x1000E000 0x1000FFFF
> erase 0x1000E000 0x1000FFFF
> protect on 0x1000E000 0x1000FFFF

Of course, it will delete all evironment variables but then you will be able to change the ethaddr variable.

Rgds
JP


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 10, 2005 10:25 am 
Offline

Joined: Tue Mar 01, 2005 12:54 pm
Posts: 22
Location: Valence, France
thanks for this information
I'll try it as soon as possible


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 10, 2005 5:44 pm 
Offline

Joined: Mon Feb 16, 2004 1:34 pm
Posts: 61
Location: Atmel Rousset
Hello,

1)on u-boot the ethernet PHY is not initialised.
You need to made some changes on u-boot:
In lib_arm/board.c source file
In start_armboot() function, set the following lines just before the main
loop (at the end of the function)
#ifdef CONFIG_AT91RM9200DK
eth_init(gd->bd);
#endif

Or enable a tftp download before run your Linux appplication.

2) EMAC address overwrite
on u-boot, include/configs/at91rm9200dk.h file enable the variable:
#define CONFIG_ENV_OVERWRITE 1
Care should be taken as emac physical address is single.

3) FYI: released u-boot version on
http://sourceforge.net/projects/u-boot
on u-boot 1.1.2 version you are able to configure uboot to boot through flash or dataflash:
accordingly update the file include/configs/at91rm9200dk.h

Ciao


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 10:25 am 
Offline

Joined: Tue Mar 01, 2005 12:54 pm
Posts: 22
Location: Valence, France
due to a lack of time, I found a totally experimental solution

i tryed to overwrite the "ethaddr 01:02:03:04:05" variable
i use the command next line :
Code:
Uboot> setenv ethaddr=01:02:03:04:05:06

and have the result
Code:
Uboot> printenv
bootdelay=3
baudrate=115200
[color=red]env=ethaddr 01:02:03:04:05[/color]
filesize=5591e6
fileaddr=21100000
bootargs=root=/dev/ram rw initrd=0x21100000,6000000 ramdisk_size=15360 console=t
tyS0,115200 mem=32M
serverip=172.25.1.11
ipaddr=172.25.1.100
stdin=serial
stdout=serial
stderr=serial


the variable is still here but now there is no more ethadd variable
so i can write it on the board
Code:
Uboot> setenv ethaddr 01:02:03:04:05:06
Uboot>
Uboot> printenv
bootdelay=3
baudrate=115200
env=ethaddr 01:02:03:04:05
filesize=5591e6
fileaddr=21100000
bootargs=root=/dev/ram rw initrd=0x21100000,6000000 ramdisk_size=15360 console=t
tyS0,115200 mem=32M
serverip=172.25.1.11
ipaddr=172.25.1.100
stdin=serial
stdout=serial
stderr=serial
ethaddr=01:02:03:04:05:06


here we go with linux
ifconfig now show us a real mac adress for eth0 and i can now ping some hosts on the network

i don't know how my solution works and why but by the way, i'll try the other if i still have the problem on our homemade board


thanks for all, i've now to resolv a problem with my own ramdisk
life is obstacles-paved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: