Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 1999 18:41:11 -1000
From:      "Randal S. Masutani" <randal@comtest.com>
To:        Andrzej Bialecki <abial@nask.pl>
Cc:        freebsd-small@FreeBSD.ORG
Subject:   Re: IBM PC110 with CompactFlash
Message-ID:  <199901200420.SAA06819@oldyeller.comtest.com>
In-Reply-To: <199812290251.QAA17895@oldyeller.comtest.com>
References:  <Pine.BSF.4.02A.9812282350250.2125-100000@korin.warman.org.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Dec 98, at 17:11, Randal S. Masutani wrote:

> On 28 Dec 98, at 23:57, Andrzej Bialecki wrote:
> 
> > * if possible, use IDE flash - it's easiest to support on various OS-es.
> > 
> > * then, try to use M-Systems' DiskOnChip - there is a driver for it. 
> 
> The DiskOnChip works fine if you are using them as a second drive.  You 
> can't boot from it unless your BIOS also has the right support for it.  
> There may be some compatibility issues between the BIOS access and kernel 
> access to the DiskOnChip.  Anyone else have experience with this?
> 
> Randal

I stand corrected.  The DiskOnChip does not need any special BIOS support 
to work as a boot drive.  It has built-in code to work in almost any 
system.

1. The DOC2k has built in BIOS extension code that will add itself as a 
drive to INT13 BIOS services during POST ROM extension scan.  It requires 
an 8K window size in the memory ranges from C8000 to EFFFF.

2. Depending on how the DOC2K is configured to add itself as the last 
drive or first drive will determine if you can boot from it.  It is setup 
from factory to add itself as the last drive.  Of course if it is the 
only drive in the system then it will install itself as drive C: and boot.

I have successfully tested and booted PicoBSD from a DiskOnChip 2000 2MB 
on an ISA card.  I am using the M-systems DiskOnChip EvalBoard which 
includes a 2MB DiskOnChip 2000.  This is an ISA card with one socket and 
cost about $40 US dollars.

How I got it to work:

1. First of all you need to partition, label, and newfs like any hard 
drive before you can copy PicoBSD to it.

   a)  Build a new kernel on a FreeBSD 3.0 system with the DOC2K driver 
support.
      1)  Download the DOC2K driver from http://phk.freebsd.dk/doc2k/
      2)  Follow the README instructions to install the driver.
      3)  Once you get a new kernel with DOC2K support, FreeBSD should 
recognize it as a drive /dev/fla0.

   b) Now you need to format it.
      1)  dd if=/dev/zero of=/dev/rfla0 count=32
      2)  fdisk -f doc2k2.conf -i fla0
      3)  disklabel -w -r fla0s1 doc2k2
      4)  disklabel -B -b /usr/mdec/wdboot -s /usr/mdec/bootwd fla0s1
      5)  newfs fla0s1a
      6)  thats it! now you should have a mountable drive /dev/fla0s1a.

2.  Build a new PicoBSD to add support for the DOC2K.

   a)  Assuming you are building PicoBSD on the same system above. You 
just need to add the driver line to the conf/PICOBSD kernel config file.
   b)  Modify lang/mfs.rc.en [.pl] file to mount /dev/fla0s1a instead of 
the floppy /dev/fd0a.
   c)  Modify lang/update.en [.pl] file to mount /dev/fla0s1a instead of 
the floppy /dev/fd0a.
   d)  Modify mfs.tree/Makefile to MAKEDEV fla0s1h instead of wd0s1h.
   e)  Now you can just build your new PicoBSD image to a floppy.

3.  Copy the files from floppy to DOC2K drive.

   a)  mount /dev/fla0s1a /mnt
   b)  mount /dev/fd0c /mnt2
   c)  cp -pR /mnt2/* /mnt
   d)  umount /mnt /mnt2
(note: it is possible to modify the build stage3 file to build an image 
directly for the DOC2K instead of floppy, but that gets a bit more 
technical and dependent on the size of you DOC2k chip.)

4.  You now should be able to boot PicoBSD off the DOC2K chip.


Here are contents of the files doc2k2.conf and /etc/disktab.

contents of doc2k2.conf:
# wd0
p 1 165 0 3904
p 2 0   0   0
p 3 0   0   0
p 4 0   0   0
a 1

(note: the last number 3904 will need to be adjusted for the correct 
number of sectors on your doc2k chip size.)

contents of /etc/disktab:

<snip>

doc2k2|DiskOnChip 2000 2MB Chip:\
        :dt=ESDI:ty=winchester:se#512:nt#4:ns#1:nc#976: \
        :pa#3904:oa#0:ta=4.2BSD:ba#0:fa#0: \
        :pc#3904:oc#0:bc#0:fc#0:

<snip>

(note: the nt#4, ns#1, nc#976, pa#3904, pc#3904 will all need to be 
adjusted for the correct numbers on your doc2k chip size.)

Randal


-------------------------------------------------------------------------
ComTest Technologies, Inc.
3049 Ualena St., Suite 1005
Honolulu, Hawaii  96819

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901200420.SAA06819>