<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/api.php?action=feedcontributions&amp;user=Xinkeqiong&amp;feedformat=atom</id>
		<title>eLinux.org - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/api.php?action=feedcontributions&amp;user=Xinkeqiong&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/Special:Contributions/Xinkeqiong"/>
		<updated>2013-05-19T15:36:17Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/ECE597_Listings_for_Chapter_2_xink</id>
		<title>ECE597 Listings for Chapter 2 xink</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Listings_for_Chapter_2_xink"/>
				<updated>2010-05-21T06:53:24Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #1e30000400000000040365fa1400400a&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''2-2'''&lt;br /&gt;
| '''2-7'''&lt;br /&gt;
| '''Loading the Linux Kernel'''&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
2996196 bytes read&lt;br /&gt;
## Booting kernel from Legacy Image at 80300000 ...&lt;br /&gt;
   Image Name:   Angstrom/2.6.29/beagleboard&lt;br /&gt;
   Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
   Data Size:    2996132 Bytes =  2.9 MB&lt;br /&gt;
   Load Address: 80008000&lt;br /&gt;
   Entry Point:  80008000&lt;br /&gt;
   Verifying Checksum ... OK&lt;br /&gt;
   Loading Kernel Image ... OK&lt;br /&gt;
OK&lt;br /&gt;
&lt;br /&gt;
Starting kernel ...&lt;br /&gt;
&lt;br /&gt;
Uncompressing Linux.................................................................................................................................................................................................. done, booting the kernel.&lt;br /&gt;
[    0.000000] Linux version 2.6.29-omap1 (koen@dominion) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Wed Oct 21 13:11:52 CEST 2009&lt;br /&gt;
[    0.000000] CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c5387f&lt;br /&gt;
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache&lt;br /&gt;
[    0.000000] Machine: OMAP3 Beagle Board&lt;br /&gt;
[    0.000000] Memory policy: ECC disabled, Data cache writeback&lt;br /&gt;
[    0.000000] OMAP3430 ES3.1&lt;br /&gt;
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xd7000000 size: 0x100000&lt;br /&gt;
[    0.000000] Reserving 14680064 bytes SDRAM for VRAM&lt;br /&gt;
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024&lt;br /&gt;
[    0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait&lt;br /&gt;
[    0.000000] Clocking rate (Crystal/DPLL/ARM core): 26.0/332/720 MHz&lt;br /&gt;
[    0.000000] GPMC revision 5.0&lt;br /&gt;
[    0.000000] IRQ: Found an INTC at 0xd8200000 (revision 4.0) with 96 interrupts&lt;br /&gt;
[    0.000000] Total of 96 interrupts on 1 active controller&lt;br /&gt;
[    0.000000] OMAP34xx GPIO hardware version 2.5&lt;br /&gt;
[    0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)&lt;br /&gt;
[    0.000000] OMAP clockevent source: GPTIMER12 at 32768 Hz&lt;br /&gt;
[    0.000000] Console: colour dummy device 80x30&lt;br /&gt;
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)&lt;br /&gt;
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)&lt;br /&gt;
[    0.000000] Memory: 128MB 128MB = 256MB total&lt;br /&gt;
[    0.000000] Memory: 238848KB available (5632K code, 576K data, 204K init)&lt;br /&gt;
[    0.000000] Calibrating delay loop... 740.48 BogoMIPS (lpj=2891776)&lt;br /&gt;
[    0.000000] Mount-cache hash table entries: 512&lt;br /&gt;
[    0.000000] CPU: Testing write buffer coherency: ok&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Lease of 192.168.1.108 obtained, lease time 86400&lt;br /&gt;
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1&lt;br /&gt;
adding dns 192.168.1.1&lt;br /&gt;
done.&lt;br /&gt;
Starting portmap daemon: portmap.&lt;br /&gt;
Unknown HZ value! (75) Assume 100.&lt;br /&gt;
net.ipv4.conf.default.rp_filter = 1&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
Wed Mar 10 03:00:00 GMT 2010&lt;br /&gt;
^MINIT: Entering runlevel: 5^M&lt;br /&gt;
Configuring leds:&lt;br /&gt;
  beagleboard::usr0: heartbeat&lt;br /&gt;
  beagleboard::usr1: mmc0&lt;br /&gt;
Starting Dropbear SSH server: dropbear.&lt;br /&gt;
Starting advanced power management daemon: No APM support in kernel&lt;br /&gt;
(failed.)&lt;br /&gt;
Starting Vixie-cron.&lt;br /&gt;
Starting system message bus: dbus.&lt;br /&gt;
Starting Hardware abstraction layer hald&lt;br /&gt;
Starting syslogd/klogd: done&lt;br /&gt;
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon&lt;br /&gt;
[ ok ]&lt;br /&gt;
Starting Connection Manager&lt;br /&gt;
Running ntpdate to synchronize clock.&lt;br /&gt;
Starting GPE display manager: gpe-dm&lt;br /&gt;
&lt;br /&gt;
.-------.                                           &lt;br /&gt;
|       |                  .-.                      &lt;br /&gt;
|   |   |-----.-----.-----.| |   .----..-----.-----.&lt;br /&gt;
|       |     | __  |  ---'| '--.|  .-'|     |     |&lt;br /&gt;
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |&lt;br /&gt;
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'&lt;br /&gt;
                -'  |&lt;br /&gt;
                '---'&lt;br /&gt;
&lt;br /&gt;
The Angstrom Distribution beagleboard ttyS2&lt;br /&gt;
&lt;br /&gt;
Angstrom 2009.X-stable beagleboard ttyS2&lt;br /&gt;
&lt;br /&gt;
beagleboard login: root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
xink@xink ~ % ./a.out                                                                                     [1021]&lt;br /&gt;
Hello, World! Main is executing at 0x80483e4&lt;br /&gt;
This address (0xbfe6b58c) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;root@beagleboard:~# ./a.out &lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbea11cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Listings_for_Chapter_2_xink</id>
		<title>ECE597 Listings for Chapter 2 xink</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Listings_for_Chapter_2_xink"/>
				<updated>2010-05-21T06:51:15Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with '== Chapter 2 ==  {| ! Number ! Page ! Caption ! Listing |- | 2-1 | 2-6 | Initial Bootloader Serial Output | &amp;lt;pre&amp;gt;Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) Reading…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #1e30000400000000040365fa1400400a&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| '''2-2'''&lt;br /&gt;
| '''2-7'''&lt;br /&gt;
| '''Loading the Linux Kernel'''&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
2996196 bytes read&lt;br /&gt;
## Booting kernel from Legacy Image at 80300000 ...&lt;br /&gt;
   Image Name:   Angstrom/2.6.29/beagleboard&lt;br /&gt;
   Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
   Data Size:    2996132 Bytes =  2.9 MB&lt;br /&gt;
   Load Address: 80008000&lt;br /&gt;
   Entry Point:  80008000&lt;br /&gt;
   Verifying Checksum ... OK&lt;br /&gt;
   Loading Kernel Image ... OK&lt;br /&gt;
OK&lt;br /&gt;
&lt;br /&gt;
Starting kernel ...&lt;br /&gt;
&lt;br /&gt;
Uncompressing Linux.................................................................................................................................................................................................. done, booting the kernel.&lt;br /&gt;
[    0.000000] Linux version 2.6.29-omap1 (koen@dominion) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Wed Oct 21 13:11:52 CEST 2009&lt;br /&gt;
[    0.000000] CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c5387f&lt;br /&gt;
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache&lt;br /&gt;
[    0.000000] Machine: OMAP3 Beagle Board&lt;br /&gt;
[    0.000000] Memory policy: ECC disabled, Data cache writeback&lt;br /&gt;
[    0.000000] OMAP3430 ES3.1&lt;br /&gt;
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xd7000000 size: 0x100000&lt;br /&gt;
[    0.000000] Reserving 14680064 bytes SDRAM for VRAM&lt;br /&gt;
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024&lt;br /&gt;
[    0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait&lt;br /&gt;
[    0.000000] Clocking rate (Crystal/DPLL/ARM core): 26.0/332/720 MHz&lt;br /&gt;
[    0.000000] GPMC revision 5.0&lt;br /&gt;
[    0.000000] IRQ: Found an INTC at 0xd8200000 (revision 4.0) with 96 interrupts&lt;br /&gt;
[    0.000000] Total of 96 interrupts on 1 active controller&lt;br /&gt;
[    0.000000] OMAP34xx GPIO hardware version 2.5&lt;br /&gt;
[    0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)&lt;br /&gt;
[    0.000000] OMAP clockevent source: GPTIMER12 at 32768 Hz&lt;br /&gt;
[    0.000000] Console: colour dummy device 80x30&lt;br /&gt;
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)&lt;br /&gt;
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)&lt;br /&gt;
[    0.000000] Memory: 128MB 128MB = 256MB total&lt;br /&gt;
[    0.000000] Memory: 238848KB available (5632K code, 576K data, 204K init)&lt;br /&gt;
[    0.000000] Calibrating delay loop... 740.48 BogoMIPS (lpj=2891776)&lt;br /&gt;
[    0.000000] Mount-cache hash table entries: 512&lt;br /&gt;
[    0.000000] CPU: Testing write buffer coherency: ok&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Lease of 192.168.1.108 obtained, lease time 86400&lt;br /&gt;
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1&lt;br /&gt;
adding dns 192.168.1.1&lt;br /&gt;
done.&lt;br /&gt;
Starting portmap daemon: portmap.&lt;br /&gt;
Unknown HZ value! (75) Assume 100.&lt;br /&gt;
net.ipv4.conf.default.rp_filter = 1&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
Wed Mar 10 03:00:00 GMT 2010&lt;br /&gt;
^MINIT: Entering runlevel: 5^M&lt;br /&gt;
Configuring leds:&lt;br /&gt;
  beagleboard::usr0: heartbeat&lt;br /&gt;
  beagleboard::usr1: mmc0&lt;br /&gt;
Starting Dropbear SSH server: dropbear.&lt;br /&gt;
Starting advanced power management daemon: No APM support in kernel&lt;br /&gt;
(failed.)&lt;br /&gt;
Starting Vixie-cron.&lt;br /&gt;
Starting system message bus: dbus.&lt;br /&gt;
Starting Hardware abstraction layer hald&lt;br /&gt;
Starting syslogd/klogd: done&lt;br /&gt;
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon&lt;br /&gt;
[ ok ]&lt;br /&gt;
Starting Connection Manager&lt;br /&gt;
Running ntpdate to synchronize clock.&lt;br /&gt;
Starting GPE display manager: gpe-dm&lt;br /&gt;
&lt;br /&gt;
.-------.                                           &lt;br /&gt;
|       |                  .-.                      &lt;br /&gt;
|   |   |-----.-----.-----.| |   .----..-----.-----.&lt;br /&gt;
|       |     | __  |  ---'| '--.|  .-'|     |     |&lt;br /&gt;
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |&lt;br /&gt;
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'&lt;br /&gt;
                -'  |&lt;br /&gt;
                '---'&lt;br /&gt;
&lt;br /&gt;
The Angstrom Distribution beagleboard ttyS2&lt;br /&gt;
&lt;br /&gt;
Angstrom 2009.X-stable beagleboard ttyS2&lt;br /&gt;
&lt;br /&gt;
beagleboard login: root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
xink@xink~ % ./a.out                                                                                     [1021]&lt;br /&gt;
Hello, World! Main is executing at 0x80483e4&lt;br /&gt;
This address (0xbfe6b58c) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;root@beagleboard:~# ./a.out &lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbea11cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-21T06:48:50Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Our Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Our Project ==&lt;br /&gt;
Our project in this course is [[ECE597: Auto HUD]]. All the documentation is contained in the page link. &lt;br /&gt;
&lt;br /&gt;
The idea of this project is to recognize road signs with Beagleboard and camera, and display the result through the pico projector.&lt;br /&gt;
&lt;br /&gt;
1. Build the sample set for training, and using Haar training program to train the samples.&lt;br /&gt;
&lt;br /&gt;
2. Working on sign detection code to optimize the detection result.&lt;br /&gt;
&lt;br /&gt;
3. Get the display buffer working.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-21T06:48:16Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Our Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Our Project ==&lt;br /&gt;
Our project in this course is [[ECE597: Auto HUD]]. All the documentation is contained in the page link. &lt;br /&gt;
&lt;br /&gt;
The idea of this project is to recognize road signs with Beagleboard and camera, and display the result through the pico projector.&lt;br /&gt;
&lt;br /&gt;
1. Build the sample set for training, and using Haar training program to train the samples.&lt;br /&gt;
2. Working on sign detection code to optimize the detection result.&lt;br /&gt;
3. Get the display buffer working.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-21T06:39:10Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Our Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Our Project ==&lt;br /&gt;
Our project in this course is [[ECE597: Auto HUD]].&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-21T06:37:38Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Our Project ==&lt;br /&gt;
Our project in this course is [[Auto HUD | ECE597: Auto HUD]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-21T06:35:36Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* How to use OpenCV to train Classifiers for image detection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Project_Ideas</id>
		<title>ECE497 Project Ideas</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Project_Ideas"/>
				<updated>2010-05-21T06:34:47Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Projects you would like to do */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE597]]&lt;br /&gt;
[[Category:BeagleBoard]]&lt;br /&gt;
&lt;br /&gt;
== Sources for Project Ideas ==&lt;br /&gt;
&lt;br /&gt;
Here are some links where you'll find ideas for your project.&lt;br /&gt;
* [http://wiki.omap.com/index.php/ETechDays_Community_Lightning_Talks ETechDays Community Lightning Talks], this is a one-day web-based conference where many project ideas are presented.  One of our 2009-2010 senior design projects was found here.&lt;br /&gt;
* [http://beagleboard.org/project Official list of Beagle Projects], there are many Beagle specific projects listed here.  Many are inactive.  ''List your project here once it running.''&lt;br /&gt;
* [http://www.youtube.com/watch?v=Mk1xjbA-ISE Augmented Reality Project], here's an idea that I think we can do on the Beagle.  Rather than using augmented reality glasses, I'd suggest we use a [http://focus.ti.com/dlpdmd/docs/dlpdiscovery.tsp?sectionId=60&amp;amp;tabId=2235 TI DLP pico projector]. [http://www.hitlabnz.org/wiki/EmbeddedAR Here's] AR running on the Beagle. &lt;br /&gt;
* [http://code.google.com/p/0xdroid/ Android], this is one of a couple of efforts to port [http://source.android.com/ Google's Android OS] to the Beagle.&lt;br /&gt;
* [[BeagleBoard/Ideas-2009]] Google summer code ideas 2009.&lt;br /&gt;
&lt;br /&gt;
== Projects you would like to do ==&lt;br /&gt;
Edit this page to add projects you would like to do.  If you aren't in the class, add ideas you would like to see done by class members.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Team&amp;amp;nbsp;Members&lt;br /&gt;
! Project Title&lt;br /&gt;
! Description &lt;br /&gt;
|-&lt;br /&gt;
| Mark A. Yoder&lt;br /&gt;
| [[ECE597 Google PowerMeter]]&lt;br /&gt;
| Google has a [http://www.google.com/powermeter project] to view and manage home electricity usage. This project would involve designing the hardware to measure the power usage and the Beagle software in interface with it.  The Beagle would talk to the local home network via a wireless link and the home owner would configure the Beagle via a web page served on the Beagle.&lt;br /&gt;
|-&lt;br /&gt;
| Yannick Polius&lt;br /&gt;
| [[ECE597 Project pyWikiReader | pyWikiReader]]&lt;br /&gt;
| This project is mostly software, with the hardware element being the use of the dsp. The idea is to tie together three technologies: speech recognition, speech synthesis, and internet access in order to create an interface capable of orating information to the user based on a vocal command. The implementation I have in mind is to use the Pocket Sphinx speech recognition engine to first understand what the user wants through speech, such as &amp;quot;Rose-Hulman&amp;quot;. Once the speech is translated, the software can execute a Wikipedia search to pull said item's page. Most of the important info is contained within the introductory paragraph, so the software will take only that chunk and feed it into the Flite speech synthesis engine. The end result is a simple machine with &amp;quot;mother box&amp;quot; like usability, that is, no interaction besides what is natural to the user (speaking) should be necessary to retrieve the information.&lt;br /&gt;
|-&lt;br /&gt;
| Paul Morrison &amp;lt;br&amp;gt; Steven Stark&lt;br /&gt;
| [[ECE597 3D Chess | 3D Chess with Networking]]&lt;br /&gt;
| This project would simulate a hand-held chess game, and the game would allow two player games using two beagleboards over a network connection.  The graphics would use the beagle's PowerVR SGX for hardware accelerated graphics by using OpenGL.  In addition to 3D graphics and networking, a third portion of the project would be to optimize the boot time because a chess computer should start up quickly.&lt;br /&gt;
|-&lt;br /&gt;
| Tom Most &amp;lt;br&amp;gt; David Baty &amp;lt;br&amp;gt; Mark Jacobson&lt;br /&gt;
| [[ECE597: Sumo Robot|Sumo Robot]]&lt;br /&gt;
| The goal of this project is to create a robot capable of competing in the 3.0 kg weight class of a sumo competition ([http://www.youtube.com/watch?v=V3OR_sHrOJM an example]).  This would have minor hardware and electronics elements, but would focus on communication with sensors using the BeagleBoard and the Linux kernel.  At minimum, this involves sensors to detect the edge of the ring and the opposing robot.  This would likely be implemented using Sharp IR rangefinders, a ultrasonic rangefinders, and ideally a camera.  [http://circ.mtco.com/competitions/2010/rules/sumo Sumo rules].&lt;br /&gt;
|-&lt;br /&gt;
|Brian Embry &amp;lt;br&amp;gt; Jessica Lipscomb &amp;lt;br&amp;gt; Paul Banister&lt;br /&gt;
| [[ECE597 Network based MP3 player]]&lt;br /&gt;
| Network based mp3 player.  The Beagle will be programmed using a custom, protocol for transferring files from a network based server (x86 pc) to a Beagle.  Speakers will be attached to the Beagle, where the file will be played back.  Possible extensions are a LCD for displaying id3 tag information, and buttons for user interaction (next track, previous track, etc.) on the GPIO interface.&lt;br /&gt;
|-&lt;br /&gt;
|[[user:routhcr | Chris Routh]] &amp;lt;br&amp;gt; [[user:collinjc | J. Cody Collins]] &amp;lt;br&amp;gt; [[user:jacksogc | Greg Jackson]] [[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
| [[ECE597: Auto HUD]]&lt;br /&gt;
| Use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest.&lt;br /&gt;
|-&lt;br /&gt;
| Adam Jesionowski&amp;lt;br&amp;gt;Qiang Jiang&lt;br /&gt;
| [[ECE597_Adding_Sense_to_Beagle|Adding Sense to Beagle]] (See [[BeagleBoard/GSoC/Ideas]])&lt;br /&gt;
| Sensory aware applications are becoming more mainstream with the release of the Apple iPhone. This project would combine both HW and SW to add sensory awareness to beagle. First, additional modules such as GPS, 3-axis accelerometers, Gyroscopes, Temperature Sensors, Humidity Sensors, Pressure Sensors, etc, would be added to beagle to compliment the microphone input in order to allow sensing of the real world environment. Then SW APIs would need to be layered on top to allow easy access to the sensory data for use by applications. &lt;br /&gt;
|-&lt;br /&gt;
| Mitch Garvin &amp;lt;br&amp;gt; Matt Luke &amp;lt;br&amp;gt; Elliot Simon &amp;lt;br&amp;gt; Jian Li&lt;br /&gt;
| [[ECE597 Interactive Pong|Interactive Pong]]&lt;br /&gt;
| Run classic pong, projecting the screen and using a camera to track user's hands for input.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T06:31:29Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Display Buffer Mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the training finished, there will be an .xml file which contains the information of Haar classifiers, and can be used in the detection directly.&lt;br /&gt;
&lt;br /&gt;
Since the training with big sample set will all take a long time, there is a way to generate classifier from unfinished training. Using convert_cascade.c from /opencv/samples/c will help to do this trick.&lt;br /&gt;
&lt;br /&gt;
==Sign Detection==&lt;br /&gt;
We use the .xml file generated from Haar training and detection function to detect the stop sign from the camera or videos. The program is attached below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;cv.h&amp;quot;&lt;br /&gt;
#include &amp;quot;highgui.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;cstdio&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cv;&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer);&lt;br /&gt;
&lt;br /&gt;
String cascadeName = &amp;quot;signRec_rev5.xml&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
int main( int argc, const char** argv )&lt;br /&gt;
{&lt;br /&gt;
    CvCapture* capture = 0;&lt;br /&gt;
    Mat frame, frameCopy, image;&lt;br /&gt;
    const String scaleOpt = &amp;quot;--scale=&amp;quot;;&lt;br /&gt;
    size_t scaleOptLen = scaleOpt.length();&lt;br /&gt;
    const String cascadeOpt = &amp;quot;--cascade=&amp;quot;;&lt;br /&gt;
    size_t cascadeOptLen = cascadeOpt.length();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    CascadeClassifier cascade;&lt;br /&gt;
    double scale = 1;&lt;br /&gt;
&lt;br /&gt;
    for( int i = 1; i &amp;lt; argc; i++ )&lt;br /&gt;
    {&lt;br /&gt;
        if( cascadeOpt.compare( 0, cascadeOptLen, argv[i], cascadeOptLen ) == 0 )&lt;br /&gt;
            cascadeName.assign( argv[i] + cascadeOptLen );&lt;br /&gt;
        else if( scaleOpt.compare( 0, scaleOptLen, argv[i], scaleOptLen ) == 0 )&lt;br /&gt;
        {&lt;br /&gt;
            if( !sscanf( argv[i] + scaleOpt.length(), &amp;quot;%lf&amp;quot;, &amp;amp;scale ) || scale &amp;lt; 1 )&lt;br /&gt;
                scale = 1;&lt;br /&gt;
        }&lt;br /&gt;
        else if( argv[i][0] == '-' )&lt;br /&gt;
        {&lt;br /&gt;
            cerr &amp;lt;&amp;lt; &amp;quot;WARNING: Unknown option %s&amp;quot; &amp;lt;&amp;lt; argv[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            inputName.assign( argv[i] );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( !cascade.load( cascadeName ) )&lt;br /&gt;
    {&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;ERROR: Could not load classifier cascade&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;Usage: signdetect [--cascade=\&amp;quot;&amp;lt;cascade_path&amp;gt;\&amp;quot;]\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [--scale[=&amp;lt;image scale&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [filename|camera_index]\n&amp;quot; ;&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( inputName.empty() || (isdigit(inputName.c_str()[0]) &amp;amp;&amp;amp; inputName.c_str()[1] == '\0') )&lt;br /&gt;
        capture = cvCaptureFromCAM( inputName.empty() ? 0 : inputName.c_str()[0] - '0' );&lt;br /&gt;
    else ( inputName.size() )&lt;br /&gt;
    {&lt;br /&gt;
        image = imread( inputName, 1 );&lt;br /&gt;
        if( image.empty() )&lt;br /&gt;
            capture = cvCaptureFromAVI( inputName.c_str() );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
CvVideoWriter *writer;&lt;br /&gt;
long frameNum = 0;&lt;br /&gt;
    if( capture )&lt;br /&gt;
    {&lt;br /&gt;
	double fps = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);&lt;br /&gt;
	CvSize size = cvSize((int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH),(int)cvGetCaptureProperty(capture, &lt;br /&gt;
CV_CAP_PROP_FRAME_HEIGHT)); &lt;br /&gt;
    	cout &amp;lt;&amp;lt; &amp;quot;Camera Native Resolution: Width: &amp;quot; &amp;lt;&amp;lt; size.width &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; size.height &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_WIDTH, 320 );&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_HEIGHT, 240 );&lt;br /&gt;
&lt;br /&gt;
        for(;;)&lt;br /&gt;
        {&lt;br /&gt;
            IplImage* iplImg = cvQueryFrame( capture );&lt;br /&gt;
            frame = iplImg;&lt;br /&gt;
            if( frame.empty() )&lt;br /&gt;
                break;&lt;br /&gt;
            if( iplImg-&amp;gt;origin == IPL_ORIGIN_TL )&lt;br /&gt;
                frame.copyTo( frameCopy );&lt;br /&gt;
            else&lt;br /&gt;
                flip( frame, frameCopy, 0 );&lt;br /&gt;
		&lt;br /&gt;
		detectAndDraw( frameCopy, cascade scale, frameNum, writer );&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
            if( waitKey( 10 ) &amp;gt;= 0 )&lt;br /&gt;
                goto _cleanup_;&lt;br /&gt;
        frameNum++;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
        waitKey(0);&lt;br /&gt;
_cleanup_:&lt;br /&gt;
        cvReleaseCapture( &amp;amp;capture );&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        if( !image.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
            waitKey(0);&lt;br /&gt;
        }&lt;br /&gt;
        else if( !inputName.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            /* assume it is a text file containing the&lt;br /&gt;
            list of the image filenames to be processed - one per line */&lt;br /&gt;
            FILE* f = fopen( inputName.c_str(), &amp;quot;rt&amp;quot; );&lt;br /&gt;
            if( f )&lt;br /&gt;
            {&lt;br /&gt;
                char buf[1000+1];&lt;br /&gt;
                while( fgets( buf, 1000, f ) )&lt;br /&gt;
                {&lt;br /&gt;
                    int len = (int)strlen(buf), c;&lt;br /&gt;
                    while( len &amp;gt; 0 &amp;amp;&amp;amp; isspace(buf[len-1]) )&lt;br /&gt;
                        len--;&lt;br /&gt;
                    buf[len] = '\0';&lt;br /&gt;
                    cout &amp;lt;&amp;lt; &amp;quot;file &amp;quot; &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
                    image = imread( buf, 1 );&lt;br /&gt;
                    if( !image.empty() )&lt;br /&gt;
                    {&lt;br /&gt;
                        detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
                        c = waitKey(0);&lt;br /&gt;
                        if( c == 27 || c == 'q' || c == 'Q' )&lt;br /&gt;
                            break;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                fclose(f);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer)&lt;br /&gt;
{&lt;br /&gt;
	if((frameNum % 4) != 0){&lt;br /&gt;
		cv::imshow( &amp;quot;result&amp;quot;, img );&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
    int i = 0;&lt;br /&gt;
    double t = 0;&lt;br /&gt;
    vector&amp;lt;Rect&amp;gt; signs;&lt;br /&gt;
    const static Scalar colors[] =  { CV_RGB(0,0,255),&lt;br /&gt;
        CV_RGB(0,128,255),&lt;br /&gt;
        CV_RGB(0,255,255)} ;&lt;br /&gt;
    Mat gray, smallImg( cvRound (img.rows/scale), cvRound(img.cols/scale), CV_8UC1 );&lt;br /&gt;
&lt;br /&gt;
    cvtColor( img, gray, CV_BGR2GRAY );&lt;br /&gt;
    resize( gray, smallImg, smallImg.size(), 0, 0, INTER_LINEAR );&lt;br /&gt;
    equalizeHist( smallImg, smallImg );&lt;br /&gt;
&lt;br /&gt;
    t = (double)cvGetTickCount();&lt;br /&gt;
    cascade.detectMultiScale( smallImg, signs,&lt;br /&gt;
        1.1, 2, 0&lt;br /&gt;
        //|CV_HAAR_FIND_BIGGEST_OBJECT&lt;br /&gt;
        //|CV_HAAR_DO_ROUGH_SEARCH&lt;br /&gt;
        |CV_HAAR_SCALE_IMAGE&lt;br /&gt;
        ,&lt;br /&gt;
        Size(40, 40) );&lt;br /&gt;
    t = (double)cvGetTickCount() - t;&lt;br /&gt;
    printf( &amp;quot;detection time = %g ms\n&amp;quot;, t/((double)cvGetTickFrequency()*1000.) );&lt;br /&gt;
    for( vector&amp;lt;Rect&amp;gt;::const_iterator r = signs.begin(); r != signs.end(); r++, i++ )&lt;br /&gt;
    {&lt;br /&gt;
        Mat smallImgROI;&lt;br /&gt;
        Point center;&lt;br /&gt;
        Scalar color = colors[i%8];&lt;br /&gt;
        int radius;&lt;br /&gt;
        center.x = cvRound((r-&amp;gt;x + r-&amp;gt;width*0.5)*scale);&lt;br /&gt;
        center.y = cvRound((r-&amp;gt;y + r-&amp;gt;height*0.5)*scale);&lt;br /&gt;
        radius = cvRound((r-&amp;gt;width + r-&amp;gt;height)*0.25*scale);&lt;br /&gt;
        circle( img, center, radius, color, 3, 8, 0 );&lt;br /&gt;
    }  &lt;br /&gt;
    cv::imshow( &amp;quot;result&amp;quot;, img );   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y &lt;br /&gt;
omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
1. Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
&lt;br /&gt;
2. Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T06:31:05Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Run Haar Training Program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the training finished, there will be an .xml file which contains the information of Haar classifiers, and can be used in the detection directly.&lt;br /&gt;
&lt;br /&gt;
Since the training with big sample set will all take a long time, there is a way to generate classifier from unfinished training. Using convert_cascade.c from /opencv/samples/c will help to do this trick.&lt;br /&gt;
&lt;br /&gt;
==Sign Detection==&lt;br /&gt;
We use the .xml file generated from Haar training and detection function to detect the stop sign from the camera or videos. The program is attached below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;cv.h&amp;quot;&lt;br /&gt;
#include &amp;quot;highgui.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;cstdio&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cv;&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer);&lt;br /&gt;
&lt;br /&gt;
String cascadeName = &amp;quot;signRec_rev5.xml&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
int main( int argc, const char** argv )&lt;br /&gt;
{&lt;br /&gt;
    CvCapture* capture = 0;&lt;br /&gt;
    Mat frame, frameCopy, image;&lt;br /&gt;
    const String scaleOpt = &amp;quot;--scale=&amp;quot;;&lt;br /&gt;
    size_t scaleOptLen = scaleOpt.length();&lt;br /&gt;
    const String cascadeOpt = &amp;quot;--cascade=&amp;quot;;&lt;br /&gt;
    size_t cascadeOptLen = cascadeOpt.length();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    CascadeClassifier cascade;&lt;br /&gt;
    double scale = 1;&lt;br /&gt;
&lt;br /&gt;
    for( int i = 1; i &amp;lt; argc; i++ )&lt;br /&gt;
    {&lt;br /&gt;
        if( cascadeOpt.compare( 0, cascadeOptLen, argv[i], cascadeOptLen ) == 0 )&lt;br /&gt;
            cascadeName.assign( argv[i] + cascadeOptLen );&lt;br /&gt;
        else if( scaleOpt.compare( 0, scaleOptLen, argv[i], scaleOptLen ) == 0 )&lt;br /&gt;
        {&lt;br /&gt;
            if( !sscanf( argv[i] + scaleOpt.length(), &amp;quot;%lf&amp;quot;, &amp;amp;scale ) || scale &amp;lt; 1 )&lt;br /&gt;
                scale = 1;&lt;br /&gt;
        }&lt;br /&gt;
        else if( argv[i][0] == '-' )&lt;br /&gt;
        {&lt;br /&gt;
            cerr &amp;lt;&amp;lt; &amp;quot;WARNING: Unknown option %s&amp;quot; &amp;lt;&amp;lt; argv[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            inputName.assign( argv[i] );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( !cascade.load( cascadeName ) )&lt;br /&gt;
    {&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;ERROR: Could not load classifier cascade&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;Usage: signdetect [--cascade=\&amp;quot;&amp;lt;cascade_path&amp;gt;\&amp;quot;]\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [--scale[=&amp;lt;image scale&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [filename|camera_index]\n&amp;quot; ;&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( inputName.empty() || (isdigit(inputName.c_str()[0]) &amp;amp;&amp;amp; inputName.c_str()[1] == '\0') )&lt;br /&gt;
        capture = cvCaptureFromCAM( inputName.empty() ? 0 : inputName.c_str()[0] - '0' );&lt;br /&gt;
    else ( inputName.size() )&lt;br /&gt;
    {&lt;br /&gt;
        image = imread( inputName, 1 );&lt;br /&gt;
        if( image.empty() )&lt;br /&gt;
            capture = cvCaptureFromAVI( inputName.c_str() );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
CvVideoWriter *writer;&lt;br /&gt;
long frameNum = 0;&lt;br /&gt;
    if( capture )&lt;br /&gt;
    {&lt;br /&gt;
	double fps = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);&lt;br /&gt;
	CvSize size = cvSize((int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH),(int)cvGetCaptureProperty(capture, &lt;br /&gt;
CV_CAP_PROP_FRAME_HEIGHT)); &lt;br /&gt;
    	cout &amp;lt;&amp;lt; &amp;quot;Camera Native Resolution: Width: &amp;quot; &amp;lt;&amp;lt; size.width &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; size.height &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_WIDTH, 320 );&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_HEIGHT, 240 );&lt;br /&gt;
&lt;br /&gt;
        for(;;)&lt;br /&gt;
        {&lt;br /&gt;
            IplImage* iplImg = cvQueryFrame( capture );&lt;br /&gt;
            frame = iplImg;&lt;br /&gt;
            if( frame.empty() )&lt;br /&gt;
                break;&lt;br /&gt;
            if( iplImg-&amp;gt;origin == IPL_ORIGIN_TL )&lt;br /&gt;
                frame.copyTo( frameCopy );&lt;br /&gt;
            else&lt;br /&gt;
                flip( frame, frameCopy, 0 );&lt;br /&gt;
		&lt;br /&gt;
		detectAndDraw( frameCopy, cascade scale, frameNum, writer );&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
            if( waitKey( 10 ) &amp;gt;= 0 )&lt;br /&gt;
                goto _cleanup_;&lt;br /&gt;
        frameNum++;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
        waitKey(0);&lt;br /&gt;
_cleanup_:&lt;br /&gt;
        cvReleaseCapture( &amp;amp;capture );&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        if( !image.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
            waitKey(0);&lt;br /&gt;
        }&lt;br /&gt;
        else if( !inputName.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            /* assume it is a text file containing the&lt;br /&gt;
            list of the image filenames to be processed - one per line */&lt;br /&gt;
            FILE* f = fopen( inputName.c_str(), &amp;quot;rt&amp;quot; );&lt;br /&gt;
            if( f )&lt;br /&gt;
            {&lt;br /&gt;
                char buf[1000+1];&lt;br /&gt;
                while( fgets( buf, 1000, f ) )&lt;br /&gt;
                {&lt;br /&gt;
                    int len = (int)strlen(buf), c;&lt;br /&gt;
                    while( len &amp;gt; 0 &amp;amp;&amp;amp; isspace(buf[len-1]) )&lt;br /&gt;
                        len--;&lt;br /&gt;
                    buf[len] = '\0';&lt;br /&gt;
                    cout &amp;lt;&amp;lt; &amp;quot;file &amp;quot; &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
                    image = imread( buf, 1 );&lt;br /&gt;
                    if( !image.empty() )&lt;br /&gt;
                    {&lt;br /&gt;
                        detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
                        c = waitKey(0);&lt;br /&gt;
                        if( c == 27 || c == 'q' || c == 'Q' )&lt;br /&gt;
                            break;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                fclose(f);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer)&lt;br /&gt;
{&lt;br /&gt;
	if((frameNum % 4) != 0){&lt;br /&gt;
		cv::imshow( &amp;quot;result&amp;quot;, img );&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
    int i = 0;&lt;br /&gt;
    double t = 0;&lt;br /&gt;
    vector&amp;lt;Rect&amp;gt; signs;&lt;br /&gt;
    const static Scalar colors[] =  { CV_RGB(0,0,255),&lt;br /&gt;
        CV_RGB(0,128,255),&lt;br /&gt;
        CV_RGB(0,255,255)} ;&lt;br /&gt;
    Mat gray, smallImg( cvRound (img.rows/scale), cvRound(img.cols/scale), CV_8UC1 );&lt;br /&gt;
&lt;br /&gt;
    cvtColor( img, gray, CV_BGR2GRAY );&lt;br /&gt;
    resize( gray, smallImg, smallImg.size(), 0, 0, INTER_LINEAR );&lt;br /&gt;
    equalizeHist( smallImg, smallImg );&lt;br /&gt;
&lt;br /&gt;
    t = (double)cvGetTickCount();&lt;br /&gt;
    cascade.detectMultiScale( smallImg, signs,&lt;br /&gt;
        1.1, 2, 0&lt;br /&gt;
        //|CV_HAAR_FIND_BIGGEST_OBJECT&lt;br /&gt;
        //|CV_HAAR_DO_ROUGH_SEARCH&lt;br /&gt;
        |CV_HAAR_SCALE_IMAGE&lt;br /&gt;
        ,&lt;br /&gt;
        Size(40, 40) );&lt;br /&gt;
    t = (double)cvGetTickCount() - t;&lt;br /&gt;
    printf( &amp;quot;detection time = %g ms\n&amp;quot;, t/((double)cvGetTickFrequency()*1000.) );&lt;br /&gt;
    for( vector&amp;lt;Rect&amp;gt;::const_iterator r = signs.begin(); r != signs.end(); r++, i++ )&lt;br /&gt;
    {&lt;br /&gt;
        Mat smallImgROI;&lt;br /&gt;
        Point center;&lt;br /&gt;
        Scalar color = colors[i%8];&lt;br /&gt;
        int radius;&lt;br /&gt;
        center.x = cvRound((r-&amp;gt;x + r-&amp;gt;width*0.5)*scale);&lt;br /&gt;
        center.y = cvRound((r-&amp;gt;y + r-&amp;gt;height*0.5)*scale);&lt;br /&gt;
        radius = cvRound((r-&amp;gt;width + r-&amp;gt;height)*0.25*scale);&lt;br /&gt;
        circle( img, center, radius, color, 3, 8, 0 );&lt;br /&gt;
    }  &lt;br /&gt;
    cv::imshow( &amp;quot;result&amp;quot;, img );   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
1. Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
&lt;br /&gt;
2. Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T06:23:41Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Sign Detection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign Detection==&lt;br /&gt;
We use the .xml file generated from Haar training and detection function to detect the stop sign from the camera or videos. The program is attached below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;cv.h&amp;quot;&lt;br /&gt;
#include &amp;quot;highgui.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;cstdio&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cv;&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer);&lt;br /&gt;
&lt;br /&gt;
String cascadeName = &amp;quot;signRec_rev5.xml&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
int main( int argc, const char** argv )&lt;br /&gt;
{&lt;br /&gt;
    CvCapture* capture = 0;&lt;br /&gt;
    Mat frame, frameCopy, image;&lt;br /&gt;
    const String scaleOpt = &amp;quot;--scale=&amp;quot;;&lt;br /&gt;
    size_t scaleOptLen = scaleOpt.length();&lt;br /&gt;
    const String cascadeOpt = &amp;quot;--cascade=&amp;quot;;&lt;br /&gt;
    size_t cascadeOptLen = cascadeOpt.length();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    CascadeClassifier cascade;&lt;br /&gt;
    double scale = 1;&lt;br /&gt;
&lt;br /&gt;
    for( int i = 1; i &amp;lt; argc; i++ )&lt;br /&gt;
    {&lt;br /&gt;
        if( cascadeOpt.compare( 0, cascadeOptLen, argv[i], cascadeOptLen ) == 0 )&lt;br /&gt;
            cascadeName.assign( argv[i] + cascadeOptLen );&lt;br /&gt;
        else if( scaleOpt.compare( 0, scaleOptLen, argv[i], scaleOptLen ) == 0 )&lt;br /&gt;
        {&lt;br /&gt;
            if( !sscanf( argv[i] + scaleOpt.length(), &amp;quot;%lf&amp;quot;, &amp;amp;scale ) || scale &amp;lt; 1 )&lt;br /&gt;
                scale = 1;&lt;br /&gt;
        }&lt;br /&gt;
        else if( argv[i][0] == '-' )&lt;br /&gt;
        {&lt;br /&gt;
            cerr &amp;lt;&amp;lt; &amp;quot;WARNING: Unknown option %s&amp;quot; &amp;lt;&amp;lt; argv[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            inputName.assign( argv[i] );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( !cascade.load( cascadeName ) )&lt;br /&gt;
    {&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;ERROR: Could not load classifier cascade&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;Usage: signdetect [--cascade=\&amp;quot;&amp;lt;cascade_path&amp;gt;\&amp;quot;]\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [--scale[=&amp;lt;image scale&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [filename|camera_index]\n&amp;quot; ;&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( inputName.empty() || (isdigit(inputName.c_str()[0]) &amp;amp;&amp;amp; inputName.c_str()[1] == '\0') )&lt;br /&gt;
        capture = cvCaptureFromCAM( inputName.empty() ? 0 : inputName.c_str()[0] - '0' );&lt;br /&gt;
    else ( inputName.size() )&lt;br /&gt;
    {&lt;br /&gt;
        image = imread( inputName, 1 );&lt;br /&gt;
        if( image.empty() )&lt;br /&gt;
            capture = cvCaptureFromAVI( inputName.c_str() );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
CvVideoWriter *writer;&lt;br /&gt;
long frameNum = 0;&lt;br /&gt;
    if( capture )&lt;br /&gt;
    {&lt;br /&gt;
	double fps = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);&lt;br /&gt;
	CvSize size = cvSize((int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH),(int)cvGetCaptureProperty(capture, &lt;br /&gt;
CV_CAP_PROP_FRAME_HEIGHT)); &lt;br /&gt;
    	cout &amp;lt;&amp;lt; &amp;quot;Camera Native Resolution: Width: &amp;quot; &amp;lt;&amp;lt; size.width &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; size.height &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_WIDTH, 320 );&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_HEIGHT, 240 );&lt;br /&gt;
&lt;br /&gt;
        for(;;)&lt;br /&gt;
        {&lt;br /&gt;
            IplImage* iplImg = cvQueryFrame( capture );&lt;br /&gt;
            frame = iplImg;&lt;br /&gt;
            if( frame.empty() )&lt;br /&gt;
                break;&lt;br /&gt;
            if( iplImg-&amp;gt;origin == IPL_ORIGIN_TL )&lt;br /&gt;
                frame.copyTo( frameCopy );&lt;br /&gt;
            else&lt;br /&gt;
                flip( frame, frameCopy, 0 );&lt;br /&gt;
		&lt;br /&gt;
		detectAndDraw( frameCopy, cascade scale, frameNum, writer );&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
            if( waitKey( 10 ) &amp;gt;= 0 )&lt;br /&gt;
                goto _cleanup_;&lt;br /&gt;
        frameNum++;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
        waitKey(0);&lt;br /&gt;
_cleanup_:&lt;br /&gt;
        cvReleaseCapture( &amp;amp;capture );&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        if( !image.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
            waitKey(0);&lt;br /&gt;
        }&lt;br /&gt;
        else if( !inputName.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            /* assume it is a text file containing the&lt;br /&gt;
            list of the image filenames to be processed - one per line */&lt;br /&gt;
            FILE* f = fopen( inputName.c_str(), &amp;quot;rt&amp;quot; );&lt;br /&gt;
            if( f )&lt;br /&gt;
            {&lt;br /&gt;
                char buf[1000+1];&lt;br /&gt;
                while( fgets( buf, 1000, f ) )&lt;br /&gt;
                {&lt;br /&gt;
                    int len = (int)strlen(buf), c;&lt;br /&gt;
                    while( len &amp;gt; 0 &amp;amp;&amp;amp; isspace(buf[len-1]) )&lt;br /&gt;
                        len--;&lt;br /&gt;
                    buf[len] = '\0';&lt;br /&gt;
                    cout &amp;lt;&amp;lt; &amp;quot;file &amp;quot; &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
                    image = imread( buf, 1 );&lt;br /&gt;
                    if( !image.empty() )&lt;br /&gt;
                    {&lt;br /&gt;
                        detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
                        c = waitKey(0);&lt;br /&gt;
                        if( c == 27 || c == 'q' || c == 'Q' )&lt;br /&gt;
                            break;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                fclose(f);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer)&lt;br /&gt;
{&lt;br /&gt;
	if((frameNum % 4) != 0){&lt;br /&gt;
		cv::imshow( &amp;quot;result&amp;quot;, img );&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
    int i = 0;&lt;br /&gt;
    double t = 0;&lt;br /&gt;
    vector&amp;lt;Rect&amp;gt; signs;&lt;br /&gt;
    const static Scalar colors[] =  { CV_RGB(0,0,255),&lt;br /&gt;
        CV_RGB(0,128,255),&lt;br /&gt;
        CV_RGB(0,255,255)} ;&lt;br /&gt;
    Mat gray, smallImg( cvRound (img.rows/scale), cvRound(img.cols/scale), CV_8UC1 );&lt;br /&gt;
&lt;br /&gt;
    cvtColor( img, gray, CV_BGR2GRAY );&lt;br /&gt;
    resize( gray, smallImg, smallImg.size(), 0, 0, INTER_LINEAR );&lt;br /&gt;
    equalizeHist( smallImg, smallImg );&lt;br /&gt;
&lt;br /&gt;
    t = (double)cvGetTickCount();&lt;br /&gt;
    cascade.detectMultiScale( smallImg, signs,&lt;br /&gt;
        1.1, 2, 0&lt;br /&gt;
        //|CV_HAAR_FIND_BIGGEST_OBJECT&lt;br /&gt;
        //|CV_HAAR_DO_ROUGH_SEARCH&lt;br /&gt;
        |CV_HAAR_SCALE_IMAGE&lt;br /&gt;
        ,&lt;br /&gt;
        Size(40, 40) );&lt;br /&gt;
    t = (double)cvGetTickCount() - t;&lt;br /&gt;
    printf( &amp;quot;detection time = %g ms\n&amp;quot;, t/((double)cvGetTickFrequency()*1000.) );&lt;br /&gt;
    for( vector&amp;lt;Rect&amp;gt;::const_iterator r = signs.begin(); r != signs.end(); r++, i++ )&lt;br /&gt;
    {&lt;br /&gt;
        Mat smallImgROI;&lt;br /&gt;
        Point center;&lt;br /&gt;
        Scalar color = colors[i%8];&lt;br /&gt;
        int radius;&lt;br /&gt;
        center.x = cvRound((r-&amp;gt;x + r-&amp;gt;width*0.5)*scale);&lt;br /&gt;
        center.y = cvRound((r-&amp;gt;y + r-&amp;gt;height*0.5)*scale);&lt;br /&gt;
        radius = cvRound((r-&amp;gt;width + r-&amp;gt;height)*0.25*scale);&lt;br /&gt;
        circle( img, center, radius, color, 3, 8, 0 );&lt;br /&gt;
    }  &lt;br /&gt;
    cv::imshow( &amp;quot;result&amp;quot;, img );   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
1. Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
&lt;br /&gt;
2. Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T06:23:01Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Sign Detection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign Detection==&lt;br /&gt;
We use the .xml file generated from Haar training and detection function to detect the stop sign from the camera or videos. The program is attached below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;cv.h&amp;quot;&lt;br /&gt;
#include &amp;quot;highgui.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;cstdio&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cv;&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer);&lt;br /&gt;
&lt;br /&gt;
String cascadeName = &amp;quot;signRec_rev5.xml&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
int main( int argc, const char** argv )&lt;br /&gt;
{&lt;br /&gt;
    CvCapture* capture = 0;&lt;br /&gt;
    Mat frame, frameCopy, image;&lt;br /&gt;
    const String scaleOpt = &amp;quot;--scale=&amp;quot;;&lt;br /&gt;
    size_t scaleOptLen = scaleOpt.length();&lt;br /&gt;
    const String cascadeOpt = &amp;quot;--cascade=&amp;quot;;&lt;br /&gt;
    size_t cascadeOptLen = cascadeOpt.length();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    CascadeClassifier cascade;&lt;br /&gt;
    double scale = 1;&lt;br /&gt;
&lt;br /&gt;
    for( int i = 1; i &amp;lt; argc; i++ )&lt;br /&gt;
    {&lt;br /&gt;
        if( cascadeOpt.compare( 0, cascadeOptLen, argv[i], cascadeOptLen ) == 0 )&lt;br /&gt;
            cascadeName.assign( argv[i] + cascadeOptLen );&lt;br /&gt;
        else if( scaleOpt.compare( 0, scaleOptLen, argv[i], scaleOptLen ) == 0 )&lt;br /&gt;
        {&lt;br /&gt;
            if( !sscanf( argv[i] + scaleOpt.length(), &amp;quot;%lf&amp;quot;, &amp;amp;scale ) || scale &amp;lt; 1 )&lt;br /&gt;
                scale = 1;&lt;br /&gt;
        }&lt;br /&gt;
        else if( argv[i][0] == '-' )&lt;br /&gt;
        {&lt;br /&gt;
            cerr &amp;lt;&amp;lt; &amp;quot;WARNING: Unknown option %s&amp;quot; &amp;lt;&amp;lt; argv[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            inputName.assign( argv[i] );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( !cascade.load( cascadeName ) )&lt;br /&gt;
    {&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;ERROR: Could not load classifier cascade&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cerr &amp;lt;&amp;lt; &amp;quot;Usage: signdetect [--cascade=\&amp;quot;&amp;lt;cascade_path&amp;gt;\&amp;quot;]\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [--scale[=&amp;lt;image scale&amp;gt;\n&amp;quot;&lt;br /&gt;
            &amp;quot;   [filename|camera_index]\n&amp;quot; ;&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if( inputName.empty() || (isdigit(inputName.c_str()[0]) &amp;amp;&amp;amp; inputName.c_str()[1] == '\0') )&lt;br /&gt;
        capture = cvCaptureFromCAM( inputName.empty() ? 0 : inputName.c_str()[0] - '0' );&lt;br /&gt;
    else ( inputName.size() )&lt;br /&gt;
    {&lt;br /&gt;
        image = imread( inputName, 1 );&lt;br /&gt;
        if( image.empty() )&lt;br /&gt;
            capture = cvCaptureFromAVI( inputName.c_str() );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
CvVideoWriter *writer;&lt;br /&gt;
long frameNum = 0;&lt;br /&gt;
    if( capture )&lt;br /&gt;
    {&lt;br /&gt;
	double fps = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);&lt;br /&gt;
	CvSize size = cvSize((int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH),(int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT)); &lt;br /&gt;
    	cout &amp;lt;&amp;lt; &amp;quot;Camera Native Resolution: Width: &amp;quot; &amp;lt;&amp;lt; size.width &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; size.height &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_WIDTH, 320 );&lt;br /&gt;
	cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_HEIGHT, 240 );&lt;br /&gt;
&lt;br /&gt;
        for(;;)&lt;br /&gt;
        {&lt;br /&gt;
            IplImage* iplImg = cvQueryFrame( capture );&lt;br /&gt;
            frame = iplImg;&lt;br /&gt;
            if( frame.empty() )&lt;br /&gt;
                break;&lt;br /&gt;
            if( iplImg-&amp;gt;origin == IPL_ORIGIN_TL )&lt;br /&gt;
                frame.copyTo( frameCopy );&lt;br /&gt;
            else&lt;br /&gt;
                flip( frame, frameCopy, 0 );&lt;br /&gt;
		&lt;br /&gt;
		detectAndDraw( frameCopy, cascade scale, frameNum, writer );&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
            if( waitKey( 10 ) &amp;gt;= 0 )&lt;br /&gt;
                goto _cleanup_;&lt;br /&gt;
        frameNum++;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
        waitKey(0);&lt;br /&gt;
_cleanup_:&lt;br /&gt;
        cvReleaseCapture( &amp;amp;capture );&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        if( !image.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
            waitKey(0);&lt;br /&gt;
        }&lt;br /&gt;
        else if( !inputName.empty() )&lt;br /&gt;
        {&lt;br /&gt;
            /* assume it is a text file containing the&lt;br /&gt;
            list of the image filenames to be processed - one per line */&lt;br /&gt;
            FILE* f = fopen( inputName.c_str(), &amp;quot;rt&amp;quot; );&lt;br /&gt;
            if( f )&lt;br /&gt;
            {&lt;br /&gt;
                char buf[1000+1];&lt;br /&gt;
                while( fgets( buf, 1000, f ) )&lt;br /&gt;
                {&lt;br /&gt;
                    int len = (int)strlen(buf), c;&lt;br /&gt;
                    while( len &amp;gt; 0 &amp;amp;&amp;amp; isspace(buf[len-1]) )&lt;br /&gt;
                        len--;&lt;br /&gt;
                    buf[len] = '\0';&lt;br /&gt;
                    cout &amp;lt;&amp;lt; &amp;quot;file &amp;quot; &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
                    image = imread( buf, 1 );&lt;br /&gt;
                    if( !image.empty() )&lt;br /&gt;
                    {&lt;br /&gt;
                        detectAndDraw( image, cascade, scale, frameNum, writer );&lt;br /&gt;
                        c = waitKey(0);&lt;br /&gt;
                        if( c == 27 || c == 'q' || c == 'Q' )&lt;br /&gt;
                            break;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                fclose(f);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void detectAndDraw( Mat&amp;amp; img,&lt;br /&gt;
                   CascadeClassifier&amp;amp; cascade,&lt;br /&gt;
                   double scale, long frameNum, CvVideoWriter *writer)&lt;br /&gt;
{&lt;br /&gt;
	if((frameNum % 4) != 0){&lt;br /&gt;
		cv::imshow( &amp;quot;result&amp;quot;, img );&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
    int i = 0;&lt;br /&gt;
    double t = 0;&lt;br /&gt;
    vector&amp;lt;Rect&amp;gt; signs;&lt;br /&gt;
    const static Scalar colors[] =  { CV_RGB(0,0,255),&lt;br /&gt;
        CV_RGB(0,128,255),&lt;br /&gt;
        CV_RGB(0,255,255)} ;&lt;br /&gt;
    Mat gray, smallImg( cvRound (img.rows/scale), cvRound(img.cols/scale), CV_8UC1 );&lt;br /&gt;
&lt;br /&gt;
    cvtColor( img, gray, CV_BGR2GRAY );&lt;br /&gt;
    resize( gray, smallImg, smallImg.size(), 0, 0, INTER_LINEAR );&lt;br /&gt;
    equalizeHist( smallImg, smallImg );&lt;br /&gt;
&lt;br /&gt;
    t = (double)cvGetTickCount();&lt;br /&gt;
    cascade.detectMultiScale( smallImg, signs,&lt;br /&gt;
        1.1, 2, 0&lt;br /&gt;
        //|CV_HAAR_FIND_BIGGEST_OBJECT&lt;br /&gt;
        //|CV_HAAR_DO_ROUGH_SEARCH&lt;br /&gt;
        |CV_HAAR_SCALE_IMAGE&lt;br /&gt;
        ,&lt;br /&gt;
        Size(40, 40) );&lt;br /&gt;
    t = (double)cvGetTickCount() - t;&lt;br /&gt;
    printf( &amp;quot;detection time = %g ms\n&amp;quot;, t/((double)cvGetTickFrequency()*1000.) );&lt;br /&gt;
    for( vector&amp;lt;Rect&amp;gt;::const_iterator r = signs.begin(); r != signs.end(); r++, i++ )&lt;br /&gt;
    {&lt;br /&gt;
        Mat smallImgROI;&lt;br /&gt;
        Point center;&lt;br /&gt;
        Scalar color = colors[i%8];&lt;br /&gt;
        int radius;&lt;br /&gt;
        center.x = cvRound((r-&amp;gt;x + r-&amp;gt;width*0.5)*scale);&lt;br /&gt;
        center.y = cvRound((r-&amp;gt;y + r-&amp;gt;height*0.5)*scale);&lt;br /&gt;
        radius = cvRound((r-&amp;gt;width + r-&amp;gt;height)*0.25*scale);&lt;br /&gt;
        circle( img, center, radius, color, 3, 8, 0 );&lt;br /&gt;
    }  &lt;br /&gt;
    cv::imshow( &amp;quot;result&amp;quot;, img );   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
1. Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
&lt;br /&gt;
2. Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:51:22Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* OpenCV Haar Training */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign Detection==&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
1. Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
&lt;br /&gt;
2. Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:50:07Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
1. Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
&lt;br /&gt;
2. Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:49:14Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Future Directions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
Learning OpenCV: Computer Vision with the OpenCV Library, Gary Bradski and Adrian Kaehler&lt;br /&gt;
Haar training Tutorials: http://note.sonots.com/SciSoftware/haartraining.html&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:45:19Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Generate Samples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:44:36Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Creating the Positive Index File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - &lt;br /&gt;
topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &lt;br /&gt;
objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:43:31Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Generate Samples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. This is the method we used for training stop signs. Because unlike using one standard positive image, the multiple positive samples are much more accurate, comparing with color intensity and image distortion. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:39:56Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Generate Samples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6&lt;br /&gt;
 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second one is to create samples from multiple images which either selected or cropped from the method described above. Using the good images' description file, the command is like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -info signs.idx -vec signs.vec -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:36:17Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Generate Samples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
The example command is as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ opencv-createsamples -img stopSign.jpeg -num 1000 -bg background.idx -vec signs.vec -maxxangle 0.6 -maxyangle 1.1 -maxzangle 0.6 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 40 -h 40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:33:39Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Gather Samples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:32:59Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Run Haar Training Program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
For positive images(good images), there are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
The utility of Haar training is as below: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./haartraining&lt;br /&gt;
  -data &amp;lt;dir_name&amp;gt;&lt;br /&gt;
  -vec &amp;lt;vec_file_name&amp;gt;&lt;br /&gt;
  -bg &amp;lt;background_file_name&amp;gt;&lt;br /&gt;
  [-npos &amp;lt;number_of_positive_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nneg &amp;lt;number_of_negative_samples = 2000&amp;gt;]&lt;br /&gt;
  [-nstages &amp;lt;number_of_stages = 14&amp;gt;]&lt;br /&gt;
  [-nsplits &amp;lt;number_of_splits = 1&amp;gt;]&lt;br /&gt;
  [-mem &amp;lt;memory_in_MB = 200&amp;gt;]&lt;br /&gt;
  [-sym (default)] [-nonsym]&lt;br /&gt;
  [-minhitrate &amp;lt;min_hit_rate = 0.995000&amp;gt;]&lt;br /&gt;
  [-maxfalsealarm &amp;lt;max_false_alarm_rate = 0.500000&amp;gt;]&lt;br /&gt;
  [-weighttrimming &amp;lt;weight_trimming = 0.950000&amp;gt;]&lt;br /&gt;
  [-eqw]&lt;br /&gt;
  [-mode &amp;lt;BASIC (default) | CORE | ALL&amp;gt;]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
  [-bt &amp;lt;DAB | RAB | LB | GAB (default)&amp;gt;]&lt;br /&gt;
  [-err &amp;lt;misclass (default) | gini | entropy&amp;gt;]&lt;br /&gt;
  [-maxtreesplits &amp;lt;max_number_of_splits_in_tree_cascade = 0&amp;gt;]&lt;br /&gt;
  [-minpos &amp;lt;min_number_of_positive_samples_per_cluster = 500&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 730 -nneg 835 -w 40 -h 40 -nonsym -mem 2048 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:29:27Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Run the Training Program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
For positive images(good images), there are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run Haar Training Program ===&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 111 -nneg 2239 -w 40 -h 40 -nonsym -mem 512 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:28:50Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Run the Training Program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
For positive images(good images), there are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run the Training Program ===&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 &lt;br /&gt;
-maxfalsealarm .5 -npos 111 -nneg 2239 -w 40 -h 40 -nonsym -mem 512 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:27:38Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Run the Training Program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
For positive images(good images), there are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run the Training Program ===&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 &lt;br /&gt;
-nsplits 2 -minhitrate 0.995 -maxfalsealarm .5 -npos 111 -nneg 2239 -w 40 -h 40 -nonsym -mem 512 &lt;br /&gt;
-mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:23:07Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Creating the Positive Index File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
For positive images(good images), there are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, there is another way to crop the positive samples from sample set. Using images clipper tools can help to crop the positive samples directly from the image sets. And the find command and identify command (from ImageMagick) will find and gather images' information like width and height.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find &amp;lt;dir&amp;gt; -name '*.&amp;lt;ext&amp;gt;' -exec identify -format '%i 1 0 0 %w %h' \{\} \; &amp;gt; &amp;lt;description_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run the Training Program ===&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 -maxfalsealarm .5 -npos 111 -nneg 2239 -w 40 -h 40 -nonsym -mem 512 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:13:32Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Gather Samples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
&lt;br /&gt;
For positive images(good images), there are two way to achieve it. The first and simple one is to generate the samples from one positive image. With background images, rotating angle and insensitivity deviation setup, the positive samples can be generated quickly by computer. However, comparing with gathering samples from tons of real images, the accuracy for this sample set will be low.&lt;br /&gt;
&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run the Training Program ===&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 -maxfalsealarm .5 -npos 111 -nneg 2239 -w 40 -h 40 -nonsym -mem 512 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Project_Auto_HUD</id>
		<title>ECE597 Project Auto HUD</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Project_Auto_HUD"/>
				<updated>2010-05-21T05:04:22Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
==Project Overview==&lt;br /&gt;
The goal of this project is to use the beagle board to run image recognition on a camera feed located inside a car, and then signaling to the driver via a pico projector various objects of interest. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[user:routhcr | Chris Routh]]&lt;br /&gt;
&lt;br /&gt;
[[user:collinjc | J. Cody Collins]]&lt;br /&gt;
&lt;br /&gt;
[[user:jacksogc | Greg Jackson]]&lt;br /&gt;
&lt;br /&gt;
[[user:Xinkeqiong | Keqiong Xin]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
* Create Minimal Linux Image that can run OpenCV and run the display&lt;br /&gt;
* Determine hardware needed for the project&lt;br /&gt;
* Work on getting a camera functioning on the beagle board&lt;br /&gt;
* OpenCV running nativly on beagle with min config&lt;br /&gt;
* OpenCV working on video stream&lt;br /&gt;
* Projector working on Beagle&lt;br /&gt;
* Car integration (power)&lt;br /&gt;
* Algorithm development&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV (Development Machine)==&lt;br /&gt;
This is a script that will install OpenCV on a debian-based development machine. The script will add the debian testing repositories and install OpenCV and its dependencies. The repositories are then removed to avoid conflicts with existing packages during regular updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;deb http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt; /tmp/opencv-temp.list &lt;br /&gt;
echo &amp;quot;deb-src http://mirrors.kernel.org/debian/ testing main&amp;quot; &amp;gt;&amp;gt; /tmp/opencv-temp.list&lt;br /&gt;
sudo mv /tmp/opencv-temp.list /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y --allow-unauthenticated libcv4 libcv-dev libhighgui4 libhighgui-dev libcvaux4 libcvaux-dev&lt;br /&gt;
&lt;br /&gt;
sudo rm -f /etc/apt/sources.list.d/opencv-temp.list&lt;br /&gt;
&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing OpenCV on the Beagle==&lt;br /&gt;
&lt;br /&gt;
Probably the easiest place to start is by using [http://www.angstrom-distribution.org/narcissus/ narcissus]. Choose beagleboard as the machine type and unstable for the release. In order for highgui to work (necessary for camera capture unless you are using GStreamer), you must build an image with X11 support. Therefore, choose X11 for the user environment. The choice for the X11 desktop environment is not critical, but it would be wise to choose something fairly lightweight, such as Enlightenment. It took several hours for Gnome to configure upon first boot. Once the filesystem has been extracted to a properly formatted SD card with an appropriate kernel on the boot partition (we tested this using 2.6.29), you should be able to boot. Upon boot, you will need to run opkg update. After this, you will need to run opkg install with the following packages:&lt;br /&gt;
&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-dev&lt;br /&gt;
* binutils&lt;br /&gt;
* binutils-dev&lt;br /&gt;
* opencv&lt;br /&gt;
* opencv-dev&lt;br /&gt;
* g++&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ signdetect.cpp -o signdetect -I /usr/include/opencv/ -L /usr/lib -lm -lcv -lhighgui -lcvaux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenCV Haar Training==&lt;br /&gt;
=== Gather Samples ===&lt;br /&gt;
Due to the large volume of sample data needed to create a effective Haar Cascade (about 1000 positive images) it is easier to gather video of a positive target and then break apart the video frame by frame and use the results as images. There are 2 two types of images, good and background. Both types of images are important in order for the cascade to be trained accurately.&lt;br /&gt;
=== Create Index File ===&lt;br /&gt;
There are two index files needing to be created in order for the system to train on the images, a background index file creating a list of filelocations, and a positive index file containing the positive file locations, the number of objects in the picture and the rectangular locations for the object.&lt;br /&gt;
==== Creating the Negative Index File ====&lt;br /&gt;
Use the following automated script from within the background images folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
find ./*.jpg -maxdepth 2 -print  &amp;gt; background.idx&lt;br /&gt;
find ./*.png -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.bmp -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
find ./*.jpeg -maxdepth 2 -print &amp;gt;&amp;gt; background.idx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Creating the Positive Index File ====&lt;br /&gt;
Use the following source code to create a training program that allows the user to click on the upper left and lower right of a object to select it and then press a key to return.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// Calibrate.cpp&lt;br /&gt;
// Date: 4/20/10&lt;br /&gt;
// Author: Christopher Routh&lt;br /&gt;
// This program brings up the necessary images and allows the user to&lt;br /&gt;
// select correct training spots for objects and generates a index file.&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cv.h&amp;gt;&lt;br /&gt;
#include &amp;lt;highgui.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
static CvSize imageSize;&lt;br /&gt;
static CvPoint old_click_pt;&lt;br /&gt;
static CvPoint new_click_pt;&lt;br /&gt;
static std::vector&amp;lt;CvPoint&amp;gt; pointsClicked;&lt;br /&gt;
&lt;br /&gt;
/*function... might want it in some class?*/&lt;br /&gt;
int getdir (std::string dir, std::vector&amp;lt;string&amp;gt; &amp;amp;files)&lt;br /&gt;
{&lt;br /&gt;
    DIR *dp;&lt;br /&gt;
    struct dirent *dirp;&lt;br /&gt;
    if((dp  = opendir(dir.c_str())) == NULL) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Error(&amp;quot; &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; &amp;quot;) opening &amp;quot; &amp;lt;&amp;lt; dir &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return errno;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while ((dirp = readdir(dp)) != NULL) {&lt;br /&gt;
        files.push_back(string(dirp-&amp;gt;d_name));&lt;br /&gt;
    }&lt;br /&gt;
    closedir(dp);&lt;br /&gt;
	files.erase(files.begin(), files.begin()+2);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// handle mouse clicks here&lt;br /&gt;
void mouse_callback(int event, int x, int y, int flags, void* obj)&lt;br /&gt;
{&lt;br /&gt;
	if (event == CV_EVENT_LBUTTONDOWN)&lt;br /&gt;
	{&lt;br /&gt;
		cout &amp;lt;&amp;lt; &amp;quot;(x,y) = (&amp;quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; &amp;quot;)&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
		// reset old_click_pt&lt;br /&gt;
		old_click_pt.x = new_click_pt.x;&lt;br /&gt;
		old_click_pt.y = new_click_pt.y;&lt;br /&gt;
&lt;br /&gt;
		// get new click point -- note the coordinate change in y&lt;br /&gt;
		new_click_pt.x = x;  // coming in from the window system&lt;br /&gt;
		new_click_pt.y = imageSize.height-y;  // window system and images have different y axes&lt;br /&gt;
		pointsClicked.push_back(cvPoint(new_click_pt.x, new_click_pt.y));			&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int getCorrectObjectLocation(string file, vector&amp;lt;CvRect&amp;gt; &amp;amp;results)&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0;&lt;br /&gt;
  // load an image  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Trying to load: &amp;quot; &amp;lt;&amp;lt; file &amp;lt;&amp;lt; endl; &lt;br /&gt;
  img=cvLoadImage((file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
  if(!img){&lt;br /&gt;
    printf(&amp;quot;Could not load image file: %s\n&amp;quot;,(file.insert(0, &amp;quot;./good/&amp;quot;).c_str()));&lt;br /&gt;
    exit(0);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // get the image data&lt;br /&gt;
  int height    = img-&amp;gt;height;&lt;br /&gt;
  int width     = img-&amp;gt;width;&lt;br /&gt;
  int step      = img-&amp;gt;widthStep;&lt;br /&gt;
  int channels  = img-&amp;gt;nChannels;&lt;br /&gt;
  uchar* data = (uchar *)img-&amp;gt;imageData;&lt;br /&gt;
  printf(&amp;quot;Processing a %dx%d image with %d channels\n&amp;quot;,height,width,channels); &lt;br /&gt;
&lt;br /&gt;
  // create a window&lt;br /&gt;
  cvNamedWindow(&amp;quot;mainWin&amp;quot;, CV_WINDOW_AUTOSIZE);&lt;br /&gt;
&lt;br /&gt;
  // show the image&lt;br /&gt;
  cvShowImage(&amp;quot;mainWin&amp;quot;, img );&lt;br /&gt;
&lt;br /&gt;
  cvSetMouseCallback( &amp;quot;mainWin&amp;quot;, mouse_callback );&lt;br /&gt;
  // wait for a key&lt;br /&gt;
  cvWaitKey(0);&lt;br /&gt;
&lt;br /&gt;
  int properClicks = pointsClicked.size() % 2;&lt;br /&gt;
  if(properClicks != 0 || pointsClicked.size() == 0){&lt;br /&gt;
  &lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Improper Number of Points Clicked: &amp;quot; &amp;lt;&amp;lt; pointsClicked.size() &amp;lt;&amp;lt; &amp;quot; Selected&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return -1;&lt;br /&gt;
&lt;br /&gt;
  }else{&lt;br /&gt;
  &lt;br /&gt;
  //Process new rectangles&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i++){&lt;br /&gt;
	cout &amp;lt;&amp;lt; &amp;quot;Recieved Points X: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; pointsClicked.at(i).y &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for(unsigned int i = 0; i &amp;lt; pointsClicked.size(); i=i+2){&lt;br /&gt;
		CvPoint topLeft = pointsClicked.at(i);&lt;br /&gt;
		CvPoint bottomRight = pointsClicked.at(i+1);		&lt;br /&gt;
		results.push_back( cvRect(topLeft.x,abs(topLeft.y), (bottomRight.x - topLeft.x), abs((topLeft.y - bottomRight.y)) ) );	&lt;br /&gt;
  		cout &amp;lt;&amp;lt; &amp;quot;Rectangle Created --- X: &amp;quot; &amp;lt;&amp;lt; topLeft.x &amp;lt;&amp;lt; &amp;quot; Y: &amp;quot; &amp;lt;&amp;lt; abs(topLeft.y) &amp;lt;&amp;lt; &amp;quot; Width: &amp;quot; &amp;lt;&amp;lt; (bottomRight.x - topLeft.x) &amp;lt;&amp;lt; &amp;quot; Height: &amp;quot; &amp;lt;&amp;lt; abs((topLeft.y - bottomRight.y)) &amp;lt;&amp;lt; endl; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pointsClicked.clear();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // release the image&lt;br /&gt;
  cvReleaseImage(&amp;amp;img ); &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  IplImage* img = 0; &lt;br /&gt;
  int height,width,step,channels;&lt;br /&gt;
  uchar *data;&lt;br /&gt;
  int i,j,k;&lt;br /&gt;
&lt;br /&gt;
string dir = string(&amp;quot;./good/&amp;quot;);&lt;br /&gt;
    vector&amp;lt;string&amp;gt; files = vector&amp;lt;string&amp;gt;();&lt;br /&gt;
    getdir(dir,files);&lt;br /&gt;
    vector&amp;lt;CvRect&amp;gt; objectRects = vector&amp;lt;CvRect&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
ofstream vecFile;&lt;br /&gt;
vecFile.open (&amp;quot;./good/signs.idx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    for (unsigned int i = 0;i &amp;lt; files.size();i++) {&lt;br /&gt;
	      int success = getCorrectObjectLocation(files.at(i), objectRects); &lt;br /&gt;
    	if(success != 0){&lt;br /&gt;
	 i--;&lt;br /&gt;
	pointsClicked.clear();&lt;br /&gt;
	}else{&lt;br /&gt;
	&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; &amp;quot;good/&amp;quot; &amp;lt;&amp;lt; files.at(i) &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.size();&lt;br /&gt;
&lt;br /&gt;
	for(int j = 0; j &amp;lt; objectRects.size(); j++)&lt;br /&gt;
	{&lt;br /&gt;
		vecFile &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).x &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).y &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).width &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; objectRects.at(j).height;  &lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	vecFile &amp;lt;&amp;lt; endl;&lt;br /&gt;
	objectRects.clear();&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
//Close the Vector File&lt;br /&gt;
vecFile.close();&lt;br /&gt;
&lt;br /&gt;
cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; &amp;quot;******  INDEX FILE CREATED ******&amp;quot;;&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Generate Samples ===&lt;br /&gt;
Using the positive samples the creasamples cammand can apply transforms to the images and add them to the background images creating a wider range of images to train on. The syntax for this command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: ./createsamples&lt;br /&gt;
  [-info &amp;lt;description_file_name&amp;gt;]&lt;br /&gt;
  [-img &amp;lt;image_file_name&amp;gt;]&lt;br /&gt;
  [-vec &amp;lt;vec_file_name&amp;gt;]&lt;br /&gt;
  [-bg &amp;lt;background_file_name&amp;gt;]&lt;br /&gt;
  [-num &amp;lt;number_of_samples = 1000&amp;gt;]&lt;br /&gt;
  [-bgcolor &amp;lt;background_color = 0&amp;gt;]&lt;br /&gt;
  [-inv] [-randinv] [-bgthresh &amp;lt;background_color_threshold = 80&amp;gt;]&lt;br /&gt;
  [-maxidev &amp;lt;max_intensity_deviation = 40&amp;gt;]&lt;br /&gt;
  [-maxxangle &amp;lt;max_x_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxyangle &amp;lt;max_y_rotation_angle = 1.100000&amp;gt;]&lt;br /&gt;
  [-maxzangle &amp;lt;max_z_rotation_angle = 0.500000&amp;gt;]&lt;br /&gt;
  [-show [&amp;lt;scale = 4.000000&amp;gt;]]&lt;br /&gt;
  [-w &amp;lt;sample_width = 24&amp;gt;]&lt;br /&gt;
  [-h &amp;lt;sample_height = 24&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Run the Training Program ===&lt;br /&gt;
Commands differ based upon application and intended sample size, the command my group used was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
opencv-haartraining -data signs_drivedata_rev1 -vec signs.vec -bg background.idx -nstages 20 -nsplits 2 -minhitrate 0.995 -maxfalsealarm .5 -npos 111 -nneg 2239 -w 40 -h 40 -nonsym -mem 512 -mode ALL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Display Buffer Mapping==&lt;br /&gt;
In order to get access to the display buffer on the beagle, you will need to run the following in U-Boot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait omapfb.mode=1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi omapfb.vram=0:10M,1:10M vram=20M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other sources have mentioned setting a value for mmcargs. However, we were not able to get it to work properly until the options were applied '''directly''' to the bootargs variable.&lt;br /&gt;
&lt;br /&gt;
==Pico Projector Integration==&lt;br /&gt;
As of revision C4 of the Beagleboard there is no necessary configuration needed to display native resolution on the projector.&lt;br /&gt;
&lt;br /&gt;
==Future Directions==&lt;br /&gt;
===GStreamer on the DSP===&lt;br /&gt;
There is a package available for the beagle called gst-dsp, which is a native GStreamer plug-in to give it access to the DSP. Along with gst-opamfb and the dsp-bridge driver, this should allow us to access the DSP directly and output video directly to the framebuffer. OpenCV can interact with GStreamer, so this appears to be a very promising direction for the project. See [http://felipec.wordpress.com/2009/10/13/new-project-gst-dsp-with-beagleboard-demo-image/ this article] for more information and a demonstration. That article also has a link to a minimal beagle image that provides a native framebuffer video player without requiring X.&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_xink</id>
		<title>ECE597 xink</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_xink"/>
				<updated>2010-05-10T00:13:04Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with 'OpenCV has some applications that can be used directly for training Classifiers for image detection. In ../bin directory, there are several executable files can help to achieve t…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenCV has some applications that can be used directly for training Classifiers for image detection. In ../bin directory, there are several executable files can help to achieve the trainning. The training using&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-09T23:52:04Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* How to use OpenCV to train Classifiers for image detection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
== How to use OpenCV to train Classifiers for image detection ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 xink | How to use OpenCV to train Classifiers for image detection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-05-09T23:51:46Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 8 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
== How to use OpenCV to train Classifiers for image detection ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 xink | How to use OpenCV to train Classifiers for image detection8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Lab10_gMake</id>
		<title>ECE497 Lab10 gMake</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Lab10_gMake"/>
				<updated>2010-04-23T20:53:37Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Lab 05, gMake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
Texas Instruments' Technical Tranining for students concerning the DaVinci/OMAP platforms including DM64xx, DM35x/36x, OMAP35x, OMAP-L1x, and AMx.  Below are the details of the labs we'll be doing from the DaVinci workshop.  &lt;br /&gt;
&lt;br /&gt;
* Before starting on the labs, make sure to setup the [[ECE597_BeagleBoard_DSP_Software_Setup|BeagleBoard DSP]].  &lt;br /&gt;
** For Lab 5, the only required setup is the DVSDK ([http://focus.ti.com/docs/toolsw/folders/print/linuxdvsdk-dv.html Linux Digital Video Software Development Kit for DaVinci Devices]) and XDC Tools ([http://rtsc.eclipse.org/docs-tip/RTSC_Module_Primer eXtenDed C Tools])&lt;br /&gt;
&lt;br /&gt;
* Go to the class [https://myrhit.rose-hulman.edu/class/ece597/default.aspx SharePoint Site] and get&lt;br /&gt;
** DaVinci-OMAP_Workshop_v2.0.pdf&lt;br /&gt;
** tto_workshop_labs_(v2.00).tar&lt;br /&gt;
** makefile_profile.mak&lt;br /&gt;
&lt;br /&gt;
* Untar the labs file on your Linux host.  It will create two directories, '''workshop''' and '''solutions'''.  You will find the materials needed to do the labs below in the '''workshop''' directory.  The finished product for each lab can be found in the '''solutions''' directory.  The directions in '''DaVanci-OMAP_Workshop''' file will tell you which directory to use for each lab.&lt;br /&gt;
&lt;br /&gt;
These labs were originally done for the Digital Video Evaluation Module (DVEVM).  We will be adapting them for the BeagleBoard as we go.&lt;br /&gt;
&lt;br /&gt;
== Lab 05, gMake ==&lt;br /&gt;
&lt;br /&gt;
Lab 05 is on pages 125-157 of the DaVinci-OMAP_Workshop_v2.0.pdf file. Work through this lab.  You'll learn how '''make''' works.  Part C has an error in the solution, a workaround can be found [[User:Simonea|here]].  When you get to part D, compare my version of the make file ('''makefile_profile.mak.yoder''') to the one in the folder.  The workshop assumes you have NFS setup to share files between the DVEVM and the host computer.  Rather than share files, I've set up the makefile so use sftp and ssh to copy the executables to the Beagle when installing.  If you can at the NFS working, great!, otherwise use my setup. &lt;br /&gt;
&lt;br /&gt;
To get part '''d''' to compile correctly, you have to make sure all the path information is correct.  Make sure to edit '''setpaths.sh, setpaths.mak, and makefile_profile.mak'''.  Because Configuro is stubborn, you will still need to link 'arm_v5t_le-gcc' to 'arm-nonearm-none-linux-gnueabi-gcc' if it is to compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/user/CodeSourcery/Sourcery_G++_Lite/bin&lt;br /&gt;
ln -s arm-none-linux-gnueabi-gcc arm_v5t_le-gcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lab 06, Using the OSS Driver ==&lt;br /&gt;
&lt;br /&gt;
Lab 06 is on pages 171-186 of the DaVinci-OMAP_Workshop_v2.0.pdf file.  In doing this lab you will get audio from the line-in jack on the Beagle and sent it out the speaker jack.&lt;br /&gt;
* Go to the class [https://myrhit.rose-hulman.edu/class/ece597/default.aspx SharePoint Site] and get&lt;br /&gt;
** setpaths.mak&lt;br /&gt;
** setpaths.sh&lt;br /&gt;
&lt;br /&gt;
* Move the '''setpaths''' files in the workshop directory to another location.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
host $ cd workshop&lt;br /&gt;
host $ mv setpaths.sh setpaths.sh.orig&lt;br /&gt;
host $ mv setpaths.mak setpaths.mak.orig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Copy the setpaths files you got from SharePoint into the workshop directory. In Lab 6 you will edit these files so they are correct.&lt;br /&gt;
&lt;br /&gt;
You will still need the symbolic link from part 5, and make sure to update the file paths.  &lt;br /&gt;
&lt;br /&gt;
== Lab 07, Using Video Drivers ==&lt;br /&gt;
&lt;br /&gt;
=== Lab 07a - Writing to a Frame Buffer ===&lt;br /&gt;
&lt;br /&gt;
Lab 07a almost works on the Beagle.  You should be able to write to the frame buffer directly with a couple of changes.  Here are some hints about what to change:&lt;br /&gt;
&lt;br /&gt;
* The path to the frame buffer &amp;lt;code&amp;gt;/dev/fb...&amp;lt;/code&amp;gt; is different on the Beagle than in the code.  Look on the Beagle and find the right path.  Find the path in the code and change it.&lt;br /&gt;
* The code assumes an attribute frame.  I haven't found this on the Beagle, use #define's to remove the code that references the attribute frame.&lt;br /&gt;
* Initially I commented out the code that draws the circular frame.&lt;br /&gt;
&lt;br /&gt;
With these few changes your code should compile and when run it should display your picture on the Beagle.  I was surprised to find it even worked through the VNC.  I'm guessing X-windows just displays what's in the buffer.&lt;br /&gt;
&lt;br /&gt;
Here's some things to try to see if you understand how the code works.&lt;br /&gt;
&lt;br /&gt;
* The code sets the background color to black.  Make the background another color.&lt;br /&gt;
* Try getting &amp;lt;code&amp;gt;video_osd_circframe&amp;lt;/code&amp;gt; to work.&lt;br /&gt;
&lt;br /&gt;
=== Lab 07b - Recording Video ===&lt;br /&gt;
&lt;br /&gt;
Lab 07b almost works too.  There are a couple of &amp;lt;code&amp;gt;ioctl&amp;lt;/code&amp;gt; class that don't work with the web cam.  Just &amp;lt;code&amp;gt;#define&amp;lt;/code&amp;gt; them out.  Don't run the app too long, it's writing to /tmp and you might fill it up.&lt;br /&gt;
&lt;br /&gt;
=== Lab 07c - Video Playback ===&lt;br /&gt;
&lt;br /&gt;
== Lab 08, Multithread ==&lt;br /&gt;
&lt;br /&gt;
== Lab 09, Prebuilt Engine ==&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Listings_for_Chapter_7_xink</id>
		<title>ECE597 Listings for Chapter 7 xink</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Listings_for_Chapter_7_xink"/>
				<updated>2010-04-15T18:17:48Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with '{| ! Number ! Page ! Caption ! Listing |- | 7-1 | 7-4 | Simple C Function With Local Variable | &amp;lt;pre&amp;gt; int setup_memory_controller(board_info_t *p)     {     unsigned int *dram_co…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 7-1&lt;br /&gt;
| 7-4&lt;br /&gt;
| Simple C Function With Local Variable&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
int setup_memory_controller(board_info_t *p)&lt;br /&gt;
    {&lt;br /&gt;
    unsigned int *dram_controller_register = p-&amp;gt;dc_reg;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 7-2&lt;br /&gt;
| 7-4&lt;br /&gt;
| Linker Command Script-Reset Vector Placement .../board/omap3/beagle/u-boot.lds&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
OUTPUT_FORMAT(&amp;quot;elf32-littlearm&amp;quot;, &amp;quot;elf32-littlearm&amp;quot;, &amp;quot;elf32-littlearm&amp;quot;)&lt;br /&gt;
OUTPUT_ARCH(arm)&lt;br /&gt;
ENTRY(_start)&lt;br /&gt;
SECTIONS&lt;br /&gt;
{&lt;br /&gt;
	. = 0x00000000;&lt;br /&gt;
&lt;br /&gt;
	. = ALIGN(4);&lt;br /&gt;
	.text	:&lt;br /&gt;
	{&lt;br /&gt;
		cpu/arm_cortexa8/start.o	(.text)&lt;br /&gt;
		*(.text)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 7-3&lt;br /&gt;
| 7-5&lt;br /&gt;
| Reset Vectors …/cpu/arm_cortexa8/start.S&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
.globl _start&lt;br /&gt;
_start: &lt;br /&gt;
		b	reset&lt;br /&gt;
		ldr	pc, _undefined_instruction&lt;br /&gt;
		ldr	pc, _software_interrupt&lt;br /&gt;
		ldr	pc, _prefetch_abort&lt;br /&gt;
		ldr	pc, _data_abort&lt;br /&gt;
		ldr	pc, _not_used&lt;br /&gt;
		ldr	pc, _irq&lt;br /&gt;
		ldr	pc, _fiq&lt;br /&gt;
_undefined_instruction: .word undefined_instruction&lt;br /&gt;
_software_interrupt:	.word software_interrupt&lt;br /&gt;
…&lt;br /&gt;
_pad:			.word 0x12345678 /* now 16*4=64 */&lt;br /&gt;
.global _end_vect&lt;br /&gt;
_end_vect:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 7-4&lt;br /&gt;
| 7-9&lt;br /&gt;
| Portions of U-Boot Board-Configuration Header File …/incluyde/configs/omap3_beagle.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * High Level Configuration Options&lt;br /&gt;
 */&lt;br /&gt;
#define CONFIG_ARMCORTEXA8	1	/* This is an ARM V7 CPU core */&lt;br /&gt;
#define CONFIG_OMAP		1	/* in a TI OMAP core */&lt;br /&gt;
#define CONFIG_OMAP34XX		1	/* which is a 34XX */&lt;br /&gt;
#define CONFIG_OMAP3430		1	/* which is in a 3430 */&lt;br /&gt;
#define CONFIG_OMAP3_BEAGLE	1	/* working with BEAGLE */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;asm/arch/cpu.h&amp;gt;		/* get chip and board defs */&lt;br /&gt;
#include &amp;lt;asm/arch/omap3.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Display CPU and Board information&lt;br /&gt;
 */&lt;br /&gt;
#define CONFIG_DISPLAY_CPUINFO		1&lt;br /&gt;
#define CONFIG_DISPLAY_BOARDINFO	1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Listings_for_Chapter_5_xink</id>
		<title>ECE597 Listings for Chapter 5 xink</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Listings_for_Chapter_5_xink"/>
				<updated>2010-04-02T01:45:17Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with 'Category:ECE597  {| ! Number ! Page ! Caption ! Listing |- | 5-1 | 5-2 | Final Kernel Build Sequence:  ARM/BeagleBoard | &amp;lt;pre&amp;gt; $ export OETREE=&amp;quot;${HOME}/oe&amp;quot; $ PATH=${OETREE}/a…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE597]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 5-1&lt;br /&gt;
| 5-2&lt;br /&gt;
| Final Kernel Build Sequence:  ARM/BeagleBoard&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
... &amp;lt; many build steps omitted for clarity &amp;gt;&lt;br /&gt;
    CC      lib/vsprintf.o&lt;br /&gt;
  AR      lib/lib.a&lt;br /&gt;
  LD      vmlinux.o&lt;br /&gt;
  MODPOST vmlinux.o&lt;br /&gt;
  GEN     .version&lt;br /&gt;
  CHK     include/linux/compile.h&lt;br /&gt;
  UPD     include/linux/compile.h&lt;br /&gt;
  CC      init/version.o&lt;br /&gt;
  LD      init/built-in.o&lt;br /&gt;
  LD      .tmp_vmlinux1&lt;br /&gt;
  KSYM    .tmp_kallsyms1.S&lt;br /&gt;
  AS      .tmp_kallsyms1.o&lt;br /&gt;
  LD      .tmp_vmlinux2&lt;br /&gt;
  KSYM    .tmp_kallsyms2.S&lt;br /&gt;
  AS      .tmp_kallsyms2.o&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Fri Apr  2 00:19:32 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2991200 Bytes = 2921.09 kB = 2.85 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-2&lt;br /&gt;
| 5-5&lt;br /&gt;
| Assembly File .../arch/arm/boot/compressed/piggy.S&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
        .section .piggydata,#alloc&lt;br /&gt;
        .globl  input_data&lt;br /&gt;
input_data:&lt;br /&gt;
        .incbin &amp;quot;arch/arm/boot/compressed/piggy.gz&amp;quot;&lt;br /&gt;
        .globl  input_data_end&lt;br /&gt;
input_data_end:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-3&lt;br /&gt;
| 5-7&lt;br /&gt;
| Final Kernel Build Sequence:  ARM/BeagleBoard&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
reading uImage                                                                                                       &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
2996196 bytes read                                                                                                   &lt;br /&gt;
## Booting kernel from Legacy Image at 80300000 ...                                                                  &lt;br /&gt;
   Image Name:   Angstrom/2.6.29/beagleboard                                                                         &lt;br /&gt;
   Image Type:   ARM Linux Kernel Image (uncompressed)                                                               &lt;br /&gt;
   Data Size:    2996132 Bytes =  2.9 MB                                                                             &lt;br /&gt;
   Load Address: 80008000                                                                                            &lt;br /&gt;
   Entry Point:  80008000                                                                                            &lt;br /&gt;
   Verifying Checksum ... OK                                                                                         &lt;br /&gt;
   Loading Kernel Image ... OK                                                                                       &lt;br /&gt;
OK                                                                                                                   &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
Starting kernel ...                                                                                                  &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
Uncompressing Linux..................................................................................................&lt;br /&gt;
[    0.000000] Linux version 2.6.29-omap1 (koen@dominion) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Wed Oct 21 13:11:52 9&lt;br /&gt;
[    0.000000] CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c5387f                                       &lt;br /&gt;
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache                                  &lt;br /&gt;
[    0.000000] Machine: OMAP3 Beagle Board                                                                           &lt;br /&gt;
[    0.000000] Memory policy: ECC disabled, Data cache writeback                                                     &lt;br /&gt;
[    0.000000] OMAP3430 ES3.1                                                                                        &lt;br /&gt;
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xd7000000 size: 0x100000                                            &lt;br /&gt;
[    0.000000] Reserving 14680064 bytes SDRAM for VRAM                                                               &lt;br /&gt;
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024                            &lt;br /&gt;
[    0.000000] Kernel command line: console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootw0&lt;br /&gt;
[    0.000000] Clocking rate (Crystal/DPLL/ARM core): 26.0/332/720 MHz                                               &lt;br /&gt;
[    0.000000] GPMC revision 5.0                                                                                     &lt;br /&gt;
[    0.000000] IRQ: Found an INTC at 0xd8200000 (revision 4.0) with 96 interrupts                                    &lt;br /&gt;
[    0.000000] Total of 96 interrupts on 1 active controller                                                         &lt;br /&gt;
[    0.000000] OMAP34xx GPIO hardware version 2.5                                                                    &lt;br /&gt;
[    0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)                                                  &lt;br /&gt;
[    0.000000] OMAP clockevent source: GPTIMER12 at 32768 Hz                                                         &lt;br /&gt;
[    0.000000] Console: colour dummy device 80x30                                                                    &lt;br /&gt;
[    0.000000] console [tty0] enabled                                                                                &lt;br /&gt;
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)                                       &lt;br /&gt;
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)                                         &lt;br /&gt;
[    0.000000] Memory: 128MB 128MB = 256MB total                                                                     &lt;br /&gt;
[    0.000000] Memory: 238848KB available (5632K code, 576K data, 204K init)                                         &lt;br /&gt;
[    0.000000] Calibrating delay loop... 750.98 BogoMIPS (lpj=2932736)                                               &lt;br /&gt;
[    0.000000] Mount-cache hash table entries: 512                                                                   &lt;br /&gt;
[    0.000000] CPU: Testing write buffer coherency: ok                                                               &lt;br /&gt;
[    0.000000] net_namespace: 1036 bytes                                                                             &lt;br /&gt;
[    0.000000] regulator: core version 0.5                                                                           &lt;br /&gt;
[    0.000000] NET: Registered protocol family 16                                                                    &lt;br /&gt;
[    0.000000] GPIO-156 autorequested                                                                                &lt;br /&gt;
[    0.000000] GPIO-159 autorequested                                                                                &lt;br /&gt;
[    0.000000] Found NAND on CS0                                                                                     &lt;br /&gt;
[    0.000000] Registering NAND on CS0                                                                               &lt;br /&gt;
[   17.966888] OMAP DMA hardware revision 4.0                                                                        &lt;br /&gt;
[   18.000305] bio: create slab &amp;lt;bio-0&amp;gt; at 0                                                                         &lt;br /&gt;
[   18.061981] OMAP DSS rev 2.0                                                                                      &lt;br /&gt;
[   18.062103] OMAP DISPC rev 3.0                                                                                    &lt;br /&gt;
[   18.062133] OMAP VENC rev 2                                                                                       &lt;br /&gt;
[   18.062255] OMAP DSI rev 1.0                                                                                      &lt;br /&gt;
[   18.078216] i2c_omap i2c_omap.1: bus 1 rev3.12 at 2600 kHz                                                        &lt;br /&gt;
[   18.081542] twl4030: PIH (irq 7) chaining IRQs 368..375                                                           &lt;br /&gt;
[   18.081604] twl4030: power (irq 373) chaining IRQs 376..383                                                       &lt;br /&gt;
[   18.082092] twl4030: gpio (irq 368) chaining IRQs 384..401                                                        &lt;br /&gt;
[   18.084442] regulator: VMMC1: 1850 &amp;lt;--&amp;gt; 3150 mV normal standby                                                    &lt;br /&gt;
[   18.085235] regulator: VDAC: 1800 mV normal standby                                                               &lt;br /&gt;
[   18.085968] regulator: VUSB1V5: 1500 &amp;lt;--&amp;gt; 0 mV normal standby                                                     &lt;br /&gt;
[   18.086822] regulator: VUSB1V8: 1800 &amp;lt;--&amp;gt; 0 mV normal standby                                                     &lt;br /&gt;
[   18.087585] regulator: VUSB3V1: 3100 &amp;lt;--&amp;gt; 0 mV normal standby                                                     &lt;br /&gt;
[   18.088287] regulator: VPLL2: 1800 mV normal standby                                                              &lt;br /&gt;
[   18.089050] regulator: VMMC2: 2800 &amp;lt;--&amp;gt; 3150 mV normal standby                                                    &lt;br /&gt;
[   18.089813] regulator: VSIM: 1800 &amp;lt;--&amp;gt; 3000 mV normal standby                                                     &lt;br /&gt;
[   18.089996] i2c_omap i2c_omap.2: bus 2 rev3.12 at 400 kHz                                                         &lt;br /&gt;
[   18.102722] i2c_omap i2c_omap.3: bus 3 rev3.12 at 100 kHz                                                         &lt;br /&gt;
[   18.104492] SCSI subsystem initialized                                                                            &lt;br /&gt;
[   18.107452] twl4030_usb twl4030_usb: Initialized TWL4030 USB module                                               &lt;br /&gt;
[   18.108764] usbcore: registered new interface driver usbfs                                                        &lt;br /&gt;
[   18.109252] usbcore: registered new interface driver hub                                                          &lt;br /&gt;
[   18.109619] usbcore: registered new device driver usb                                                             &lt;br /&gt;
[   18.112121] Bluetooth: Core ver 2.14                                                                              &lt;br /&gt;
[   18.112548] NET: Registered protocol family 31                                                                    &lt;br /&gt;
[   18.112579] Bluetooth: HCI device and connection manager initialized                                              &lt;br /&gt;
[   18.112640] Bluetooth: HCI socket layer initialized                                                               &lt;br /&gt;
[   18.113250] cfg80211: Using static regulatory domain info                                                         &lt;br /&gt;
[   18.113281] cfg80211: Regulatory domain: US                                                                       &lt;br /&gt;
[   18.113311]  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)                                    &lt;br /&gt;
[   18.113342]  (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)                                         &lt;br /&gt;
[   18.113403]  (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)                                         &lt;br /&gt;
[   18.113433]  (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)                                         &lt;br /&gt;
[   18.113464]  (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)                                         &lt;br /&gt;
[   18.113494]  (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)                                         &lt;br /&gt;
[   18.113525]  (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)                                         &lt;br /&gt;
[   18.113586] cfg80211: Calling CRDA for country: US                                                                &lt;br /&gt;
[   18.116333] musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0                                      &lt;br /&gt;
[   18.118591] musb_hdrc: USB OTG mode controller at d80ab000 using DMA, IRQ 92                                      &lt;br /&gt;
[   18.119873] NET: Registered protocol family 2                                                                     &lt;br /&gt;
[   18.120117] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)                                        &lt;br /&gt;
[   18.120635] TCP established hash table entries: 8192 (order: 4, 65536 bytes)                                      &lt;br /&gt;
[   18.120849] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)                                             &lt;br /&gt;
[   18.120971] TCP: Hash tables configured (established 8192 bind 8192)                                              &lt;br /&gt;
[   18.121002] TCP reno registered                                                                                   &lt;br /&gt;
[   18.121215] NET: Registered protocol family 1                                                                     &lt;br /&gt;
[   18.124542] VFS: Disk quotas dquot_6.5.2                                                                          &lt;br /&gt;
[   18.124664] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)                                            &lt;br /&gt;
[   18.125152] squashfs: version 4.0 (2009/01/31) Phillip Lougher                                                    &lt;br /&gt;
[   18.125762] JFFS2 version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.                                       &lt;br /&gt;
[   18.126495] msgmni has been set to 466                                                                            &lt;br /&gt;
[   18.130279] alg: No test for stdrng (krng)                                                                        &lt;br /&gt;
[   18.130401] io scheduler noop registered                                                                          &lt;br /&gt;
[   18.130432] io scheduler anticipatory registered                                                                  &lt;br /&gt;
[   18.130462] io scheduler deadline registered                                                                      &lt;br /&gt;
[   18.130645] io scheduler cfq registered (default)                                                                 &lt;br /&gt;
[   18.149841] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled                                               &lt;br /&gt;
[   18.172973] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654                                        &lt;br /&gt;
[   18.194763] serial8250.0: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654                                        &lt;br /&gt;
[   18.217071] serial8250.0: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654                                        &lt;br /&gt;
[   18.217132] console [ttyS2] enabled                                                                               &lt;br /&gt;
[   18.747802] brd: module loaded                                                                                    &lt;br /&gt;
[   18.755737] loop: module loaded                                                                                   &lt;br /&gt;
[   18.759490] enc28j60 spi4.0: enc28j60 Ethernet driver 1.01 loaded                                                 &lt;br /&gt;
[   18.768646] enc28j60 spi4.0: enc28j60 chip not found                                                              &lt;br /&gt;
[   18.773681] enc28j60: probe of spi4.0 failed with error -5                                                        &lt;br /&gt;
[   18.779785] usbcore: registered new interface driver catc                                                         &lt;br /&gt;
[   18.785308] catc: v2.8:CATC EL1210A NetMate USB Ethernet driver                                                   &lt;br /&gt;
[   18.791564] usbcore: registered new interface driver kaweth                                                       &lt;br /&gt;
[   18.797180] pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver                                 &lt;br /&gt;
[   18.804992] usbcore: registered new interface driver pegasus                                                      &lt;br /&gt;
[   18.810760] rtl8150: v0.6.2 (2004/08/27):rtl8150 based usb-ethernet driver                                        &lt;br /&gt;
[   18.817932] usbcore: registered new interface driver rtl8150                                                      &lt;br /&gt;
[   18.823883] usbcore: registered new interface driver asix                                                         &lt;br /&gt;
[   18.829559] usbcore: registered new interface driver cdc_ether                                                    &lt;br /&gt;
[   18.835723] usbcore: registered new interface driver dm9601                                                       &lt;br /&gt;
[   18.841613] usbcore: registered new interface driver smsc95xx                                                     &lt;br /&gt;
[   18.847686] usbcore: registered new interface driver gl620a                                                       &lt;br /&gt;
[   18.853515] usbcore: registered new interface driver net1080                                                      &lt;br /&gt;
[   18.859497] usbcore: registered new interface driver plusb                                                        &lt;br /&gt;
[   18.865295] usbcore: registered new interface driver rndis_host                                                   &lt;br /&gt;
[   18.871520] usbcore: registered new interface driver cdc_subset                                                   &lt;br /&gt;
[   18.877777] usbcore: registered new interface driver zaurus                                                       &lt;br /&gt;
[   18.883605] usbcore: registered new interface driver MOSCHIP usb-ethernet driver                                  &lt;br /&gt;
[   18.891357] Broadcom 43xx driver loaded [ Features: L, Firmware-ID: FW13 ]                                        &lt;br /&gt;
[   18.898681] usbcore: registered new interface driver zd1211rw                                                     &lt;br /&gt;
[   18.904754] usbcore: registered new interface driver rtl8187                                                      &lt;br /&gt;
[   18.910766] usbcore: registered new interface driver rndis_wlan                                                   &lt;br /&gt;
[   18.916992] usbcore: registered new interface driver zd1201                                                       &lt;br /&gt;
[   18.922882] usbcore: registered new interface driver usb8xxx                                                      &lt;br /&gt;
[   18.928894] usbcore: registered new interface driver rt2500usb                                                    &lt;br /&gt;
[   18.935058] usbcore: registered new interface driver rt73usb                                                      &lt;br /&gt;
[   18.941070] usbcore: registered new interface driver p54usb                                                       &lt;br /&gt;
[   18.946685] i2c /dev entries driver                                                                               &lt;br /&gt;
[   18.951751] Driver 'sd' needs updating - please use bus_type methods                                              &lt;br /&gt;
[   18.958465] Driver 'sr' needs updating - please use bus_type methods                                              &lt;br /&gt;
[   18.965759] omap2-nand driver initializing                                                                        &lt;br /&gt;
[   18.970184] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB 1,8V 16-bit)                    &lt;br /&gt;
[   18.979248] cmdlinepart partition parsing not available                                                           &lt;br /&gt;
[   18.984527] Creating 5 MTD partitions on &amp;quot;omap2-nand&amp;quot;:                                                            &lt;br /&gt;
[   18.989746] 0x000000000000-0x000000080000 : &amp;quot;X-Loader&amp;quot;                                                            &lt;br /&gt;
[   18.996765] 0x000000080000-0x000000260000 : &amp;quot;U-Boot&amp;quot;                                                              &lt;br /&gt;
[   19.003692] 0x000000260000-0x000000280000 : &amp;quot;U-Boot Env&amp;quot;                                                          &lt;br /&gt;
[   19.010192] 0x000000280000-0x000000680000 : &amp;quot;Kernel&amp;quot;                                                              &lt;br /&gt;
[   19.018005] 0x000000680000-0x000010000000 : &amp;quot;File System&amp;quot;                                                         &lt;br /&gt;
[   19.135314] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                                            &lt;br /&gt;
[   19.142211] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller                                                      &lt;br /&gt;
[   19.148773] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1                                  &lt;br /&gt;
[   19.156585] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800                                                      &lt;br /&gt;
[   19.173980] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00                                                     &lt;br /&gt;
[   19.180419] usb usb1: configuration #1 chosen from 1 choice                                                       &lt;br /&gt;
[   19.186462] hub 1-0:1.0: USB hub found                                                                            &lt;br /&gt;
[   19.190368] hub 1-0:1.0: 3 ports detected                                                                         &lt;br /&gt;
[   19.196166] Initializing USB Mass Storage driver...                                                               &lt;br /&gt;
[   19.201507] usbcore: registered new interface driver usb-storage                                                  &lt;br /&gt;
[   19.207611] USB Mass Storage support registered.                                                                  &lt;br /&gt;
[   19.212829] mice: PS/2 mouse device common for all mice                                                           &lt;br /&gt;
[   19.218688] input: gpio-keys as /devices/platform/gpio-keys/input/input0                                          &lt;br /&gt;
[   19.227600] input: twl4030_pwrbutton as /devices/platform/i2c_omap.1/i2c-adapter/i2c-1/1-0049/twl4030_pwrbutton/i1&lt;br /&gt;
[   19.519744] usb 1-2: new high speed USB device using ehci-omap and address 2                                      &lt;br /&gt;
[   19.683166] usb 1-2: configuration #1 chosen from 1 choice                                                        &lt;br /&gt;
[   19.689208] hub 1-2:1.0: USB hub found                                                                            &lt;br /&gt;
[   19.693237] hub 1-2:1.0: 4 ports detected                                                                         &lt;br /&gt;
[   19.986877] usb 1-2.2: new high speed USB device using ehci-omap and address 3                                    &lt;br /&gt;
[   20.126037] usb 1-2.2: configuration #1 chosen from 1 choice                                                      &lt;br /&gt;
[   20.236846] i2c_omap i2c_omap.2: controller timed out                                                             &lt;br /&gt;
[   20.242004] rtc-ds1307: probe of 2-0068 failed with error -5                                                      &lt;br /&gt;
[   20.249267] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec                                                  &lt;br /&gt;
[   20.255615] Bluetooth: HCI UART driver ver 2.2                                                                    &lt;br /&gt;
[   20.260162] Bluetooth: HCI H4 protocol initialized                                                                &lt;br /&gt;
[   20.264984] Bluetooth: HCI BCSP protocol initialized                                                              &lt;br /&gt;
[   20.270050] Bluetooth: HCILL protocol initialized                                                                 &lt;br /&gt;
[   20.274810] Bluetooth: Broadcom Blutonium firmware driver ver 1.2                                                 &lt;br /&gt;
[   20.281280] usbcore: registered new interface driver bcm203x                                                      &lt;br /&gt;
[   20.287048] Bluetooth: Digianswer Bluetooth USB driver ver 0.10                                                   &lt;br /&gt;
[   20.293273] usbcore: registered new interface driver bpa10x                                                       &lt;br /&gt;
[   20.298950] Bluetooth: BlueFRITZ! USB driver ver 1.2                                                              &lt;br /&gt;
[   20.304199] usbcore: registered new interface driver bfusb                                                        &lt;br /&gt;
[   20.309967] Bluetooth: Generic Bluetooth USB driver ver 0.4                                                       &lt;br /&gt;
[   20.316009] usbcore: registered new interface driver btusb                                                        &lt;br /&gt;
[   20.321563] Bluetooth: Generic Bluetooth SDIO driver ver 0.1                                                      &lt;br /&gt;
[   20.328247] mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock                                             &lt;br /&gt;
[   20.440093] mmci-omap-hs mmci-omap-hs.1: Failed to get debounce clock                                             &lt;br /&gt;
[   20.446685] regulator: Unable to get requested regulator: vmmc_aux                                                &lt;br /&gt;
[   20.455291] Registered led device: beagleboard::usr0                                                              &lt;br /&gt;
[   20.460571] Registered led device: beagleboard::usr1                                                              &lt;br /&gt;
[   20.471374] usbcore: registered new interface driver usbhid                                                       &lt;br /&gt;
[   20.477020] usbhid: v2.6:USB HID core driver                                                                      &lt;br /&gt;
[   20.482543] Advanced Linux Sound Architecture Driver Version 1.0.18a.                                             &lt;br /&gt;
[   20.489898] usbcore: registered new interface driver snd-usb-audio                                                &lt;br /&gt;
[   20.496551] No device for DAI twl4030                                                                             &lt;br /&gt;
[   20.500274] No device for DAI omap-mcbsp-dai-0                                                                    &lt;br /&gt;
[   20.504913] No device for DAI omap-mcbsp-dai-1                                                                    &lt;br /&gt;
[   20.509399] No device for DAI omap-mcbsp-dai-2                                                                    &lt;br /&gt;
[   20.513977] No device for DAI omap-mcbsp-dai-3                                                                    &lt;br /&gt;
[   20.518493] No device for DAI omap-mcbsp-dai-4                                                                    &lt;br /&gt;
[   20.522979] OMAP3 Beagle SoC init                                                                                 &lt;br /&gt;
[   20.526733] TWL4030 Audio Codec init                                                                              &lt;br /&gt;
[   20.531555] asoc: twl4030 &amp;lt;-&amp;gt; omap-mcbsp-dai-0 mapping ok                                                         &lt;br /&gt;
[   20.545837] ALSA device list:                                                                                     &lt;br /&gt;
[   20.548858]   #0: omap3beagle (twl4030)                                                                           &lt;br /&gt;
[   20.553192] oprofile: using arm/armv7                                                                             &lt;br /&gt;
[   20.557220] TCP cubic registered                                                                                  &lt;br /&gt;
[   20.560485] NET: Registered protocol family 17                                                                    &lt;br /&gt;
[   20.565032] NET: Registered protocol family 15                                                                    &lt;br /&gt;
[   20.569580] Bluetooth: L2CAP ver 2.11                                                                             &lt;br /&gt;
[   20.573303] Bluetooth: L2CAP socket layer initialized                                                             &lt;br /&gt;
[   20.578430] Bluetooth: SCO (Voice Link) ver 0.6                                                                   &lt;br /&gt;
[   20.583038] Bluetooth: SCO socket layer initialized                                                               &lt;br /&gt;
[   20.593780] Bluetooth: RFCOMM socket layer initialized                                                            &lt;br /&gt;
[   20.599060] Bluetooth: RFCOMM TTY layer initialized                                                               &lt;br /&gt;
[   20.604095] Bluetooth: RFCOMM ver 1.10                                                                            &lt;br /&gt;
[   20.607879] Bluetooth: BNEP (Ethernet Emulation) ver 1.3                                                          &lt;br /&gt;
[   20.613281] Bluetooth: BNEP filters: protocol multicast                                                           &lt;br /&gt;
[   20.618560] Bluetooth: HIDP (Human Interface Emulation) ver 1.2                                                   &lt;br /&gt;
[   20.627746] RPC: Registered udp transport module.                                                                 &lt;br /&gt;
[   20.632507] RPC: Registered tcp transport module.                                                                 &lt;br /&gt;
[   20.637634] lib80211: common routines for IEEE802.11 drivers                                                      &lt;br /&gt;
[   20.643463] ThumbEE CPU extension supported.                                                                      &lt;br /&gt;
[   20.647766] Power Management for TI OMAP3.                                                                        &lt;br /&gt;
[   20.658599] Disabling unused clock &amp;quot;sr2_fck&amp;quot;                                                                      &lt;br /&gt;
[   20.662933] Disabling unused clock &amp;quot;sr1_fck&amp;quot;                                                                      &lt;br /&gt;
[   20.667266] Disabling unused clock &amp;quot;mcbsp_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.671783] Disabling unused clock &amp;quot;mcbsp_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.676300] Disabling unused clock &amp;quot;mcbsp_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.680786] Disabling unused clock &amp;quot;mcbsp_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.685302] Disabling unused clock &amp;quot;mcbsp_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.689788] Disabling unused clock &amp;quot;mcbsp_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.694274] Disabling unused clock &amp;quot;gpt2_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.698730] Disabling unused clock &amp;quot;gpt3_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.703125] Disabling unused clock &amp;quot;gpt4_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.707550] Disabling unused clock &amp;quot;gpt5_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.711944] Disabling unused clock &amp;quot;gpt6_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.716369] Disabling unused clock &amp;quot;gpt7_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.720794] Disabling unused clock &amp;quot;gpt8_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.725189] Disabling unused clock &amp;quot;gpt9_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.729827] Disabling unused clock &amp;quot;wdt3_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.734222] Disabling unused clock &amp;quot;wdt3_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.738647] Disabling unused clock &amp;quot;gpio2_dbck&amp;quot;                                                                   &lt;br /&gt;
[   20.743225] Disabling unused clock &amp;quot;gpio3_dbck&amp;quot;                                                                   &lt;br /&gt;
[   20.747802] Disabling unused clock &amp;quot;gpio4_dbck&amp;quot;                                                                   &lt;br /&gt;
[   20.752410] Disabling unused clock &amp;quot;gpio5_dbck&amp;quot;                                                                   &lt;br /&gt;
[   20.756988] Disabling unused clock &amp;quot;gpio6_dbck&amp;quot;                                                                   &lt;br /&gt;
[   20.761596] Disabling unused clock &amp;quot;gpt9_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.765991] Disabling unused clock &amp;quot;gpt8_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.770416] Disabling unused clock &amp;quot;gpt7_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.774810] Disabling unused clock &amp;quot;gpt6_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.779235] Disabling unused clock &amp;quot;gpt5_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.783660] Disabling unused clock &amp;quot;gpt4_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.788055] Disabling unused clock &amp;quot;gpt3_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.792480] Disabling unused clock &amp;quot;gpt2_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.796875] Disabling unused clock &amp;quot;gpt1_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.801300] Disabling unused clock &amp;quot;wdt1_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.805694] Disabling unused clock &amp;quot;wdt2_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.810119] Disabling unused clock &amp;quot;wdt2_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.814544] Disabling unused clock &amp;quot;gpio1_dbck&amp;quot;                                                                   &lt;br /&gt;
[   20.819122] Disabling unused clock &amp;quot;gpt1_fck&amp;quot;                                                                     &lt;br /&gt;
[   20.823730] Disabling unused clock &amp;quot;cam_ick&amp;quot;                                                                      &lt;br /&gt;
[   20.828063] Disabling unused clock &amp;quot;cam_mclk&amp;quot;                                                                     &lt;br /&gt;
[   20.832519] Disabling unused clock &amp;quot;des1_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.836914] Disabling unused clock &amp;quot;sha11_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.841430] Disabling unused clock &amp;quot;rng_ick&amp;quot;                                                                      &lt;br /&gt;
[   20.845764] Disabling unused clock &amp;quot;aes1_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.850158] Disabling unused clock &amp;quot;ssi_ick&amp;quot;                                                                      &lt;br /&gt;
[   20.854492] Disabling unused clock &amp;quot;mailboxes_ick&amp;quot;                                                                &lt;br /&gt;
[   20.859313] Disabling unused clock &amp;quot;mcbsp_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.863830] Disabling unused clock &amp;quot;mcbsp_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.868316] Disabling unused clock &amp;quot;gpt10_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.872833] Disabling unused clock &amp;quot;gpt11_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.877349] Disabling unused clock &amp;quot;hdq_ick&amp;quot;                                                                      &lt;br /&gt;
[   20.881652] Disabling unused clock &amp;quot;mspro_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.886169] Disabling unused clock &amp;quot;des2_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.890563] Disabling unused clock &amp;quot;sha12_ick&amp;quot;                                                                    &lt;br /&gt;
[   20.895080] Disabling unused clock &amp;quot;aes2_ick&amp;quot;                                                                     &lt;br /&gt;
[   20.899475] Disabling unused clock &amp;quot;icr_ick&amp;quot;                                                                      &lt;br /&gt;
[   20.903808] Disabling unused clock &amp;quot;pka_ick&amp;quot;                                                                      &lt;br /&gt;
[   20.908111] Disabling unused clock &amp;quot;ssi_ssr_fck&amp;quot;                                                                  &lt;br /&gt;
[   20.912811] Disabling unused clock &amp;quot;hdq_fck&amp;quot;                                                                      &lt;br /&gt;
[   20.917327] Disabling unused clock &amp;quot;mcbsp_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.921813] Disabling unused clock &amp;quot;mcbsp_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.926330] Disabling unused clock &amp;quot;mspro_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.930816] Disabling unused clock &amp;quot;gpt11_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.935333] Disabling unused clock &amp;quot;gpt10_fck&amp;quot;                                                                    &lt;br /&gt;
[   20.939849] Disabling unused clock &amp;quot;dpll4_m6x2_ck&amp;quot;                                                                &lt;br /&gt;
[   20.944702] Disabling unused clock &amp;quot;dpll3_m3x2_ck&amp;quot;                                                                &lt;br /&gt;
[   20.949554] Disabling unused clock &amp;quot;sys_clkout1&amp;quot;                                                                  &lt;br /&gt;
[   20.954254] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1                               &lt;br /&gt;
[   20.968780] registered taskstats version 1                                                                        &lt;br /&gt;
[   20.974121] fbcvt: 1024x768@60: CVT Name - .786M3-R                                                               &lt;br /&gt;
[   21.001678] Console: switching to colour frame buffer device 128x48                                               &lt;br /&gt;
[   21.019104] clock: clksel_round_rate_div: dpll4_m4_ck target_rate 48000000                                        &lt;br /&gt;
[   21.026214] clock: new_div = 9, new_rate = 48000000                                                               &lt;br /&gt;
[   21.034088] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)                                               &lt;br /&gt;
[   21.056976] mmc0: new high speed SD card at address 1145                                                          &lt;br /&gt;
[   21.063049] mmcblk0: mmc0:1145 SD02G 1.83 GiB                                                                     &lt;br /&gt;
[   21.067962]  mmcblk0: p1 p2                                                                                       &lt;br /&gt;
[   21.294006] eth0 (asix): not using net_device_ops yet                                                             &lt;br /&gt;
[   21.299926] eth0: register 'asix' at usb-ehci-omap.0-2.2, ASIX AX88772 USB 2.0 Ethernet, 00:50:b6:06:c4:57        &lt;br /&gt;
[   21.393066] usb 1-2.4: new high speed USB device using ehci-omap and address 4                                    &lt;br /&gt;
[   21.518951] usb 1-2.4: configuration #1 chosen from 1 choice                                                      &lt;br /&gt;
[   21.526580] hub 1-2.4:1.0: USB hub found                                                                          &lt;br /&gt;
[   21.531372] hub 1-2.4:1.0: 4 ports detected                                                                       &lt;br /&gt;
[   21.823577] usb 1-2.4.1: new low speed USB device using ehci-omap and address 5                                   &lt;br /&gt;
[   21.953704] usb 1-2.4.1: configuration #1 chosen from 1 choice                                                    &lt;br /&gt;
[   21.967559] input: Logitech Optical USB Mouse as /devices/platform/ehci-omap.0/usb1/1-2/1-2.4/1-2.4.1/1-2.4.1:1.02&lt;br /&gt;
[   21.986114] generic-usb 0003:046D:C016.0001: input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-ehci-0&lt;br /&gt;
[   22.088409] usb 1-2.4.2: new low speed USB device using ehci-omap and address 6                                   &lt;br /&gt;
[   22.219512] usb 1-2.4.2: configuration #1 chosen from 1 choice                                                    &lt;br /&gt;
[   22.235900] input: HID 04f3:0103 as /devices/platform/ehci-omap.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/input/input3 &lt;br /&gt;
[   22.250885] generic-usb 0003:04F3:0103.0002: input: USB HID v1.10 Keyboard [HID 04f3:0103] on usb-ehci-omap.0-2.40&lt;br /&gt;
[   22.276123] input: HID 04f3:0103 as /devices/platform/ehci-omap.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.1/input/input4 &lt;br /&gt;
[   22.292663] generic-usb 0003:04F3:0103.0003: input: USB HID v1.10 Device [HID 04f3:0103] on usb-ehci-omap.0-2.4.21&lt;br /&gt;
[   26.784179] kjournald starting.  Commit interval 5 seconds                                                        &lt;br /&gt;
[   26.829589] EXT3 FS on mmcblk0p2, internal journal                                                                &lt;br /&gt;
[   26.839569] EXT3-fs: recovery complete.                                                                           &lt;br /&gt;
[   27.092559] EXT3-fs: mounted filesystem with ordered data mode.                                                   &lt;br /&gt;
[   27.103057] VFS: Mounted root (ext3 filesystem) on device 179:2.                                                  &lt;br /&gt;
[   27.113800] Freeing init memory: 204K                                                                             &lt;br /&gt;
[   34.775878] uncorrectable error : &amp;lt;3&amp;gt;end_request: I/O error, dev mtdblock0, sector 0                              &lt;br /&gt;
[   34.783721] Buffer I/O error on device mtdblock0, logical block 0                                                 &lt;br /&gt;
[   35.148834] uncorrectable error : &amp;lt;3&amp;gt;end_request: I/O error, dev mtdblock0, sector 8                              &lt;br /&gt;
[   35.156768] Buffer I/O error on device mtdblock0, logical block 1                                                 &lt;br /&gt;
[   35.267791] uncorrectable error : &amp;lt;3&amp;gt;end_request: I/O error, dev mtdblock0, sector 16                             &lt;br /&gt;
[   35.275726] Buffer I/O error on device mtdblock0, logical block 2                                                 &lt;br /&gt;
[   35.331329] uncorrectable error : &amp;lt;3&amp;gt;end_request: I/O error, dev mtdblock0, sector 24                             &lt;br /&gt;
[   35.339263] Buffer I/O error on device mtdblock0, logical block 3                                                 &lt;br /&gt;
[   35.394592] uncorrectable error : &amp;lt;3&amp;gt;end_request: I/O error, dev mtdblock0, sector 0                              &lt;br /&gt;
[   35.402435] Buffer I/O error on device mtdblock0, logical block 0                                                 &lt;br /&gt;
[   36.684143] FAT: IO charset iso8859-1 not found                                                                   &lt;br /&gt;
[   39.959899] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   39.994750] irda: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   40.005432] ircomm: disagrees about version of symbol struct_module                                               &lt;br /&gt;
[   40.017547] ircomm_tty: disagrees about version of symbol struct_module                                           &lt;br /&gt;
[   41.687622] eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1                                                       &lt;br /&gt;
[   41.948944] eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1                                                       &lt;br /&gt;
[   42.976959] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   43.062438] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   44.849395] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   45.715362] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   45.858184] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   45.925842] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
[   46.094299] ipv6: disagrees about version of symbol struct_module                                                 &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
.-------.                                                                                                            &lt;br /&gt;
|       |                  .-.                                                                                       &lt;br /&gt;
|   |   |-----.-----.-----.| |   .----..-----.-----.                                                                 &lt;br /&gt;
|       |     | __  |  ---'| '--.|  .-'|     |     |                                                                 &lt;br /&gt;
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |                                                                 &lt;br /&gt;
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'                                                                 &lt;br /&gt;
                -'  |                                                                                                &lt;br /&gt;
                '---'                                                                                                &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
The Angstrom Distribution beagleboard ttyS2                                                                          &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
Angstrom 2009.X-stable beagleboard ttyS2                                                                             &lt;br /&gt;
                                                                                                                     &lt;br /&gt;
beagleboard login: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-4&lt;br /&gt;
| 5-17&lt;br /&gt;
| Console Setup Code Snippet from .../kernel/printk.c&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * Set up a list of consoles.  Called from init/main.c&lt;br /&gt;
 */&lt;br /&gt;
static int __init console_setup(char *str)&lt;br /&gt;
{&lt;br /&gt;
        char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for index */&lt;br /&gt;
        char *s, *options, *brl_options = NULL;&lt;br /&gt;
        int idx;&lt;br /&gt;
&lt;br /&gt;
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE&lt;br /&gt;
        if (!memcmp(str, &amp;quot;brl,&amp;quot;, 4)) {&lt;br /&gt;
                brl_options = &amp;quot;&amp;quot;;&lt;br /&gt;
                str += 4;&lt;br /&gt;
        } else if (!memcmp(str, &amp;quot;brl=&amp;quot;, 4)) {&lt;br /&gt;
                brl_options = str + 4;&lt;br /&gt;
                str = strchr(brl_options, ',');&lt;br /&gt;
                if (!str) {&lt;br /&gt;
                        printk(KERN_ERR &amp;quot;need port name after brl=\n&amp;quot;);&lt;br /&gt;
                        return 1;&lt;br /&gt;
                }&lt;br /&gt;
                *(str++) = 0;&lt;br /&gt;
        }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
        /*&lt;br /&gt;
         * Decode str into name, index, options.&lt;br /&gt;
         */&lt;br /&gt;
        if (str[0] &amp;gt;= '0' &amp;amp;&amp;amp; str[0] &amp;lt;= '9') {&lt;br /&gt;
                strcpy(buf, &amp;quot;ttyS&amp;quot;);&lt;br /&gt;
                strncpy(buf + 4, str, sizeof(buf) - 5);&lt;br /&gt;
        } else {&lt;br /&gt;
                strncpy(buf, str, sizeof(buf) - 1);&lt;br /&gt;
        }&lt;br /&gt;
        buf[sizeof(buf) - 1] = 0;&lt;br /&gt;
        if ((options = strchr(str, ',')) != NULL)&lt;br /&gt;
                *(options++) = 0;&lt;br /&gt;
#ifdef __sparc__&lt;br /&gt;
        if (!strcmp(str, &amp;quot;ttya&amp;quot;))&lt;br /&gt;
                strcpy(buf, &amp;quot;ttyS0&amp;quot;);&lt;br /&gt;
        if (!strcmp(str, &amp;quot;ttyb&amp;quot;))&lt;br /&gt;
                strcpy(buf, &amp;quot;ttyS1&amp;quot;);&lt;br /&gt;
#endif&lt;br /&gt;
        for (s = buf; *s; s++)&lt;br /&gt;
                if ((*s &amp;gt;= '0' &amp;amp;&amp;amp; *s &amp;lt;= '9') || *s == ',')&lt;br /&gt;
                        break;&lt;br /&gt;
        idx = simple_strtoul(s, NULL, 10);&lt;br /&gt;
        *s = 0;&lt;br /&gt;
&lt;br /&gt;
        __add_preferred_console(buf, idx, options, brl_options);&lt;br /&gt;
        console_set_on_cmdline = 1;&lt;br /&gt;
        return 1;&lt;br /&gt;
}&lt;br /&gt;
__setup(&amp;quot;console=&amp;quot;, console_setup);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-5&lt;br /&gt;
| 5-18&lt;br /&gt;
| Family of __setup Macro Definitions from .../include/linux/init.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#define __setup_param(str, unique_id, fn, early)			\&lt;br /&gt;
	static char __setup_str_##unique_id[] __initdata __aligned(1) = str; \&lt;br /&gt;
	static struct obs_kernel_param __setup_##unique_id	\&lt;br /&gt;
		__used __section(.init.setup)			\&lt;br /&gt;
		__attribute__((aligned((sizeof(long)))))	\&lt;br /&gt;
		= { __setup_str_##unique_id, fn, early }&lt;br /&gt;
&lt;br /&gt;
#define __setup(str, fn)					\&lt;br /&gt;
	__setup_param(str, fn, fn, 0)&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| 5-19&lt;br /&gt;
| Kernel Command Line Processing&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
extern struct obs_kernel_param __setup_start[], __setup_end[];&lt;br /&gt;
&lt;br /&gt;
static int __init obsolete_checksetup(char *line)&lt;br /&gt;
{&lt;br /&gt;
	struct obs_kernel_param *p;&lt;br /&gt;
	int had_early_param = 0;&lt;br /&gt;
&lt;br /&gt;
	p = __setup_start;&lt;br /&gt;
	do {&lt;br /&gt;
		int n = strlen(p-&amp;gt;str);&lt;br /&gt;
		if (!strncmp(line, p-&amp;gt;str, n)) {&lt;br /&gt;
			if (p-&amp;gt;early) {&lt;br /&gt;
				/* Already done in parse_early_param?&lt;br /&gt;
				 * (Needs exact match on param part).&lt;br /&gt;
				 * Keep iterating, as we can have early&lt;br /&gt;
				 * params and __setups of same names 8( */&lt;br /&gt;
				if (line[n] == '\0' || line[n] == '=')&lt;br /&gt;
					had_early_param = 1;&lt;br /&gt;
			} else if (!p-&amp;gt;setup_func) {&lt;br /&gt;
				printk(KERN_WARNING &amp;quot;Parameter %s is obsolete,&amp;quot;&lt;br /&gt;
				       &amp;quot; ignored\n&amp;quot;, p-&amp;gt;str);&lt;br /&gt;
				return 1;&lt;br /&gt;
			} else if (p-&amp;gt;setup_func(line + n))&lt;br /&gt;
				return 1;&lt;br /&gt;
		}&lt;br /&gt;
		p++;&lt;br /&gt;
	} while (p &amp;lt; __setup_end);&lt;br /&gt;
&lt;br /&gt;
	return had_early_param;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-7&lt;br /&gt;
| 5-22&lt;br /&gt;
| Example Initialization Routine - .../arch/arm/kernel/setup.c&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
static int __init customize_machine(void)&lt;br /&gt;
{&lt;br /&gt;
	/* customizes platform devices, or adds new ones */&lt;br /&gt;
	if (init_machine)&lt;br /&gt;
		init_machine();&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
arch_initcall(customize_machine);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-8&lt;br /&gt;
| 5-22&lt;br /&gt;
| initcall Family of Macros - .../include/linux/init.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define __define_initcall(level,fn,id) \&lt;br /&gt;
	static initcall_t __initcall_##fn##id __used \&lt;br /&gt;
	__attribute__((__section__(&amp;quot;.initcall&amp;quot; level &amp;quot;.init&amp;quot;))) = fn&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Early initcalls run before initializing SMP.&lt;br /&gt;
 *&lt;br /&gt;
 * Only for built-in code, not modules.&lt;br /&gt;
 */&lt;br /&gt;
#define early_initcall(fn)		__define_initcall(&amp;quot;early&amp;quot;,fn,early)&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * A &amp;quot;pure&amp;quot; initcall has no dependencies on anything else, and purely&lt;br /&gt;
 * initializes variables that couldn't be statically initialized.&lt;br /&gt;
 *&lt;br /&gt;
 * This only exists for built-in code, not for modules.&lt;br /&gt;
 */&lt;br /&gt;
#define pure_initcall(fn)		__define_initcall(&amp;quot;0&amp;quot;,fn,0)&lt;br /&gt;
&lt;br /&gt;
#define core_initcall(fn)		__define_initcall(&amp;quot;1&amp;quot;,fn,1)&lt;br /&gt;
#define core_initcall_sync(fn)		__define_initcall(&amp;quot;1s&amp;quot;,fn,1s)&lt;br /&gt;
#define postcore_initcall(fn)		__define_initcall(&amp;quot;2&amp;quot;,fn,2)&lt;br /&gt;
#define postcore_initcall_sync(fn)	__define_initcall(&amp;quot;2s&amp;quot;,fn,2s)&lt;br /&gt;
#define arch_initcall(fn)		__define_initcall(&amp;quot;3&amp;quot;,fn,3)&lt;br /&gt;
#define arch_initcall_sync(fn)		__define_initcall(&amp;quot;3s&amp;quot;,fn,3s)&lt;br /&gt;
#define subsys_initcall(fn)		__define_initcall(&amp;quot;4&amp;quot;,fn,4)&lt;br /&gt;
#define subsys_initcall_sync(fn)	__define_initcall(&amp;quot;4s&amp;quot;,fn,4s)&lt;br /&gt;
#define fs_initcall(fn)			__define_initcall(&amp;quot;5&amp;quot;,fn,5)&lt;br /&gt;
#define fs_initcall_sync(fn)		__define_initcall(&amp;quot;5s&amp;quot;,fn,5s)&lt;br /&gt;
#define rootfs_initcall(fn)		__define_initcall(&amp;quot;rootfs&amp;quot;,fn,rootfs)&lt;br /&gt;
#define device_initcall(fn)		__define_initcall(&amp;quot;6&amp;quot;,fn,6)&lt;br /&gt;
#define device_initcall_sync(fn)	__define_initcall(&amp;quot;6s&amp;quot;,fn,6s)&lt;br /&gt;
#define late_initcall(fn)		__define_initcall(&amp;quot;7&amp;quot;,fn,7)&lt;br /&gt;
#define late_initcall_sync(fn)		__define_initcall(&amp;quot;7s&amp;quot;,fn,7s)&lt;br /&gt;
&lt;br /&gt;
#define __initcall(fn) device_initcall(fn)&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-9&lt;br /&gt;
| 5-24&lt;br /&gt;
| Creation of Kernel init Thread&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
static noinline void __init_refok rest_init(void)&lt;br /&gt;
	__releases(kernel_lock)&lt;br /&gt;
{&lt;br /&gt;
	int pid;&lt;br /&gt;
&lt;br /&gt;
	kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);&lt;br /&gt;
	numa_default_policy();&lt;br /&gt;
	pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);&lt;br /&gt;
	kthreadd_task = find_task_by_pid_ns(pid, &amp;amp;init_pid_ns);&lt;br /&gt;
	unlock_kernel();&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * The boot idle thread must execute schedule()&lt;br /&gt;
	 * at least once to get things moving:&lt;br /&gt;
	 */&lt;br /&gt;
	init_idle_bootup_task(current);&lt;br /&gt;
	rcu_scheduler_starting();&lt;br /&gt;
	preempt_enable_no_resched();&lt;br /&gt;
	schedule();&lt;br /&gt;
	preempt_disable();&lt;br /&gt;
&lt;br /&gt;
	/* Call into cpu_idle with preempt disabled */&lt;br /&gt;
	cpu_idle();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-10&lt;br /&gt;
| 5-25&lt;br /&gt;
| Initialization via initcalls&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[];&lt;br /&gt;
&lt;br /&gt;
static void __init do_initcalls(void)&lt;br /&gt;
{&lt;br /&gt;
	initcall_t *call;&lt;br /&gt;
&lt;br /&gt;
	for (call = __early_initcall_end; call &amp;lt; __initcall_end; call++)&lt;br /&gt;
		do_one_initcall(*call);&lt;br /&gt;
&lt;br /&gt;
	/* Make sure there is no pending stuff from the initcall sequence */&lt;br /&gt;
	flush_scheduled_work();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5-11&lt;br /&gt;
| 5-27&lt;br /&gt;
| Final Boot Steps from main.c&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
static noinline int init_post(void)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;lt;... lines trimmed for clarity ...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	if (execute_command) {&lt;br /&gt;
		run_init_process(execute_command);&lt;br /&gt;
		printk(KERN_WARNING &amp;quot;Failed to execute %s.  Attempting &amp;quot;&lt;br /&gt;
					&amp;quot;defaults...\n&amp;quot;, execute_command);&lt;br /&gt;
	}&lt;br /&gt;
	run_init_process(&amp;quot;/sbin/init&amp;quot;);&lt;br /&gt;
	run_init_process(&amp;quot;/etc/init&amp;quot;);&lt;br /&gt;
	run_init_process(&amp;quot;/bin/init&amp;quot;);&lt;br /&gt;
	run_init_process(&amp;quot;/bin/sh&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	panic(&amp;quot;No init found.  Try passing init= option to kernel.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-04-02T01:41:19Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 5 xink | Listings for Chapter 5 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 6 xink | Listings for Chapter 6 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 7 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 7 xink | Listings for Chapter 7 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 8 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 8 xink | Listings for Chapter 8 ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-04-02T01:40:10Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Listings_for_Chapter_4_xink</id>
		<title>ECE597 Listings for Chapter 4 xink</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Listings_for_Chapter_4_xink"/>
				<updated>2010-04-02T01:39:34Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with '== Chapter 4 ==  {| ! Number ! Page ! Caption ! Listing |- | 4-1 | 4-7 | Kernel Build Output | &amp;lt;pre&amp;gt; $ export OETREE=&amp;quot;${HOME}/oe&amp;quot; $ PATH=${OETREE}/angstrom-dev/staging/i686-linux…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-04-02T01:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 4 xink | Listings for Chapter 4 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-04-02T01:38:36Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 xink | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-04-02T01:37:23Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE597_Listings_for_Chapter_2</id>
		<title>ECE597 Listings for Chapter 2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE597_Listings_for_Chapter_2"/>
				<updated>2010-04-02T01:36:45Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with '== Chapter 2 ==  {| ! Number ! Page ! Caption ! Listing |- | 2-1 | 2-6 | Initial Bootloader Serial Output | &amp;lt;pre&amp;gt; Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) Readin…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Hello, World! Main is executing at 0x80483c4&lt;br /&gt;
This address (0xbfc4b7e0) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
root@beagleboard:~# ./a.out&lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbe876cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-04-02T01:35:55Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
* [[ECE597 Listings for Chapter 2 | Listings for Chapter 2 ]]&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Hello, World! Main is executing at 0x80483c4&lt;br /&gt;
This address (0xbfc4b7e0) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
root@beagleboard:~# ./a.out&lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbe876cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-03-24T04:56:31Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Hello, World! Main is executing at 0x80483c4&lt;br /&gt;
This address (0xbfc4b7e0) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
root@beagleboard:~# ./a.out&lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbe876cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 5 ==&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-03-24T04:54:53Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Hello, World! Main is executing at 0x80483c4&lt;br /&gt;
This address (0xbfc4b7e0) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
root@beagleboard:~# ./a.out&lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbe876cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
        prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
        default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
        bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
        select CPU_ARM920T&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        help&lt;br /&gt;
          This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
        bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
        select HAVE_CLK&lt;br /&gt;
        select COMMON_CLKDEV&lt;br /&gt;
        select ICST525&lt;br /&gt;
        help&lt;br /&gt;
          Support for ARM's Integrator platform.&lt;br /&gt;
&lt;br /&gt;
config ARCH_REALVIEW&lt;br /&gt;
        bool &amp;quot;ARM Ltd. RealView family&amp;quot;&lt;br /&gt;
        select ARM_AMBA&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap1/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-omap2/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-orion5x/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/mach-kirkwood/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c24xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c64xx/Kconfig&amp;quot;&lt;br /&gt;
source &amp;quot;arch/arm/plat-s3c/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
# CONFIG_OMAP_GPIO_SWITCH_2 is not set&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
# CONFIG_OMAP_MBOX_FWK is not set&lt;br /&gt;
CONFIG_OMAP_IOMMU=m&lt;br /&gt;
# CONFIG_OMAP_MPU_TIMER is not set&lt;br /&gt;
CONFIG_OMAP_32K_TIMER=y&lt;br /&gt;
CONFIG_OMAP_32K_TIMER_HZ=128&lt;br /&gt;
CONFIG_OMAP_TICK_GPTIMER=12&lt;br /&gt;
CONFIG_OMAP_DM_TIMER=y&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART1 is not set&lt;br /&gt;
# CONFIG_OMAP_LL_DEBUG_UART2 is not set&lt;br /&gt;
CONFIG_OMAP_LL_DEBUG_UART3=y&lt;br /&gt;
CONFIG_ARCH_OMAP34XX=y&lt;br /&gt;
CONFIG_ARCH_OMAP3430=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/Makefile&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
         usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-03-24T04:49:59Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Hello, World! Main is executing at 0x80483c4&lt;br /&gt;
This address (0xbfc4b7e0) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
root@beagleboard:~# ./a.out&lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbe876cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Chapter 4 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 4-7&lt;br /&gt;
| Kernel Build Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ export OETREE=&amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}&lt;br /&gt;
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}&lt;br /&gt;
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
&lt;br /&gt;
scripts/kconfig/conf -s arch/arm/Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
make[1]: `include/asm-arm/mach-types.h' is up to date.&lt;br /&gt;
  CHK     include/linux/utsrelease.h&lt;br /&gt;
  SYMLINK include/asm -&amp;gt; include/asm-arm&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  GEN     include/linux/bounds.h&lt;br /&gt;
  CC      arch/arm/kernel/asm-offsets.s&lt;br /&gt;
  GEN     include/asm/asm-offsets.h&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC      scripts/mod/empty.o&lt;br /&gt;
  MKELF   scripts/mod/elfconfig.h&lt;br /&gt;
  HOSTCC  scripts/mod/file2alias.o&lt;br /&gt;
  HOSTCC  scripts/mod/modpost.o&lt;br /&gt;
  HOSTCC  scripts/mod/sumversion.o&lt;br /&gt;
  HOSTLD  scripts/mod/modpost&lt;br /&gt;
  CC      init/main.o&lt;br /&gt;
      .&lt;br /&gt;
      .  &amp;lt;lines of output omitted here&amp;gt;&lt;br /&gt;
      .&lt;br /&gt;
  LD      vmlinux&lt;br /&gt;
  SYSMAP  System.map&lt;br /&gt;
  SYSMAP  .tmp_System.map&lt;br /&gt;
  OBJCOPY arch/arm/boot/Image&lt;br /&gt;
  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
  AS      arch/arm/boot/compressed/head.o&lt;br /&gt;
  GZIP    arch/arm/boot/compressed/piggy.gz&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.o&lt;br /&gt;
  CC      arch/arm/boot/compressed/misc.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
  UIMAGE  arch/arm/boot/uImage&lt;br /&gt;
Image Name:   Linux-2.6.29-omap1&lt;br /&gt;
Created:      Wed Mar 24 01:01:33 2010&lt;br /&gt;
Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
Data Size:    2994372 Bytes = 2924.19 kB = 2.86 MB&lt;br /&gt;
Load Address: 80008000&lt;br /&gt;
Entry Point:  80008000&lt;br /&gt;
  Image arch/arm/boot/uImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 4-9&lt;br /&gt;
| Link Stage: vmlinux&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 4-15&lt;br /&gt;
| Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -ls arch/arm/plat-omap/ | grep -v \\.o&lt;br /&gt;
arch/arm/plat-omap:&lt;br /&gt;
total 764&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   8100 Mar 19 19:48 Kconfig&lt;br /&gt;
  4 -rw-r--r-- 1 xink students    824 Mar 15 02:52 Makefile&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2404 Mar 11 07:46 bootreason.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  15334 Mar 11 07:46 clock.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   8210 Mar 11 07:46 common.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1593 Mar 11 07:46 component-version.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   4053 Mar 11 07:46 cpu-omap.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1975 Mar 11 07:46 debug-devices.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   7120 Mar 11 07:46 debug-leds.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9975 Mar 11 07:46 devices.c&lt;br /&gt;
 60 -rwxr-xr-x 1 xink students  59827 Mar 15 02:51 dma.c&lt;br /&gt;
 24 -rw-r--r-- 1 xink students  20791 Mar 11 07:46 dmtimer.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students   9675 Mar 15 02:51 fb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  12815 Mar 11 07:46 gpio-switch.c&lt;br /&gt;
 48 -rw-r--r-- 1 xink students  47671 Mar 11 07:46 gpio.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   5841 Mar 11 07:46 i2c.c&lt;br /&gt;
  0 drwxr-xr-x 3 xink students     72 Mar 11 07:46 include&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   3749 Mar 11 07:46 io.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19782 Mar 15 02:52 iommu.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  17214 Mar 15 03:17 iommu.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1924 Mar 15 03:16 iommu.mod.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2152 Mar 15 02:52 iopgtable.h&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  19139 Mar 15 02:52 iovmm.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  14686 Mar 15 03:17 iovmm.ko&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   1764 Mar 15 03:16 iovmm.mod.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  12069 Mar 11 07:46 mailbox.c&lt;br /&gt;
 28 -rw-r--r-- 1 xink students  26560 Mar 11 07:46 mcbsp.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2109 Mar 11 07:46 mux.c&lt;br /&gt;
  4 -rw-r--r-- 1 xink students   2739 Mar 11 07:46 ocpi.c&lt;br /&gt;
 12 -rw-r--r-- 1 xink students  10915 Mar 11 07:46 sram.c&lt;br /&gt;
 20 -rw-r--r-- 1 xink students  18290 Mar 11 07:46 usb.c&lt;br /&gt;
 16 -rw-r--r-- 1 xink students  13911 Mar 15 02:51 vram.c&lt;br /&gt;
  8 -rw-r--r-- 1 xink students   6426 Mar 15 02:51 vrfb.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 4-17&lt;br /&gt;
| Snippet from Linux 2.6 .config&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
#&lt;br /&gt;
# USB Input Devices&lt;br /&gt;
#&lt;br /&gt;
CONFIG_USB_HID=y&lt;br /&gt;
# CONFIG_HID_PID is not set&lt;br /&gt;
# CONFIG_USB_HIDDEV is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Special HID drivers&lt;br /&gt;
#&lt;br /&gt;
CONFIG_HID_COMPAT=y&lt;br /&gt;
CONFIG_HID_A4TECH=y&lt;br /&gt;
CONFIG_HID_APPLE=y&lt;br /&gt;
CONFIG_HID_BELKIN=y&lt;br /&gt;
CONFIG_HID_CHERRY=y&lt;br /&gt;
CONFIG_HID_CHICONY=y&lt;br /&gt;
CONFIG_HID_CYPRESS=y&lt;br /&gt;
CONFIG_HID_EZKEY=y&lt;br /&gt;
CONFIG_HID_GYRATION=y&lt;br /&gt;
CONFIG_HID_LOGITECH=y&lt;br /&gt;
# CONFIG_LOGITECH_FF is not set&lt;br /&gt;
# CONFIG_LOGIRUMBLEPAD2_FF is not set&lt;br /&gt;
CONFIG_HID_MICROSOFT=y&lt;br /&gt;
CONFIG_HID_MONTEREY=y&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| 4-21&lt;br /&gt;
| Linux autoconf.h&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#define CONFIG_USB_SISUSBVGA_MODULE 1&lt;br /&gt;
#define CONFIG_USB_PHIDGETMOTORCONTROL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_LEGOTOWER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_IR_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GSPCA_T613_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_TI_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ETH_RNDIS 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_MODULE 1&lt;br /&gt;
#define CONFIG_USB_W9968CF_MODULE 1&lt;br /&gt;
#define CONFIG_USB_RTL8150 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_WHITEHEAT_MODULE 1&lt;br /&gt;
#define CONFIG_USB_GADGET_MUSB_HDRC 1&lt;br /&gt;
#define CONFIG_USB_KAWETH 1&lt;br /&gt;
#define CONFIG_USB_ZERO_HNPTEST 1&lt;br /&gt;
#define CONFIG_USB_CXACRU_MODULE 1&lt;br /&gt;
#define CONFIG_USB_SERIAL_ARK3116_MODULE 1&lt;br /&gt;
#define CONFIG_USB_G_PRINTER_MODULE 1&lt;br /&gt;
#define CONFIG_USB_NET_PLUSB 1&lt;br /&gt;
#define CONFIG_USB_GPIO_VBUS 1&lt;br /&gt;
#define CONFIG_USB_EHCI_TT_NEWSCHED 1&lt;br /&gt;
#define CONFIG_USB_ACM_MODULE 1&lt;br /&gt;
#define CONFIG_USB_ARCH_HAS_EHCI 1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-6&lt;br /&gt;
| 4-22&lt;br /&gt;
| Makefile Targets&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help &lt;br /&gt;
Cleaning targets:&lt;br /&gt;
  clean           - Remove most generated files but keep the config and&lt;br /&gt;
                    enough build support to build external modules&lt;br /&gt;
  mrproper        - Remove all generated files + config + various backup files&lt;br /&gt;
  distclean       - mrproper + remove editor backup and patch files&lt;br /&gt;
&lt;br /&gt;
Configuration targets:&lt;br /&gt;
  config          - Update current config utilising a line-oriented program&lt;br /&gt;
  menuconfig      - Update current config utilising a menu based program&lt;br /&gt;
  xconfig         - Update current config utilising a QT based front-end&lt;br /&gt;
  gconfig         - Update current config utilising a GTK based front-end&lt;br /&gt;
  oldconfig       - Update current config utilising a provided .config as base&lt;br /&gt;
  silentoldconfig - Same as oldconfig, but quietly&lt;br /&gt;
  randconfig      - New config with random answer to all options&lt;br /&gt;
  defconfig       - New config with default answer to all options&lt;br /&gt;
  allmodconfig    - New config selecting modules when possible&lt;br /&gt;
  allyesconfig    - New config where all options are accepted with yes&lt;br /&gt;
  allnoconfig     - New config where all options are answered with no&lt;br /&gt;
&lt;br /&gt;
Other generic targets:&lt;br /&gt;
  all             - Build all targets marked with [*]&lt;br /&gt;
* vmlinux         - Build the bare kernel&lt;br /&gt;
* modules         - Build all modules&lt;br /&gt;
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)&lt;br /&gt;
  firmware_install- Install all firmware to INSTALL_FW_PATH&lt;br /&gt;
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)&lt;br /&gt;
  dir/            - Build all files in dir and below&lt;br /&gt;
  dir/file.[ois]  - Build specified target only&lt;br /&gt;
  dir/file.ko     - Build module including final link&lt;br /&gt;
  prepare         - Set up for building external modules&lt;br /&gt;
  tags/TAGS       - Generate tags file for editors&lt;br /&gt;
  cscope          - Generate cscope index&lt;br /&gt;
  kernelrelease   - Output the release version string&lt;br /&gt;
  kernelversion   - Output the version stored in Makefile&lt;br /&gt;
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH&lt;br /&gt;
                    (default: /home/users/collinjc/oe/angstrom-dev-backup2/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git/usr)&lt;br /&gt;
&lt;br /&gt;
Static analysers&lt;br /&gt;
  checkstack      - Generate a list of stack hogs&lt;br /&gt;
  namespacecheck  - Name space analysis on compiled kernel&lt;br /&gt;
  versioncheck    - Sanity check on version.h usage&lt;br /&gt;
  includecheck    - Check for duplicate included header files&lt;br /&gt;
  export_report   - List the usages of all exported symbols&lt;br /&gt;
  headers_check   - Sanity check on exported headers&lt;br /&gt;
  headerdep       - Detect inclusion cycles in headers&lt;br /&gt;
&lt;br /&gt;
Kernel packaging:&lt;br /&gt;
  rpm-pkg         - Build both source and binary RPM kernel packages&lt;br /&gt;
  binrpm-pkg      - Build only the binary kernel package&lt;br /&gt;
  deb-pkg         - Build the kernel as an deb package&lt;br /&gt;
  tar-pkg         - Build the kernel as an uncompressed tarball&lt;br /&gt;
  targz-pkg       - Build the kernel as a gzip compressed tarball&lt;br /&gt;
  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball&lt;br /&gt;
&lt;br /&gt;
Documentation targets:&lt;br /&gt;
 Linux kernel internal documentation in different formats:&lt;br /&gt;
  htmldocs        - HTML&lt;br /&gt;
  installmandocs  - install man pages generated by mandocs&lt;br /&gt;
  mandocs         - man pages&lt;br /&gt;
  pdfdocs         - PDF&lt;br /&gt;
  psdocs          - Postscript&lt;br /&gt;
  xmldocs         - XML DocBook&lt;br /&gt;
&lt;br /&gt;
Architecture specific targets (arm):&lt;br /&gt;
* zImage        - Compressed kernel image (arch/arm/boot/zImage)&lt;br /&gt;
  Image         - Uncompressed kernel image (arch/arm/boot/Image)&lt;br /&gt;
* xipImage      - XIP kernel image, if configured (arch/arm/boot/xipImage)&lt;br /&gt;
  uImage        - U-Boot wrapped zImage&lt;br /&gt;
  bootpImage    - Combined zImage and initial RAM disk&lt;br /&gt;
                  (supply initrd image via make variable INITRD=&amp;lt;path&amp;gt;)&lt;br /&gt;
  install       - Install uncompressed kernel&lt;br /&gt;
  zinstall      - Install compressed kernel&lt;br /&gt;
                  Install using (your) ~/bin/installkernel or&lt;br /&gt;
                  (distribution) /sbin/installkernel or&lt;br /&gt;
                  install to $(INSTALL_PATH) and run lilo&lt;br /&gt;
&lt;br /&gt;
  afeb9260_defconfig       - Build for afeb9260&lt;br /&gt;
  am200epdkit_defconfig    - Build for am200epdkit&lt;br /&gt;
  ams_delta_defconfig      - Build for ams_delta&lt;br /&gt;
  assabet_defconfig        - Build for assabet&lt;br /&gt;
  at91cap9adk_defconfig    - Build for at91cap9adk&lt;br /&gt;
  at91rm9200dk_defconfig   - Build for at91rm9200dk&lt;br /&gt;
  at91rm9200ek_defconfig   - Build for at91rm9200ek&lt;br /&gt;
  at91sam9260ek_defconfig  - Build for at91sam9260ek&lt;br /&gt;
  at91sam9261ek_defconfig  - Build for at91sam9261ek&lt;br /&gt;
  at91sam9263ek_defconfig  - Build for at91sam9263ek&lt;br /&gt;
  at91sam9g20ek_defconfig  - Build for at91sam9g20ek&lt;br /&gt;
  at91sam9rlek_defconfig   - Build for at91sam9rlek&lt;br /&gt;
  ateb9200_defconfig       - Build for ateb9200&lt;br /&gt;
  badge4_defconfig         - Build for badge4&lt;br /&gt;
  cam60_defconfig          - Build for cam60&lt;br /&gt;
  carmeva_defconfig        - Build for carmeva&lt;br /&gt;
  cerfcube_defconfig       - Build for cerfcube&lt;br /&gt;
  cm_x300_defconfig        - Build for cm_x300&lt;br /&gt;
  colibri_defconfig        - Build for colibri&lt;br /&gt;
  collie_defconfig         - Build for collie&lt;br /&gt;
  corgi_defconfig          - Build for corgi&lt;br /&gt;
  csb337_defconfig         - Build for csb337&lt;br /&gt;
  csb637_defconfig         - Build for csb637&lt;br /&gt;
  dss_omap3_beagle_defconfig - Build for dss_omap3_beagle&lt;br /&gt;
  dss_omap_3430sdp_defconfig - Build for dss_omap_3430sdp&lt;br /&gt;
  dss_overo_defconfig      - Build for dss_overo&lt;br /&gt;
  ebsa110_defconfig        - Build for ebsa110&lt;br /&gt;
  ecbat91_defconfig        - Build for ecbat91&lt;br /&gt;
  edb7211_defconfig        - Build for edb7211&lt;br /&gt;
  ep93xx_defconfig         - Build for ep93xx&lt;br /&gt;
  eseries_pxa_defconfig    - Build for eseries_pxa&lt;br /&gt;
  ezx_defconfig            - Build for ezx&lt;br /&gt;
  footbridge_defconfig     - Build for footbridge&lt;br /&gt;
  fortunet_defconfig       - Build for fortunet&lt;br /&gt;
  h3600_defconfig          - Build for h3600&lt;br /&gt;
  h5000_defconfig          - Build for h5000&lt;br /&gt;
  h7201_defconfig          - Build for h7201&lt;br /&gt;
  h7202_defconfig          - Build for h7202&lt;br /&gt;
  hackkit_defconfig        - Build for hackkit&lt;br /&gt;
  imx27ads_defconfig       - Build for imx27ads&lt;br /&gt;
  integrator_defconfig     - Build for integrator&lt;br /&gt;
  iop13xx_defconfig        - Build for iop13xx&lt;br /&gt;
  iop32x_defconfig         - Build for iop32x&lt;br /&gt;
  iop33x_defconfig         - Build for iop33x&lt;br /&gt;
  ixp2000_defconfig        - Build for ixp2000&lt;br /&gt;
  ixp23xx_defconfig        - Build for ixp23xx&lt;br /&gt;
  ixp4xx_defconfig         - Build for ixp4xx&lt;br /&gt;
  jornada720_defconfig     - Build for jornada720&lt;br /&gt;
  kafa_defconfig           - Build for kafa&lt;br /&gt;
  kb9202_defconfig         - Build for kb9202&lt;br /&gt;
  kirkwood_defconfig       - Build for kirkwood&lt;br /&gt;
  ks8695_defconfig         - Build for ks8695&lt;br /&gt;
  lart_defconfig           - Build for lart&lt;br /&gt;
  littleton_defconfig      - Build for littleton&lt;br /&gt;
  loki_defconfig           - Build for loki&lt;br /&gt;
  lpd270_defconfig         - Build for lpd270&lt;br /&gt;
  lpd7a400_defconfig       - Build for lpd7a400&lt;br /&gt;
  lpd7a404_defconfig       - Build for lpd7a404&lt;br /&gt;
  lubbock_defconfig        - Build for lubbock&lt;br /&gt;
  lusl7200_defconfig       - Build for lusl7200&lt;br /&gt;
  magician_defconfig       - Build for magician&lt;br /&gt;
  mainstone_defconfig      - Build for mainstone&lt;br /&gt;
  msm_defconfig            - Build for msm&lt;br /&gt;
  mv78xx0_defconfig        - Build for mv78xx0&lt;br /&gt;
  mx1ads_defconfig         - Build for mx1ads&lt;br /&gt;
  mx31ads_defconfig        - Build for mx31ads&lt;br /&gt;
  mx31litekit_defconfig    - Build for mx31litekit&lt;br /&gt;
  mx31moboard_defconfig    - Build for mx31moboard&lt;br /&gt;
  mx31pdk_defconfig        - Build for mx31pdk&lt;br /&gt;
  n770_defconfig           - Build for n770&lt;br /&gt;
  n800_defconfig           - Build for n800&lt;br /&gt;
  neocore926_defconfig     - Build for neocore926&lt;br /&gt;
  neponset_defconfig       - Build for neponset&lt;br /&gt;
  netwinder_defconfig      - Build for netwinder&lt;br /&gt;
  netx_defconfig           - Build for netx&lt;br /&gt;
  ns9xxx_defconfig         - Build for ns9xxx&lt;br /&gt;
  omap2_evm_defconfig      - Build for omap2_evm&lt;br /&gt;
  omap3_beagle_defconfig   - Build for omap3_beagle&lt;br /&gt;
  omap3_evm_defconfig      - Build for omap3_evm&lt;br /&gt;
  omap3_pandora_defconfig  - Build for omap3_pandora&lt;br /&gt;
  omap_2430sdp_defconfig   - Build for omap_2430sdp&lt;br /&gt;
  omap_3430sdp_defconfig   - Build for omap_3430sdp&lt;br /&gt;
  omap_apollon_2420_defconfig - Build for omap_apollon_2420&lt;br /&gt;
  omap_generic_1510_defconfig - Build for omap_generic_1510&lt;br /&gt;
  omap_generic_1610_defconfig - Build for omap_generic_1610&lt;br /&gt;
  omap_generic_1710_defconfig - Build for omap_generic_1710&lt;br /&gt;
  omap_generic_2420_defconfig - Build for omap_generic_2420&lt;br /&gt;
  omap_h2_1610_defconfig   - Build for omap_h2_1610&lt;br /&gt;
  omap_h3_1710_defconfig   - Build for omap_h3_1710&lt;br /&gt;
  omap_h4_2420_defconfig   - Build for omap_h4_2420&lt;br /&gt;
  omap_innovator_1510_defconfig - Build for omap_innovator_1510&lt;br /&gt;
  omap_innovator_1610_defconfig - Build for omap_innovator_1610&lt;br /&gt;
  omap_ldp_defconfig       - Build for omap_ldp&lt;br /&gt;
  omap_osk_5912_defconfig  - Build for omap_osk_5912&lt;br /&gt;
  omap_perseus2_730_defconfig - Build for omap_perseus2_730&lt;br /&gt;
  onearm_defconfig         - Build for onearm&lt;br /&gt;
  orion5x_defconfig        - Build for orion5x&lt;br /&gt;
  overo_defconfig          - Build for overo&lt;br /&gt;
  palmte_defconfig         - Build for palmte&lt;br /&gt;
  palmtt_defconfig         - Build for palmtt&lt;br /&gt;
  palmz71_defconfig        - Build for palmz71&lt;br /&gt;
  palmz72_defconfig        - Build for palmz72&lt;br /&gt;
  pcm027_defconfig         - Build for pcm027&lt;br /&gt;
  pcm037_defconfig         - Build for pcm037&lt;br /&gt;
  pcm038_defconfig         - Build for pcm038&lt;br /&gt;
  picotux200_defconfig     - Build for picotux200&lt;br /&gt;
  pleb_defconfig           - Build for pleb&lt;br /&gt;
  pnx4008_defconfig        - Build for pnx4008&lt;br /&gt;
  pxa255-idp_defconfig     - Build for pxa255-idp&lt;br /&gt;
  qil-a9260_defconfig      - Build for qil-a9260&lt;br /&gt;
  realview-smp_defconfig   - Build for realview-smp&lt;br /&gt;
  realview_defconfig       - Build for realview&lt;br /&gt;
  rpc_defconfig            - Build for rpc&lt;br /&gt;
  rx51_defconfig           - Build for rx51&lt;br /&gt;
  s3c2410_defconfig        - Build for s3c2410&lt;br /&gt;
  s3c6400_defconfig        - Build for s3c6400&lt;br /&gt;
  sam9_l9260_defconfig     - Build for sam9_l9260&lt;br /&gt;
  shannon_defconfig        - Build for shannon&lt;br /&gt;
  shark_defconfig          - Build for shark&lt;br /&gt;
  simpad_defconfig         - Build for simpad&lt;br /&gt;
  spitz_defconfig          - Build for spitz&lt;br /&gt;
  sx1_defconfig            - Build for sx1&lt;br /&gt;
  tct_hammer_defconfig     - Build for tct_hammer&lt;br /&gt;
  trizeps4_defconfig       - Build for trizeps4&lt;br /&gt;
  usb-a9260_defconfig      - Build for usb-a9260&lt;br /&gt;
  usb-a9263_defconfig      - Build for usb-a9263&lt;br /&gt;
  versatile_defconfig      - Build for versatile&lt;br /&gt;
  viper_defconfig          - Build for viper&lt;br /&gt;
  w90p910_defconfig        - Build for w90p910&lt;br /&gt;
  xm_x2xx_defconfig        - Build for xm_x2xx&lt;br /&gt;
  yl9200_defconfig         - Build for yl9200&lt;br /&gt;
  zylonite_defconfig       - Build for zylonite&lt;br /&gt;
&lt;br /&gt;
  make V=0|1 [targets] 0 =&amp;gt; quiet build (default), 1 =&amp;gt; verbose build&lt;br /&gt;
  make V=2   [targets] 2 =&amp;gt; give reason for rebuild of target&lt;br /&gt;
  make O=dir [targets] Locate all output files in &amp;quot;dir&amp;quot;, including .config&lt;br /&gt;
  make C=1   [targets] Check all c source with $CHECK (sparse by default)&lt;br /&gt;
  make C=2   [targets] Force check of all c source with $CHECK&lt;br /&gt;
&lt;br /&gt;
Execute &amp;quot;make&amp;quot; or &amp;quot;make all&amp;quot; to build all targets marked with [*] &lt;br /&gt;
For further info see the ./README file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| 4-27&lt;br /&gt;
| Partial Listing of Kconfig for ARM Architecture&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-8&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;init/Kconfig&amp;quot;&lt;br /&gt;
&lt;br /&gt;
source &amp;quot;kernel/Kconfig.freezer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;System Type&amp;quot;&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;ARM system type&amp;quot;&lt;br /&gt;
	default ARCH_VERSATILE&lt;br /&gt;
&lt;br /&gt;
config ARCH_AAEC2000&lt;br /&gt;
	bool &amp;quot;Agilent AAEC-2000 based&amp;quot;&lt;br /&gt;
	select CPU_ARM920T&lt;br /&gt;
	select ARM_AMBA&lt;br /&gt;
	select HAVE_CLK&lt;br /&gt;
	help&lt;br /&gt;
	  This enables support for systems based on the Agilent AAEC-2000&lt;br /&gt;
&lt;br /&gt;
config ARCH_INTEGRATOR&lt;br /&gt;
	bool &amp;quot;ARM Ltd. Integrator family&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
source &amp;quot;arch/arm/plat-omap/Kconfig&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-9&lt;br /&gt;
| 4-30&lt;br /&gt;
| Snippet from .../arch/arm/plat-omap/Kconfig&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
if ARCH_OMAP&lt;br /&gt;
&lt;br /&gt;
menu &amp;quot;TI OMAP Implementations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP_OTG&lt;br /&gt;
	bool&lt;br /&gt;
&lt;br /&gt;
choice&lt;br /&gt;
	prompt &amp;quot;OMAP System Type&amp;quot;&lt;br /&gt;
	default ARCH_OMAP1&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP1&lt;br /&gt;
	bool &amp;quot;TI OMAP1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP2&lt;br /&gt;
	bool &amp;quot;TI OMAP2&amp;quot;&lt;br /&gt;
	select CPU_V6&lt;br /&gt;
&lt;br /&gt;
config ARCH_OMAP3&lt;br /&gt;
	bool &amp;quot;TI OMAP3&amp;quot;&lt;br /&gt;
	select CPU_V7&lt;br /&gt;
&lt;br /&gt;
endchoice&lt;br /&gt;
...&lt;br /&gt;
config OMAP_GPIO_SWITCH&lt;br /&gt;
	bool &amp;quot;GPIO switch support&amp;quot;&lt;br /&gt;
        default n&lt;br /&gt;
        help&lt;br /&gt;
          Say Y, if you want to have support for reporting of GPIO&lt;br /&gt;
          switches (e.g. cover switches) via sysfs. Your bootloader has&lt;br /&gt;
          to provide information about the switches to the kernel via the&lt;br /&gt;
          ATAG_BOARD mechanism if they're not defined by the board config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-10&lt;br /&gt;
| 4-32&lt;br /&gt;
| Customized .config File Snippet&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# OMAP Feature Selections&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set&lt;br /&gt;
# CONFIG_OMAP_SMARTREFLEX is not set&lt;br /&gt;
CONFIG_OMAP_RESET_CLOCKS=y&lt;br /&gt;
CONFIG_OMAP_BOOT_TAG=y&lt;br /&gt;
CONFIG_OMAP_BOOT_REASON=y&lt;br /&gt;
# CONFIG_OMAP_COMPONENT_VERSION is not set&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH=y&lt;br /&gt;
CONFIG_OMAP_GPIO_SWITCH2=y&lt;br /&gt;
# CONFIG_OMAP_MUX is not set&lt;br /&gt;
CONFIG_OMAP_MCBSP=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4-11&lt;br /&gt;
| 4-33&lt;br /&gt;
| Makefile from .../arch/arm/plat-omap/ Kernel Subdirectory&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Makefile for the linux kernel.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Common support&lt;br /&gt;
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \&lt;br /&gt;
	 usb.o fb.o vram.o vrfb.o io.o&lt;br /&gt;
obj-m :=&lt;br /&gt;
obj-n :=&lt;br /&gt;
obj-  :=&lt;br /&gt;
&lt;br /&gt;
# OCPI interconnect support for 1710, 1610 and 5912&lt;br /&gt;
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o&lt;br /&gt;
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o&lt;br /&gt;
&lt;br /&gt;
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o&lt;br /&gt;
obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o&lt;br /&gt;
obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o&lt;br /&gt;
obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o&lt;br /&gt;
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o&lt;br /&gt;
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o&lt;br /&gt;
obj-y += $(i2c-omap-m) $(i2c-omap-y)&lt;br /&gt;
&lt;br /&gt;
# OMAP mailbox framework&lt;br /&gt;
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-03-24T04:40:49Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: /* Chapter 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Hello, World! Main is executing at 0x80483c4&lt;br /&gt;
This address (0xbfc4b7e0) is in our stack frame&lt;br /&gt;
This address (0x804a020) is in our bss section&lt;br /&gt;
This address (0x804a014) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
root@beagleboard:~# ./a.out&lt;br /&gt;
Hello, World! Main is executing at 0x8380&lt;br /&gt;
This address (0xbe876cd4) is in our stack frame&lt;br /&gt;
This address (0x10670) is in our bss section&lt;br /&gt;
This address (0x10668) is in our data section&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-03-22T02:19:41Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
== Chapter 2 ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Number&lt;br /&gt;
! Page&lt;br /&gt;
! Caption&lt;br /&gt;
! Listing&lt;br /&gt;
|-&lt;br /&gt;
| 2-1&lt;br /&gt;
| 2-6&lt;br /&gt;
| Initial Bootloader Serial Output&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)&lt;br /&gt;
&lt;br /&gt;
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz&lt;br /&gt;
OMAP3 Beagle board + LPDDR/NAND&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  256 MB&lt;br /&gt;
NAND:  256 MiB&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Board revision C4&lt;br /&gt;
Die ID #5444000400000000040365fa1400e007&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
OMAP3 beagleboard.org # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 2-7&lt;br /&gt;
| Loading the Linux Kernel&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 2-9&lt;br /&gt;
| Linux Final Boot Messages&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 2-21&lt;br /&gt;
| Hello World, Embedded Style&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int bss_var;        /* Uninitialized global variable */&lt;br /&gt;
&lt;br /&gt;
int data_var = 1;   /* Initialized global variable */&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  void *stack_var;            /* Local variable on the stack */&lt;br /&gt;
  &lt;br /&gt;
  stack_var = (void *)main;   /* Don't let the compiler */&lt;br /&gt;
                              /* optimize it out */&lt;br /&gt;
&lt;br /&gt;
  printf(&amp;quot;Hello, World! Main is executing at %p\n&amp;quot;, stack_var);&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our stack frame\n&amp;quot;, &amp;amp;stack_var);&lt;br /&gt;
&lt;br /&gt;
  /* bss section contains uninitialized data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our bss section\n&amp;quot;, &amp;amp;bss_var);&lt;br /&gt;
&lt;br /&gt;
  /* data section contains initializated data */&lt;br /&gt;
  printf(&amp;quot;This address (%p) is in our data section\n&amp;quot;, &amp;amp;data_var);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Host Computer&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| 2-22&lt;br /&gt;
| Hello Output for Beagle&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Xinkeqiong</id>
		<title>User:Xinkeqiong</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Xinkeqiong"/>
				<updated>2010-03-22T02:18:25Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: Created page with 'Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.  [[Category…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, My name is Keqiong &amp;quot;Claire&amp;quot; Xin. I'm now pursuing the Master Degree of Computer Engineering in Rose-Hulman. This is my user page for course ECE597 Embedded Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Editing_a_Wiki</id>
		<title>ECE497 Editing a Wiki</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Editing_a_Wiki"/>
				<updated>2010-03-12T21:06:31Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a wiki you can practice editing.  Before you can edit it you will have to create an login.  Pick something that will make it easy for me to identify you as part of my class.  Then just add your name and date on the end of the table.&lt;br /&gt;
&lt;br /&gt;
You can get help here: [[Help:Contents]].&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name&lt;br /&gt;
! Date&lt;br /&gt;
|-&lt;br /&gt;
| [[user:Yoder | Mark A. Yoder]]&lt;br /&gt;
| 2-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Elliot Simon&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Mitch Garvin&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| [[user:collinjc | J. Cody Collins]]&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Steven Stark&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Brian Embry&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Qiang Jiang&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Jessica Lipscomb&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Chris Routh&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Paul Morrison&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| [[user:batydm |David Baty]]&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Adam Jesionowski&lt;br /&gt;
| 9-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Greg Jackson&lt;br /&gt;
| 9-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Mark Jacobson&lt;br /&gt;
| 9-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Tom Most&lt;br /&gt;
| 10-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Yannick Polius&lt;br /&gt;
| 10-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Matt Luke&lt;br /&gt;
| 11-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| [[user:banistpw | Paul Banister]]&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Jian Li&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Xiaoyan Mu&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Keqiong Xin&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Editing_a_Wiki</id>
		<title>ECE497 Editing a Wiki</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Editing_a_Wiki"/>
				<updated>2010-03-12T21:06:01Z</updated>
		
		<summary type="html">&lt;p&gt;Xinkeqiong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a wiki you can practice editing.  Before you can edit it you will have to create an login.  Pick something that will make it easy for me to identify you as part of my class.  Then just add your name and date on the end of the table.&lt;br /&gt;
&lt;br /&gt;
You can get help here: [[Help:Contents]].&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name&lt;br /&gt;
! Date&lt;br /&gt;
|-&lt;br /&gt;
| [[user:Yoder | Mark A. Yoder]]&lt;br /&gt;
| 2-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Elliot Simon&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Mitch Garvin&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| [[user:collinjc | J. Cody Collins]]&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Steven Stark&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Brian Embry&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Qiang Jiang&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Jessica Lipscomb&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Chris Routh&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Paul Morrison&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| [[user:batydm |David Baty]]&lt;br /&gt;
| 8-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Adam Jesionowski&lt;br /&gt;
| 9-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Greg Jackson&lt;br /&gt;
| 9-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Mark Jacobson&lt;br /&gt;
| 9-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Tom Most&lt;br /&gt;
| 10-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Yannick Polius&lt;br /&gt;
| 10-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Matt Luke&lt;br /&gt;
| 11-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| [[user:banistpw | Paul Banister]]&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Jian Li&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Xiaoyan Mu&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|-&lt;br /&gt;
| Keqiong Xin&lt;br /&gt;
| 12-Mar-2010&lt;br /&gt;
|&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE597]]&lt;/div&gt;</summary>
		<author><name>Xinkeqiong</name></author>	</entry>

	</feed>