User`s manual
Getting Started With Linux on the LPC3250 OEM Board Page 25
Copyright 2009 © Embedded Artists AB Rev A
3.6 Useful Linux Commands
3.6.1 Obtain IP Address
The IP address of your Linux host can be obtained by using the
ifconfig
command.
$ sudo ifconfig
eth1 Link encap:Ethernet HWaddr 00:0c:29:40:d2:db
inet addr:192.168.5.58 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe40:d2db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:732443 errors:0 dropped:0 overruns:0 frame:0
TX packets:202445 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:418384275 (418.3 MB) TX bytes:57386301 (57.3 MB)
Interrupt:19 Base address:0x2024
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:16436 Metric:1
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6040 (6.0 KB) TX bytes:6040 (6.0 KB)
3.7 Hello World Application
As a first step to application development in Linux you can try to use and modify the existing Hello
World application. Follow the steps below to access, modify and build the Hello World application.
1. Unpack and prepare the Hello World package
$ cd /home/user/ltib
$ ./ltib – p helloworld –m prep
2. Go to the directory where the Hello World application is available and open the source code.
$ cd rpm/BUILD/helloworld-1.1
$ gedit hello.c
3. Change the
printf
statement.
p
p
r
r
i
i
n
n
t
t
f
f
(
(
“
“
h
h
e
e
l
l
l
l
o
o
w
w
o
o
r
r
l
l
d
d
f
f
r
r
o
o
m
m
E
E
A
A
\
\
n
n
”
”
)
)
4. Add the Hello World application to the list of packages that will be included in your Linux
system. Follow the instructions in section 3.5 and choose the package named “hello world”.
5. When the build has finished successfully transfer the root file system to the target board (with
an NFS mounted file system the application will be available directly after the build has
finished).
# hello
hello world from EA