Subject: Re: kernel manipulations
To: None <port-amiga@netbsd.org>
From: Georges Heinesch <geohei-ml@geohei.lu>
List: port-amiga
Date: 03/08/2001 12:28:20
Quoting Gunther Nikl (07-Mar-01 07:45:02):

> On Wed, Mar 07, 2001 at 06:43:43AM +0100, Georges Heinesch wrote:
>> Quoting Gunther Nikl (06-Mar-01 12:21:35):
>> 
>> > On Mon, Mar 05, 2001 at 05:59:46PM +0100, Georges Heinesch wrote:
>> 
>> >> Q1: I guess that is grf0 (I have a CV64), right?
>> 
>> >   No. grf0 is the custom-chip display.
>> 
>> That's what the console is using when I startup (or not?). I'm
>> talking about the very first sign of life NetBSD shows you on the
>> console once it's wking up. Basically the dmesg stuff. This must be
>> displayed using the custom-chips, no?

>  NO. It depends on your hardware setup. Eg. if you have a CV64, its
>  enabled and if you have the CV64 support in your kernel,
>  NetBSD/amiga will use the CV64 as console device. Read your boot
>  message more carefully ;-)

This is my dmesg:

----- cut here -----
NetBSD 1.5 (A3000a) #6: Thu Mar  8 11:17:51 CET 2001
    root@:/usr/src/sys/arch/amiga/compile/A3000a
Amiga 3000 (68060 rev.5 CPU/MMU/FPU)
total memory = 143 MB
avail memory = 131 MB
using 928 buffers containing 7424 KB of memory
[...]
grfcc0 at mainbus0
grf0 at grfcc0: width 640 height 400 colors 4
[...]
grfcv0 at zbus0 pa 0x40000000 man/pro 8512/34
grf5 at grfcv0: width 640 height 480 colors 16
[...]
grfcv: CyberVision64 with 4MB being used
[...]
----- cut here -----

Hope I didn't cut the most interesting part.

>> >> Q2: Which file defines the resolution of the booting screen?
>> 
>> >   <path_to_resolution_file>/<name_of_resolution_file>
>> 
>> >   eg. on my setup: /etc/grfmodes
>> 
>> That's the same here. But this is now used yet when booting.

>  You must add a line in rc.local (?) that loads this file. With 1.5
>  this line is already present but commented if my memory serves me
>  right. INSTALL.X11 explains what todo with a modes file.

That's done. Hmmm ... I didn't see it commented.

----- cut here -----
#   $NetBSD: rc.local,v 1.25.10.2 2000/10/07 20:21:35 hubertf Exp $
#   originally from: @(#)rc.local   8.3 (Berkeley) 4/28/94
#
# This file is (nearly) the last thing invoked by /etc/rc during a
# normal boot, via /etc/rc.d/local.
#
# It is intended to be edited locally to add site-specific boot-time
# actions, such as starting locally installed daemons.
#
# An alternative option is to create site-specific /etc/rc.d scripts.
#

echo -n 'starting local daemons:'

# Add your local daemons here.
#

#if [ -f /usr/pkg/etc/rc.d/apache ]; then
#   /usr/pkg/etc/rc.d/apache start
#fi

echo '.'
/usr/sbin/loadkmap /usr/share/keymaps/amiga/din.map

# following lines added by geohei
echo 'loading grfmodes'
/usr/sbin/grfconfig /dev/grf5 /etc/grfmodes
----- cut here -----

>> >> Q3: Same question for the foreground and background color of
>> >> this
>> >>     screen.
>> 
>> >   AFAIK, you must change the colours in the source of the driver.
>> 
>> Hmmm ... where shall I start looking for?

>   /usr/src/sys/arch/amiga/dev/grf??.c

>  Choose the correct one (every source has comments on top, thus you
>  should be able to identify the right one)

While looking at dmesg above, grf_cc.c should be the right one.

However while changing grf_cc.c ...

----- cut here -----
    if (viewioctl (0, VIOCGSIZE, (caddr_t)&vs, -1, NULL)) {
        /* XXX type of vs ? */
        /* fill in some default values... XXX */
        vs.width = 640;
        vs.height = 400;
        vs.depth = 2;
    }
----- cut here -----

... into ...

----- cut here -----
    if (viewioctl (0, VIOCGSIZE, (caddr_t)&vs, -1, NULL)) {
        /* XXX type of vs ? */
        /* fill in some default values... XXX */
        vs.width = 1024;
        vs.height = 768;
        vs.depth = 16;
    }
----- cut here -----

... didn't change anything!

-- 
Cu  Georges Heinesch, Luxembourg
    geohei@geohei.lu
    http://www.geohei.lu
    PGP RSA & DH/DSS public key on request and on public servers

... Orville Wright didn't have a pilot's license ...