Subject: FAQ - a _very_ small start (2)
To: None <port-atari@NetBSD.ORG>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: port-atari
Date: 11/23/1995 16:25:00
Hi again,

	Well, I have done some typing again. Part 2 of the FAQ contains the
subjects I promised yesterday and some 'asked for' additions. Please
look through it. I again need some Falcon info ;-)

Leo.

I don't like my screen colors and resolution, can I change them?
----------------------------------------------------------------
Yes you can. Take a look at the iteconfig(1) manual page. Owners of a
TT can change the colors/height/width and depth. Falcon owners can changes
colors but can they change depths??????
------> Another 'fill me in'!!

How do I build my own kernel
----------------------------

You should start by obtaining the kernel sources from ftp.netbsd.org or
one of it's mirrors. The path to look in depends on you:
	- /pub/NetBSD/NetBSD-1.1/source/ksrc11
	  The sources of the 1.1 kernel.
	- /pub/NetBSD/NetBSD-current/tar_files/src/sys.tar.gz
	  If you want the latest kernel sources.

After unpacking the sources, the kernel source is located on '/usr/src/sys'.
You should now start with configuring the kernel you wish to build. So go
to the directory: /usr/src/sys/arch/atari/conf . Among others, you see
a bunch of files in capital letters - the kernel config files.
	- BOOT
	  The kernel as supplied on the boot floppy.
	- ATARITT
	  A more TT specific kernel
	- FALCON
	  A more Falcon specific kernel
	- GENERIC
	  A bulky kernel with a lot of options turned on
Browse a bit through the files and copy the one you like most to, say,
MYKERNEL. add or change the file to your liking and when you are finished,
type: "config MYKERNEL". When there are no errors, a new directory is setup
for you: /usr/src/sys/arch/atari/compile/MYKERNEL. Go to this directory
and type: "make depend; make". You'll have some time to drink coffee now ;-)
When all goes well, you will have a file called 'netbsd'. This is your newly
build kernel. Save your working kernel to 'netbsd.old', copy the new kernel
to wherever you keep your kernels and try booting it.

WARNING: You should always have a backup of a working kernel at hand!

How do I increase the number of virtual consoles?
-------------------------------------------------
To change the number of virtual consoles you have to build your own
kernel. 
The atari console driver is build of the following components:
	- view
	  A view is an abstraction of the video hardware.
	- grf
	  This is the graphics driver. This driver deals with the screen
	  in graphics mode. The X11 driver accesses the console through 'grf'.
	  Each grf-driver is layered above a single view.
	- ite
	  This is the terminal emulator. Each ite-driver is layered above
	  a single grf.
There is a 1-1 connection between the layers. ite2 talks to grf2 that talks
to view2. For autoconfigure purposes, the grf-devices are grouped as a
bus, the 'grfbus0'.
If you want to have 3 virtual consoles, your config file looks like:
	pseudo-device  view  3  # View (graphics mapping)
	grf1  at grfbus0        # second graphics driver
        grf2  at grfbus0        # third graphics driver
	ite1  at grf1           # second tty
	ite2  at grf2           # third

The devices ite0/grf0 are always defined. To be exact, they are defined in
the file 'std.atari' which is included in all config files.
The minimum number of virtual consoles is 1.

My kernel says 'dma-ready: code = 2'
------------------------------------
You are probably suffering from SCSI parity errors. By default, parity
checking is off on all devices - unless I make a mistake and upload a
kernel with parity checking on, which I sometimes do....

The discussion of whether or not SCSI parity checking should work on all
devices on the Atari has not yet ended. There were rumours of hardware
problems but until now, I've not yet seen a sensible reason why it shouldn't
work. In practice however, some devices will give a _lot_ of parity errors.
Note that the discussion is about the parity checking on the _host adapter_
(the Atari), not about parity checking on the SCSI-targets. The Atari
generates the parity bit correctly (Although I remember Christoph Simon
having a different experience). So it should be possible to enable
parity checking on the SCSI-targets.

The NetBSD/Atari kernel has a 'bitfield' describing on what targets parity
checking should be disabled. You can modify it with the binpatch program.
The exact command line is:
    binpatch -b -s _ncr5380_no_parchk -o 8192 -r <new_value> <path to kernel>

Target 0 is the low-order bit and target 7 the most significant bit of the
mask. So if you want to disable parity checking on targets 0 and 3, subsitute
'0x09' for <new_value>.

In my personal opinion, you should try to enable parity checking on all
devices that it works for. The parity bit was not invented for fun! Also,
you should enable the parity check on all connected targets.

Can I fix the link between a SCSI target and a device node?
-----------------------------------------------------------
Currently, the device nodes for SCSI devices are assigned dynamically. For
example if you have 2 harddisks at scsi-id's 1 & 2, they will have
device numbers sd0 & sd1. When you add a new disk with scsi-id 0, the
old disks will become sd1 & sd2 while the new disk becomes sd0. 

To fixate the links, you have to build your own kernel. Go to the the
config directory and edit 'std.atari'. Currently the line for configuring
disks looks like:
	sd*   at scsibus? target ? lun ?

If you change this to read:
	sd0   at scsibus0 target0  lun?
	sd1   at scsibus0 target1  lun?
	sd2   at scsibus0 target2  lun?
         .    .              .      .
         .    .              .      .

You can now remove scsi-0 without having to worry about scsi-id's 1 & 2
getting a different name.