uClinux on S5LinBOX configuration --------------------------------- Marko Kovacevic, S57MMK, 02/2003 If You want to run uclinux on S5LinBOX board You will need uclboot (S5LinBOX Boot) already in the flash. Get the uclinux and config images and put them into flash from boot prompt. Run uclinux and edit /var/config files to meet Your requirements and write them back to flash (see below how). Connect serial terminal (ie HyperTerminal or minicom) to UARTA port to get uclinux prompt (at 38400,N,8,1). After You have correct configuration You can try telnet over ethernet. Current image (mmk-jan-2003) includes kernel and root. Root is read only romfs image. Some of /etc config files are symlinked to rw (ramfs) /var/config files. That files are copied from special config flash partition (/dev/rom5) at boot time (/etc/rc). Here is /etc contents: drwxr-xr-x 2 root root 4096 Jan 25 20:12 . drwxr-xr-x 12 root root 4096 Jan 25 20:12 .. lrwxrwxrwx 1 root root 19 Jan 25 20:12 axports -> /var/config/axports lrwxrwxrwx 1 root root 17 Jan 25 20:12 hosts -> /var/config/hosts -rw-r--r-- 1 root root 44 Jan 25 20:12 inetd.conf lrwxrwxrwx 1 root root 19 Jan 25 20:12 inittab -> /var/config/inittab -rw-r--r-- 1 root root 2 Jan 25 20:12 ip_forward -rw-r--r-- 1 root root 309 Jan 25 20:12 motd -rw-r--r-- 1 root root 21 Jan 25 20:12 passwd -rw-r--r-- 1 root root 2778 Jan 25 20:12 ramfs.img -rwxr-xr-x 1 root root 298 Jan 25 20:12 rc lrwxrwxrwx 1 root root 23 Jan 25 20:12 resolv.conf -> /var/config/resolv.conf -rw-r--r-- 1 root root 8205 Jan 25 20:12 services -rw-r--r-- 1 root root 61 Jan 25 20:12 version /etc/rc (read only !): mount -t proc proc /proc /bin/expand /etc/ramfs.img /dev/ram0 mount -t ramfs /dev/ram0 /var mkdir /var/config mkdir /var/tmp mkdir /var/log mkdir /var/run mkdir /var/lock mount -t romfs /dev/rom5 /config cp /config/* /var/config source /var/config/network sleep 2 cat /etc/motd You can change files from /var/config to meet Your requirements using vi editor. Then proceed as folows to save them to flash: cd /var genromfs -V "Config" -d /var/config -f cfg flashw -f cfg /dev/rom5 reboot Be careful while typing "/dev/rom5" ! Any mistake here will make Your flash out of order !! Flash partitioning: S5LinBOX hardware with 2MB/4MB FLASH. rom0 -- root file-system (actually in RAM) rom1 -- FLASH boot block (16k), adr:0x01000000,len:0x004000 rom2 -- FLASH boot block (8k), adr:0x01004000,len:0x002000 rom3 -- FLASH boot block (8k), adr:0x01006000,len:0x002000 rom4 -- FLASH kernel+file-system binary, adr:0x01020000,len:0x1d0000 rom5 -- FLASH config (64k), adr:0x01010000,len:0x010000 rom6 -- FLASH the whole damn thing (2Mb)! rom7 -- FLASH etnc (64k), adr:0x011f0000,len:0x010000 /var/config files examples: /var/config/axports dmascc0 MYCALL-6 0 255 7 psk1 dmascc1 MYCALL-9 0 255 7 psk2 /var/config/hosts 44.150.1.12 s57mmk.ampr.org mmk 44.150.1.1 s50lea.ampr.org lea 127.0.0.1 localhost lo 10.0.0.1 S5LinBOX /var/config/inittab inet:unknown:/bin/inetd /var/config/inetd.conf /var/config/inetd.conf telnet stream tcp nowait root /bin/telnetd /var/config/ax25ipd.conf socket udp 93 device dmascc0 mode tnc speed 0 loglevel 0 route MYCALL-0 10.0.0.2 d udp 93 /var/config/resolv.conf domain ampr.org nameserver 44.150.1.1 /var/config/network hostname=myhost.ampr.org ETHIP=10.0.0.1 ETHNET=10.0.0.0 ETHMASK=255.255.255.0 AXPIP=44.150.1.12 AXIPNET=44.150.0.0 AXIPMASK=255.255.0.0 GATE=44.150.1.1 MYCALL=MYCALL-6 GATECALL=S50LEA-0 # ifconfig lo 127.0.0.1 ifconfig eth0 $ETHIP netmask $ETHMASK arp up ifconfig dmascc0 $AXPIP netmask $AXIPMASK hw ax25 $MYCALL arp up # arp -H ax25 -i dmascc0 -s $GATE $GATECALL axparms -route add dmascc0 $GATECALL S55YLJ-3 -ipmode D arp -H ax25 -i dmascc0 -s 44.150.12.1 S50SOU axparms -route add dmascc0 S50SOU S55YLJ-4 -ipmode D # route add -net 127.0.0.0 lo route add -net $AXIPNET netmask $AXIPMASK mss 1500 window 32000 irtt 200 dmascc0 route add -net $ETHIPNET netmask $ETHMASK mss 1500 window 32000 eth0 route add default gw $GATE # iptables -t nat -A POSTROUTING -s $ETHIP/24 -o dmascc0 -j SNAT --to-source $AXPIP cp /etc/ip_forward /proc/sys/net/ipv4/ip_forward # ax25ipd -c /var/config/ax25ipd.conf &