Labels

19/02/2010

Gumstix Study --- Connect to Gumstix Console

Gumstix 学习： 连结篇

Gumstix is quite a tiny embeded computer. It is very useful in many industry area.I am a newbie to Gumstix.My goal is to run my Qt program on Gumstix.Here are some steps I need to acheive:- talk to gumstix through serial port or usb port;- build my own embeded image and install into Gumstix;- run my Qt program in Gumstix with LCD.

PART I

Gumstix I am using:

mother board: Verdex Pro;

expanstion board: Console-vx.

Now, this is the first step --- talk to Gumstix.

there are three serial ports on this board, looking from the left to right are:

STUART (Standard UART): /dev/ttyS2

FFUART (Full-Function UART): /dev/ttyS0, the console

BTUART (BlueTooth UART): /dev/ttyS1

I need to connect my computer to the middle serial port (ttyS0).

the program I need is either Kermit or Minicom. I am using minicom, because it is easy to be installed in Fedora, and easy to be setup and used.

1)run minicom in root.

root$ minicom -s

setup "serial port setup" as follows:

- serial device: /dev/ttyS0 (or /dev/ttyUSB0)

- Bps/Par/Bits: 115200 8N1

- hardware flow control: No

- Software flow control: No

select "save setup as dfl";exit from minicom.

2)connect serial port to FFUart port on Gumstix.

3) run minicomroot$ minicom -o # means skip all modem initialization.

4)power on Gumstix, When connected and powered, you should see a message from U-Boot followed by the normal Gumstix boot sequence in the minicom window.

1) Insert a 2GB SD card to laptop. This SD card appear in my /dev as "mmcblk0". Need to umount it first.

2) format SD card into two partition

$ sudo fdisk /dev/mmcblk0Command (m for help): oBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Now go into "Expert" mode:

Command (m for help): x

Next we will set the geometry to 255 heads, 63 sectors and a calculated value for the number of cylinders required for the particular microSD card.

To calculate the number of cylinders, we take the 2032664576 bytes reported above by fdisk divided by 255 heads, 63 sectors and 512 bytes per sector:

Up to this point no changes have been made to the card itself, so our final step is to write the new partition table to the card and then exit:

Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: If you have created or modified any DOS 6.xpartitions, please see the fdisk manual page for additionalinformation.Syncing disks.

We format the first partition as an FAT file system (the -n parameter gives it a label of FAT):