AnsweredAssumed Answered

How to assign static IP?

Question asked by Cengizhan Yapicioglu on Mar 22, 2017
Latest reply on Mar 23, 2017 by Cengizhan Yapicioglu

In my project I use T1024rdb-64b and QorIQ SDK 2.0.I want to assign a static ip to ethaddr0.For this purpose in /home/VIDTM/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-freescale/recipes-core/init-ifupdown directory,I changed  the content of init-ifupdown_%.bbappend file as the following:

 

FILESEXTRAPATHS_prepend := "${THISDIR}/init-ifupdown:"

 

In this path I have this:

[lkarakaya@glcentos7 init-ifupdown]$ ls
init-ifupdown  init-ifupdown_%.bbappend
[lkarakaya@glcentos7 init-ifupdown]$ cd init-ifupdown
[lkarakaya@glcentos7 init-ifupdown]$ ls
qoriq
[lkarakaya@glcentos7 init-ifupdown]$ cd qoriq/
[lkarakaya@glcentos7 qoriq]$ ls
interfaces

 

and in this path I changed the content of interfaces that is in the following:

 

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

 

# The loopback interface

 

auto lo

 

iface lo inet loopback

 

 

# Wireless interfaces

 

iface wlan0 inet dhcp

 

  wireless_mode managed

 

  wireless_essid any

 

  wpa-driver wext

 

  wpa-conf /etc/wpa_supplicant.conf

 

   

iface atml0 inet dhcp

 

# Wired or wireless interfaces

 

auto eth0

 

iface eth0 inet static

 

  address 10.254.253.1

 

  netmask 255.255.255.0

 

     

 

iface eth1 inet dhcp

 

# Ethernet/RNDIS gadget (g_ether)

 

# ... or on host side, usbnet and random hwaddr

 

iface usb0 inet static

 

  address 192.168.7.2

 

  netmask 255.255.255.0

 

  network 192.168.7.0

 

  gateway 192.168.7.1

 

# Bluetooth networking

 

iface bnep0 inet dhcp

 

Then I call the "bitbake fsl-image-core" and then I followed the "Ramdisk Deployment From TFTP" on QorIQ SDK 2.0 REC.Although image was successfully inserted the board.I can not change the ip address and it preserve it's value not assigned a static.

 

In addition to these,I found another path that includes recipes core that is:

/home/VIDTM/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/meta/recipes-core/init-ifupdown

 

Which one is the true path for T1024 rdb and Why I can not change ip as I wanted?or I have some problems about my image?

After loading the core image,system works truly as in the figure:

 

Starting OpenBSD Secure Shell server: sshd
  generating ssh RSA key...
  generating ssh ECDSA key...
  generating ssh DSA key...
  generating ssh ED25519 key...
done.
Starting network benchmark server: netserver.
Starting system log daemon...0
Starting kernel log daemon...0
Starting internet superserver: xinetd.

 

QorIQ SDK (FSL Reference Distro) 2.0 t1024rdb /dev/ttyS0

 

t1024rdb login: root
root@t1024rdb:~# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  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
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Outcomes