Notes on setting up TS-Linux ver 3.05 on the embeddedx86 CPU. Last revision is 2004/11. Note: All vendor instructions can be found in the Linux Dev Manual (0412xx_Linux_Dev_Manual.pdf, see #2 for file location). These notes just document the step I took to develop the tx1 boots Compact Flash Disk. 1. Setting up x86CPU to work with minicom. Note: We run the com ports using 115200 baud. This requires the JP4 jumper to be ON on the TS-5600. Attach embeddedx86 to com1 on the linux PC. To set the permissions for minicom ttys Become root: # chmod 666 /dev/ttys0 # minicom -s serial port setup -> Serial Device:/dev/ttys0 Bps/Par/Bits: 115200 8N1 To run minicom: >minicom This connects you to the embeddedPC's console. Run minicom in the ANSI mode for terminal emulation. This prevents The system prompt etc from printing as garbage: In the minicom window, press cntl-A then T In the terminal setup window press A at the prompt until ANSI is selected, then press return at the prompt to exit the setup 2. Configure a linux compact flash boot disk from scratch. a. Download compact flash files. Site: http://www.embeddedx86.com/support/linux/main.htm Also located locally: /home/tcs3/public_html/systems/tcs3/vendor_info/Technologic_systems/embeddex86/0407_downloads/ 1) Blank compact flash image. Bootable binary image for TS-Linux v3.05 TS-Base-64.cf (new_blank_bootable.64.cf.bz2) 2) Base file system for TS-Linux v3.05 OS-3.05.tar.gz 3) Precompiled 2.4.23 kernels with TS version 2.4 patch kernel-image.tgz (kernel-image-2.4.23-2.4-ts.leucosia-ts2.4.tgz) 4) Documentation: TS-5600.pdf - hardware manual for TS-5600 CPU boards. 0412xx_Linux_Dev_Manual.pdf - Developer manual for Linux. b. Copy the Blank compact flash image to a temporary directory and uncompress it. >bunzip2 -k new_blank_bootable.64.cf.bz2 c. Applying blank CF image to the CF card. 1) Attach CF card reader to the USB port of the linux computer. 2) Download blank compact flash image to the compact flash card. #dd if=new_blank_bootable.64.cf of=/dev/sda d. Mount compact flash compact flash second partition. Become root. #mkdir /mnt/cfp2 #mount -t ext2 /dev/sda2 /mnt/cfp2 e. Put OS on second partition. #tar -C /mnt/cfp2 -xvzf OS-3.05.tar.gz f. Put Kernel onto compact flash. 1) Extract kernel files in a temporary directory. This produces in three folders: boot, lib and usr. >tar -xvzf kernel-image-2.4.23-2.4-ts.leucosia-ts2.4.tgz 2) Mount first partition. #mkdir /mnt/cfp1 #mount -t msdos /dev/sda1 /mnt/cfp1 3) Copy /boot/bzImage to the first partition. File must be named "bzImage". #cp bzImage-2.4.23-2.4-ts.leucosia /mnt/cfp1/bzImage 4) Recursively copy /lib directory to /mnt/cfp2 #/bin/cp -R lib /mnt/cfp2 5) Their was some misconfiguration of the console's baud rate. Insure they are set to 115200 baud edit /mnt/cfp2/etc/inittab: console login on COM ports should show 115200 baud: lgn0:2345:respawn:/sbin/getty -L 115200 ttyS1 edit /mnt/cfp1/syslinux.cfg boot parameters should indicated 115200: console=ttyS1,115200 6) Cleanup: Unmount compact flash partitions #umount /dev/sda1 #umount /dev/sda2 7) Remove temporary files and directories 3. Setup for TCS3 development. a. Place the CF card in the embedded PC and boot it. b. Change root password. Initial login/pass: root/redhat #passwd c. Configure Hostname and IP settings Edit files. 1) /etc/sysconfig/ifcfg-eth0 2) /etc/sysconfig/network_cfg Hostname must be capitalized to HOSTNAME 3) /etc/hosts 4) /etc/resolv.conf 5) Change /etc/rc.d/rcS.sysinit Comment out this line to look like: #/bin/hostname miniepc.embeddedx86.com d. add tcs3 account. 1) Edit /etc/passwd file. 2) Change tcs3 password. #passwd tcs3 3) Add home directory #mkdir /home/tcs3 #chown tcs3 /home/tcs3 e. Disable httpd. #mv /etc/init.d/Apache.script /etc/init.d/Apache.script.removed f. Remove guest account from /etc/passwd. g. portmap For rpc need to run portmap (only run as port of nfs server). (see /home/tcs3/public_html/systems/tcs3/computers/embeddedx86/misc) create a script in /etc/init.d called portmap.script chmod 755 portmap.script create links for the starting and stopping of the script in rc3.d & rc5.d respectively. h. mount duke 1) Change /etc/fstab. Add this line: duke:/aux2 /duke nfs noauto,soft,nolock 0 0 Note: the nolock parameter seems to be necessary 2) Edit /etc/hosts Add line: 128.171.165.3 duke 3) Create mounting point #mkdir /duke 4) mount duke #mount /duke i. Make Disk Read-Only To make the disk read-only follow these few steps, also you can refer to pg. 9 & 10 in the Technologic Systems manual (February 2004). 1. Remove /etc/mtab, and make a symbolic link to /proc/mounts rm /etc/mtab ln -s /proc/mounts /etc/mtab 2. Edit /etc/rc.d/rcS.sysinit file to remount/ (root) partition read-write Change (about line 50): mount -n -o remount, rw / by making it a comment: #mount -n -o remount, rw / 3. Add these ramdisk partitions to etc/fstab tmp_log /var/log tmpfs size=512K 0 0 tmp_var /var/run tmpfs size=100K 0 0 j. localtime & syncing the clock. 1. To get the correct timezone: Copied /usr/shared/zoneinfo/US/Hawaii from slackware 8.1 to embeddedOS linked /etc/localtime to ../usr/share/zoneinfo/US/Hawaii 2. We don't have a real-time hardware clock. We couldn't get any ntp client to work well so we wrote our own timeserver program to do the ntpclient funcition. Installed in /usr/local/bin and started at boot time using timerserver.script. Follow the same procedure as for adding the portmap.script. (see /home/tcs3/public_html/systems/tcs3/computers/embeddedx86/timeserver) 4. Development Notes: 1. To make the / filesystem rw for development, change 1 line in /etc/rc.d/rcS.sysint Uncomment line 50: mount -n -o remount,rw / This will make the root filesystem (/) rw. After changes, restore command to make / ro again. Here are the host commands to edit the file: # mount /dev/sda2 /mnt/cfp2 # vi /mnt/cfp2/etc/rc.d/rcS.sysint # umount /mnt/cfp2 2. For a development system I used slackware 8.1 which provides: kernel: 2.4.18, gcc: 2.95.3, glibc: 2.2.5 This closely match the TS-Linux's 3.05 (based on Linux From Scratch v3.1) kernel: 2.4.23, gcc: 2.95, glibc: 2.2.5 One of t9h partition is setup as the embedddedx86 development host. Bugs with OS: 1. Startup displays garbage characters where dmesg data should appear: 2. Hostname in /etc/sysconfig/network_cfg is in lowercase and should be HOSTNAME