handbuch id swrwdemo-a isc lru… · obid® manual isc.sdk.lru1000.acc v0.14.00 feig electronic...

22
MANUAL final public (B) 2005-04-08 H41001-0e-ID-B.doc OBI D ® ID ISC.SDK.LRU1000.ACC Version 0.14.00 Software-Support for Embedded Software Development for ID ISC.LRU1000 μClinux

Upload: others

Post on 08-May-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

MANUAL

finalpublic (B)2005-04-08H41001-0e-ID-B.doc

OBID®

ID ISC.SDK.LRU1000.ACCVersion 0.14.00

Software-Support for

Embedded Software Development

for

ID ISC.LRU1000

µClinux

Page 2: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 2 (of 22) H41001-0e-ID-B.doc

Note

© Copyright 2004-2005 by FEIG ELECTRONIC GmbHLange Straße 4D-35781 Weilburg-WaldhausenGermanyeMail: [email protected]

This manual supercedes all previous editions.The information contained in this manual is subject to change without notice.

Copying of this document, and giving it to others and the use or communication of thecontents thereof, are forbidden without express authority. Offenders are liable to thepayment of damages. All rights are reserved in the event of the grant of a patent or theregistration of a utility model or design.

The information contained in this manual has been gathered with all due care and to the best of our knowledge. FEIGELECTRONIC GmbH assumes no liability for the accuracy and completeness of the data in this manual. In particular,FEIG ELECTRONIC GmbH cannot be held liable for consequential damages resulting from inaccurate or incompleteinformation. Since even with our best efforts this document may still contain mistakes, please contact us should you findany errors.

OBID® and OBID i-scan® are registered Trademarks of FEIG ELECTRONIC GmbH.

Microsoft®, Windows® are registered Trademarks of Microsoft Corporation

Linux® is a registered Trademark of Linus Torvalds.

ARM® is a registered Trademark of ARM Limited.

Page 3: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc

Licensing agreement for use of the softwareThis is an agreement between you and FEIG ELECTRONIC GmbH (hereafter "FEIG") for use of the ID ISC.SDK.LRU1000.ACCSoftware Development Kit and the present documentation, hereafter called licensing material. By installing and using the software youagree to all terms and conditions of this agreement without exception and without limitation. If you are not or not completely inagreement with the terms and conditions, you may not install the licensing material or use it in any way. This licensing material remainsthe property of FEIG ELECTRONIC GmbH and is protected by international copyright.

§1 Object and scope of the agreement

1. FEIG grants you the right to install the licensing material provided and to use it under the following conditions.

2. You may install all components of the licensing material on a hard disk or other storage medium. The installation and use may alsobe done on a network fileserver. You may create backup copies of the licensing material.

3. FEIG grants you the right to use the documented program library for developing your own application programs or programlibraries, and you may sell the runtime files LRU1000 and FEDPRDRV.O, included in your own kernel image, without licensing feesunder the stipulation that these application programs or program libraries are used to control devices and/or systems which aredeveloped and/or sold by FEIG.

§2. Protection of the licensing material

1. The licensing material is the intellectual property of FEIG and its suppliers. It is protected in accordance with copyright, internationalagreements and relevant national statutes where it is used. The structure, organization and code of the software are a valuablebusiness secret and confidential information of FEIG and its suppliers.

2. You agree not to change, modify, translate, reverse develop, decompile, disassemble the program files or the documentation or inany way attempt to discover the source code of this software.

3. To the extent that FEIG has applied protection marks, such as copyright marks and other legal restrictions in the licensing material,you agree to keep these unchanged and to use them unchanged in all complete or partial copies which you make.

4. The transmission of licensing material in part or in full is prohibited unless there is an explicit agreement to the contrary betweenyou and FEIG. Application programs or program libraries which are created and sold in accordance with §1 Par. 3 of thisAgreement are excepted.

§3 Warranty and liability limitations

1. You agree with FEIG that is not possible to develop EDP programs such that they are error-free for all application conditions. FEIGexplicitly makes you aware that the installation of a new program can affect already existing software, including such software thatdoes not run at the same time as the new software. FEIG assumes no liability for direct or indirect damages, for consequentialdamages or special damages, including lost profits or lost savings. If you want to ensure that no already installed program will beaffected, you should not install the present software.

2. FEIG explicitly notes that this software makes it possible for irreversible settings and adaptations to be made on devices whichcould destroy these devices or render them unusable. FEIG assumes no liability for such actions, regardless of whether they arecarried out intentionally or unintentionally.

3. FEIG provides the software „as is“ and without any warranty. FEIG cannot guarantee the performance or the results you obtainfrom using the software. FEIG assumes no liability or guarantee that the protection rights of third parties are not violated, nor thatthe software is suitable for a particular purpose.

§4 Concluding provisions

1. This Agreement contains the complete licensing terms and conditions and supercedes any prior agreements and terms. Changesand additions must be made in writing.

2. If any provision this agreement is declared to be void, or if for any reason is declared to be invalid or of no effect, the remainingprovisions shall be in no manner affected thereby but shall remain in full force and effect. Both parties agree to replace the invalidprovision with one which comes closest to its original intention.

3. This agreement is subject to the laws of the Federal Republic of Germany. Place of jurisdiction is Frankfurt a. M.

Page 4: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 4 (of 22) H41001-0e-ID-B.doc

Contents:

1. Introduction...................................................................................................................5

2. System Requirements ..................................................................................................6

3. Hardware Features of ACC ..........................................................................................6

4. Development Features .................................................................................................6

5. Table of content of SDK ...............................................................................................7

6. Installation.....................................................................................................................9

7. Changes since the previous version......................................................................... 10

8. Modifications in the LxNETES Distribution .............................................................. 11

8.1. Kernel Configuration..........................................................................................................11

8.2. Kernel files..........................................................................................................................11

8.3. Build files ............................................................................................................................12

8.4. Runtime files.......................................................................................................................12

9. Programming Interface............................................................................................... 13

10. Communication Ports............................................................................................... 14

11. Restrictions ............................................................................................................... 15

12. Appendix ................................................................................................................... 16

12.1. Kernel Configuration for Release Version .....................................................................16

12.2. Kernel Configuration for Debug Version .......................................................................17

12.3. Modifications in the file build.sh.....................................................................................18

12.4. Modifications in the file etc/inittab .................................................................................19

12.5. Modifications in the file etc/init.d/rcS.............................................................................20

12.6. Modifications in the file custom.h ..................................................................................21

12.7. Revision history ...............................................................................................................22

Page 5: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 5 (of 22) H41001-0e-ID-B.doc

1. Introduction

The ID ISC.SDK.LRU1000.ACC is a Software Development Kit (SDK) intended to assist inprogramming embedded applications executable inside the Application and Connectivity Controller(ACC) of the OBID® UHF Long-Range Reader ID ISC.LRU1000.

The OBID® UHF Long-Range Reader ID ISC.LRU1000 has two on-board controllers: a RF-Controller and an Application and Connectivity Controller. The first one is deeply embedded andnot programmable by customers. It realizes the tag communication. The second one is based onthe CPU module UNC20 from FS Forth Systeme, Germany (www.fsforth.de) with an ARMprocessor and µClinux, an adapted Linux for MMU-less CPUs. This controller handles thecommunication ports, the reader settings and implements the reader modes. On top of the basicmain application, customers can build their own application to realize higher level applications or toimplement other communication standards.

Important Note: The basic documentation for software developers is the system manual H40802-xe-ID-B.pdf of the OBID® UHF Long-Range Reader ID ISC.LRU1000 and should be read firstbefore beginning with programming.

Fig. 1: Software Architecture of ACC

LRU1000

ACC with uClinux

uClinux-Kernel

COM

LAN

C++ ApplicationLRU1000

RF-Controller

RF-Firmware LRU1000

Customers

C++ Application

FEIGLibraries

WLAN

FEIGLibraries

CustomersLibrariesFEIG Libraries

Customers Libraries

IP: 127.0.0.1:10001

Page 6: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 6 (of 22) H41001-0e-ID-B.doc

2. System Requirements

• Reader ID ISC.LRU1000 with ACC

• LxNETES V2.3 distribution for UNC20

• Patches for serial_netarm_dma.c and time.c

• JTAG-Booster for flashing the UNC201

• Development platform is Linux (SuSE, RedHat, ...)

• Debugger like DDD

3. Hardware Features of ACC

• Embedded Controller Board UNC20 from FS Forth-Systeme (www.fsforth.de)

• NetSilicon NS7520 with ARM7TDMI Kernel

• 55 MHz

• 8MB Flash (65% free for applications)

• 16 MB RAM (50% free for applications)

• 10/100 Ethernet MAC

• 2 serial interfaces

4. Development Features

• GNU compiler collection (www.gnu.org)

• C and C++

• uClibc library (www.uclibc.org)

• POSIX® Threads (pthread library)

• Standard Template Library (STL)

• CGI and HTML support, Web Server

• Optional: Java Virtual Machine (‚Mika‘) available from FS Forth-Systeme

1 The JTAG booster accelerates the flash of UNC20 dramatically. Alternatively, the flash can be done withonboard tools. JTAG-Booster can be ordered by FsForth-Systeme

Page 7: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 7 (of 22) H41001-0e-ID-B.doc

5. Table of content of SDK

The SDK is a assembly of different files located in directories

and consists of the following components:

File Use Location

lru1000 Binary of main application of ACC apps/bin

fedprdrv.o Kernel driver binary apps/bin

FECOM library Archive library for serial communication. For moreinformation see manual for this library.

apps/lib-files apps/include-files

FETCP library Archive library for socket communication. For moreinformation see manual for this library.

apps/lib-files apps/include-files

FEISC library Archive library for OBID i-scan® Reader. For moreinformation see manual for this library.

apps/lib-files apps/include-files

FEDM library Archive C++ class library for OBID i-scan® Reader. Formore information see manual for this library.

apps/lib-files apps/fedm-classlib

lru1000_acc_xxyyzz Original kernel image. original image

files to make Linuxkernel and image

Configuration files, makefile, etc. linux etc etc/init.d

Page 8: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 8 (of 22) H41001-0e-ID-B.doc

patches for Linuxkernel

serial_netarm_dma.c and time.c kernel files

lru1000_sample C++ sample project as a template for own applications. apps/lru1000_sample

manual files manuals manuals/…

Page 9: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 9 (of 22) H41001-0e-ID-B.doc

6. Installation

The Installation must be performed manually. It is provided that the LxNETES distribution isinstalled first.

• Copy the file lru1000 to a directory e.g. /targets/LxNETES/project_uncbascf/apps/bin-files andchange the build.sh in that way that this file is included to the kernel image (see 12.3.Modifications in the file build.sh).

• Copy the file fedprdrv.o to a directory e.g. /targets/LxNETES/project_uncbascf/apps/bin-filesand change the build.sh in that way that this file is included to the kernel image (see 12.3.Modifications in the file build.sh).

• Copy the kernel configuration files .feig_rel_kernel_conf and .feig_dev_kernel_conf to e.g./targets/LxNETES/project_uncbascf/linux. In the kernel build process, one of these files mustbe load with xconfig and saved as .config file.

• Copy the lru1000_sample project to e.g./targets/LxNETES/project_uncbascf/apps/lru1000_sample and change the build.sh in that waythat the compiled lru1000_sample is included to the kernel image.

• Copy the include-files (*.h) of the libraries to e.g. /targets/LxNETES/project_uncbascf/apps/include-files.

• Copy the fedm class library files (*.h) of the libraries to e.g./targets/LxNETES/project_uncbascf/ apps/fedm-classlib.

• Copy the lib-files (*.ar) of the libraries to e.g. /targets/LxNETES/project_uncbascf/ apps/bin-files.

• Copy the files in the etc directory to the /targets/LxNETES/project/etc.

• Copy the kernel patches to the following directories:

serial_netarm_dma.c to /usr/local/LxNETES-2.3/linux/drivers/chartime.c to /usr/local/LxNETES-2.3/linux/arch/armnommu/mach-netarm

• Copy the files of the linux directory to the following directories:

Makefile to /targets/LxNETES/project_uncbascfbuild.sh to /targets/LxNETES/project_uncbascfcustom.h to /targets/LxNETES/project_uncbascf/linux/include/asm-armnommu/arch-netarm.feig_dev_kernel_config to /targets/LxNETES/project_uncbascf/linux.feig_rel_kernel_config to /targets/LxNETES/project_uncbascf/linux

Page 10: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 10 (of 22) H41001-0e-ID-B.doc

7. Changes since the previous version

• first release

Please note also the revision history in the Appendix to this document.

Page 11: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 11 (of 22) H41001-0e-ID-B.doc

8. Modifications in the LxNETES Distribution

8.1. Kernel Configuration

The kernel configuration is adapted to the hardware and software requirements of the reader IDISC.LRU1000 (s. 12.1. Kernel Configuration for Release Version).

The adaption to the hardware is realized with the file custom.h and configures the internal registersand the timing for external memory of the ACC. All the other adaptions are realized with modifiedkernel parameters in the kernel’s .config file.

As a short summary, the kernel configuration has the following modifications against the originalkernel settings of the UNC20 distribution. Most modifications are a must, others can be changed.

No Kernel-Parameter Requirement

1. both serial ports are configured for reader communication must

2. thus, the console is disabled must

3. the rescue kernel is disabled can

4. Samba support is enabled. Samba is necessary for flash updates with WindowsPCs

must

5. I2C and Real-Time Clock support are enabled must

6. allocation of large memory blocks is enabled must

7. DHCP support is disabled can

8. compiled-in kernel boot parameters enabled and defined must

9. System V IPC support enabled must

10. EEPROM disabled must

8.2. Kernel files

The latest bug fixes are shipped with this SDK. For installation of these files, please have a look to6. Installation.

Page 12: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 12 (of 22) H41001-0e-ID-B.doc

8.3. Build files

The build process creates the image for the ACC. The modifications by FEIG enshures, that thekernel driver and the main application are integrated. For more information s. 12.3. Modifications inthe file build.sh.

8.4. Runtime files

The boot process is controlled by some files in the etc directory. To disable the settings for theconsole and prevent the load of run-time kernel parameters from EEPROM, the file etc/inittab andetc/init.d/rcS are modified. Additionally, rcS initializes the linux clock with the integrated real-timeclock, loads the kernel driver and starts the main application. For detailled informations, s. 12.4.Modifications in the file etc/inittab and 12.5. Modifications in the file etc/init.d/rcS.

Page 13: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 13 (of 22) H41001-0e-ID-B.doc

9. Programming Interface

Programming for the ACC inside the LRU1000 is just like the software development for a PCapplication. Only some restrictions must be considered as described in 11. Restrictions.

The development process is supported by the libraries FECOM, FETCP, FEISC and FEDM whichrepresents an identical API inside the ACC as under Windows or Linux. These libraries can beused, but it’s not a must. If these libraries are used, the programming interface is documentedinside the library manuals. If the libraries are not used, the communication with the mainapplication is exactly described in the system manual of the reader.

However, the system manual of the reader is the most important manual for software developers.

The sample application lru1000_sample, shipped with this SDK, is an easy entry to setup a newapplication. It forwards the reader protocols between the ACC main application and a hostapplication, like ISOStart.

The sample uses the libraries and demonstrates minimal solution for communication threads (withpthread library) and the necessary initialization inside the main function.

Fig 2: Software Support for uClinux

Applications-Level FECOM

FEISC

Function Libraries (.ar)

FETCP

uClinux-driver

RS232 RS485

Kernel-LeveluClinux-

driver

LAN

FEDM

C++ Class Library (.ar)

Page 14: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 14 (of 22) H41001-0e-ID-B.doc

10. Communication Ports

The ACC can manage up to four different communication ports: RS232, RS485 or RS422, LANand WLAN. To avoid communication conflicts between the main application and the customersapplication, some settings for the reader should be done prior the start of the customersapplication.

The designated communication ports for the main application are set as enabled in the readersEEPROM and at least one port must be enabled. All other ports can be used by the customersapplication.

It is suggested, that only the LAN port is enabled and the factory default settings are used. In thiscase, customers application can use the ip address 127.0.0.1 and port 10001 for communicationwith the main application. The lru1000_sample shows the necessary code.

When the customers application has established a connection, then the main application is notconnectable by LAN. This means, that the readers setting in the EEPROM must be handled by thecustomers application. If you wish to have a communication port to the main application for otherhost applications, e.g. to change readers parameters with a tool like ISOStart, then you must eitherdisconnect the customers application from the main application to deblock the LAN channel or youmust enable an unused communication channel in the readers EEPROM, like RS232.

Page 15: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 15 (of 22) H41001-0e-ID-B.doc

11. Restrictions

Associated with the choice of uClinux1 as underlaying operating system, the software developermust consider some restriction. uClinux is designed for CPUs without memory management unitand for small footprint. Additionally, the standard C and C++ library is also redesigned for lessmemory demand. Based on this, some usually existing programming conventions must beabandon:

a) no shared libraries (.so)

b) no shared objects (load of libraries at runtime with libdl)

c) the deletion of dynamically created objects with delete has no really effect for the memoryspace. The allocated memory is not freed until the termination of the application.

One implication from this is to allocate greater memory blocks once and the use of globalobjects.

1 More informations about uClinux can be found under www.uclinux.org

Page 16: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 16 (of 22) H41001-0e-ID-B.doc

12. Appendix

12.1. Kernel Configuration for Release Version

The following table lists the changes to the pre-defined kernel configuration. Use e.g xconfig toverify or change the settings.

The file .feig_rel_kernel_config contains the complete release kernel configuration.

Kernel Parameter Location in xconfig dialog Setting

CONFIG_FS_BOARD_NONE System Type/Carrier Board Support Custom

CONFIG_FS_RESCUE_KERNEL System Type/Port C0/CFG9 for Rescue Kernel No

CONFIG_SYSVIPC General Setup/System V IPC Yes

CONFIG_CMDLINE_BOOL General Setup/Compiled-in Kernel Boot Parameter Yes

CONFIG_CMDLINE General Setup/Default kernel command string "root=/dev/mtdblock2ip=192.168.10.10:0.0.0.0:::feig:eth0:offmtdparts=modnet:0x00400000(Kernel),0x002ff000@0x1000(cramfs)ro,0x100000(jffs2),0x00400000(unused)"

CONFIG_IP_PNP_DHCP Network Options/IP: DHCP Support No

CONFIG_ROOT_NFS File Systems/Network File Systems/Root file systemon NFS

No

CONFIG_SMB_FS File Systems/Network File Systems/SMB filesystem support

Yes

CONFIG_SERIAL_NETARM_CONSOLE

Character Devices/Support NET+50 built-in UARTas console

No

CONFIG_FS_SERIAL_DISABLE_CHANNEL1

Character Devices/Disable COM A No

CONFIG_FS_SERIAL_DISABLE_CHANNEL2

Character Devices/Disable COM B No

CONFIG_FS_I2C Character Devices/Support ModNET built-in I2CBus

Yes

CONFIG_FS_RTC Character Devices/Support ModNET built-in RTC Yes

CONFIG_FS_EEPROM Character Devices/Provide /dev/eeprom No

CONFIG_I2C Character Devices/I2C Support/i2CSupport Yes

CONFIG_I2C_CHARDEV Character Devices/I2C Support/I2C DeviceInterface

Yes

CONFIG_NO_MMU_LARGE_ALLOCS

Kernel Hacking/Allow allocating large blocks (>1MB) of memory

Yes

Page 17: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 17 (of 22) H41001-0e-ID-B.doc

12.2. Kernel Configuration for Debug Version

The following table lists the changes to the release kernel configuration. Use e.g xconfig to verify orchange the settings.

The file .feig_dev_kernel_config contains the complete kernel configuration for developmentsessions.

Kernel Parameter Location in xconfig dialog Setting

CONFIG_CMDLINE General Setup/Default kernel command string "nfsroot=192.168.3.1:/exports/bootdirroot=/dev/nfsip=192.168.3.201:0.0.0.0:::feig:eth0:offmtdparts=modnet:0x00400000(Kernel),0x002ff000@0x1000(cramfs)ro,0x100000(jffs2),0x00400000(unused)"

CONFIG_ROOT_NFS File Systems/Network File Systems/Root file systemon NFS

Yes

Page 18: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 18 (of 22) H41001-0e-ID-B.doc

12.3. Modifications in the file build.sh

The build.sh file manages the build process of the kernel image. As all application files must bepacked into the image, the build.sh file must be modified.

In the following section, you should comment the sample applications and add the last two lines.

# **** add user files here ****#cp apps/hello_world/lxnet/hello_cc rootfs/usr/bin/#cp apps/hello_world/lxnet_debug/hello_c rootfs/usr/bin/#cp apps/bas_test/lxnet_uclibc0919/bas_test rootfs/usr/bin/#cp apps/sample_driver/lxnet_uclibc0919/sample_app rootfs/usr/bin/#cp apps/sample_driver/lxnet_uclibc0919/sample_driver.o rootfs/lib/modules/#cp apps/fedpr-drv/lxnet_uclibc0919/test_app rootfs/usr/bin/cp apps/bin-files/fedprdrv.o rootfs/lib/modules/cp apps/bin-files/lru1000 rootfs/usr/bin

In the following section, you must uncoment the lines for samba support

# *** SMB(MOUNT) stuff# *** uncomment only if needed as this stuff is about 1MBcp $LXNETES_APPS_PATH/bin/smbmount rootfs/sbincp $LXNETES_APPS_PATH/bin/smbmnt rootfs/sbinmkdir -p rootfs/usr/lib/samba/codepagesmkdir -p rootfs/home/samba/codepages# *** select your codepagescp $LXNETES_APPS_PATH/lib/samba/codepages/*850* rootfs/usr/lib/samba/codepagescp $LXNETES_APPS_PATH/lib/samba/codepages/*850* rootfs/home/samba/codepages

Page 19: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 19 (of 22) H41001-0e-ID-B.doc

12.4. Modifications in the file etc/inittab

The file inittab contains lines for the console. As the console output must be disabled, the followinglines must be comment:

# use agetty instead directly connecting sh to console, ttyS0 or ttyS1# to enable Ctrl-C and Ctrl-\#::respawn:/sbin/agetty /dev/ttyS0 /bin/sh -l#::respawn:-/bin/sh#::respawn:/sbin/agetty /dev/ttyS1 /bin/sh -l

Page 20: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 20 (of 22) H41001-0e-ID-B.doc

12.5. Modifications in the file etc/init.d/rcS

The file rcS acts like an autostart file.

As the run-time configuration of the kernel with parameters from the /dev/eeprom is switched off,the start of a script must be comment.

# read EEPROM and run scripts#/sbin/eeprom -r /etc/init.d/eeprom.sh

You must secure, that the real-time clock is read by the kernel to initialise the system clock.

if [ -e /dev/misc/rtc ]; then echo "Setting system time" /sbin/hwclock --hctosys datefi

The kernel driver for the dualport-RAM must be load prior of the main application. These two linesmust not removed!

# FEIG addings insmod fedprdrv.o /usr/bin/lru1000 &

Page 21: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 21 (of 22) H41001-0e-ID-B.doc

12.6. Modifications in the file custom.h

The file custom.h located in /targets/LxNETES/project_uncbascf/linux/include/asm-armnommu/arch-netarm contains modificated defines for the kernel build process. This filecompletes the main configuration header file netarm_config.h in the same directory. The filenetarm_config.h should never be modified, but you must ensure that the last line is enabled, whichincludes the file custom.h.

#undef FS_PARAM_PORTC_INIT/* PortC without settings */#define FS_PARAM_PORTC_INIT ( NETARM_GEN_PORT_MODE(0x0) | \

NETARM_GEN_PORT_DIR(0x80) ) /* TODO adapt on FEIG board */

# undef FS_PARAM_SERIAL_PORT_GEN_A# define FS_PARAM_SERIAL_PORT_GEN_A ( NETARM_GEN_PORT_MODE(0x88) | \

NETARM_GEN_PORT_DIR(0xA0) | 0x20 ) /* A5 for Run-LED */

/*# define FS_PARAM_SERIAL_PORT_GEN_C ( NETARM_GEN_PORT_MODE(0x88) | \ NETARM_GEN_PORT_DIR(0x88) | \ NETARM_GEN_PORT_CSF(0x88))*/

#define FS_PARAM_BOARD_HAS_CS3#define FS_PARAM_BOARD_HAS_CS4

// 28.01.2004; CS4 for DualPort-RAM added by FEIG ELECTRONIC GmbH# define FS_PARAM_NETARM_MEM_CS4_BASE \

NETARM_MEM_BAR_BASE(NETARM_MMAP_CS4_BASE) | \NETARM_MEM_BAR_VALID

# define FS_PARAM_NETARM_MEM_CS4_OPT \NETARM_MEM_OPT_BASE_USE(NETARM_MMAP_CS4_MASK) | \NETARM_MEM_OPT_BCYC_1 | \NETARM_MEM_OPT_BSIZE_2 | \NETARM_MEM_OPT_WAIT_STATES(2) | \NETARM_MEM_OPT_8BIT | \NETARM_MEM_OPT_READ_SYNC | \NETARM_MEM_OPT_WRITE_SYNC

# define FS_PARAM_NETARM_MEM_CS4_OPTB \NETARM_MEM_OPTB_BCYC_PLUS0 | \NETARM_MEM_OPTB_WAIT_PLUS0

#define FS_PARAM_BOARD_HAS_DISABLE_EEPROM_C4#define FS_PARAM_BOARD_HAS_WAIT_DBG_C0 /* TODO remove on FEIG board */#undef FS_PARAM_CS3_WAIT_NS7520#define FS_PARAM_CS3_WAIT_NS7520 2

Page 22: Handbuch ID SWRWDEMO-A ISC LRU… · OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00 FEIG ELECTRONIC GmbH Page 3 (of 22) H41001-0e-ID-B.doc Licensing agreement for use of the software

OBID® Manual ISC.SDK.LRU1000.ACC V0.14.00

FEIG ELECTRONIC GmbH Page 22 (of 22) H41001-0e-ID-B.doc

12.7. Revision history