B4860QDS Linux - Getting Started

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

B4860QDS Linux - Getting Started

Jump to solution
1,076 Views
billchadwick
Contributor III

I can boot a B4860QDS to Linux and interact with the shell over the RS232

 

I now want to get its IP Network stack up and connect the board to a PC via ethernet so that I can build and debug Linux apps from Code Warrior.

 

Is there some getting started document about this that I have failed to find ?

 

From the serial link, typing ifconfig-a I get

 

 

b4860qds login: root

root@b4860qds:~# ifconfig -a

fm1-mac3  Link encap:Ethernet  HWaddr 00:e0:0c:00:a9:02

          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:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Memory:fe4e4000-fe4e4fff

 

fm1-mac4  Link encap:Ethernet  HWaddr 00:e0:0c:00:a9:03

          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:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Memory:fe4e6000-fe4e6fff

 

fm1-mac5  Link encap:Ethernet  HWaddr 00:e0:0c:00:a9:04

          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:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Memory:fe4e8000-fe4e8fff

 

fm1-mac6  Link encap:Ethernet  HWaddr 00:e0:0c:00:a9:05

          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:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Memory:fe4ea000-fe4eafff

 

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NOARP  MTU:1452  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)

 

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)

 

sit0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NOARP  MTU:1480  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)

 

tunl0     Link encap:IPIP Tunnel  HWaddr

          NOARP  MTU:1480  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)

 

root@b4860qds:~#

 

I have tried

 

 

root@b4860qds:~#

root@b4860qds:~# ifconfig fm1-mac3 192.168.0.10 netmask 255.255.255.0 up

root@b4860qds:~# ifconfig fm1-mac3

fm1-mac3  Link encap:Ethernet  HWaddr 00:e0:0c:00:a9:02

          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::2e0:cff:fe00:a902/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:468 (468.0 B)

          Memory:fe4e4000-fe4e4fff

 

root@b4860qds:~#

 

but I can not ping my PC on 192.168.0.1 (or ping 192.168.0.10 from my pc).

 

I am connecting my B4860QDS to my PC using J18. Is that correct ?

 

 

 

.

Labels (1)
0 Kudos
1 Solution
617 Views
AdrianR
NXP Employee
NXP Employee

Some more info on running Linux at the same time with SC software.

- Make sure you use a different Initialize target script for that: B4860_QDS_uBoot_Init.tcl - this skips some initializations done by uboot (DDRC, LAWs).

You can change this in Debug configuration -> Connection Edit... -> Target Edit...-> Initialize target script (select a different file in the dialog

- Change bootargs for linux to utilize only the lower 2GB:

setenv bootargs “root=/dev/ram rw console=ttyS0,115200 mem=2G”

and

setenv bootm_size=0x80000000

This way you should be able to run any SC software while linux is running (provided that SC sw is mapped to 0x80000000-0xFFFFFFFF).

Regards,

Adrian

View solution in original post

0 Kudos
6 Replies
617 Views
addiyi
NXP Employee
NXP Employee

J18 is correct, but you should config all interface with ip address to find out the correct interface is used.

Adrian

0 Kudos
617 Views
billchadwick
Contributor III

The below using the fm1-mac6 interface worked to make a pingable link between B4860QDS (192.168.0.7) and a PC (192.168.0.1)

ifconfig fm1-mac6 192.168.0.7 netmask 255.255.255.0 up

Is there some way I can save this info so that it will be setup on every boot ?

0 Kudos
617 Views
addiyi
NXP Employee
NXP Employee

You have 2 possibilities. First one is to boot linux from nfs and in this case you can edit config file for network interfaces (e.g. /etc/network/interfaces) or the second possibility is to rebuild the linux rootfs with this modification.

Adrian

0 Kudos
617 Views
billchadwick
Contributor III

I don't seem to be able to have Linux running on PA whilst using Code Warrior (USB TAP) to load and run a SC3900 app (single core, without SmartDsp).

Should I be able to somehow do simultaneous Linux debug and SC3900 debug ?

0 Kudos
618 Views
AdrianR
NXP Employee
NXP Employee

Some more info on running Linux at the same time with SC software.

- Make sure you use a different Initialize target script for that: B4860_QDS_uBoot_Init.tcl - this skips some initializations done by uboot (DDRC, LAWs).

You can change this in Debug configuration -> Connection Edit... -> Target Edit...-> Initialize target script (select a different file in the dialog

- Change bootargs for linux to utilize only the lower 2GB:

setenv bootargs “root=/dev/ram rw console=ttyS0,115200 mem=2G”

and

setenv bootm_size=0x80000000

This way you should be able to run any SC software while linux is running (provided that SC sw is mapped to 0x80000000-0xFFFFFFFF).

Regards,

Adrian

0 Kudos
617 Views
catalindemergia
Contributor IV

Hi,

You should be able to debug both PA and SC in the same time through one tap, but using two Code Warrior

programs, one targeting the PA and one targeting the SC.

regards,

Catalin

0 Kudos