background image

LxNETES™ User’s Guide
ConnectCore 9P 9360/9750

Summary of Contents for 9P 9360/9750

Page 1: ...LxNETES User s Guide ConnectCore 9P 9360 9750 ...

Page 2: ......

Page 3: ...tional Digi provides this document as is without warranty of any kind either expressed or implied including but not limited to the implied warranties of fitness or merchantability for a particular purpose Digi may make improvements and or changes in this manual or in the product s and or the program s described in this manual at any time This product could include technical inaccuracies or typogra...

Page 4: ......

Page 5: ...breviations 14 Chapter 2 Requirements 15 System Requirements Prerequisites 15 System requirements 15 Disk space 16 Applications Services 17 TFTP daemon 17 NFS server 18 JTAG Booster 19 Chapter 3 Getting Started 21 Introduction 21 Connecting host PC with development board 21 Step 1 Connect serial port 21 Step 2 Connect Ethernet interface 21 Step 3 Configure terminal client 21 Minicom 22 Seyon 22 St...

Page 6: ...cations 34 Included pre built applications 36 Shell applications busybox 36 Telnet daemon utelnetd 36 Web server Boa 36 Debug server gdbserver 36 Nano X microwindows 37 Embedded Qt 37 Useful applications 38 mem 38 Chapter 6 Kernel Development 39 Writing kernel modules 39 What is a kernel module 39 Writing your own kernel modules 39 Add your source files 39 Add the module to the build environment 4...

Page 7: ...n 52 Step 3 Write the image to Flash 52 ConnectCore 9P 9360 9750 53 U Boot 53 Kernel 53 Root File System 53 Updating a corrupted system using a debugger 54 ConnectCore 9P 9360 9750 54 Chapter 8 Root File System Types 55 NFSROOT 55 Step 1 Set bootargs to be passed to the kernel 56 Step 2 Download the kernel to RAM via TFTP 56 Step 3 Launch the kernel from RAM 56 JFFS2 57 Step 1 Set bootargs to be p...

Page 8: ...ce 64 Appendix A 65 Related documentation 65 CD contents 65 Readme txt 66 RelNotes txt 66 install sh 66 docs 66 images 66 ConnectCore 9P 9360 CC9P9360 67 ConnectCore 9P 9750 CC9P9750 67 hardware 67 LxNETES 67 setup 67 upstream 68 U Boot 68 Memory layouts 68 Flash memory layout 68 ConnectCore 9P 9360 ConnectCore 9P 9750 68 SDRAM memory layout 68 ConnectCore 9P 9360 ConnectCore 9P 9750 69 Appendix B...

Page 9: ...BN 0 596 00590 3 2 Debian Reference http www debian org doc manuals reference reference en html The following sections explain the several parts that compose the LxNETES package Cross development environment Whenever you need to generate code for an embedded target on a development system with a different microprocessor architecture you need a cross development environment That is you need a compi...

Page 10: ...ill contain The specific kernel configuration The root file system directory structure and files The applications compiled With one simple command the compilation process takes care of compiling the kernel the applications generating the target s file system and compressing into the final binary images The compilation process take place within the project folder with normal user permissions Exampl...

Page 11: ...T ARM ARM and XScale processors General features With LxNETES you receive a Development Kit and BSP with the following features Support for Linux kernel 2 6 Support for the following NET ARM ARM and Intel X Scale processors NetSilicon NS9750 NS9360 Samsung S3C2440 S3C2410 Intel PXA270 Atmel AT91RM9200 For existing LxNETES customers LxNETES 3 2 uses a different uClibc than previous versions of LxNE...

Page 12: ...other operating systems from Ethernet Flash memory and USB C and C support for application development gcc 3 4 4 cross compiler for Net ARM ARM and XScale processors uClibc 0 9 27 for user applications Pre built Busybox and other applications Telnet daemon utelnetd Web server BOA Nano X and QT embedded sample projects Shared library support Project oriented workflow kernel configuration and rootfs...

Page 13: ... and new terms Style Used in examples to show the contents of files the output from commands or in the text the C code Style Used in examples to show the text that should be typed literally by the user This prompt indicates that the listed commands have to be executed as a root This prompt indicates that listed commands have to be executed as a normal user 1 Used to indicate an item of the referen...

Page 14: ...DHCP Dynamic Host Configuration Protocol RFC 2131 GDB GNU debugger GPIO General Purpose Input Output INITRD Initial Ram Disk IP Internet Protocol JFFS 2 Journaling Flash File System version 2 JTAG Joint Test Action Group IEEE 1149 1 MMU Memory Management Unit NFS Network File System ROMFS ROM File System ROOTFS Root File System RTC Real Time Clock TFTP Trivial File Transfer Protocol USB Universal ...

Page 15: ...opment This documentation is based on the Debian Linux distribution however other distributions with minor changes in the settings can also be used Please refer to the manuals of your Linux distribution if settings are not working as described in this document The following software is required on your development system GNU C library glibc 2 3 GNU C compiler gcc 2 95 3 3 3 or higher recommended G...

Page 16: ...se GNU Make version 3 80 or later Check yours with the following command Check the versions of required applications with these commands Disk space The LxNETES installation needs 400 MB of free disk space Every project you create needs another 100 MB free disk space The LxNETES installation and the projects can be located on different hard disks Check if there is enough space available on your dri...

Page 17: ...ter to the target Debian users can execute the following command to install a TFTP server After completing installation create a directory using the path tftboot where exported files are located Your images can be placed in the directory automatically by the LxNETES build environment You must be root to create this directory To make sure that your TFTP server is using the tftpboot directory check ...

Page 18: ...g a different distribution When the NFS server package Debian package nfs kernel server is installed on Debian there is a file etc exports that contains information on exported directories and its access rights Add the following line to this file to provide read write access for your target BOOTDIR needs to be replaced with the path to the NFS root directory which is exported to the target The IP_...

Page 19: ... of dosemu needs the entry To install the JTAG Booster software copy the directory hardware from the CD to any directory on the hard disk This directory may also contain a file Readme txt with the latest instructions Ensure that the parallel port is accessible for the application If you are using Microsoft Windows NT 2000 or XP you have to install the Kithara DOS Enabler which is shipped on the Lx...

Page 20: ...S y s t e m R e q u i r e m e n t s P r e r e q u i s i t e s 2 0 L x N E T E S U s e r s G u i d e ...

Page 21: ... to interact with the target device Step 2 Connect Ethernet interface The Ethernet connection can be established by connecting a crossover cable directly to the development board s Ethernet port and your host PC Alternatively if you already have a running network configuration you can connect the development board to your hub or switch Step 3 Configure terminal client Configure a terminal client t...

Page 22: ...change the values to your environment Figure 3 4 Minicom settings Next time start minicom as a standard user with Seyon Start Seyon as a standard user by entering Go to Seyon Command window and press Set In the Settings window you can adjust the settings Unless otherwise stated it is assumed your target is connected to the first serial port COM 1 ttyS0 of your host If you use another port change t...

Page 23: ...ment board After power on the LEDs on the board will light up and 2 4 seconds later the system will print boot messages on the console After 20 25 seconds the boot loader has unpacked and launched the pre installed Linux kernel from the built in Flash memory You will see output on the terminal client similar to the output below ...

Page 24: ... 20000000 32 MB AM29LV128M 16MB Flash 16 MB In serial Out serial Err serial Hit any key to stop autoboot 0 Booting image at 20100000 Image Name Linux 2 6 12 Created 2005 06 17 11 29 13 UTC Image Type ARM Linux Kernel Image uncompressed Data Size 2478816 Bytes 2 4 MB Load Address 20008000 Entry Point 20008000 Verifying Checksum OK OK Starting kernel Linux version 2 6 12 root lxnetes gcc driver vers...

Page 25: ...g eth0 Link encap Ethernet HWaddr 12 34 56 78 9A BC inet addr 192 168 42 10 Bcast 192 168 42 255 Mask 255 255 255 0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 3453 errors 0 dropped 0 overruns 0 frame 0 TX packets 62 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 1000 RX bytes 399740 390 3 KiB TX bytes 6726 6 5 KiB Interrupt 24 Base address 0xc000 ping 192 168 42 1...

Page 26: ...lan to be the only developer on your system it is a good idea to install LxNETES to your home directory Otherwise you should use a global directory like usr local After selecting the installation click INSTALL If an error accurs e g no permissions to write to the directory the progress bar will turn red and an error message will appear If your system isn t able to run the graphical installer a she...

Page 27: ...7 G e t t i n g S t a r t e d Manual Installation Instead of using the installation script you can do the installation manually Just copy the directory LxNETES on the CDROM to a directory on your host PC ...

Page 28: ...M a n u a l I n s t a l l a t i o n 2 8 L x N E T E S U s e r s G u i d e ...

Page 29: ...ory Create a new directory underneath and change to that directory Then execute configure for your platform to configure your project Example This configures your project for the default platform If you want to configure another platform you have to specify it as a parameter to the configure script for example The names for available platform ConnectCore 9P 9360 cc9p9360dev cd HOME LxNETES 3 2 LxN...

Page 30: ...nfigure finished successfully run make This will build your first kernel image Step 3 Run make install If the configure script was able to detect the directories for exporting a root file system via TFTP and NFS serving add install to the make command to copy the output files from the build process to the appropriate locations checking which directory to install bootfiles to tftpboot checking whic...

Page 31: ... system Adding your own applications To add a new application run the script bin add_app with the name of the new application as first parameter Example This command creates a sample application named customapp in the folder apps customapp in the source directory Edit the file apps customapp customapp c to insert your application code To use more than one source file just create the source files a...

Page 32: ...several applications included in the project template with full source code display This is a simple application that demonstrates the usage of the Common Gateway Interface CGI to communicate data between the embedded web server BOA and a target s application Open a web browser in your development PC and type the IP address of the target in the address box to access the embedded web page of the ta...

Page 33: ...3 3 A p p l i c a t i o n D e v e l o p m e n t Table 6 3 proc cpuinfo contents ...

Page 34: ...rebuild the application with the following command A binary mem will be created and copied to the rootfs Restart the target with the new rootfs Run the debug server on the target with the following commands Port number 2001 was selected randomly Now start the debug client on the host and connect to the target with LxNETES3 2 rm apps mem o apps mem mem LxNETES3 2 make apps DEBUG 1 install gdbserver...

Page 35: ...e arm linux gdbtui on the command line instead of arm linux gdb gdb set architecture ARCHITECTURE gdb set solib absolute prefix INSTALL_DIR gdb target remote TARGET IP 2001 gdb set architecture Requires an argument Valid arguments are arm armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te xscale ep9312 iwmmxt auto Valid Argument CC9C CCXP270 UNC90 A9M2410 A9M2440 CC9P9360 9750 armv4 x x a...

Page 36: ...for daemons LxNETES has stripped off the less important applications in order to obtain a small busybox binary Telnet daemon utelnetd Utelnetd is a small telnet daemon It is launched by init For login use the Telnet on our host computer to connect to the target You don t need to provide username or password Web server Boa Boa is a small single tasking HTTP server The configuration file boa conf is...

Page 37: ... small variant from the Troll Tech Cross Platform GUI toolkit A demo is included To start the demo enter the following For further information see http www trolltech com products qt3 embedded nano X nanox_bar On targets with small flash nano X is disabled by default You may pass enable nano X to configure despite the flash size but you risk overwriting the rootfs on the target qthello qws On targe...

Page 38: ...mands mem h c addr len Display char at w addr len Display word at i addr len Display int at s addr Display string at B addr val len Write byteval at addr W addr val len Write wordval at addr I addr val len Write intval at addr addr txt len Search string at h Display this help q Quit b 0x31000000 32 0x31000000 0xff 0xff 0xff 0xbf 0xfd 0x7d 0xbf 0xcd 0xf9 0xfb 0xfe 0xfb 0xff 0xfb 0xff 0xfb 0x3100001...

Page 39: ...y directly into the kernel image Besides having extensive kernels you would be required to rebuild and reboot the kernel for every new functionality Writing your own kernel modules Some kernel modules are included as examples They can be found in the modules subdirectory of the project folder Each kernel module must be stored in a different folder The easiest way to create your own kernel module i...

Page 40: ...el modules For building the new kernel module just rebuild your project by issuing make in the build directory If you reboot your target with the newly created rootfs or if you mount your rootfs via nfs The modules can be loaded in the target with modprobe my_kmodule There is an example minimal c for the most minimalist kernel module Try it with modprobe minimal Included Kernel modules minimal Thi...

Page 41: ... by U Boot Kernel configuration lowest priority The kernel command line parameters can overwrite some configurations However if there is no boot loader the only way the kernel command line parameters can be entered is by compiling them into the kernel To change the kernel configuration to the needs of your target system enter the following commands from the project build directory The menu driven ...

Page 42: ...x N E T E S U s e r s G u i d e Once you have configured the kernel to your system needs save the configuration and exit To rebuild the kernel use one of the build commands seen before make to build the entire project make uImage to build only the linux kernel ...

Page 43: ... configure Now you can reconfigure your custom kernel by running You can build and install the project for the default platform after the previous steps are complete LxNETES 3 2 build bin add_platform b cc9p9360dev custom checking whether make sets MAKE yes LxNETES 3 2 build cd LxNETES 3 2 mkdir build_custom LxNETES 3 2 cd build_custom LxNETES 3 2 build_custom configure enable platform custom LxNE...

Page 44: ...ystem configuration The low level initialization of the microprocessor memory controllers and other board specific hardware varies from board to board and CPU to CPU These initializations must be performed before a Linux kernel image can execute At a minimum a boot loader for an embedded system performs the following functions Initialize the hardware especially the memory controller Provides boot ...

Page 45: ... environment variables in the nonvolatile memory Then it waits some seconds programmable before it loads and starts the operating system image You can stop the auto boot process by sending a character to the serial port pressing a key on the serial console connected to the target If stopped U Boot displays a command line console similar to this U Boot 1 1 3 Sep 15 2005 17 02 40 FS 1 CC9P9360 modul...

Page 46: ... it NAND Flash This method will load the Linux kernel and the root file system from NAND Flash Use the nand read jffs2 command to load the kernel from the NAND flash After copying the kernel image from NAND to flash you can run it with bootm setenv bootargs console ip ipaddr serverip netmask 2440 eth0 off root nfs nfsroot serverip npath tftp load_addr kernel_image bootm load_addr A faster way to d...

Page 47: ... guu are provided Enter the following to copy the kernel from the USB stick to the memory The image can now be executed with the bootm command There is also a macro for boot_usb which does both steps It is run boot_usb A faster way to do this is to use the boot_flash macro setenv bootargs console ip ipaddr serverip netmask 2440 eth0 off root dev mtdblock2 rootfstype jffs2 cp b start flash load_add...

Page 48: ...ash memory Linux boot process The command bootm uncompress the kernel and runs the function start_kernel Once the kernel is started several options are given to the kernel machine type command line and ATAG list The kernel itself does some basic initialization MMU Machine Type Interrupt Handler Timer Loading drivers run update_kernel_usb ...

Page 49: ...55 255 0 a9m9360 eth0 off nfsroot 192 168 42 1 exports nfsroot cc9p9360dev root nfs PID hash table entries 256 order 8 4096 bytes Console colour dummy device 80x30 Dentry cache hash table entries 8192 order 3 32768 bytes Inode cache hash table entries 4096 order 2 16384 bytes Memory 32MB 32MB total Memory 29756KB available 2097K code 387K data 104K init Mount cache hash table entries 512 CPU Testi...

Page 50: ...to enable a console on a different serial port than the standard one when Linux boots add console ttyS1 Automating the image download It is also possible to automate the boot process to always boot by network when the target is reset Adjust the environment variable bootcmd to contain the run boottftp script seen before Don t forget saveenv to store your settings Updating the Flash memory This chap...

Page 51: ...pt You can also copy the images onto a vfat formatted usb stick connect it to the target and run one or more of these macros from the U Boot prompt Updating a running system manually Advanced users may want to have more control over the flash update process In this case use the steps below to update an image on a running system It is presumed you are using the memory layout as described in Appendi...

Page 52: ...range to be deleted For modules with NAND flash use this command For modules with NOR flash use this command Step 3 Write the image to Flash After the image is downloaded into RAM and the flash erased the new image can be copied into Flash For modules with NAND flash use this command mw l start address in RAM end address in RAM image size tftp start address image name Filename image name Load addr...

Page 53: ...00 tftp 100000 u boot_image nand erase 0 40000 nand write jffs2 100000 0 u boot_image_size reset Kernel To update the Linux kernel image type tftp 100000 kernel_image nand erase 40000 2C0000 nand write jffs2 100000 40000 kernel_image_size Root File System To update the root file system type tftp 100000 rootfs_image nand erase 300000 Size of flash 3MB nand write jffs2 100000 300000 rootfs_image_siz...

Page 54: ...he two black cables point to pin 1 Set DIP switch S4 1 to on and S4 2 to S4 8 to off Copy the JTAG tools from the LxNETES 3 2 CD to the host system A detailed manual how to setup the JTAG Booster can be found on the LxNETES 3 2 CD hardware jtag On a Linux system use a tool like dosemu to get the JTAG tools running Once you have installed the JTAG tools on your host computer copy the U Boot image t...

Page 55: ...m integrity since the server is basically impervious to crashes by the client and provides virtually infinite storage During development it feel free to use an NFS directory as root file system This avoids unnecessary flash erases which on a power failure will result in the need to re program the kernel into flash It also increases the lifetime of the module because the flash has a limited number ...

Page 56: ...eady set The values for ip and console have to be filled depending on the platform Step 2 Download the kernel to RAM via TFTP The following commands download the tftpboot uImage unc90 image to RAM memory Step 3 Launch the kernel from RAM Now that the kernel image has been downloaded to RAM we can execute Linux with the following command run boot_net setenv bootargs nfsroot serverip nfspath root nf...

Page 57: ...ft for reserve blocks In U Boot you can run the nand bad command for a summary of known bad blocks on the flash device In Linux a JFFS2 driver for NOR and NAND chips can be used If a jffs2 image should be copied to a partition it must be ensured that the image was created with the correct erase size of the used chip Otherwise Linux will print error messages on the screen To reduce memory allocatio...

Page 58: ...commands to manually initate these commands Step 2 Copy the kernel to RAM Depending on the flash type of your platform use for NOR flash the following command to copy the kernel from Flash to RAM memory For NAND flash use the following command Step 3 Launch the kernel from RAM Now that the kernel image has been copied to RAM we can execute Linux with the following command jffs2_get_inode_nodes Dat...

Page 59: ...5 9 R o o t F i l e S y s t e m T y p e s You should use a separate data partition for your data which is frequently updated so your rootfs does not get corrupted ...

Page 60: ...6 0 L x N E T E S U s e r s G u i d e ...

Page 61: ...uired to enable these interfaces Serial interface A driver for the serial interfaces is included and enabled in the default kernel configuration Devices can be accessed via dev ttyS n a9m2410 a9m2440 cc9c cc9p9360 cc9p9750 ccxp270 unc90 Compact Flash X X X X X only available on the UNCBASCF base board Ethernet X X X X X X X I2C Interface X X X X X X X LCD X X X X X PCI n a n a n a n a X n a n a RT...

Page 62: ... attached to the I2C interface can be accessed via sys bus i2c device your device SPI interface A driver for the SPI interface is included and enabled in the default kernel configuration It can be accessed via sys bus spi device your device LCD interface A LCD frame buffer driver is included and enabled in the default Linux kernel configuration Touch screen interface CC9P9360 9750 A driver for the...

Page 63: ...abled in the default kernel configuration The system time and date is automatically set to the values of the RTC when the kernel boots This is done by calling sbin hwclock s How to set the initial system date and time Initially the RTC doesn t have a correct time date value so establish the correct time date on the Linux system using the date command The parameters are given in the format MMDDhhmm...

Page 64: ...ur target The small battery on the development board will keep the correct time date values and are saved when you power up your target again PCI interface A driver for the PCI interface can be enabled in the kernel configuration You can use Mini PCI cards with the Mini PCI slot on the development board hwclock Fri Jun 3 13 22 44 UTC 2005 0 000000 seconds ...

Page 65: ...ernel http u boot sourceforge net Homepage of the U Boot Loader http www uclibc org Homepage of the user library and user applications Toolchain is also created by uclibc s build flow http www abatron ch Manufacturer of the BDI2000 for debugging via JTAG http www samsung com Manufacturer of S3C2410 processor http www netsilicon com Manufacturer of NS9750 NS9360 processor http www atmel com Manufac...

Page 66: ... chapter 4 installation docs The doc folder contains this User s Manual and additional documentation images This folder contains pre built images for your target platform These images are already programmed into the Flash memory on all modules shipped with a development kit The files in the imags folder are named according to the following scheme File Description u boot platform bin U Boot boot lo...

Page 67: ...tup This folder contains files needed to install LxNETES File Description u boot cc9p9360dev bin U Boot boot loader image for the ConnectCore 9P 9360 module on the ConnectCore 9P development board uImage cc9p9360dev bin Linux kernel image for the ConnectCore 9P 9360 module on the ConnectCore 9P development board rootfs cc9p9360dev jffs2 Root file system for the ConnectCore 9P 9360 module File Desc...

Page 68: ...e of U Boot including all patches which are necessary for the specific target Memory layouts Flash memory layout The partitioning of the nonvolatile memory is described in this following table ConnectCore 9P 9360 ConnectCore 9P 9750 SDRAM memory layout The following tables describe some typical addresses in memory used by U Boot and Linux Flash Start Address Size Partition Name mtdblock 0x00000000...

Page 69: ...rt Address RAM End Address Description Used by 0x00000000 0x00080000 U Boot stack U Boot 0x00080000 TEXT_BASE 0x00080000 0x000C0000 U Boot 0x00100000 default load address in U Boot for Linux kernel Linux 0x00108000 entry point of the decompressed kernel ...

Page 70: ...M e m o r y l a y o u t s 7 0 L x N E T E S U s e r s G u i d e ...

Page 71: ... Boot commands Detailed information can be found at http www denx de wiki view DULG Manual stickboard tqm8xxl To get to the U Boot prompt press any key immediately after you have powered the target on or pressed reset At the prompt type help or to get an overview of the supported commands ...

Page 72: ... range imd i2c memory display iminfo print header information for application image imls list all images found in flash imm i2c memory modify auto incrementing imw memory write fill inm memory modify constant address iprobe probe to discover valid I2C chip addresses itest return true false on integer compare loadb load binary file over serial line kermit mode loads load S Record file over serial l...

Page 73: ...nand read ADDR OFF SIZE read SIZE bytes from OFF in NAND flash to ADDR If there are bad blocks the command stops with an error nand read jffs2s ADDR OFF SIZE read SIZE bytes from OFF in NAND flash to ADDR Bad blocks are skipped nand write ADDR OFF SIZE write SIZE bytes from ADDR to OFF in NAND flash If there are bad blocks or writing fails the command stops with an error nand write jffs2 ADDR OFF ...

Page 74: ... X b o o t m X X X X X b o o t p X X X X X b o o t v x c m p X X X X X c o n i n f o X X X X X c p X X X X X c r c 3 2 X X X X X d a t e X X X X e c h o X X X X X e e p r o m X X X f a t i n f o X X X X X f a t l o a d X X X X X f a t l s X X X X X f s i n f o X X X X f s l o a d X X X X g o X X X X X h e l p X X X X X i c r c 3 2 X X X X X i l o o p i m d X i m i n f o X X X X i m l s X i m m X i...

Page 75: ...age a9m2410dev bootm 30100000 and setenv bootcmd tftp 30100000 bootfile bootm 30100000 User keys Note CC9P9360 9750 and A9M2410 2440 only There are two User Keys on the development board which can be used with functions from U Boot It is common to use them for booting different kernel versions or using different rootfs For example When User Key 1 is pressed in the start phase of U Boot the content...

Reviews: