Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2000 04:55:40 -0700 (MST)
From:      Les Biffle <les@ns3.safety.net>
To:        freebsd-small@freebsd.org
Subject:   Re: M-systems DiskOnChip
Message-ID:  <200003231155.EAA85689@ns3.safety.net>

next in thread | raw e-mail | index | archive | help
> In message <s8d730d3.010@brisbane.qld.gov.au> David Elkin writes:
> : Im trying to find out how to install Freebsd onto A DiskONChip. I cannot
> : find any documentation at all. Could you please tell me if it is possible and
> : if so point me in the right direction.
> 
> src/sys/contrib/dev/fla/README

The README is a very comprehensive and wonderful document.  The
associated "prep.fla.sh" init script, while being very nice and useful,
is broken in an unfortunate way, because it sets the device type to
"ESDI" rather than DOC2K.  This was also suggested in Michael
Bretterklieber's posting of December 27:

(quoting Michael)

my disktab-entries:
...
doc2k4|DiskOnChip 2000 4MB Chip:\
    :dt=ESDI:ty=winchester:se#512:nt#8:ns#1:nc#986:\
    :pa#7888:oa#0:ba#0:fa#0:ta=4.2BSD:\
    :pc#7888:oc#0:bc#0:fc#0: 
...

(me again)

Setting it to ESDI is fine if we're installing a picobsd, since the
DOC2K is never mounted as the root filesystem.  If we're installing
"FreeBSD" on it as stated in David's question, we need to change the
script to label it right.  I know I'm not telling you (Warner) anything
you don't know, since you are the one that made much of this work for us
(thank you thank you thank you), but the README, the associated script,
and the messages in the mailing-list are sending the newbies down the
wrong path (including me last week).

So, the steps to boot FreeBSD from DiskOnChip in 3.4 are:

- Add support for the DOC2K in your kernel config file with:

  device    fla0  at isa?

- Build and load that kernel.

- Edit the /usr/src/sys/contrib/dev/fla/prep.fla.sh script to say
  "DOC2K" instead of "ESDI", then run it to make the DiskOnChip
  mountable and useful as a potential boot device.

- Mount the flash device and construct the FreeBSD system you
  want to boot in it.

- Build a kernel to be placed into that flash filesystem's root,
  telling the kernel to boot from the flash.  Tell it this by
  creating a new kernel config that includes this line instead
  of the generic one:

  config    kernel  root on major 28 minor 65538

- Put the DOC2K device into your target system and reboot.  

If the target system is your development machine (with a hard disk), you
may wish to run the "dupdate" MSDOS program (provided by M-Systems(R))
to tell the flash device to place itself first in the boot order, else
you'll load from your hard disk as usual.

As the README explains, the firmware on the DOC2K device convinces MSDOS
that it's a normal disk drive.  This charade continues through the 3 or
so steps of the BSD load process, since everything up to the actual
kernel use BIOS calls for disk access.  This also means that, if you 
don't use dupdate to put the DOC first, you can type "1:wd(0,a)/boot/loader"
at the first opportunity during the boot load (when the _ appears), and
load from the flash by hand.

If the target system is not your development machine, and in fact your
development machine lacks a socket for the DOC2K device, you should 
build a picobsd with DOC2K support.  I recommend starting with the "net"
configuration, and adding the "fla0" device driver to the kernel config.
Boot that on your target machine and mount_nfs a directory on your
development machine that has dd, fdisk, disklabel, newfs and the image
you want to write to the flash.  You can build that image on the dev
machine, using the vn facility to make a file look like your flash
device, and then just dd that file to the flash.

Regards,

-Les

-- 
Les Biffle            Community Service...  Just Say NO!
(480) 778-0177    les@safety.net  http://www.les.safety.net/
Network Safety Group, 5831 E. Dynamite Blvd.,  Cave Creek, AZ 85331


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?200003231155.EAA85689>