Sony XCI-SX1 User Manual

SDK Technical Manual
Version 1.0
XCI-SX1 SDK / SDK Technical Manual

Table of Contents

1.1 Dependencies------------------------------------------------------------------------------------------------ 1
1.2 SDK Environment------------------------------------------------------------------------------------------- 2
2.1 Patches to kernel -------------------------------------------------------------------------------------------- 3
2.1.1 BigPhysArea Patch-------------------------------------------------------------------------------------- 3
2.1.2 Network Driver Patch----------------------------------------------------------------------------------- 3
2.1.3 BootSplash Patch ---------------------------------------------------------------------------------------- 4
2.1.4 Keyboard Patch ------------------------------------------------------------------------------------------ 4
2.1.5 MVL Patches--------------------------------------------------------------------------------------------- 6
2.2 Kernel Configuration and Installation ------------------------------------------------------------------- 7
2.2.1 Kernel Configuration------------------------------------------------------------------------------------ 7
2.2.2 Kernel Compilation-------------------------------------------------------------------------------------- 8
2.2.3 Kernel Installation --------------------------------------------------------------------------------------- 8
2.3 Environment System Configurations---------------------------------------------------------------------- 9
2.3.1 Kernel Files----------------------------------------------------------------------------------------------- 9
2.3.2 GRUB Configurations----------------------------------------------------------------------------------- 9
2.3.3 Required Modules --------------------------------------------------------------------------------------- 9
2.3.4 Network Configuration---------------------------------------------------------------------------------10
2.3.5 FTP Service----------------------------------------------------------------------------------------------11
2.3.6 User Accounts and their Capabilities-----------------------------------------------------------------11
2.4 Driver Installation -----------------------------------------------------------------------------------------12
2.4.1 Video for Linux 2---------------------------------------------------------------------------------------12
2.4.2 Camera Driver-------------------------------------------------------------------------------------------13
2.4.3 Flash Driver ---------------------------------------------------------------------------------------------13
2.5 Library Installation ----------------------------------------------------------------------------------------14
2.5.1 XFree86--------------------------------------------------------------------------------------------------14
2.5.2 FLTK-----------------------------------------------------------------------------------------------------17
2.5.3 LibJPEG -------------------------------------------------------------------------------------------------18
2.6 Service Installation ----------------------------------------------------------------------------------------18
2.6.1 Apache Web Server ------------------------------------------------------------------------------------18
2.6.2 SNMP ----------------------------------------------------------------------------------------------------19
2.6.3 Pro-FTPD------------------------------------------------------------------------------------------------21
2.6.4 GKermit--------------------------------------------------------------------------------------------------22
2.7 SmartCam Build Tree-------------------------------------------------------------------------------------- 22
2.8 SmartCam Files --------------------------------------------------------------------------------------------22
2.8.1 /usr/smartcam/bin Directory------------------------------------------------------------------22
2.8.2 /usr/smartcam/include Directory-----------------------------------------------------------22
2.8.3 /usr/smartcam/lib Directory------------------------------------------------------------------23
2.8.4 /usr/smartcam/gui Directory------------------------------------------------------------------24
2.8.5 /usr/smartcam/src Directory------------------------------------------------------------------24
2.8.6 /usr/smartcam/sample Directory-------------------------------------------------------------24
2.8.7 /sbin/ Directory--------------------------------------------------------------------------------------25
2.8.8 /etc/init.d/ Directory---------------------------------------------------------------------------25
ii

1 Overview

The Software Development Kit or SDK is provided to give the end users an environment where they can develop their own applications and images. This document is intended as a complete, step-by-step guide to create the SDK environment on the 2GB CF and does not contain instruction on how to create an application using SDK. Please note that the SDK is also referred to as development environment in this document.
Please also refer to UM_SDK.pdf (SDK User’s Manual) how to setup/use SDK.
XCI-SX1 SDK / SDK Technical Manual

1.1 Dependencies

Other files required to develop the SDK needs to be downloaded. The table below shows the said files and their license information.
List of Dependencies
Package Name License Download Path
XFree86
FLTK
NFS-Util V4L2
UPX
PHP
Apache
GKermit
XFree86
License
LGPL
GPL GPL
GPL
PHP License Apache License
GPL http://www.columbia.edu/kermit/gkermit.html
http://www.xfree86.org/ www.fltk.org/software.php http://prdownloads.sourceforge.net/nfs
http://www.thedirks.org/v4l2/ http://upx.sourceforge.net/ http://php.net/ http://httpd.apache.org/
Net-SNMP ProFTPD
BSD http://net-snmp.sourceforge.net/
GPL http://www.proftpd.org/
1

1.2 SDK Environment

This SDK is build with the following environments.
MontaVista Linux 3.0
Linux Kernel 2.4.18
gcc (GCC) 3.2.1 20020930 (MontaVista)
glibc 2.2.5
GNU gdb 5.2.1
XCI-SX1 SDK / SDK Technical Manual
2

2 Environment

This chapter explains kernels, programs, settings and so on. The contents of this chapter have been applied to SDK.

2.1 Patches to kernel

Before kernel compilation, patches are first applied to the kernel. The following sections lists the patches applied to the kernel.
Note: All patches have already been applied to /usr/src/linux on SDK. The patch files are stored on
/buildtree/src/kernel/patches.

2.1.1 BigPhysArea Patch

XCI-SX1 SDK / SDK Technical Manual
Applying this patch allows the user to allocate a large area of contiguous memory during boot up time which can be allocated or deallocated by the kernel driver that needs it.
BigPhysArea
Patch Application:

2.1.2 Network Driver Patch

The network driver has to be patched to enable a more stable Ethernet device driver for the target hardware (RTL8100C).
Network Driver Upgrade
Patch Application:
cd /usr/src/linux patch –p1 < [source]/bigphysarea.diff
Where: [source] – path where the exploded patch is located
cp 8139too.c /usr/src/linux/drivers/net/
NOTE: This command must overwrite the existing 8139too.c in the MVL3.0 kernel tree.
3

2.1.3 BootSplash Patch

To display a boot logo and progress bar during boot-up, this patch should be applied to the kernel. Applying this patch enables the user to display the desired effect during boot up.
XCI-SX1 SDK / SDK Technical Manual
Bootsplash Patch
Patch Application:

2.1.4 Keyboard Patch

The keyboard patch applied is to adjust the keyboard repeat interval and delay. The other patch is a Kernel modification to avoid the occurrence of “pc_keyb: controller jammed (0xFF)” error message.
Keyboard Patch
Patch Application:
Keyboard Repeat
“controller jammed”
error
cd /usr/src/linux patch -p1 < [source]/bootsplash-3.0.7-
2.4.18-vanilla.diff
Where: [source] – path where the exploded patch is located
cd /usr/src/linux/drivers/input/ (edit the input.c file as shown below)
init_timer(&dev->timer); dev->timer.data = (long) dev; dev->timer.function = input_repeat_key; //dev->rep[REP_DELAY] = HZ/4; dev->rep[REP_DELAY] = HZ; //dev->rep[REP_PERIOD] = HZ/33; dev->rep[REP_PERIOD] = HZ/8;
cd /usr/src/linux/include/asm-i386/ (edit the keyboard.h file as shown below)
#ifdef __KERNEL__
#include <linux/config.h> #include <linux/kernel.h> #include <linux/ioport.h>
4
XCI-SX1 SDK / SDK Technical Manual
#include <linux/kd.h> #include <linux/pm.h> #include <asm/io.h>
#ifndef CONFIG_PSKEYBOARD #define kbd_controller_present() 0 #endif
#define KEYBOARD_IRQ 1 #define DISABLE_KBD_DURING_INTERRUPTS 0
. . .
/* How to access the keyboard macros on this platform. */ +#ifdef CONFIG_PSKEYBOARD #define kbd_read_input() inb(KBD_DATA_REG) #define kbd_read_status() inb(KBD_STATUS_REG) #define kbd_write_output(val) outb(val, KBD_DATA_REG) #define kbd_write_command(val) outb(val, KBD_CNTL_REG) +#else +#define kbd_read_input() 0 +#define kbd_read_status() 0 +#define kbd_write_output(val) +#define kbd_write_command(val) +#endif
/* Some stoneage hardware needs delays after some operations. */ #define kbd_pause() do { } while(0)
cd /usr/src/linux/drivers/char/ (edit the Config.in file as shown below)
bool 'PS/2 keyboard support (Off = EXPERIMENTAL)' CONFIG_PSKEYBOARD $CONFIG_EXPERIMENTAL
mainmenu_option next_comment comment 'Mice' tristate 'Bus Mouse Support' CONFIG_BUSMOUSE
cd /usr/src/linux/arch/i386/ (edit the defconfig file as shown below)
# # CONFIG_I2C is not set
CONFIG_PSKEYBOARD=y
5
XCI-SX1 SDK / SDK Technical Manual
# # Mice #
cd /usr/src/linux/Documentations (edit the Configure.help file as shown below)
it as a module, say M here and read <file:Documentation/modules.txt>. The module will be called i2c-proc.o.
PS/2 keyboard support CONFIG_PSKEYBOARD PS/2 keyboard support is optional and can be omitted on some systems, for example, some IA32 systems which use IrDA keyboards. If unsure, say Y.
Bus Mouse Support CONFIG_BUSMOUSE Say Y here if your machine has a bus mouse as opposed to a serial
The CONFIG_PSKEYBOARD kernel option should be disabled.

2.1.5 MVL Patches

In addition to applied kernel patches, below is the list of MVL3.0 updates that were applied into our kernel:
MVL3.0 Updates
Patch Application:
real_time_fixes
CAN-2004-0077
CAN-2003-0985
cd /usr/src/linux patch -p1 [source]/mvl3.0.patch
cd /usr/src/linux patch -p1 < [source]/CAN-2004-
0077.patch
cd /usr/src/linux patch -p1 < [source]/CAN-2003-
0985.patch
6
XCI-SX1 SDK / SDK Technical Manual
CAN-2003-0961
cd /usr/src/linux patch -p1 < [source]/CAN-2003-
0961.patch
Where: [source] – location of the exploded patch
2.2 Kernel Configuration and Installation

2.2.1 Kernel Configuration

After applying the required patches to the kernel, it is time to set the kernel configurations. Please make sure that the following configurations are set before building the kernel.
Kernel Configurations
Kernel Features Remarks
ext3 file system
Minix file system Minix’s compact feature makes it ideal for read-
romfs
tmpfs
USB input device support Used for USB I/O Video4Linux Used for the camera module ATA/IDE Used to support IDE CF media Network options’ UNIX domain sockets RAM disk and initrd Used to allow an initrd image load and act as
Loop back device
To enable journaling on an IDE device such as a CF. A journalized file system is required in order to protect the CF’s XIP partition during abrupt hardware on/off events.
only and load-on-boot-time-only partitions Also known as cramfs. It is ideal for storing run­time, read-only data. This dynamic ramdisk fs is used for storing volatile data (such as contents of /tmp and the like)
To allow network communication
the embedded environment’s main file system Used as mount device for cramfs images
UNIX98 PTY, Standard/Generic Serial, and Virtual Terminal supports
Used for serial console terminal requirements
7
Loading...
+ 19 hidden pages