Linux on Mity-Mite/Tiny Module

Home : Products | Technical Support 2002/03/28

Linux Environment Overview

We provide pre-installed Linux MDM/DOC for programmer who want to make their application under Linux. All they have to do is to write/debug their program on PC then upload it to Mity-Mite/Tiny module. The programs on MDM/DOC are:

Software Version Path Size
Linux Kernel 2.4.17 /boot/linux 516 KB
Loader SysLinux 1.67 / 7 KB
Shell BusyBox 0.60.2 /bin/busybox 158 KB
FTP Server FTP4ALL 2.27 /usr/ftpd 70 KB
HTTP Server WN Server 2.2.11 /usr/httpd 102 KB
DHCP Client udhcp Client 0.9.6 /usr/dhcpcd 11 KB
LCD Driver Port from our DOS library /demo/lcd 23 KB
Share Library glibc 2.2.4 /lib 1.84 MB
Web Pages /usr/www 30 KB
Size Requirement 3 MB

Setup Files

You can modify those files to build your own environment:

/boot DOS partition where kernel image are. You can use FTP to upload new kernel to /boot to update kernel.
/boot/linux Linux kernel.
/etc/init.d/rcS It will be ran first and you can add your initial programs into it. We add statement assign our IP in this file.
/etc/profile It work as autoexec.bat under DOS and will be run automatically. We start FTP and HTTP server on /etc/profile.
/etc/inittab Init is the parent of all processes and it will read inittab. View BusyBox document to get more information.
/usr/www Our web pages are here. lcd.cgi is a CGI program that can show text from browser to LCD.
/demo/lcd LCD driver that can receive request to show text on LCD.
/demo/lcd_time Send a request every 0.5 second to update time displayed on LCD.
/sbin/ftpd Script to load FTP server.
/sbin/httpd Script to load HTTP server.
/sbin/dhcpcd Script to use DHCP to get IP.

Install Your Program

We put FTP server on our Linux DOC/MDM that you can use FTP to upload your program .The user name is "dmp" and password is "dmp".We recommend you to install Linux(RedHat, Mandrake, SuSE...) on a PC to develop your application. Write and compile your program then upload it to Mity-Mite/Tiny module via FTP to test. You can kill the process if program is not correct .Repeat those steps until program is okay. There is a example:

  • We create a directory "/demo".
  • Put lcd(LCD driver), dmp.bmp(DM&P logo, will loaded by lcd) andlcd_time(send time to display every 0.5 second) into "/demo".
  • Write a script "demo" to load lcd and lcd_time.
    
    #!/bin/sh./lcd&
    sleep 5
    ./lcd_time&
  • Remember to change mode of upload files to executable
    
    chmod +x ./lcd
    chmod +x ./lcd_time
    chmod +x ./demo
  • Run "demo" to test. If program is not correct,use "ps" to find process ID of program to kill it. Go to step 1 until program is okay.
    
    # ps
      PID  Uid     Stat Command
        1 0         S    init
        2 0         S    [keventd]
        3 0         S    [ksoftirqd_CPU0]
        4 0         S    [kswapd]
        5 0         S    [bdflush]
        6 0         S    [kupdated]
       11 0         S    -sh
       14 0         S    ./ftpd
       17 0         S    /usr/httpd/wnsd -p 80
       19 0         S    ./lcd
       21 0         S    ./lcd_time
       22 0         R    ps
    # kill 21
    # kill 22

    Also, you can lunch "demo" script at /etc/profileto run it automatically when program is okay.

    Hint

    Before uploading your program, you should use "ldd" to check share library dependency. Upload share library to /lib first if need.
    
    [root@/root/grlcd]# ldd lcd
            libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x4002c000)
            libm.so.6 => /lib/libm.so.6 (0x4006e000)
            libc.so.6 => /lib/libc.so.6 (0x40090000)
            /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    [root@/root/grlcd]#

    Application

    Refer to this table can compare Mity-Mite Demo Box DOS version with Linux version:

    DOS

    Linux

    Hardware

    RAM 1 MB
    DOC/MDM 512 KB
    Boot Time 5 Seconds (Mity-Mite)
    BIOS boot 4 seconds
    Start FTP/HTTP/LCD  1 seconds
       
       
    RAM 4MB (8MB recommended)
    DOC/MDM 4MB (8MB recommended)
    Boot Time 20 Seconds (Tiny Module)
    BIOS boot 3 seconds
    Decompress kernel image 11 seconds
    Initialize devices 6 seconds
    Start FTP/HTTP services 3 seconds

    Software

    Software Version Size
    DOS X-DOS 5.2 63 KB
    Shell COMMAND.COM 26 KB
    User App MMM.EXE 69 KB
    FTP Server Build-in 0 KB
    HTTP Server Build-in 0 KB
    DHCP Client Build-in 0 KB
    SMTP Server Build-in 0 KB
    SMTP Client Build-in 0 KB
    LCD Driver Build-in 0 KB
    Packet Driver NE2000 compatible 9 KB
    Web Pages 24 KB
    Total Size 191 KB
     
    Software Version Size
    Linux Kernel 2.4.17 516 KB
    Loader SysLinux 1.67 7 KB
    Shell BusyBox 0.60.2 158 KB
    FTP Server FTP4ALL 2.27 70 KB
    HTTP Server WN Server 2.2.11 102 KB
    DHCP Client UDHCP Client 0.9.6 11 KB
    LCD Driver Port from our DOS library 23 KB
    Share Library glibc 2.2.4 1.84 MB
    Web Pages 30 KB
         
         
    Total Size 3 MB

    Reference Links

    Linux Kernel http://www.kernel.org/
    SysLinux http://syslinux.zytor.com/
    BusyBox http://www.busybox.net/
    FTP4ALL http://www.ftp4all.de/v3/noframes/index_v3.html
    WN Server http://hopf.math.nwu.edu/
    udhcp http://udhcp.busybox.net/

    Technical Support

    If you have any problem, feel free to mail to soc@dmp.com.tw please.We will do our best to answer your question.


    DMP Electronics Inc. All rights reserved. Email us: info@dmp.com.tw