SDK Technical Manual Version 1.
XCI-SX1 SDK / SDK Technical Manual Table of Contents 1 2 Overview ----------------------------------------------------------------------------------------------------------- 1 1.1 Dependencies ------------------------------------------------------------------------------------------------ 1 1.
XCI-SX1 SDK / SDK Technical Manual 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.
XCI-SX1 SDK / SDK Technical Manual 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.
XCI-SX1 SDK / SDK Technical Manual 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.
XCI-SX1 SDK / SDK Technical Manual 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. Bootsplash Patch Patch Application: cd /usr/src/linux patch -p1 < [source]/bootsplash-3.0.72.4.18-vanilla.diff Where: [source] – path where the exploded patch is located 2.1.
XCI-SX1 SDK / SDK Technical Manual #include #include #include #ifndef CONFIG_PSKEYBOARD #define kbd_controller_present() #endif 0 #define KEYBOARD_IRQ 1 #define DISABLE_KBD_DURING_INTERRUPTS 0 . . . /* How to access the keyboard macros on this platform.
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 . 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.
XCI-SX1 SDK / SDK Technical Manual CAN-2003-0961 cd /usr/src/linux patch -p1 < [source]/CAN-20030961.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.
XCI-SX1 SDK / SDK Technical Manual MSDOS SCSI support NFS support Big Physical Area support Required file system support for mass storage devices Required support for mass storage devices Required support to enable the system to be accessed through NFS mount Used by the camera driver to reserve large memory area at boot time To apply the following configurations, go to /usr/src/linux and run make menuconfig and start going through the options.
XCI-SX1 SDK / SDK Technical Manual And finally, run make modules_install to copy all build modules to /lib/modules/2.4.18_mvl30-pc_target/ directory. Please copy this directory to the target system directory. 2.3 Environment System Configurations The SDK is installed some software and applied some settings. 2.3.1 Kernel Files The target file system needs to be configured due to the kernel updates made. To be sure, copy the following files to its proper destination.
XCI-SX1 SDK / SDK Technical Manual ----------------------------------------------------------# /etc/modules: kernel modules to load at boot time. # # This file should contain the names of kernel modules that are # to be loaded at boot time, one per line. Comments begin with # a `#', and everything on the line after them are ignored.
XCI-SX1 SDK / SDK Technical Manual ----------------------------------------------------------. . . echo -n "Configuring network interfaces: " /sbin/dhcpcd -t 30 > /dev/null 2>&1 /sbin/ifup -a echo "done." . . . ----------------------------------------------------------- 2.3.5 FTP Service To enable file transfer from and to the system, edit the /etc/inetd.conf to enable FTP service every time the system starts up. This feature would be very helpful during installations of other files.
XCI-SX1 SDK / SDK Technical Manual The user has to enter the password for the root user twice. The system is also required to have at least a single non-root user. The adduser command has been used to add another user. This is friendlier front end than the useradd command, choosing Debian policy conformant UID and GID values, creating a home directory with skeletal configuration, running a custom script, and other features.
XCI-SX1 SDK / SDK Technical Manual 2.4.2 Camera Driver The camera driver (smartcam.o) can now be added to the system. The camera driver module is installed in /lib/modules/2.4.18_mvl30pc_target/kernel/driver/smartcam directory. Before using the camera driver, make sure to invoke the following commands first: 1. mknod /dev/video0 c 81 0 - creates the special file node used by the camera driver 2.
XCI-SX1 SDK / SDK Technical Manual Just like the camera driver, running modprobe skxflash inserts the module to the kernel. Adding skxflash entry on the /etc/modules file will also enable this module to be loaded at system boot up. The source code of the flash driver is also installed in /usr/smartcam/src/skxflash directory. Just make to build skxflash.o. 2.5 Library Installation 2.5.
XCI-SX1 SDK / SDK Technical Manual Edit the /etc/ld.so.conf file and make sure the following lines exist and run ‘ldconfig’ command afterwards: • /lib • /usr/local/lib • /usr/X11R6/lib • /usr/src/linux/lib Make sure that the /dev/mouse node exists. If the said node does not exist, invoke mknod /dev/mouse c 13 63 Running ‘startx’ should be successful. To test if the mouse is properly working on X11 environment, run ‘xev’ command.
XCI-SX1 SDK / SDK Technical Manual Make sure that all the locale requirements are present in /usr/share/i18n/locales directory and the charmap requirements are in /usr/share/i18n/charmaps directory. The created locale environments are created stored in /usr/lib/locale directory. Sometimes, this directory still needs to be created. One way to verify the support for locale environment is through the xterm command.
XCI-SX1 SDK / SDK Technical Manual ----------------------------------------------------------#!/bin/sh # xinitrc - X11 start-up script # - customized for the Sony Smart Camera Project # 10/11/04 update /usr/X11R6/bin/xsetroot -solid smartcolor & /usr/X11R6/bin/xterm -bg black -fg white -cr yellow -geometry 120x45+0+0 -ls -display $DISPLAY & /usr/X11R6/bin/xterm -bg black -fg white -cr yellow -geometry 120x45+50+50 -ls -display $DISPLAY & /etc/init.
XCI-SX1 SDK / SDK Technical Manual - runs configuration scripts with generation of shared libraries enabled 2. make clean - automatically runs configure with the default (no) options and then removes all the binary objects. 3. make - compiles the FLTK library 4. make install - copies the required files to where they should be located (to /usr/local/lib) 2.5.3 LibJPEG The JPEG library is used for converting raw images generated by the camera into jpeg format. This functionality is used by the Web Monitor.
XCI-SX1 SDK / SDK Technical Manual - changes directory to source directory of PHP (/usr/src) 4. ./configure -–with-apache=/usr/src/apache_1.3.31 - runs configuration script of PHP with Apache support 5. make - builds PHP source codes 6. make install - installs required files to their proper locations 7. cd /usr/src/apache_1.3.31 - changes directory back to Apache source directory 8. ./configure -–activate-module=src/modules/php4/libphp4.a - Reconfigures Apache with PHP support 9.
XCI-SX1 SDK / SDK Technical Manual - SNMP server has been installed using 2c version 2. make - builds the package 3. make install - install the files In /var/etc/snmp/snmpd.conf ----------------------------------------------------------########################################################### # First, map the community name (COMMUNITY) into a security name (local # and mynetwork, depending on where the request is coming from): #---------------------------------------------------------# sec.
XCI-SX1 SDK / SDK Technical Manual # context model level match read write notif access smartcamROGroup "" any noauth exact all none none access smartcamRWGroup "" any noauth exact all all none ########################################################### # System contact information #---------------------------------------------------------sysdescr Sony Smart Camera ########################################################### # Trap destination #---------------------------------------------------------trapcom
XCI-SX1 SDK / SDK Technical Manual 2.6.4 GKermit G-Kermit is a Unix program for transferring files with the Kermit protocol. G-Kermit is a product of the Kermit Project at Columbia University in New York City. G-Kermit is fast, small, portable, easy to use, interoperable, low-maintenance, stable, and reliable. It features text and binary file transfer on both 7-bit and 8-bit connections. Files can be transferred singly or in groups.
XCI-SX1 SDK / SDK Technical Manual This directory contains the header files of the drivers and libraries created for this project. These file are grouped according to its purpose as described below: • gpio This folder contains the header files of the APIs provided for the controlling the GPIO ports. Files provided include gpiolib.h header file. • camera The smartcam subdirectory contains the smartcam.h file. This file is the header file of the camera driver.
XCI-SX1 SDK / SDK Technical Manual o config.o 2.8.4 /usr/smartcam/gui Directory This directory contains the symbolic-linked files used for the smartcam.gui application. It contains the keyboard folder which contains all the images for the software keyboard used on the GUI application. It also contains the standard folder which in turn contains the images used for displaying the GUI application. 2.8.5 /usr/smartcam/src Directory This directory contains source code of drivers and libraries.
XCI-SX1 SDK / SDK Technical Manual • smartcamlib Samples for using common libraries. 2.8.7 /sbin/ Directory Some system specific files are added to /sbin directory. The SDK users can try them on SDK environment. /sbin File Listing Filename CamConfig ledC ledD skxinport skxled skxoutport skxswt gpio gpiodemo atoi char htoi Description Sets and queries the camera registers The client application for GPIO LED control.
XCI-SX1 SDK / SDK Technical Manual the third party application on the launcher option and if a third party application is present on the /var/etc/plugins directory, the third party application will be launched. Another configuration customized for this environment is the syslog file.