Build Environment Ubuntu 7.04

From Gumstix User Wiki
Revision as of 22:01, 11 November 2009 by Searchworks (Talk | contribs) (correct link)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Setup Build Environment

1.) Get Ubuntu linux, and install it on your computer; you can install a vmware version of Ubuntu too, but it will be slow during the building process

2.) Install (build-essential, help2man, diffstat, texi2html, texinfo, libncurses5-dev, cvs, gawk, python-dev, python-pysqlite2, ckermit, lrzsz) by using apt-get. i.e:

sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk python-dev python-pysqlite2 ckermit lrzsz

3.) Download the source from svn, and caching the source code

mkdir ~/gumstix 
cd ~/gumstix 
svn co gumstix-oe
cat gumstix-oe/extras/profile >> ~/.bashrc
sudo groupadd oe
sudo usermod -a -G oe YOUR_CURRENT_USERNAME
sudo mkdir /usr/share/sources
sudo chgrp oe /usr/share/sources
sudo chmod 0775 /usr/share/sources
sudo chmod ug+s /usr/share/sources

4.) Logout and then login again.

5.) Start compiling the environment by bitbake; this will talk a very long time!

bitbake gumstix-basic-image

Building Up an Application

Method 1

6_1.) The gumstix ennviroment is done, now you need to write a hello world program, please follow this Hello World tutorial to do so.

7_1.) Now you have a helloword ipk, and it is about time to load in on the stix.

Method 2

6_2.) Write a c program (foo.c)

7_2.)Use the cross gcc to compile a program

~/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc foo.c -o foo

7_3.)Copy foo to Gumstix and run it.

Connect, Download, and Install the Application

8.) Connect your Gum to a computer via a serial port (or a USB version...), but not the power.

9.) Type the following command to initial the serial connection. Depending on which port you use, change the "ttyS0" if you are not using a USB serial port, or....

kermit -l /dev/ttyS0

10.) Type the following command in kermit:

take ~/gumstix/gumstix-oe/extras/kermit-setup

11.) Power up the Gumstix

12.) Now you should be able to see something on the screen. By the time it asks you for login and password, type "root" for login, and then "gumstix" for password. No quotation marks for sure...

13.) Now your Gumstix is running a shell, and you can control it via kermit!

14.) Type the following command in Gumstix shell.


15.) Go back to kermit from the shell by press "Ctrl+\" and then "c".

16.) Type the following command in kermit.

set protocol zmodem
send helloworld_1.0.0-r0_armv5te.ipk

17.) The installation pkg is downloaded to Gumstix in no time, and now go back to the Gumstix shell by typing "connect" in kermit

18.) In the Gumstix shell, type...

ipkg install helloworld_1.0.0-r0_armv5te.ipk

19.) Congratulation! You have installed the helloworld program on the stix. To run it simply type