File:  [NetBSD Developer Wiki] / wikisrc / ports / luna68k.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Wed Dec 19 03:50:46 2012 UTC (16 months ago) by mspo
Branches: MAIN
CVS tags: HEAD
commit more port pages for today.  will pick back up tomorrow

[[!template id=port
NetBSD/luna68k is a port of NetBSD to the LUNA product line of OMRON Tateisi
Electronics, Japan. The LUNA was a 20MHz/m68030 desktop computer at the age of
then-booming UNIX workstations, roughly comparable to a sun3/60 and any
m68020/m68030 unix boxes at that time. It is a descendent of the company's 6U
VME deskside m68010 box nicknamed Supermate, and was succeeded by a m68040
variant, LUNA-II. It has a rare cousin LUNA-88K which sports 4 88k processors
geared by CMU Mach2.5.
###Supported System Models

NetBSD/luna68k runs on the original LUNA and the successor LUNA-II, and supports
the following devices:

* built-in serial port ('ttya')
* network interface: AMD LANCE with AUI or BNC port (switch-selectable)
* monochrome/color graphics video board
* keyboard and mouse
* SCSI devices; (including built-in TEAC cassette tape drive)
* LCD on front panel; (/dev/lcd is under development)

 NetBSD/luna68k doesn't yet support the following devices:

* any devices controlled by dedicated 8bit I/O processor; serial ports ('tty00,
  tty01'), printer parallel port ('lp'), floppy port ('rfd') and YM2149 sound
* optional X.25/GP-IB multiple function board
* NEC PC9801 C-Bus option slot

Support for the deskside predecessors is not planned at this moment.
##How to install NetBSD/luna68k

There are two ways to boot a NetBSD kernel on your LUNA.

1. network boot using "isiboot"
2. place NetBSD kernel on the root directory of the LUNA original disk

Because there is no provision of installation kernel tailored to run in
standalone with the help of memory disk, either way requires to prepare an
initial filesystem on an NFS server.

###Preparing filesystem to NFS mount

NetBSD/luna68k is a cousin of various m68k port of NetBSD. Any set of m68k
distribution is useful to run NetBSD/luna68k with minor adjustments as described

Inflate two files, base.tgz and etc.tgz, to the NFS server. Then replace two
files, etc/ttys and dev/MAKEDEV, with ones found in the directory of NetBSD ftp servers.
Make sure to run 'sh ./MAKEDEV' all in dev/ directory.

###Preparing BOOTP/DHCP network service

NetBSD kernel requests its network parameters and NFS mount point. You need to
know its station address (Ethernet MAC address), which can be found using ROM
monitor (see how to do).

Here is the sample configuration of /etc/bootptab:


where rp= field tells NFS root directory for LUNA exported by NFS server.
bf= field is unnecessary to have.

Another sample configuration for /etc/dhcpd.conf:

  group {
    option subnet-mask;
    option broadcast-address;
    option routers;
    host dayan {
      hardware ethernet 00:00:0a:02:43:0f;
      option root-path "/ccd/filesys/luna68k";

###Network boot with 'isiboot'

LUNA ROM monitor can download kernel image via network. 'isiboot' serves this
purpose. The server program requires BPF (Berkeley Packet Filter) in the
servicing machine to work. The source code of isiboot can be found directory of NetBSD ftp servers.
The description is here. 

    isiboot [-i interface] [-s directory] [-d tracelevel]

    isiboot is a server which supports LUNA network boot.  It listens
    to ROM monitor download requests and serves for it.  The proprietary
    protocol uses a special Ethernet type and works within a local wire.

    -i <interface> isiboot searches available network interfaces and
    chooses one found first.  If the servicing machine has multiple
    network interfaces in action, this option can be used to specify
    which network interface to use.

    -s <directory> whose directory isiboot server makes chroot(2)
    to after invocation.  Given no provision, isiboot searches the
    downloading files in the current directory when started.

    -d <tracelevel> accepts value 1, 2 or 3.  Greater number provides
    more detailed trace.

    The protocol uses server's hostname to start the downloading
    dialogue.  isiboot makes the name using gethostname(3) trimmed
    down by the first dot '.' if applicable.

[1] Invoke isiboot program on the root directory of NetBSD/luna68k
    filesystem on NFS server.  Use -s option when necessary.

[2] Manipulate LUNA ROM monitor as follows;

    Given '> ' ROM monitor prompt;

    >[k]			start to change boot parameters,
    ctlr: dk [et]		specify network boot,
    home: omron			type a return, isiboot doesn't care this field, 
    sver: servername		type another return,
    fnam: server:/vmunix [pelican:netbsd]
				specify server hostname and the filename
				to download.  Leading / is not significant.

    Then type 'g' ROM monitor command to start downloading.  You will see
    the progress like;


    When completed, type 'x' ROM monitor command with '-s' string to
    run NetBSD kernel.  -s specifies not to start multiuser mode.

    >[x -s]

The kernel starts to configure itself, and requests BOOTP/DHCP on wire to get
network parameters and the name of filesystem to mount. After receiving a proper
reply, NetBSD/luna68k kernel invokes single user mode shell eventually. 

###Booting from disk
NetBSD/luna68k kernel can be booted off from the vender supplied original
operating system. Place kernel image on the root directory, then type to ROM
monitor as follows: 

    ctlr: dk		type just a return to make no change,
    drv: 0		return,
    par: c		and another return,
    fnam: vmunix [netbsd]
			specify the name of NetBSD/luna68k kernel.

    >[g]		load the kernel image from disk.  Litting
			front panel LED tells activity.

    >[x -sa]		run the kernel, where -sa instructs to ask
			which filesystem to mount.

Now, tell the kernel to mount filesystem provided by NFS server; 

    boot device: sd0
    root device (default on sd0a): [le0]	le0 to use NFS
    dump device:				return to choose default
    filesystem (default generic):		another return to choose

Then kernel requests BOOTP/DHCP for network parameters and its root directory,
and eventually invokes single user mode shell when successful. 

### Installing NetBSD/luna68k on disk
NetBSD sysinst utility is not prepared for NetBSD/luna68k. Here is the
instruction for manual installation.

It's reasonable and preferred to make fresh filesystems from scratch. Vender
supplied OS has such a rather obscure convention to keep its root filesystem on
partition c that's not comfortable with NetBSD standard. Use disklabel(8)
command to make the new filesystem layout.

LUNA ROM monitor can search and load kernel images on the root filesystem. To
make this possible, the root filesystem must be created in the 'old FFS' format.
Make sure to have -O (large letter oh) for newfs(8). Other filesystems do not
require the option.

Then mount the root filesystem somewhere, say /mnt, and other filesystems for
usr/ or var/ underneath it. If you have NetBSD distribution sets on a certain
NFS mounted point, goto the directory and then issue a simple loop: 

	# for i in *.tgz
	(cd /mnt && tar xvfp - ) < $i

When completed, make sure to place NetBSD/luna68k kernel image on /mnt directory
and to replace two files, etc/ttys and dev/MAKEDEV. Run sh ./MAKEDEV all on
/mnt/dev/ directory to have device nodes.

It's ok to halt the system now by typing halt for # prompt.

### Arrange ROM boot parameters for daily use

    ctlr: dk		type just a return to make no change,
    drv: 0		another return,
    par: c [a]		change to choose 'a' partition to load,
    fnam: vmunix [netbsd]
    >[k+]		store those into NVRAM
[[!tag tier2port]]

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb