cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dpekin
Explorer
Explorer
8,462 Views
Registered: ‎07-09-2012

Zynq Network IP address configuration

Jump to solution

Hello,

 

We are running Linux 3.6.0 on a Zynq platform.  The default configuration receives the IP address through the bootargs string at boot time.  This is embedded in the device tree in flash.

 

I need to allow the user to set the IP address.  I am wondering if there is a "standard" way to do this.  If not,  I guess I can programatically generate a startup script that will run after Linux boots which takes eth0 down and then brings it up with the desired IP address.

 

Any thoughts?

 

Thanks.

 

- Dave

0 Kudos
1 Solution

Accepted Solutions
pniklas
Adventurer
Adventurer
10,997 Views
Registered: ‎05-16-2012

The standard "interface" to change the IP address in linux is:
"ifconfig"

 

set the ipaddress with:

ifconfig eth0 192.168.1.24

 

see the manual for ifconfig for more information.

 

I'm not completely sure about your ramdisk but I guess that at startup the file "init.sh" ist executed, if it is available on the sd-card.

If yes, you can put the command in the init.sh file and it will be executed at startup.

View solution in original post

0 Kudos
4 Replies
pniklas
Adventurer
Adventurer
10,998 Views
Registered: ‎05-16-2012

The standard "interface" to change the IP address in linux is:
"ifconfig"

 

set the ipaddress with:

ifconfig eth0 192.168.1.24

 

see the manual for ifconfig for more information.

 

I'm not completely sure about your ramdisk but I guess that at startup the file "init.sh" ist executed, if it is available on the sd-card.

If yes, you can put the command in the init.sh file and it will be executed at startup.

View solution in original post

0 Kudos
dpekin
Explorer
Explorer
8,439 Views
Registered: ‎07-09-2012

Thanks.  That's pretty much what I  was thinking.

0 Kudos
norman_wong
Scholar
Scholar
8,428 Views
Registered: ‎05-28-2012

If you've got a filesystem on flash or SD-Card, you could use this file
  /etc/network/interfaces
to setup eth0 automatically for every boot. Doesn't work for the ramdisk case though.

0 Kudos
dpekin
Explorer
Explorer
8,412 Views
Registered: ‎07-09-2012

Thanks Norman.  You are correct.  I've used that with other flash based systems but we are using the ramdisk version of Linux in this product.

0 Kudos