DM&P xLinux

Home : Products | Technical Support 2002/12/31

DM&P xLinux is a reduced Linux package for our user to test and use Linux easily. It is small and fast boot. We can add programs or components our user want.

What's New on xLinux Release 3

xLinux Release 3 Environment Overview

Software Version Path
Linux Kernel 2.4.17 /boot/linux
Loader LILO 21.4-4 /sbin
Shell BusyBox 0.60.2 /bin/busybox
FTP Server WU-FTPD 2.6.2 /usr/sbin/ftpd
TELNET Server netkit-telnet-0.17 /usr/sbin/telnetd
HTTP Server WN Server 2.2.11 /usr/httpd
DHCP Client udhcp Client 0.9.6 /usr/dhcpcd
Share Library glibc 2.2.4 /lib
PPP Daemon/Client pppd 2.4.1 /sbin
Web Pages /usr/www
Size Requirement 6 MB

Setup Files

You can modify those files to build your own environment:

/boot/linux.img Linux kernel.
/usr/www Our web pages are here.
/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/ppp/pap-secrets User name and password file for PPP dial-up.
/etc/fstab This file makes it possible to automate the mounting of certain file systems, especially at system start-up.
/etc/ftpaccess This file controls who gets into the FTP server and how.
/etc/inetd.conf This is the default configuration file for the inetd (super-server) daemon.
/etc/inittab This file plays a crucial role in the boot sequence.
/etc/lilo.conf This file is used by lilo to determine which operating system or kernel to start, as well as to know where to install itself.
/etc/profile It work as autoexec.bat under DOS and will be run automatically. We start inetd on /etc/profile.
/etc/securetty This file allows you to specify which TTY devices the root user is allowed to login on.
/etc/services This file contains information regarding the known services available in the DARPA Internet.

Utilities

You can run those commands via keyboard or scripts. We list import commands:

Command Path Description
insmod /sbin Insert module into kernel.
ppp-on /sbin Start a ppp connection.
ppp-off /sbin Stop a ppp connection.
httpd /sbin Start a HTTP server.
dhcpcd /sbin Get IP address from DHCP server.
ifconfig /sbin Configure a network interface.
fsck.ext2 /sbin Check and repair a Linux EXT2 file system
lilo /sbin Install boot loader.
setserial /bin Get/set Linux serial port information.

TinyLogin commands: (refer to http://tinylogin.busybox.net/TinyLogin.html)

Path Command
/bin adduser, addgroup, deluser, delgroup, login, su
/sbin sulogin
/usr/sbin passwd

Commands listed below are implemented by BusyBox: (You can go to http://www.busybox.net/downloads/BusyBox.html to get more information.)

Path Command
/bin cat, chgrp, chmod, chown, cp, date, dd, df, dmesg, echo, false, grep, gunzip, gzip, kill, ln, ls, mkdir, mknod, more, mount, msh, mv, pidof, ping, ps, pwd, rm, rmdir, sed, sh, sleep, sync, tar, touch, true, umount, uname, vi, zcat
/sbin chat, halt, init, klogd, lsmod, mkswap, modprobe, poweroff, reboot, swapoff, swapon, syslogd
/usr/bin [, basename, chvt, clear, cut, deallocvt, dirname, du, env, find, free, head, id, killall, logger, reset, sort, tail, telnet, tty, uniq, uptime, wc, which, whoami, xargs, yes
/usr/sbin chroot

Install Your Program

This is a example form our Mity-Mite demo box Linux version. We wrote simple LCM library under Linux .

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) and lcd_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/profile to 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]#

    How to use PPP dial-up ?

    You should modify some configuration file for your ISP. We recommend you to use FTP to download it, modify it, then, upload it. We assume you connect modem to COM1 (our environment: 6042 + modem on COM1).

    1. /etc/ppp/pap-secrets

    This file contain user's account, you can see only one line:

    
    my_username  ppp0  my_password
    

    "my_username" is your dial-up account user name, "my_password" is password. You should change them with yours.

    2. /usr/sbin/ppp-on

    There are two lines.

    
    #!/bin/sh
    pppd nodetach lock modem crtscts /dev/ttyS0 38400 noipdefault defaultroute noauth \
    name my_username connect "chat -v '' ATDT123456789 CONNECT" &
    

    You should replace "my_username" with your user name as "/etc/ppp/pap-secrets". \ "ATDT123456789" is AT command to dial to ISP. You should reaplce "123456789" with your ISP's phone number.

    Now, you can type "ppp-on" to dial-up to your ISP and "ppp-off" to hang-up. Type "ifconfig" to display network configuration, you can find device "eth0" and "ppp0". Any problem, mail us to help you to dial-up.

    Download and installation

    We recommend user to use 16 MB or above MDM (xLinux does not support DOC) to install our Linux ghost image. You can download the image and use GHOST program to restore Linux system. Before restoring image, you should let DOS can find it. (fdisk and format it to be recognized by DOS that GHOST can see it)

    Reference Links

    Linux Kernel http://www.kernel.org/
    BusyBox http://www.busybox.net/
    TinyLogin http://tinylogin.busybox.net/
    Linux NetKit ftp://ftp.uk.linux.org/pub/linux/Networking
    WU-FTPD http://www.wu-ftpd.org/
    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