Zaurus related information

[Fractal]
Documents:
FileDescription
backup script.zip My backup bash shell script. Extract "filelist" into /home/zaurus & "backup.sh" into /usr/bin. Modify the username & ip address in backup.sh. Make the script executable with: chmod a+x /usr/bin/backup.sh.
Create a directory on the SD card called backup ie mkdir /mnt/card/backup
To extract the backup archive use:
cd /; tar xzvf /path/to/backup_xxx.tar.gz;
This is also a great way of transferring settings between different ROMs.
linstanpump 0.2 arm.tar.gz Pharmacokinetic modeling based on stanpump for DOS. I have recompiled it for the Zaurus. Extract with:
cd /; tar xzvf /path/to/linstanpump_0.2_arm.tar.gz
povray 3.6.1 arm.ipk Povray version 3.6.1 compiled for ARM. I have reomoved the documentation & some scenes to keep the file size down.

Zaurus setup



Index

  1. C860
    1. Install Cacko 1.23 as per instructions from CF card
    2. Format 1G Lexar SD card with
    3. Create directories on SD card
    4. Added the following to /home/zaurus/.profile
    5. Install
    6. Install Linksys WCF12 CF card
    7. USB TCP/IP
    8. Copy vfat image of cf card to SD card + mount using loop device
    9. ipkg
    10. Mount MS Windows shares
    11. Perl 5.8
    12. qmake
    13. Install debugger
    14. Installed minicom
    15. Getting to NAND backup service menus
    16. Flash menu
    17. Alernative developer setup
    18. tmake
    19. ipkg -d sd install personal-profile-for-zaurus
    20. Initial setup of PATH: /home/QtPalmtop/qpe.sh
    21. Povray
    22. Linking libraries or executables on sd card
  2. 6000L
    1. Need to add ssh
    2. Swap file
    3. Preserving settings between different roms
    4. Copy .profile & .bashrc for startup environment settings
    5. ssh
  3. Backup
    1. Copying an entire drive i.e. SD card
    2. Install gtar - this adds zipping capabilities + -T parameter which lets you use a file list to backup specific files/directories



Main



  1. C860    [Top]


    1. Install Cacko 1.23 as per instructions from CF card    [Top]
    2. www.cacko.biz
      Note: partition >27Mb system partition (df reports 28.4Mb used)

    3. Format 1G Lexar SD card with:    [Top]
    4. umount /dev/mmcda1
      fdisk
      mke2fs /dev/mmcda1

    5. Create directories on SD card:    [Top]
    6. ./bin
      ./sbin
      ./usr/bin
      ./usr/sbin
      ./usr/local/bin
      ./$QPEDIR/bin

    7. Added the following to /home/zaurus/.profile    [Top]
    8. SD=/mnt/card
      PATH=$PATH:$SD/bin:$SD/sbin:$SD/usr/bin:$SD/usr/sbin:$SD/usr/local/bin:$SD$QPEDIR/bin
      {This should have been added to rc.local or S99local in rc.d however it does not seem to work - ? replaced by .profile}

    9. Install:    [Top]
    10. tkcCard ver 3.0, tkcZip, tkcEditor, Tree!Explorer
      With ipkg -d sd install
      yEdit, Neocal, Portabase
      Kismet
      (requires new network connection: warwalk, type:any Ad-hoc tcp 10.1.0.2 mask 255.0.0.0 dns 10.1.0.1 gateway 10.1.0.1)
      VNC viewer
      PDF viewer (qpdf2), ZUC 640x480

    11. Install Linksys WCF12 CF card settings    [Top]
    12. Setup wireless network settings

    13. USB TCP/IP    [Top]
    14. Configure C860 through PC Link: USB TCP/IP

    15. Copy vfat image of cf card to SD card + mount using loop device    [Top]
    16. mkdir /mnt/cf
      losetup -d /dev/loop1
      mknod /dev/loop1 b 7 1
      #mknod /dev/loop b 7
      losetup /dev/loop1 /mnt/card/cfimage
      mount -t vfat -o noatime,umask=000,gid=500,uid=500,rw /dev/loop1 /mnt/cfimg
      alternative:
      mount -o loop /mnt/cf/cimage /mnt/cfimg
      fstab: (no luck with this)
      /mnt/card/cfimage /mnt/cfimg loop,noatime,rw 0 0

    17. ipkg    [Top]
    18. edit /etc/ipkg.conf

      src Cacko http://cacko.biz/cacko/feed
      dest root /
      dest sd /mnt/card
      dest home /home/zaurus
      dest tmpinst /home/tmp/ipkg/inst

      use: ipkg -d sd install ....
      ipkg update
      ipkg remove error
      or delete /usr/lib/ipkg folder and also similar folders from CF and SD cards.

    19. Mount MS Windows shares:    [Top]
    20. mount -t smbfs -o username=username,workgroup=emnet //fserve/share
      list with
      smbclient -L

    21. Install Perl 5.8    [Top]
    22. Problems - error after install however /mnt/card/perl directory created.
      Added the following to .profile (?should it be .bashrc):
      #Perl
      export LC_ALL="C"
      export LANG="en_US"
      export PERL5LIB="/mnt/card/perl/perl5.8.0/lib"
      Symbolic links created for perl in /mnt/card/usr/bin:
      cd /mnt/card/perl/perl5.8.0/bin; for i in *; do ln -s /mnt/card/perl/perl5.8.0/bin/$i /mnt/card/usr/bin/$i; echo /mnt/card/usr/bin/$i; done

    23. qmake    [Top]
    24. qmake_3.0.0_arm.ipk

    25. Install debugger    [Top]
    26. gdb_5.2-0_arm.ipk

    27. Installed minicom    [Top]
    28. Connected to pc with null modem cable.

      Found that buttons between "Fn" & "-" represent ctrl & alt.

    29. Getting to NAND backup service menus:    [Top]
    30. c860: Remove battery + charger
      Connect power while pressing Fn+D+M
      6000L: D+M+reset
      D+P+reset : extended service menu
      BTW: pressing D + B will result in single user mode - this is useful for checking the SD card with e2fsck -fpcv /dev/mmcda1 or fsck.ext3 (Cacko rom)
      Can also press '/' during boot countdown to select login options

    31. Flash menu:    [Top]
    32. Remove battery + power
      Attach AC power while pressing OK button
      Options:

      • Cancel
      • System check
      • Erase all / format (needs AC power)
      • Flash update (needs AC power)

    33. Alernative developer setup    [Top]
    34. Download dev-img_1.5 to /mnt/card
      Mount on /mnt/dev with mount -o loop,noatime,rw /mnt/card/dev-img_1.5 /mnt/dev
      Install by running /mnt/dev/compiler_setup.sh -r /mnt/dev
      Add the following as before to .profile:
      SD=/mnt/card
      PATH=$PATH:$SD/bin:$SD/sbin:$SD/usr/bin:$SD/usr/sbin:$SD/usr/local/bin
      #Perl
      export LC_ALL="C"
      export LANG="en_US"
      export PERL5LIB="/mnt/pkgs/perl/perl5.8.0/lib/5.8.0"
      export PERL_BADLANG=0
      Mount dev image at startup with "mntimg" in /etc/rc.d/init.d:
      =======================================================

      	#!/bin/bash
      	#
      	# /etc/rc.d/rc5.d/S98mnt - mount developer image + my cf image 
      	#
      	# Comment out the following exit line to enable this script.
      	# exit 0
      	echo "mounting images from sd card"
      	case "$1" in
      		start)
      		if [ -f /mnt/card/dev_img-1.5 ] ; then
      		mount -o loop,noauto,noatime,rw /mnt/card/dev_img-1.5 /mnt/dev
      		fi
      		if [ -f /mnt/card/cfimage ] ; then
      		mount -o loop,user,noatime,rw,gid=500,uid=500,umask=000 -t vfat /mnt/card/cfimage /mnt/cfimg
      		fi
      		;;
      		stop)
      		umount /mnt/dev
      		umount /mnt/cfimg
      		;;
      		restart)
      		$0 stop
      		sleep 1
      		$0 start
      		;;
      		*) 
      		echo "Usage: $0 (start|stop|restart)"
      		exit 1
      		;;
      	esac
      	exit 0
      		
      ========================================
      For some reason adding:
      /mnt/card/dev-img_1.5 /mnt/dev loop,noatime,rw 0 0
      to /etc/fstab does not work.
      Link /etc/rc.d/rc5.d/S98mnt to "mntimg"
      Link /etc/rc.d/rc6.d/K40mnt to "mntimg"
      Once /mnt/dev is available, run /mnt/dev/bin/compilersetup.sh -r /mnt/dev
      to set up required links.
      If /usr/local/include exists then you will need to create the links manually:
      cd /mnt/dev/include
      for i in *; do ln -s /mnt/dev/include/$i /usr/local/include/$i; echo $i; done

  2. tmake:    [Top]
  3. tar xzvf tmakex.x.tar.gz
    copy ./tmakex.x/lib/qws/linux-sharp-g++ to /mnt/card/lib
    copy ./tmakex.x/bin/* /mnt/card/usr/bin
    add to /home/zaurus/.profile
    export TMAKEPATH=/mnt/card/usr/lib/linux-sharp-g++
    qmake:
    The actual app is built as follows.
    "qmake -project"
    app.pro is edited to add the line
    "CONFIG += qt thread" then

    		"qmake -spec /mnt/card/usr/lib/linux-sharp-g++ \
    		 -o Makefile app.pro"

  4. ipkg -d sd install personal-profile-for-zaurus    [Top]
  5. for java on Cacko

  6. Initial setup of PATH: /home/QtPalmtop/qpe.sh    [Top]
  7. Finally found out where the PATH variable for qpe is set.

  8. Povray    [Top]
  9. Manual install: tar xzvf povray-3.x.ipk -C /mnt/card
    ln -s /mnt/card/usr/share/povray-3.x /usr/shar/povray-3.x
    ln -s /mnt/card/usr/bin/povray /usr/bin/povray
    cp /mnt/usr/lib/libstdc++-libc6.1-2.so.3 /usr/lib

    Command line switches consist of a + (plus) or - (minus) sign, followed by one or more alphabetic characters and possibly a numeric value. Here is a typical command line with switches.

    POVRAY +Isimple.pov +V +W800 +H600

    Each switch begins with a plus or minus sign:

    +I : scene file to use as input
    +V : output status to the text screen as it is working
    +W and +H : set the width and height of the image in pixels
    +L : set library paths - up to ten unique paths may be specified
    

    In switches which toggle a feature, the plus turns it on and minus turns it off. For example +P turns on the pause for keypress when finished option while -P turns it off. Other switches are used to specify values and do not toggle a feature. Either plus or minus may be used in that instance. For example +W320 sets the width to 320 pixels. You could also use -W320 and get the same results. Switches may be specified in upper or lower case. They are read left to right but in general may be specified in any order. If you specify a switch more than once, the previous value is generally overwritten with the last specification.

  10. Linking libraries or executables on sd card:    [Top]
  11. ln -s /mnt/card/usr/bin/* /usr/bin
    ln -s /mnt/card/usr/lib/* /usr/lib

  • 6000L    [Top]


    1. Need to add ssh    [Top]
    2. Swap file    [Top]
    3. dd if=/dev/zero of =/mnt/card/.swapfile bs=1024 count=32768 #32Mb
      mkswap /mnt/card/.swapfile
      swapon /mnt/card/.swapfile
      Startup:
      Add swapon to /etc/rc.d/rc.local:
      swapon /mnt/card/.swapfile
      make sure it is executable:
      chmod a+x rc.local
      cd rc5.d
      ln -s ../rc.local S49local

    4. Preserving settings between different roms:    [Top]
    5. copy /home/zaurus
      Particularly:
      /home/zaurus/Applications/dtm
      Note: change filenames to uppercase with:
      rename.sh
      ========================================
      #!/bin/bash
      for i in [a-z]*
      do
      j=`echo $i | tr '[a-z]' '[A-Z]'`
      echo "mv $i $j"
      mv $i $j
      done
      ========================================
      /home/zaurus/Applications/iqnotes
      If copied from a backup file from windows the case, links, groups & owners are lost so:
      chown -R zaurus:qpe ./dtm/*

    6. Copy .profile & .bashrc for startup environment settings    [Top]
    7. ssh:    [Top]
    8. Generate keys in ~/.ssh:
      ssh-keygen -t rsa
      To login without a password:
      Add the following line to /etc/ssh/sshd_config of the sshd host:
      PubkeyAuthentication yes
      Copy the public key to the host;
      cat ./id_rsa.pub | ssh username@192.168.129.1 "cat - >> /home/username/.ssh/authorized_keys2"

  • Backup    [Top]


    1. Copying an entire drive i.e. SD card:    [Top]
    2. dd if=/dev/mmcda1| gzip > /mnt/backup/mmcda1.gz
      Restoring:
      gunzip -c /mnt/backup/mmcda1.gz | dd of=/dev/mmcda1

    3. Install gtar - this adds zipping capabilities + -T parameter which lets you use a file list to backup specific files/directories    [Top]
    4. My backup script using a list of files in /home/zaurus/filelist:

      #!/bin/bash
      
      filelist="/home/zaurus/filelist"
      logfile="/mnt/card/backup/log.txt"      # creat a backup directory on the SD or CF card
      tarfile="/mnt/card/backup/backup"
      host="192.168.129.1"                    # change to the ip address of your ssh server
      user="username"                         # modify username
      
      echo "C860 Backup:" > $logfile
      
      exec < /home/zaurus/filelist
      
      #Write a log to show which directories existed
      #---------------------------------------------
      while read line;
      	do 
              if [ ! -r "${line}" ] 
      	then
      		echo "${line} does not exist" | tee -a $logfile
      	else
      		echo "${line} ok!" | tee  -a $logfile
      	fi   
      	done;
      
      #Create tar backup
      #-----------------
      gtar czpvf $tarfile.tgz -T $filelist    # Create archive using list of files in filelist
      
      tdy=`date '+%Y-%m-%d'`
      newtar=${tarfile}_"$tdy".tgz 
      mv $tarfile.tgz $newtar
      
      echo "`date` Compressed tar archive created:  $newtar" | tee -a $logfile
      
      #Copy to home server for remote backup
      #-------------------------------------
      echo "Copy archive to ${host}" >> $logfile
      scp "$newtar" "${user}@${host}:/home/stefan/zaurus/backup" >> $logfile
      cat $logfile | ssh ${user}@${host} "cat - >> /home/${user}/log"
      

      My file list: (in /home/zaurus)

      /home/zaurus/Applications/dtm/
      /home/zaurus/Applications/iqnotes/
      /home/zaurus/Applications/tkcCard/
      /home/zaurus/Settings