Fresh out of the box HOW TOs

Steve Watkins
This is my 3rd day with the mini2440, i have not had much time to tinker
with it- maybe 2-3 hours total, reading,tinkering, etc. The target audience
of this how to are those who are new to embedded and linux.

First of all plug the power cable in and wait for QT to load. Play around
for while to get it out of your system.

Now plug in a usb keyboard and open the terminal program under

At the command prompt type the following

to get the kernel info

#uname -a
Linux FriendlyARM #1 Fri Jan 8 12:53:23 CST 2010
armv4tl unknown

to get the cpu info

#cat /proc/cpuinfo
Processor       : ARM920T rev 0 (v4l)
BogoMIPS        : 201.93
Features        : swp half 
CPU implementer : 0x41
CPU architecture: 4T
CPU variant     : 0x1
CPU part        : 0x920
CPU revision    : 0

Hardware        : FriendlyARM Mini2440 development board
Revision        : 0000
Serial          : 0000000000000000

to get the memory info

#cat /proc/meminfo
MemTotal:          59788 kB
MemFree:           35104 kB
Buffers:               0 kB
Cached:            13716 kB
SwapCached:            0 kB
Active:             9356 kB
Inactive:          11044 kB
Active(anon):       7076 kB
Inactive(anon):        0 kB
Active(file):       2280 kB
Inactive(file):    11044 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          6712 kB
Mapped:             7748 kB
Shmem:               392 kB
Slab:               2420 kB
SReclaimable:        928 kB
SUnreclaim:         1492 kB
KernelStack:         272 kB
PageTables:          304 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       29892 kB
Committed_AS:      12636 kB
VmallocTotal:     450560 kB
VmallocUsed:        5216 kB
VmallocChunk:     439292 kB

Now i know that the 2.6.x version of the kernel supports UVC webcams, video
devices, etc. I plugged in a powered usb hub, added a mouse and a 300x USB

checking the kernel for device detection
#dmesg | grep video

Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
uvcvideo: Found UVC 1.00 device Vimicro USB Camera (Altair) (0ac8:3450)

to get info on usb
#cat /proc/bus/usb/devices

this is a long list which will change depending on how many devices you
have. But my USB video was listed as

T:  Bus=01 Lev=02 Prnt=07 Port=01 Cnt=01 Dev#=  8 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0ac8 ProdID=3450 Rev= 5.00
S:  Manufacturer=Vimicro
S:  Product=Vimicro USB Camera (Altair)

Now that everything looks fine exit the terminal.

under friendly arm /  USB camera.

After goofing around with the camera and other applications you probably
want to tinker a bit.

Connect the LAN cable to your computer. The mini2440 uses address So make sure it's not in use on your network.

Open your web browser to
You should see a picture of the mini2440 friendly arm board with a hybrid
of english-chinese writing. So yeah, it has a webserver built in out of the

How about throing files on the mini2440?
Though you could use the SD card, or an external USB hard disk to move
files around, it's more fun to use the LAN and ftp.

open up an ftp program and use the following
connect to port 21
user name = plg
pass = plg

Add some files, maybe an mp3 or some lower res phots. Tinker a bit, it is a
new toy...

So far it has been fun but we have no done anything beyond the typical
user. Lets change that.

Power down the mini2440. Connect the rs232 cable to the DB9 and to your
PC(you better have a serial port!)

Open a terminal emulator at the serial port you connected the serial cable
to and use the following settings.
115200 baud
8 data
No parity
1 stop bit
no flow control

Now power on the mini2440. You should see:

load Image of Linux...Uncompressing
Linux version (root@tom) (gcc version 4.3.2 (Sourcery
G++ Lite 2008q3-72) ) #1 Fri Jan 8 12:53:23 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: FriendlyARM Mini2440 development board
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on

etc,etc,etc (very long verbose output not included here)

yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 160K
[19/Jun/2005:13:58:15 +0000] boa: server version Boa/0.94.13
[19/Jun/2005:13:58:15 +0000] boa: server built Mar 26 2009 at 15:28:42.
[19/Jun/2005:13:58:15 +0000] boa: starting server pid=698, port 80
Try to bring eth0 interface up......eth0: link down

Please press Enter to activate this console. eth0: link up, 100Mbps,
full-duplex, lpa 0x45E1

Press enter here to enable the terminal.

At this point you don't need the USB keyboard anymore. Since you have a PC
screen with the terminal output check out the kernel messages.

[root@FriendlyARM /]# dmesg | less

to exit the less listing, press q

Now you have a fairly easy enough way to tinker around at the linux command
prompt. And with the ftp connect you can throw some files around. This
still feels an awful lot like a typical linux PC though. So lets tinker
with the embedded side a bit.

Power down the mini2440, connect the usb cable to the mini2440 usb device
port and to the PC. Find the boot flash selector switch and select NOR.

Power up the mini2440.

You will notice some major changes here. The screen will flicker but
nothing will happen and you will see a BIOS menu on your terminal emulator.

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linuxstem) on device 31:3.
[v] Download vivi y: 160K
[k] Download linux kernel 
[y] Download root_yaffs image uplex, lpa 0x45E1
[a] Absolute User Application
[n] Download Nboot for WinCE  less
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin 
[d] Download & Run 
[z] Download zImage into RAM 
[g] Boot linux from RAM 
[f] Format the nand flash 
[b] Boot the system 
[s] Set the boot parameters 
[u] Backup NAND Flash to HOST through USB(upload) 
[r] Restore NAND Flash from HOST through USB 
[q] Goto shell of vivi 
[i] Version: 0945-2K
Enter your selection: 

Becareful here, unless you want to brick your mini2440. Though you can
de-brick the device via Jtag and the supplied wiggler. It's not fun. It is
painfully slow(10,15,20+ mins. depending on your hardware and know how)

Here is where the howto is going to get flakey. I don't use window so i
can't tell you anything about dnw.exe, how it works, or how to use it.

I use the usbpush utility by Harald Welte

You can load the test binaries from the no os folder directly to ram and
For example, at the menu type d

Enter your selection: d
Clear the free memory 
USB host is connected. Waiting a download

on the PC use usbpush to throw a test file into ram for execution

# ./usbpush 2440test_T35.bin 
csum = 0xef74
send_file: addr = 0x30000000, len = 0x00095ab0

the PC serial terminal will indicate the progress

Now, Downloading [ADDRESS:30000000h,TOTAL:613050]
RECEIVED FILE SIZE:  613050 (59KB/S, 10S)
Šownloaded file at 0x30000000, size = 613040 bytes
           SBC2440 Test Program VER1.0
      Build time is: Jul 17 2009  23:30:50
          Image$$RO$$Base  = 0x30000000
          Image$$RO$$Limit = 0x300344c8
          Image$$RW$$Base  = 0x300344c8
          Image$$RW$$Limit = 0x300e2280
          Image$$ZI$$Base  = 0x30095ab0
          Image$$ZI$$Limit = 0x300e2280

Please select function : 
0 : Please input 1-16 to select test
1 : Test PWM
2 : RTC time display
3 : Test ADC
4 : Test interrupt and key scan
5 : Test Touchpanel
6 : Test TFT-LCD or VGA1024x768 module
7 : Test IIC EEPROM, if use QQ2440, please remove the LCD
8 : UDA1341 play music
9 : Test SD Card
10 : Test CMOS Camera

There should be a picture of a sunflower on the mini2440's screen at this
point. Tinker with the vcarious tests loaded.

That's it for now.  I'm looking into a method to backup the mini2440's NOR
and NAND flash memory (using linux, not windowds) before i attempt to flash
anything into the device.

I'm sure i made a few typos and what not. Use some common sense :)

Dear Steve Watkins,

I am starting with the mini2440 and I wonder if you could help me with a
doubt I have:

Right now I am using ARM Developer Suite (ADS 1.2) on windows OS to make
I have make a program that controls the LED switching of the mini2440. I
have created the binarie (led_switching.bin) output format and I have
downloaded it through USB, and with the dnw.exe and superterminal the way
you explain above. The downloading is done succesfully.

The LEDs switch properly and is working fine. But whenever I reset or
switch off the board I have to download the program it again to run it.

Do you know if is there any way to download the binarie and keep in the
memory to be running whenever I start the mini2440. 
I do not know if this is possible as I have readen that the RAM memory lost
all the data when is powered off.

I hope you can understand what I mean and could help me.
If you know how it is done with Linux is would be fine also.
Thank you very much in advance.

yes it is possible.

add your file to the linux FS, write a startup script. add it to the linux
compress the FS down, move the FS into the correct partition on the FA.

When the FA starts it loads linux, starts the script, then launches your

possibly will take 15 minutes of work.

I like that! Thank you very much!

One last question:
Is it possible to download the programs to RAM, then load them in the NAND
memory and access to different programs with supervivi? 

And if that's possible, do I have to install supervivi or u-boot in the
NAND or with the supervivi that comes pre-installed in the NOR memory is

Thank you one more time. I really appreciate your help.

Jeff Schneider
Subject: Vimicro USB Camera (Altair)

Mr. Watkins,
I bought a Vimicro USB Camera (Altair)in the hope of being able to take
snapshots for the purpose of downloading to Craigslist.  I have tinkered
with it and can get it to download streaming video but so far no stills.

Have I bought the wrong device?

Appreciate your support.


Hi Steve,
I just got my FA, and I'm reading a ton of info and how-to's trying to make
sense of everything.
Firstly, Do I have to have a serial port on my pc to be able to download
new programs to my FA, as most new pc's don't have serial, or Parallel for
that matter anymore?
Is there anywhere you can point me to for info (that makes sense unlike
most docs that come with it) That take you through the process of getting
started doing everything?
Thanks for your doc here, it has been the most helpful I have found so far.


Normally we use the serial port to access the FA from the host running a
program like minicom.  Like a remote terminal so your can talk to the
running machine.

Most download programs use USB.  You can also use a SD card or NFS.  I
would suggest reading the QuickStart.pdf at this URL:

Hello all,
         I just bought Tiny6410. Can anyone please help me in capturing
images from usb camera through command line? Any help would be greatly

Thank you.

 I already build kernel on i want to interface USB cam and
want to see captured image on mini2440 screen.Please tell me different ways
to achieve this.
    Anyone please help me.....