DM&P xLinux Setup Reference |
Home : Products | Technical Support | 2005/06/09 |
The default user name is "root" and password is "password". Use "root" to login in X-Linux to setup your environment.
File Name | Description |
/boot/linux.img | Linux kernel. |
/boot/2.x.x.config | Linux kernel configuration file. |
/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. |
User name and password file for PPP dial-up. | |
This file makes it possible to automate the mounting of certain file systems, especially at system start-up. | |
This file controls who gets into the FTP server and how. | |
This is the default configuration file for the inetd (super-server) daemon. | |
/etc/inittab | This file plays a crucial role in the boot sequence. |
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. |
This file allows you to specify which TTY devices the root user is allowed to login on. | |
This file contains information regarding the known services available in the DARPA Internet. |
Utilities
Run those commands via keyboard or scripts. List of important commands/scripts:
Command | Path | Description |
ppp-on | /usr/sbin | Start a ppp connection. |
ppp-off | /usr/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 |
fdisk | /sbin | Partition table manipulator for Linux. |
mke2fs | /sbin | Create a Linux second extended file system |
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 | ash, cat, chgrp, chmod, chown, cp, date, dd, df, dmesg, echo, egrep, false, fgrep, grep, gunzip, gzip, hostname, kill, ln, ls, mkdir, mknod, mktemp, more, mount, mv, pidof, ping, ps, pwd, rm, rmdir, sed, sh, sleep, sync, tar, touch, true, umount, uname, usleep, vi, zcat |
/sbin | halt, ifconfig, init, klogd, pivot_root, poweroff, reboot, route, swapoff, swapon, syslogd, insmod, lsmod, rmmod |
/usr/bin | [, basename, bunzip2, bzcat, chvt, clear, cmp, cut, deallocvt, dirname, du, env, expr, find, free, head, hexdump, id, install, killall, logger, openvt, readlink, reset, sort, strings, tail, tee, test, time, tr, tty, uniq, unzip, uptime, wc, wget, which, whoami, xargs, yes |
/usr/sbin | chroot |
FTP server is enabled on our Linux DOC/MDM that can use FTP to upload programs. The default user name is "root" and password is "password". Install Linux (RedHat, Mandrake, SuSE...) on a powerful PC to develop applications is recommended. Write and compile programs then upload it to Mity-Mite/Tiny module via FTP to test. Kill the process if program is not correct. Repeat those steps until programs are okay. There is a example:
#!/bin/sh./lcd& sleep 5 ./lcd_time& |
chmod +x ./lcd chmod +x ./lcd_time chmod +x ./demo |
# 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 programs, 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]# |
# mount -o remount,rw / (mount root filesystem readable/writable) # (use FTP to upload files...) # sync (flush filesystem buffers) # mount -o remount,ro / (mount root filesystem read only) |
This file contain user's account, you can see first 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.
#!/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 replace "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.
Enable PPP Server Function to Accept PPP Dial-Up
You can find those two lines on /etc/inittab:
# remove '#' of next line to enable PPP server function, but ppp client function will not work #ttyS0::respawn:/sbin/mgetty -D -a modem ttyS0 |
Remember to remount root filesystem readable/writable and remove '#' of "#ttyS0".
Use mv to restore /etc/ppp/options.ttyS0:
# mv /etc/ppp/options.ttyS0.pppd /etc/ppp/options.ttyS0 |
/etc/ppp/options.ttyS0 is needed for PPP server.
Default use name and password for PPP client to dial-up are "pppuser" and "xlinux". If you want to add other user account, just duplicate line 2 of "/etc/ppp/pap-secrets" and replace "pppuser" with new user name and "xlinux" with new password:
my_username ppp0 my_password * pppuser * xlinux * |
After doing that, login in as root and do those steps:
# adduser new_user_name (add new user) # passwd new_user_name (change user's password) |
Because accepting PPP dial-up will run mgetty which read account data from system to verify user, we have to add user account to accord with /etc/ppp/pap-secrets.
If you enable PPP server function, PPP client dial-up function of xLinux will not work.
Enable Serial Console
Flow those steps to add serial console into X-Linux R5:
profile -> /etc inittab -> /etc securetty -> /etc syslinux.cfg -> /boot linux.img -> /boot
Baud Rate = 9600 Parity Bit = No Data Bits = 8 Stop Bits = 1 Flow Control = OFF
hub.c: new USB device 00:01.2-1, assigned address 2 scsi0 : SCSI emulation for USB Mass Storage devices Vendor: Usb Model: Flash Disk Rev: 1.11 Type: Direct-Access ANSI SCSI revision: 02 Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 SCSI device sda: 129024 512-byte hdwr sectors (66 MB) sda: Write Protect is off sda: sda1 sda2 < > |
~ # mount /dev/sda1 /mnt |
~ # insmod /sbin/ac97_codec.o ~ # insmod /sbin/sis7019.o |
You can add it into /etc/profile to automatically install.
Reference Links
Linux Kernel | http://www.kernel.org/ |
SysLinux | http://syslinux.zytor.com/ |
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/ |
WN Server | http://hopf.math.nwu.edu/ |
udhcp | http://udhcp.busybox.net/ |
DMP Electronics Inc. All rights reserved. | Email us: info@dmp.com.tw |