Lantronix 2100 Linux SDK Linux SDK - User Guide
Lantronix 2100 Linux SDK Manual
View all Lantronix 2100 Linux SDK manuals
Add to My Manuals
Save this manual to your list of manuals |
Lantronix 2100 Linux SDK manual content summary:
- Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 1
EDS1100/2100 Linux Software Developer's Kit (SDK) User Guide Part Number 900-548 Revision D March 2011 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 2
manufacturer assumes no responsibility for any errors that may appear in this guide. For the latest revision of this product document, please check our online documentation at www.lantronix.com/support/documentation. Revision History Date 5/09 9/09 6/10 3/11 Rev. A B C D Comments Initial Document - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 3
Dual Bank ...23 dBUG Command Summary...24 dBUG Set Command Options 24 dbug-config Linux Utility ...25 Netcon ...26 Linux Software Developers Kit (SDK) User Guide 3 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 4
Contents 4. Supported File Systems 27 Introduction ...27 ROMFS ...27 JFFS2 ...28 NFS...29 5. Flash Partitioning 32 Intro to Partitioning ...32 Dual Bank inetd ...50 telnetd ...50 ftpd ...50 dropbear ...50 axhttpd ...50 mii-tool ...50 Linux Software Developers Kit (SDK) User Guide 4 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 5
14. Resources 72 Lantronix Open Linux SDK Forum 72 Links to Related Web Sites ...72 A. Important Configuration Switches 73 Linux Software Developers Kit (SDK) User Guide 5 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 6
Contents B. Differences Between µClinux and Standard Linux 75 C. Troubleshooting 76 Technical Support...76 List of Figures Figure 2-1. Values ...14 Figure 3-1. DeviceInstaller Window 19 Figure 3-2. Firmware -To-Ethernet System Setup Screen 71 Linux Software Developers Kit (SDK) User Guide 6 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 7
42 Table 12-1. Other Profiling and Debugging Utilities 67 Table A-1. Important Configuration Switches 73 Table A-2. Configuration Switch Abbreviations 74 Linux Software Developers Kit (SDK) User Guide 7 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 8
software suite that enables Linux developers to create applications on Lantronix embedded networking modules. Detailed instructions for installing the SDK on your host Linux system are provided in this guide. It also describes the embedded module, its boot loader, flash partitioning schemes, and the - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 9
: 10/100 base TX with Auto Negotiation Software Boot loader: customized dBUG OS: custom µClinux distribution Linux Kernel: 2.6.30 Linux Software Developers Kit (SDK) User Guide 9 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 10
SDK gets installed and is used for cross-compiling for the embedded platform Software development kit Embedded development module Linux Software Developers Kit (SDK) User Guide 10 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 11
GTK-based graphical configuration utility) qt-devel (for the Qt3-based graphical configuration utility) Debian-based distributions Debian Lenny 5.0.2 & 5.0.4 Linux Software Developers Kit (SDK) User Guide 11 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 12
(for the GTK-based graphical configuration utility) qt-devel (for the Qt3-based graphical configuration utility) 2 Installing the SDK Linux Software Developers Kit (SDK) User Guide 12 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 13
sally ALL=(ALL) NOPASSWD: ALL # Members of the admin group may gain root privileges %adm ALL=(ALL) NOPASSWD: ALL Linux Software Developers Kit (SDK) User Guide 13 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 14
2. Edit /etc/xinetd.d/tftp and change the value of disable to "no". service tftp Figure 2-1. Values { socket_type protocol wait user server server_args disable per_source cps = no = 11 = 100 2 = IPv4 3. Restart the xinetd service. service xinetd restart Linux Software Developers Kit (SDK) User - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 15
purpose cryptographic library common error values for all GnuPG components network packet capture library library to access SSH services Modbus/TCP - RTU gateway mDNS service responder daemon media-independent interface tool SSH module SSL library packet analyzer Linux Software Developers Kit (SDK - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 16
scripts for build environment pre-built images for the supported platforms files related to firmware upgrades Pre-built Images For each supported platform there are 6 pre-built images in - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 17
install missing packages? (y/N): y After the installation your directory structure should look as described in the following section, Installed Directories Linux Software Developers Kit (SDK) User Guide 17 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 18
jffs2 images Linux kernel C library Applications Lantronix applications pre built images toolchains directory Makefile environment file 2 Installing the SDK Linux Software Developers Kit (SDK) User Guide 18 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 19
Boot loader Introduction Linux on the supported platform (MatchPort AR, XPort Pro Linux development kits. Replacing the boot loader image should not be necessary, but instructions for doing so are given below. 1. Connect an RS232 cable between a Linux Software Developers Kit (SDK) User Guide 19 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 20
follow the prompts for power cycling the target. Figure 3-3. Serial Recovery Window Wait for the firmware transfer to complete. Linux Software Developers Kit (SDK) User Guide 20 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 21
: None stop bit: 1 flow control: None 2. Turn on the target. 3. If autoboot starts, press any key to stop autoboot. Linux Software Developers Kit (SDK) User Guide 21 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 22
loader 4. At the dBUG> console prompt, configure the dBUG settings. Use the following instructions for configuring dBUG to boot an image containing the kernel and a ROMFS root file system the 'show' command. Figure 3-6. dBug Configuration Window Linux Software Developers Kit (SDK) User Guide 22 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 23
increment each boot. When bootfc reaches maxbootfc dBUG will stop trying to boot Linux, and will await manual recovery. To enable the boot failure counter, set the maxbootfc parameter to the desired numeric value. see Chapter 5 Flash Partitioning. Linux Software Developers Kit (SDK) User Guide 23 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 24
be used by target. "0.0.0.0" for BOOTP IP address of gateway (default router). Subnet mask to be used by target. Linux Software Developers Kit (SDK) User Guide 24 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 25
off single|1|2 reset Description File path for image transfer via TFTP. File image type. Only "image" is supported. Ethernet MAC address. "default" resets the MAC to factory default. IP address of DNS server. Reset Output from dbug-config program Linux Software Developers Kit (SDK) User Guide 25 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 26
lost upon a reset unless the 'set client ' command is executed to write the new value to flash. Linux Software Developers Kit (SDK) User Guide 26 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 27
the standard Linux kernel as of version 2.6.30. It should be relatively straightforward for the adventurous to add support for them. The home page of the maintainers of JFFS2 (www.linux-mtd.infradead.org) provides excellent run at the same time. Linux Software Developers Kit (SDK) User Guide 27 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 28
JFFS2 What Does JFFS2 Offer JFFS2 is a sophisticated writeable log-structured file system that supports wear-leveling. JFFS2 does not support XIP. One disadvantage of having a JFFS2 root file system is that it is resolve many of its shortcomings. Linux Software Developers Kit (SDK) User Guide 28 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 29
the development directory on the target from the host to eliminate time consuming manual transfer of the compiled files via ftp or scp. To save data aware that most sample profiles provided by Lantronix do not include support for NFS to save precious RAM. Depending on the chosen profile Guide 29 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 30
a file system that can be mounted via NFS, the developer needs to manually create a directory named 'nfs' in . This is the trigger in Chapter 2: Installing the SDK . On the host machine, NFS server support needs to be installed and enabled. The needs to be User Guide 30 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 31
portmap call in a startup script if needed regularly. AUFS AUFS is an implementation of the idea to support mounts of several file systems into one single mount point, one overlaying each other. This might be used to Chapter 5 Flash Partitioning. Linux Software Developers Kit (SDK) User Guide 31 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 32
important, but variable (e.g. persistent configuration files) and then there are temporary files like logs. Linux supports these requirements by letting the user mount different file system types into one file system tree. Some the bank to be used. Linux Software Developers Kit (SDK) User Guide 32 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 33
Image Header (128 Bytes) 0x00400000 0x00430000 0x00440000 Linux Kernel + (Optional) ROMFS 0x00600000 /dev/mtd5 (2 MB) JFFS2 User Space 0x00800000 Linux Software Developers Kit (SDK) User Guide 33 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 34
-2.6.x/drivers/mtd/maps/m520x.c: static struct mtd_partition m520x_partitions_including_kernel[] = { { .name = "LTRXbloader", .size = 0x10000, .offset = 0x0, .mask_flags = MTD_WRITEABLE /* force read-only */ Linux Software Developers Kit (SDK) User Guide 34 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 35
CONFIG_MTD_RECOVER_PARAMS , { .name = "UserExtra", .size = 0x30000, .offset = 0x400000 // gets overwritten below }, { .name = "dBugConfBackup", .size = 0x10000, .offset = 0x430000 // gets overwritten below Linux Software Developers Kit (SDK) User Guide 35 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 36
a ROMFS from the root file system and appends the Linux kernel to it. This layout is supported in two variations both are created in the images/ directory per default: Uncompressed: image.bin . 0x140000 bytes erased Program successfully flashed... Linux Software Developers Kit (SDK) User Guide 36 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 37
the previous chapter but omit the flash erase command: For all platforms (Single bank configuration) dBUG> fl e 0x00400000 0x00400000 Linux Software Developers Kit (SDK) User Guide 37 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 38
noinitrd rw rootfstype=jffs2 root=/dev/mtdblock5 dBUG> show watchdog: on ... kcl: noinitrd rw rootfstype=jffs2 root=/dev/mtdblock5 Linux Software Developers Kit (SDK) User Guide 38 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 39
+ AUFS This variation is created when you use the AUFS profile. The instruction to get the resulting files on the flash are identical to the ones IP to the device, it needs to be stored on persistent storage. The problem is that /etc resides on a readonly file system. There are 3 possible Guide 39 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 40
Read 6291456 bytes (12289 blocks) For all platforms dBUG> fl w 0x00200000 0x4001FF80 0x600000 Flash Write complete. 0x600000 bytes written Linux Software Developers Kit (SDK) User Guide 40 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 41
> gfl Further details about the mtdparts kcl option can be found in (/linux/linux-2.6.x /drivers/mtd/cmdlinepart.c) Linux Software Developers Kit (SDK) User Guide 41 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 42
(LTRX_PROFILE_NO_IPV6) (NEW) 4. COMPACT (LTRX_PROFILE_COMPACT) (NEW) 5. AUFS (LTRX_PROFILE_AUFS) (NEW) 6. SHARED (LTRX_PROFILE_SHARED) (NEW) choice[1-6?]: ... Default all settings (lose changes) (DEFAULTS_OVERRIDE) [N/y] (NEW)y Linux Software Developers Kit (SDK) User Guide 42 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 43
, select Customize Kernel Settings, and press Y to include features. 3. Repeat this step for Customize Application/Library Settings as desired. Linux Software Developers Kit (SDK) User Guide 43 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 44
, navigate to the kernel configuration and enable or disable the desired options. When finished, select Exit and press Enter. Linux Software Developers Kit (SDK) User Guide 44 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 45
Enter. Figure 6-5. uClinux Distribution Configuration Window 8. Once the configuration options are updated, execute the make command to rebuild µClinux. Linux Software Developers Kit (SDK) User Guide 45 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 46
(LTRX_PROFILE_COMPACT) (NEW) 5. AUFS (LTRX_PROFILE_AUFS) (NEW) 6. SHARED (LTRX_PROFILE_SHARED) (NEW) choice[1-6?]: 1 * * Kernel/Library/Defaults Selection * * * Kernel is linux-2.6.x * * * Libc is uClibc * * Linux Software Developers Kit (SDK) User Guide 46 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 47
to 'y'. COPY_BUILD_TO_TFTP_DIRECTORY=y TFTP_DIRECTORY= To build the root file system for NFS, perform the following: $ mkdir linux/nfs $ make Linux Software Developers Kit (SDK) User Guide 47 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 48
are present. It also calls dBUG-config to reset the boot failure counter which was previously incremented by dBUG. Linux Software Developers Kit (SDK) User Guide 48 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 49
networking protocols are supported through the kernel IP address automatically through the DHCP protocol. Two DHCP clients are supported, udhcpc and dhcpcd. Udhcpc is included as part of busybox updated during the reboot. DNS The target supports name resolution via the DNS protocol. The DNS configuration is - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 50
port numbers to names is found in /etc/services. telnetd The telnet daemon allows for shell is part of the axTLS package. It includes support for SSL encrypted sessions. mii-tool The mii daemon is a service that implements Multicast DNS Service Discovery for discovery of services on the local - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 51
Linux utilities into a single binary file. The utilities have been optimized for space by supporting fewer options. Flash and RAM space have also been saved by eliminating the overhead of Enter. Figure 9-1. uClinux Distribution Configuration Window Linux Software Developers Kit (SDK) User Guide 51 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 52
and press Enter. Figure 9-3. uClinux Save Settings Window 5. Select BusyBox from the µClinux Distribution Configuration menu and press Enter. Linux Software Developers Kit (SDK) User Guide 52 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 53
options will now be updated. Figure 9-5. uClinux BusyBox Configuration Window 7. Execute the make command to rebuild busybox within µClinux. Linux Software Developers Kit (SDK) User Guide 53 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 54
to enable or disable Lantronix sample applications, and then run make to rebuild. Figure 10-1. Lantronix Applications Configuration Window Linux Software Developers Kit (SDK) User Guide 54 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 55
to the target's IP address at the configured TCP port number to access the serial port. telnet Linux Software Developers Kit (SDK) User Guide 55 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 56
, you have to set SSH server keys at SSH Setup Screen. Figure 10-5. Serial-To-Ethernet SSH Setup Screen Linux Software Developers Kit (SDK) User Guide 56 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 57
a serial to Ethernet tunnel with SSL server mode, you have to set SSL server keys at SSL Setup Screen. Linux Software Developers Kit (SDK) User Guide 57 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 58
Web. To use CPs as GPIO, you have to configure the kernel. (see CONFIG_LTRX_CPM_DEFAULT_GPIO of Appendix A Important Configuration Switches) Linux Software Developers Kit (SDK) User Guide 58 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 59
[1-7]> # CP pin assign } Below is an example configuration file for creating a group called LED to control output for CP1 to CP4 NOTE: The XPort Pro supports only 3 GPIO pins. [cpm.conf] config cp1 { type output state enable invert disable Linux Software Developers Kit (SDK) User - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 60
which GPIOs to enable. Below is a high level diagram showing how the CP Manager interfaces with the GPIO pins. Linux Software Developers Kit (SDK) User Guide 60 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 61
53248 (/sbin/inetd) 67 40606000 8192 1865 6327 113792 36864 (boa) 79 4052f000 4096 1656 2440 30240 12288 (chkstk) Linux Software Developers Kit (SDK) User Guide 61 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 62
add in the same manner. 4. Run make config (or menuconfig) from - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 63
is integrated with the s2e sample application. To create an image with VIP Access Demo: 1. Enable CONFIG_USER_LANTRONIX_VIP_ACCESS and CONFIG_USER_LANTRONIX_S2E_VIP. Linux Software Developers Kit (SDK) User Guide 63 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 64
.xml from the directory where it resides and click Submit. 5. Toggle the VIP mode to Enable, and click Submit. Linux Software Developers Kit (SDK) User Guide 64 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 65
11 VIP Access Software Figure 11-2. Serial-To-Ethernet VIP Setup Screen Your device can accept connections on TCP ports (e.g. HTTP, TELNET, s2e) via VIP, after the VIP session is visible on DSM via its Web UI. Linux Software Developers Kit (SDK) User Guide 65 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 66
commands (e.g. set breakpoints, print variables, step through the code, ...). Refer to a gdb manual for details. Note that by default µClinux applications are compiled with space optimization on. This units in order to reduce memory usage. Linux Software Developers Kit (SDK) User Guide 66 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 67
> Other Profiling and Debugging Utilities Below is a list of other profiling and debugging utilities supported on the target. Table 12-1. Other Profiling and Debugging Utilities Utility df dmesg free mount real time. (Enable with make menuconfig) Linux Software Developers Kit (SDK) User Guide 67 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 68
flash memory layout you have chosen for your build. Lantronix provides an implementation with the following features and restrictions: Linux Software Developers Kit (SDK) User Guide 68 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 69
JFFS2 area untouched: For MatchPort AR makeimage2.py images/image.bin:kernel:0x40000:ROMFS: /tmp/uclinuxkernel-and-romfs.bin Linux Software Developers Kit (SDK) User Guide 69 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 70
to prompt (default username and password is root:root). 3. Change to binary mode. ftp> binary 200 Type set to I. Linux Software Developers Kit (SDK) User Guide 70 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 71
-1. Serial-To-Ethernet System Setup Screen 2. Click Browse and select the firmware file. 3. Select Update and then click Submit. Linux Software Developers Kit (SDK) User Guide 71 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 72
current version of the SDK is available. Individual forum topics are monitored by Lantronix engineers and technical support staff and may be used to ask questions regarding any aspect of the SDK. Complete the registration - Freescale Coldfire forum Linux Software Developers Kit (SDK) User Guide 72 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 73
level autoconfiguration->IP: DHCP support KERN->File systems->Network File Systems->Root file system support on NFS KERN->Processor type and features->CP driver support KERN->Processor type and features allocates pages by numeric instead of order. Linux Software Developers Kit (SDK) User Guide 73 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 74
Configuration USER->Console Login Configuration Enables RS-485 support. Enables NFS support on mount command. Enables NFS support on mount command. Build gdbserver. Use console Library/Defaults Selection -> Customize Application/Library Settings Linux Software Developers Kit (SDK) User Guide 74 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 75
glibc -- either add more to libc, or remove some functionality. no support for ELF binary file format very limited support for shared libraries due to missing MMU -- all applications get linked statically other processes and even the kernel. Linux Software Developers Kit (SDK) User Guide 75 - Lantronix 2100 Linux SDK | Linux SDK - User Guide - Page 76
Troubleshooting Technical Support Technical Support US Check our online knowledge base or send a question to Technical Support at http://www.lantronix.com/support. Phone: (800) 422-7044 (US Only) (949) 453-7198 Technical Support www.lantronix.com/support. When you report a problem, please provide the
Linux
Software Developer's Kit (SDK)
User Guide
Part Number 900-548
Revision D March 2011
EDS1100/2100