**************************************************************************
HOW TO UPGRADE YOUR OPENBSD ZAURUS TO CURRENT SNAPSHOT
**************************************************************************

Warning! upgrades of OpenBSD are currently only supported from the
immediately previous release.

a. Copy the latest and greatest zbsdmod.o and bsd.rd from
ftp.openbsd.org/pub/OpenBSD/snapshots/zaurus to sd/cf card.

b. Unplug Zaurus from AC power.

c. Remove battery cover from the SL-C3200

d. Leaving the Battery Cover OFF, return the battery cover lock to the LOCKED position.

e. Locate reset switch on the left side edge of battery compartment.

f. Open the unit so that the keyboard is accessible with one hand and the base of the unit is accessible with the other.

g. Hold down D+B on the keyboard and whilst these keys are held depress the reset button using the stylus.

h. Release the D+B keys and within a few seconds the unit should start to boot into Emergency Linux.

i. Reconnect AC power.

j. Return battery cover lock to unlocked position, Replace battery cover, Lock cover.

k. Log into Emergency Linux using the username root (no password).

l. Insert the SD or CF storage card.

m. Change directory:
# cd /mnt/card for SD card or
# cd /mnt/cf for a CF card.

n. Load kernel module:
# insmod zbsdmod.o

o. cp bsd.rd to the zboot proc entry:
# cp bsd.rd /proc/zboot

You should now be observing the OpenBSD kernel boot messages.

p. In the text below everything after a ? should be typed as is except for text in ( !@#$%^). Some options are already selected as the [default response] and will only require you to press enter. Alot of this is just commen sense but I have listed it anyway.
-------------------------------------------------------------------------------------------------------------------
Term? vt200
(I)Install (U)Upgrade (S)Shell? U
Disk? wd0
Root partition? wd0a
Use the existing filesystems defined in /etc/fstab? yes
Edit fstab? no
Use network settings on root partition? yes
Manual network configuration? no
Location of sets? ftp
Http/ftp proxy URL? none
Display list of known ftp servers? no
Server? (IP address, hostname or 'done' ) ftp.openbsd.org
Does server support passive mode ftp? yes
Server directory? pub/OpenBSD/snapshots/zaurus
Login? anonymous
Set name? all ( etc.zz and xetc.zz will not be downloaded )
Set name? done
Ready to upgrade sets? yes
Getting bsd...
-------------------------------------------------------------------------------------------------------------------
All BSD Sets should now begin to download... Time to complete download varies depending on the speed of your network connection and server usage at the time.

After all the sets have been downloaded you will be prompted once agian for the

q. locations of sets? done

OpenBSD will the begin making all device nodes and then ask you to Calibrate your touch screen.

After you have calibrated the touch screen you should see a message stating that you have now successfully upgraded your Openbsd zaurus system!

r. Type halt to reboot the system

It is strongly advised that you also download and unpack the corresponding etczz.tgz set found at ftp.openbsd.org/pub/snapshots/zaurus in a temporary directory and merge any changes by hand. Some components of your system may not function correctly until your files in `/etc' are updated. To accomplish this use a tool such as mergemaster. Mergemaster can be found in ports/sysutils/mergemaster

Finally you may want to rebuild some/all of your installed applications if they fail to operate correctly after upgrading. However, you will want to update your ports tree first.

s. Change to your ports directory:
# cd /usr/ports

t. Update your ports tree: ( This can take awhile... )
# cvs -d anoncvs@anoncvs.openbsd.org:/cvs up -Pd

# make index

u. Update your ports via packages: (This is optional, you can rebuild your ports one-by-one from the ports directory)
# pkg_add -ui -F update -F updatedepends




*************************************************
UPGRADING YOUR OPENBSD ZAURUS VIA CVS
*************************************************


Caution! Anyone upgrading their Z from 4.0 to 4.1 should read the upgrade instructions located at: 
http://www.openbsd.org/faq/upgrade41.html There is a special procedure that must be followed this cyle. See the following link for the quote: http://mersenne.homeunix.net/zaurusforums/viewtopic.php?p=232#232

If you haven't previously checked out /usr/src or /usr/ports then STOP and do so before continuing.

# cd /usr
# cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -P src
# cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -P ports

Use CVS to download the latest source and ports collection


This process updates the sources you have previously checked out! If you just checked them out then you can skip this step!

# cd /usr/src
# cvs -d anoncvs@anoncvs.openbsd.org:/cvs up -Pd
# cd /usr/ports
# cvs -d anoncvs@anoncvs.uk.openbsd.org:/cvs up -Pd

Required pre-build processes

# make -k cleandir
# rm -rf /usr/obj/*
# make obj

# cd /usr/src/etc/mtree
# install -c -o root -g wheel -m 660 special /etc/mtree
# install -c -o root -g wheel -m 444 4.4BSD.dist /etc/mtree
# mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
# cd /usr/src/etc
# env DESTDIR=/ make distrib-dirs

Build and Install the new Kernel

# cd /usr/src/sys/arch/zaurus/conf/
# config GENERIC
# cd ../compile/GENERIC
# make clean && make depend && make
# make install
# reboot <-- Note the above Caution!
or
# cp /bsd /bsd.old
# cp bsd /bsd
# chown root:wheel /bsd
# reboot
<-- Note the above Caution!

Build and Install the new System

# cd /usr/src/
# make build
# cd /dev
# cp /usr/src/etc/etc.zaurus/MAKEDEV ./
# ./MAKEDEV all
# cd /usr/src/usr.sbin/httpd
# make -f Makefile.bsd-wrapper distribution

Build and Install mergemaster to merge any changes in the new files with the old

# cd /usr/ports/sysutils/mergemaster
# make install clean
# cd /usr/local/sbin/
# ./mergemaster
# reboot



****************************************************
FREEBSD NFS SERVER FOR OPENBSD PORTS & SRC
****************************************************


Create an NFS share on a FreeBSD box for OpenBSD ports and source:

# ssh to NFS server
# cd /usr
# mkdir openbsdports
# mkdir openbsdsrc
# vi /etc/rc.conf and add

mountd_flags="-r"
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"

# vi /etc/exports and add

/usr/openbsdports /usr/openbsdsrc -maproot=root zaurusipaddress

# reboot

You may want to check that the nfs points are being exported after the reboot. On the nfs server do the following:


# showmount -e
Exports list on localhost:
/usr/openbsdsrc <--- If you see this
/usr/openbsdports <--- and this then your good to go!

Now on the Zaurus:

# vi /etc/fstab and add

nfsserverip:/usr/openbsdsrc /usr/src nfs rw,noauto 0 0
nfsserverip:/usr/openbsdports /usr/ports nfs rw,noauto 0 0

# mkdir /usr/ports <--- If it doesn't exist
# mkdir /usr/src <--- If it doesn't exist
# mount /usr/ports
# mount /usr/src

Use cvs to download the ports collection and openbsd source from some cvs mirror into your NFS share:

# cd /usr
# cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P ports

#cd /usr
#cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P src

Once this has completed you can either rebuild your kernel/system from source, build/rebuild your ports one-by-one or do a batch mode port build all on the nfs server:

To rebuild your system from source see the text above.

To perform a batch mode port build do the following:

# cd /usr/ports
# vi mypackages and add

www/w3m
net/nmap,no_x11
port-type-dir/portname

# make BUILD=yes SUBDIRLIST=/usr/ports/mypackages install

or to build ports one-by-one: (common sense)

# cd /usr/ports/port-type-dir/portname
# make
# make install

<