Difference between revisions of "Gumstix Verdex"

From New IAC Wiki
Jump to navigation Jump to search
Line 1: Line 1:
===Compiling===
+
==Compiling==
=====To set up build environment=====
+
====To set up build environment====
 
  source  ~/gumstix/gumstix-oe/extras/profile
 
  source  ~/gumstix/gumstix-oe/extras/profile
 
Executables for cross-compiling are stored in:
 
Executables for cross-compiling are stored in:
Line 7: Line 7:
 
  PATH=$PATH:/home/brian/gumstix/gumstix-oe/tmp/cross/bin
 
  PATH=$PATH:/home/brian/gumstix/gumstix-oe/tmp/cross/bin
  
=====To compile=====
+
====To compile====
 
  arm-angstrom-linux-gnueabi-g++ cgi.cpp vfatregister.cpp vfatedit.cpp vfati2c.cpp -o vfat$i.cgi -lcgicc
 
  arm-angstrom-linux-gnueabi-g++ cgi.cpp vfatregister.cpp vfatedit.cpp vfati2c.cpp -o vfat$i.cgi -lcgicc
 
And if you need to link against cgicc (for web interfaces) add both of the arguments
 
And if you need to link against cgicc (for web interfaces) add both of the arguments
Line 13: Line 13:
 
  -L/home/brian/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/libcgicc-3.2.3-r0/cgicc-3.2.3/cgicc/.libs
 
  -L/home/brian/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/libcgicc-3.2.3-r0/cgicc-3.2.3/cgicc/.libs
  
===Flashing the gumstix===
+
==Flashing the gumstix==
 
<p>If the Gumstix won't boot, you can (rather slowly) flash the filesystem over [http://www.gumstix.net/Software/view/Developer-how-to-s/Reflashing-using-a-serial-connection/111.html serial].
 
<p>If the Gumstix won't boot, you can (rather slowly) flash the filesystem over [http://www.gumstix.net/Software/view/Developer-how-to-s/Reflashing-using-a-serial-connection/111.html serial].
 
[[File:Gumstix Serial Alignment.jpg|thumb|none|200px|Correct alignment of the TTL RS232 adapter]]
 
[[File:Gumstix Serial Alignment.jpg|thumb|none|200px|Correct alignment of the TTL RS232 adapter]]

Revision as of 04:11, 23 July 2009

Compiling

To set up build environment

source  ~/gumstix/gumstix-oe/extras/profile

Executables for cross-compiling are stored in:

/home/brian/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin

And the PATH can be set with:

PATH=$PATH:/home/brian/gumstix/gumstix-oe/tmp/cross/bin

To compile

arm-angstrom-linux-gnueabi-g++ cgi.cpp vfatregister.cpp vfatedit.cpp vfati2c.cpp -o vfat$i.cgi -lcgicc

And if you need to link against cgicc (for web interfaces) add both of the arguments

-I/home/brian/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/libcgicc-3.2.3-r0/cgicc-3.2.3 
-L/home/brian/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/libcgicc-3.2.3-r0/cgicc-3.2.3/cgicc/.libs

Flashing the gumstix

If the Gumstix won't boot, you can (rather slowly) flash the filesystem over serial.

Correct alignment of the TTL RS232 adapter

If the gumstix will boot, then flashing from RAM disk over ssh is faster, but if the process fails or gets interrupted you'll have to fall back on the serial method. Remounting the filesystem read-only may not work, and the whole processed failed. Reflash over ssh


Changes necessary from the default image

Boa config

Boa is a webserver designed for small/embedded platforms

In /etc/boa/boa.conf change the following lines:

From To
#ServerName www.your.org.here ServerName gumstix
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ ScriptAlias /cgi-bin/ /var/www/cgi-bin/

Stop and then start boa with:

/etc/init.d/boa stop
/etc/init.d/boa start

Add the following files

These are the files for the cgicc (C++ cgi script) library. Copy from the bitbake to the /usr/lib/ directory

  • libcgicc.so.5
  • libcgicc.so
  • libcgicc.so.5.0.1

Install additional packages

ipkg install libstdc++6

Suid cgi-bin

Programs that run I2C directly need to be suid as root so they have permissions to make I2C system calls.

chown root ./vfat*.cgi
chmod u+s ./vfat*.cgi

Add home PATH

  • optional

Make a file in /etc/profile.d/ that contains the following:

#!/bin/sh
export PATH=$PATH/home/root/bin: