Setting a Static IP Address¶
If you are using a newer MDK filesytem that is using systemd, please refer to the end of this page for instructions on how to set a static IP address. The initial instructions are for older filesystems that do not use systemd to control the network. If you are unsure of which instructions to follow, please contact Critical Link.
NFS Mounted File System¶
- First you need to break into U-Boot. This can be accomplished by connecting a serial cable to the unit, rebooting and pressing any key before the 'Hit any key to stop autoboot:' timer counts down to zero.
- Once in U-Boot type 'print bootargs' to print the current system boot arguments. Save this (i.e. in a text file or under a different environment variable (i.e. 'saveenv bootargs_backup $bootargs')) in case this accidentally gets corrupt. Note that on the development kit which by default loads the uEnv.txt file from the SD card you need to edit the settings on the SD card in order for them to be utilized.
- Next you'll want to edit bootargs so that ip={ ipaddr }:{ serverip }:{ gatewayip }:{ netmask }:{ hostname }::off, where you set ipaddr, serverip, gatewayip, netmask, and hostname to desired values.
- Once bootargs is modified type 'saveenv' to save the environment variables and reboot.
MMC/SD Card or NAND File System¶
- Open /etc/network/interfaces on the MitySOM-335x rootfs in a text editor.
- Comment out 'iface eth0 inet dhcp' by adding a '#' in front of it.
- Then add (substituting in your desired settings):
iface eth0 inet static address 192.168.1.5 netmask 255.255.255.0 network 192.168.1.0 gateway 192.168.1.254 dns-nameserver XXX.XXX.XXX.XXX
- Save the file and reboot.
My Ethernet Doesn't Work¶
Please reference the section in the Software FAQ that discusses how to identify and resolve a potential issue within Linux for a non-functional Ethernet port. If that does not resolve your issue please post on our forum for further help.
Configure a Static IP Address - systemd/networkd¶
Create a new file, /etc/systemd/network/eth0.network
, that contains:
[Match] Name=eth0 [Network] # static IP # 192.168.100.2 netmask 255.255.255.0 Address=192.168.100.2/24 Gateway=192.168.100.1 DNS=192.168.100.1
You can restart the networking with: # systemctl restart systemd-networkd
Go to top