Korenix JetBox 8100 User Manual

Embedded linux
Hide thumbs Also See for JetBox 8100:

Advertisement

JetBox 8100 User Manual

Embedded Linux

Copyright@2007
Korenix Technology Co., Ltd.
All rights reserved.
Reproduction without permission is prohibited.
Customer Service:
KoreCARE@korenix.com
V1.1
JetBox 8100 User Manual_Linux_1.1
i

Advertisement

Table of Contents
loading

Summary of Contents for Korenix JetBox 8100

  • Page 1: Embedded Linux

    JetBox 8100 User Manual Embedded Linux Copyright@2007 Korenix Technology Co., Ltd. All rights reserved. Reproduction without permission is prohibited. Customer Service: KoreCARE@korenix.com V1.1 JetBox 8100 User Manual_Linux_1.1...
  • Page 2: Acknowledgments

    Korenix assumes no liabilities resulting from errors or omissions in this document, or from the use of the information contained herein. Korenix reserves the right to make changes in the product design without notice to its users. Acknowledgments Korenix is a registered trademark of Korenix Technology Co., Ltd.
  • Page 3: Table Of Contents

    1.3 Software Specifications .............. 3 Chapter 2 Getting Started ................4 2.1 Powering on JetBox 8100 ............4 2.2 Connecting JetBox 8100 to a PC ..........5 2.2.1 Serial Console ..............5 2.2.2 Telnet Console ..............6 2.2.3 SSH Console ................ 7 2.2.4 JetView Console ..............
  • Page 4 5.6 UART .................... 35 5.7 Make File Example ..............36 Chapter 6 JetView .................... 37 6.1 Overview ..................37 6.2 JetView for JetBox 8100 ............37 Chapter 7 Recovery CD ................... 38 7.1 Overview ..................38 7.2 Booting with Recovery CD ............38 7.2.1 Plugging USB CD-ROM into USB port ......
  • Page 5: Chapter 1 Overview

    Linux architecture, making it easy to accept programs that follow the POSIX standard. Program porting is done with the GNU Tool Chain provided by Korenix. In addition to Standard POSIX APIs, device drivers for the USB storage, buzzer and Network controls, and UART are also included in the Linux OS.
  • Page 6: Hardware Specifications

    Construction Sheet metal case Dimensions 120.0mm(D)* 44.2mm(W)*123.0mm(H) 5℉~158℉(-15℃ ~ 70℃), 5 to 95% RH(w/o Operating Temperature -4℉~176℉(-20℃ ~ 80℃), 5 to 95% RH(w/o Storage Temperature Net Weight 0.7 kg CE/FCC class A Table 1-1 Hardware specifications JetBox 8100 User Manaual_Linux_1.1...
  • Page 7: Software Specifications

    Open Source SSL VPN solution openssl open SSL Linux Tool Chain Gcc(4.1.1) GNU project C and C++ Compiler GNU C library Glibc(v2.3.6) Table 1-2 Software specifications JetBox 8100 User Manaual_Linux_1.1...
  • Page 8: Chapter 2 Getting Started

    2.1 Powering on JetBox 8100 Connect the power line wire to the Terminal block located in the down side of JetBox 8100, and power on it. It takes about 10 to 20 seconds for the system to boot up. Power Input...
  • Page 9: Connecting Jetbox 8100 To A Pc

    2.2 Connecting JetBox 8100 to a PC There are two ways to connect JetBox 8100 to a PC: through the serial Console port or via Telnet over the network 2.2.1 Serial Console The serial console port gives users a convenient way of connecting to JetBox 8100’s console utility.
  • Page 10: Telnet Console

    Use a cross-over Ethernet Cable to connect directly from your PC to JetBox 8100. You should first modify your PC’s IP address and netmask so that your PC is on the same subnet as JetBox 8100. To connect to a hub or switch connected to your local LAN, use a straight-through Ethernet cable.
  • Page 11: Ssh Console

    Click on the link http://www.chiark.greenend.org.uk/%7Esgtatham/putty/ to download PuTTy(freeware) to set up an SSH console for JetBox 8100 in a Windows environment. The following figure shows a exmple of the configuration that is required. Figure 2-6 Windows PuTTy setting...
  • Page 12: Jetview Console

    IP address modify. Install JetView to your PC from user manual CD which associated with JetBox 8100 (You may download update JetView from Korenix Website). The following figure shows a example of the configuration. Figure 2-7 JetView setting...
  • Page 13: Configuring The Ethernet Interface

    2.3 Configuring the Ethernet Interface JetBox 8100’s network setting can be modified with the serial Console, or online over the network. 2.3.1 Modifying Network Settings with the Serial Console In this section, we use the serial console to modify JetBox 8100’s network settings 2.3.1.1 Change Network Configuration...
  • Page 14 DHCP_CLIENT=0 to DHCP_CLIENT=1. Figure 2-10 Dynamic IP address setting 2.3.1.3 Static and Dynamic IP address After the boot settings of the LAN interface have been modified, issue the following command to activate the LAN settings immediately: #/etc/init.d/10_networking.init JetBox 8100 User Manaual_Linux_1.1...
  • Page 15: Modifying Network Settings Over The Network

    IP settings can be activated over the network, but the new settings will not be saved to the flash disk without modifying the file /etc/network.conf. For example, type the command #ifconfig eth0 192.168.10.2 to change the IP address of LAN interface to 192.168.1.2. JetBox 8100 User Manaual_Linux_1.1...
  • Page 16 Figure 2-12 Network Setting over the Network JetBox 8100 User Manaual_Linux_1.1...
  • Page 17: Test Program-Developing Hello.c

    JetBox 8100 GNU Tool Chain. Fedora core or compatible versions are recommended. The Tool Chain requires approximately 203 MB of hard disk space on your PC. The JetBox 8100 Tool Chain software is located on the JetBox 8100 CD. To install the Tool Chain,...
  • Page 18: Compiling Hello.c

    Figure 2-13 Compile example file “main.c” The output executable file is the test. 2.4.3 Uploading “test” to JetBox 8100 and Running the Program Use the following command to upload test to the JetBox 8100 via FTP. 1. From the PC, type: JetBox 8100 User Manaual_Linux_1.1...
  • Page 19 2. Use bin command to set the transfer mode to Binary mode, and the put command to initiate the file transfer: ftp> bin ftp> put test Figure 2-14 upload “test” to JetBox 8100 3. From the JetBox 8100. type: # chmod +x test # ./test The word Helloworld will be printed on the screen.
  • Page 20: Chapter 3 Managing Embedded Linux

    Chapter 3 Managing Embedded Linux This chapter includes information about version control, deployment, updates, and peripherals. The information in this chapter will be particularly useful when you need to run the same application on several JetBox 8100 units. 3.1 System Version Information...
  • Page 21 Next, use vi to open your application program. We use the example program example program test-daemon, and put it to run in the background Figure 3-4 test-release example program Change the file mode so it can be executed: #chmod a+x 99_your_daemon.init JetBox 8100 User Manaual_Linux_1.1...
  • Page 22 Figure 3-5 change file mode JetBox 8100 User Manaual_Linux_1.1...
  • Page 23: Setting The Time Manually

    3.3.1 Setting the Time Manually The JetBox8100 has two time settings. One is the system time, and the other is the RTC (Real Time Clock) time kept by the JetBox 8100’s hardware. Use the #date command to query the current system time or set a new system time.
  • Page 24: Ntp Client

    3.3.2 NTP Client The JetBox 8100 has a built-in NTP (Network Time Protocol) client that is used to initialize a time request to a remote NTP server. Use #ntpdate to update the system time. #ntpdate time.stdtime.gov.tw #hwclock –w Figure 3-7 NTP client request Visit http://www.ntp.org...
  • Page 25: Updating The Time Automatically

    755 fixtime to change the shell script mode. Next, use vi editor to edit the file /etc/inittab. Add the following line to the bottom of the file: :: respawn : /etc/init.d/fixtime Reboot jetbox8100 to take effect JetBox 8100 User Manaual_Linux_1.1...
  • Page 26: Connecting Peripherals- Usb Mass Storage

    3.4 Connecting Peripherals- USB Mass Storage The JetBox 8100 disable PNP (plug-n-play) function to prevent un-expected device mounted. Once plug-in USB mass storage, use #dmesg to scan USB-storage device. Figure 3-9 usb-storage device scan status Type # mount /dev/sdb1 /mnt/. The usb-storage device will be mounted into JetBox 8100.
  • Page 27: Chapter 4 Managing Communications

    Chapter 4 Managing Communications In this chapter, we explain how to configure JetBox 8100’s various communication functions. 4.1 Telnet daemon To enable or disable the Telnet server, you first need to edit the file /etc/inetd.conf. Program name telnetd Description Config files /etc/inetd.conf...
  • Page 28: Ftp Daemon

    Disabling the FTP server Disable the daemon by typing ‘#’ in front of the first character of the row to comment out the third line. #!/bin/sh # echo “initial FTPD” #/sbin/ftpd -D Figure 4-4 Disable FTP server JetBox 8100 User Manaual_Linux_1.1...
  • Page 29: Dns

    4.3 DNS The JetBox 8100 supports DNS client (but not DNS server). To set up DNS client, you need to edit three configuration files: /etc/hosts, /etc/resolv.conf, /etc/nsswitch.conf. /etc/hosts This is the first file that the Linux system reads to resolve the host name and IP address.
  • Page 30: Web Service- Goahead

    Internet Explore or Mozilla (Firefox) from your PC to test if the goahead Web Server is working. Type the LAN IP address in the browser’s address box to open the homepage. Visit http://goahead.com/products/webserver/specifications.aspx for more information about GoAhead. JetBox 8100 User Manaual_Linux_1.1...
  • Page 31: Iptables

    “target.” Since JetBoc 8100 has one network interface, it supports Filter table of IPTABLES. Filter Table—includes three chains: INPUT chain OUTPUT chain FORWARD chain NOTE Jetbox8100 does NOT support IPV6 and ipchains. JetBox 8100 User Manaual_Linux_1.1...
  • Page 32: Dial-Up Service-Ppp

    (using a null-modem cable) over a Telnet link, and links established using a modem over a telephone line. Modem / PPP access is almost identical to connecting directly to a network through JetBox 8100’s Ethernet port. Since PPP is a peer-to-peer system.
  • Page 33: Snmp

    4.8 SNMP JetBox 8100 has built-in SNMP V1, V2C(Simple Network Management Protocol) agent software. It supports RFC 1213 MIB-II. The following snmp file path. Program name snmpd Description Config files /etc/snmp/snmpd.conf Init file Support command snmpd Default Table 4-10 SNMP file path 4.9 Open VPN...
  • Page 34: Chapter 5 Programmer's Guide

    Jetbox, you must ensure that it is compiled and linked to the same libraries that will be present on the Jetbox8100. The host tool chain that comes with Jetbox8100 contains a suite of Korenix compilers and other tools, as well as the libraries and headers that are necessary to compile applications for Jetbox8100.
  • Page 35: Compiling Applications And Libraries

    To obtain help on Korenix toolchain gcc version, you can use the Linux man utility to obtain help on many of the utilities provided by the tool chain.
  • Page 36: Tools Available In The Host Environment

    In particular, many operating characteristics of character special files (e.g. terminals) may be controlled with ioctl() requests. The argument d must be an open file descriptor. The second argument is a device-dependent request code. The third JetBox 8100 User Manaual_Linux_1.1...
  • Page 37: Rtc (Real Time Clock)

    Description: read time information from RTC. It will return the value on argument 3. 2. Function: RTC_SET_TIME int ioctl(fd, RTC_SET_TIME, struct rtc_time *time); Description: set RTC time. Argument 3 will be passed to RTC. For more information, please see example/rtc/rtc.txt JetBox 8100 User Manaual_Linux_1.1...
  • Page 38: Wdt (Watch Dog Timer)

    = 45; ioctl(fd, WDIOC_SETTIMEOUT, &timeout); printf("The timeout was set to %d seconds\n", timeout); Starting with the Linux 2.4.18 kernel, it is possible to query the current timeout using the GETTIMEOUT ioctl. JetBox 8100 User Manaual_Linux_1.1...
  • Page 39: Uart

    &oldtio); //save current serial port settings bzero(&newtio, sizeof(newtio)); // clear struct for new port settings BAUDRATE = B57600; cfsetispeed(&newtio,BAUDRATE); cfsetospeed(&newtio,BAUDRATE); Figure 5-7 UART baudrate setting For more information, see Linux’s man page for detailed documentation: #man cfsetispeed JetBox 8100 User Manaual_Linux_1.1...
  • Page 40: Make File Example

    CROSS_COMPILE := i686-korenix-linux-gnu- CC = i686-korenix-linux-gnu-gcc CPP = i686-korenix-linux-gnu-gcc SOURCES = example.c OBJS = $(SOURCES:.c=.o) all: example example: $(OBJS) $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) clean: rm -f $(OBJS) example core *.gdb Figure 5-8 Makefile example JetBox 8100 User Manaual_Linux_1.1...
  • Page 41: Chapter 6 Jetview

    Korenix web site, http://www.korenix.com or get the help from Korenix Customer Support, Korecare@korenix.com . 6.2 JetView for JetBox 8100 We can discovery/change IP address of JetBox 8100 and reboot JetBox 8100 through JetView. Figure 6-1 Jetview discovery JetBox 8100 User Manaual_Linux_1.1...
  • Page 42: Chapter 7 Recovery Cd

    In some severe circumstances, such as when a run-time image is corrupted, it may be necessary to start your device from a bootable CD. Korenix provides a bootable CD to rescue damaged JetBox 8100 Embedded Linux operation system. 7.2 Booting with Recovery CD 7.2.1 Plugging USB CD-ROM into USB port...
  • Page 43: Auto-Run Recovery Procedure

    Insert Recovery CD into the USB CD-ROM. Figure 7-2 Insert Recovery CD into the USB CD-ROM. 7.2.2 Auto-Run Recovery Procedure The Recovery CD runs recovery procedure after type recovery password “ Korenix “ as following step. Figure 7-3 Start Recovery Procedure JetBox 8100 User Manaual_Linux_1.1...
  • Page 44 Figure 7-4 Format damage Operation System Disk Figure 7-5 Booting Embedded Linux operation system with Recovery CD JetBox 8100 User Manaual_Linux_1.1...
  • Page 45 Figure 7-6 Complete Recovery Procedure JetBox 8100 User Manaual_Linux_1.1...
  • Page 46: Chapter 8 Appendix

    Echo string echo Pattern scanning and processing language. compare two files or directories diff perform text transformations on a file or input from a pipeline. JetBox 8100 User Manaual_Linux_1.1...
  • Page 47 Utility to trace the route of IP packets wget Utility for non-interactive download of files from HTTP and FTP servers. udhcpc DHCP client routing table manager route netstat display network status set ip address and configure network Ifconfig interfaces tracerout trace route JetBox 8100 User Manaual_Linux_1.1...
  • Page 48 ALSA sound card driver. amixer Command-line audio mixer for the ALSA sound card driver. kill/killall Send specified signal to the specified process or process group For complete command usage and explanation, please reference: http://www.busybox.net/downloads/BusyBox.html JetBox 8100 User Manaual_Linux_1.1...
  • Page 49: Chart Index

    8.2 Chart Index Notice Notice 1: In the JetBox 8100, COM1 (RS232) is reserved for serial console and COM2 (RS-232/422/485, JP2, BIOS select) is reserved for Modbus Gateway (Optional SW)..........................6 Table & Figure Table 1-1 Hardware specifications……………………………………………………………..2 Table 1-2 Software specifications………………………………………………….…………..3 Figure 2-1 Power connector location ……………………………………………………………4...
  • Page 50: Customer Service

    Table 5-1 Partition table ……..…..…..….….…………………………………………………..30 Figure 5-2 mount “toolchain”………..……………...…………………………………...……...31 Figure 5-3 add “toolchain” file path …………..……...……………………………………..….31 Figure 5-4 Korenix toolchain gcc version …….…..……….…………………………………..31 Figure 5-5 complier C application …....……………………...…………………………..31 Table 5-6 cross compiler tools …………………………..…...………………..……………..32 Figure 5-7 UART baudrate setting ……………..……………………………………………...35 Figure 5-8 Makefile example …………………..…………….………………………………...36...

This manual is also suitable for:

Jetbox 8100-lJetbox 8100-lm

Table of Contents