2 setting a dynamic ip address, 3 restarting network, 4 enable / disable ethernet switch ports – Kontron AM4530 User Manual

Page 33: 2 setting-up a nfs server, 1 preparing a shared directory, Setting-up a nfs server

Advertising
background image

20

AM453x

www.kontron.com

4.4.1.2

Setting a Dynamic IP Address

Set 'BOOTPROTO' to 'dhcp' in the /etc/ifcfg-eth0 file. Example:

DEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

4.4.1.3

Restarting Network

To take effect a restart of the network is required. To restart the network, use the following command:

# /etc/init.d/network restart

4.4.1.4

Enable / Disable Ethernet Switch Ports

To prevent routing loops, some ethernet switch ports might have to be disabled. By default all ports are
enabled. The following commands can be used under Linux or U-Boot. Use the following commands to
disable the ports:

phyWrite C 0 1940

(This command is for Port 0)

phyWrite D 0 1940

(This command is for Port 1)

phyWrite E 0 1940

(This command is for Port 8)

phyWrite F 0 1940

(This command is for Port 9)

Use the following commands to enable ports:

phyWrite C 0 1140

(This command is for Port 0)

phyWrite D 0 1140

(This command is for Port 1)

phyWrite E 0 1140

(This command is for Port 8)

phyWrite F 0 1140

(This command is for Port 9)

To make this change permanent, enter into the u-boot shell add the previous command in the bootcmd
variable. Below is an example:

setenv bootcmd 'sflash read 100000 2000000 300000; setenv bootargs $(bootargs_mtd); phyWrite

C 0 1940; bootm 2000000;'

saveenv

4.4.2

Setting-up a NFS Server

4.4.2.1

Preparing a Shared Directory

Create a folder for mounting a disk partition:

# mkdir /mnt/disk1

Mount the disk partition:

# mount /dev/sda1 /mnt/disk1

The partition can be mounted automatically during the boot. For auto mounting use the following command:

# echo “/dev/sda1 /mnt/disk1 ext3 defaults 0 0” >> /etc/fstab

Advertising