9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Installing without graphics ?
@ 2000-06-25  2:36 Russ Cox
  0 siblings, 0 replies; 8+ messages in thread
From: Russ Cox @ 2000-06-25  2:36 UTC (permalink / raw)
  To: 9fans

  Could anyone provide a rough overview of the vga driver code in the kernal
  and aux/vga ? I have a few ideas of where to start but there are quite a
  few structs invloved whose members and purposes I can only guess at. Ive
  managed to drag the source for the TGUI9680 out of SVGAlib and XFree86
  as well as a register list so I have these as a starting point for talking
  to my card.

We don't use much of the vga special features,
so there's not as much work in getting a card
up under Plan 9 as there is under, say, XFree86.

Aux/vga is in charge of initializing the registers
on the card to get it into a given VGA mode and depth.
At that point, it hands off to the kernel,
which treats it as a frame buffer.

Internally, each driver in aux/vga (an example
might be /sys/src/cmd/aux/vga/mach64xx.c) provides
four functions snarf, init, load, and dump.
Snarf reads the registers.  Init tweaks
the in-memory copy of the registers, and then
load writes them back (only happens with -l).
Dump prints them for debugging.

There are drivers for both the card and the
graphics cursor.  When adding a driver, be sure
to add it to the list in data.c.

I like to make one pass through the manual,
mark the registers I think are important,
and then write the code.  Before the first
load, though, I try to get a dump from a Unix
system or from Windows and compare.

Once the registers are set, aux/vga hands control
to the kernel, which treats the memory as a big
frame buffer.  /sys/src/9/pc/vgamach64xx.c is a
decent example.

The kernel also has to manipulate the hardware
graphics cursor, but that's usually straightforward.

If you want to run in more than 8-bit mode, you'll
need to work on hardware acceleration to make it
bearable.  We use block copy and block clear,
and that's enough to feel quite zippy.

It's useful for debugging to have the kernel driver
set up two segments (see segattach(2)), one for
the frame buffer and one for any PCI-mapped registers.
Then you can test the acceleration from user
space and move it into the kernel once it is ready.
When you get that far, mail me and I'll send a template
I like to use to do that.

Hope that helps.
Russ


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Installing without graphics ?
  2000-06-26 18:03   ` Lyndon Nerenberg
@ 2000-06-26 19:41     ` R. J. Bradley
  0 siblings, 0 replies; 8+ messages in thread
From: R. J. Bradley @ 2000-06-26 19:41 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]


Since a few people requested them Ill post them here.

Getting the install scripts to run without rio present is
not a major task but it requires a bit of ed or sed to
prune the scripts.

The install scripts seem to live in /rc/bin/dist and I had
to hack 4 or 5 of them to get plan9 to install with the
plan9.9gz file located on my windows c: drive but it should work
for any local disk install. If you install via network you might
need to prune the network install scripts as well.

The two things you need to do are remove any lines that send commands
to /dev/wctl (there are two in defs) as there is no rio to service these
requests. You also need to remove any redirection of output that goes to
/srv/log, I just removed the >>/srv/log and >>[2]/src/log bits from the
scripts so that they echo to the screen where I can see whats going on.
I think /srv/log is provided by a process rio runs so that it can have
a log window for the install.

The files I hacked were

configlocal
defs
mountfs
reamfs
unpack

And then you can run mainloop which will guide you through the process
of installing almost like if rio was running.

I have attatched an rc script that might make the changes I have discussed
here to the right files and then run mainloop. However I have not tested this.
It should give you an example of the sed code I used however.

You can copy the script to your c: drive if you have windows  and mount it
by typing c: at the rc prompt and then accessing the script from /n/c: or
you could try copying it to the plan9 install floppy and mounting it from
there using a: at the rc prompt and then use /n/a: to access it.

I hope that this help people install without rio. However the system is
a pain to use without rio as there is no real terminal handleing. I'm
starting to be able to use ed for a few things now which is quite worrying.
I must recomend the b command though under ed as the install disks dont
include p for viewing scripts. So load the scripts in ed and use 1b to
start viewing the file a screen at a time.

You could try exporting the scripts to your c: drive and then editing
them there which might be easier.

Hope this helps

Robin



[-- Attachment #2: mod --]
[-- Type: text/plain, Size: 455 bytes --]

#!/bin/rc

cd /rc/bin/dist
mv configlocal configlocal.o
sed 's/\>\>\[2\]\/srv\/log//' configlocal.o > configlocal

mv defs defs.o
sed 's/\>\>\/srv\/log//' defs.o > defs
mv defs defs.o
sed '/\/dev\/wctl/d' defs.o > defs

mv mountfs mountfs.o
sed 's/\>\>\[2\]\/srv\/log//' mountfs.o > mountfs

mv reamfs reamfs.o
sed 's/\>\>\[2\]\/srv\/log//' reamfs.o > reamfs

mv unpack unpack.o
sed 's/\>\>\/srv\/log//' unpack.o > unpack

./mainloop

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Installing without graphics ?
  2000-06-24 19:42 ` R. J. Bradley
  2000-06-26  4:44   ` Richard
  2000-06-26 14:46   ` Xavier Bertou
@ 2000-06-26 18:03   ` Lyndon Nerenberg
  2000-06-26 19:41     ` R. J. Bradley
  2 siblings, 1 reply; 8+ messages in thread
From: Lyndon Nerenberg @ 2000-06-26 18:03 UTC (permalink / raw)
  To: 9fans

I would be very interested in seeing your rio-less install notes.

--lyndon


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Installing without graphics ?
  2000-06-24 19:42 ` R. J. Bradley
  2000-06-26  4:44   ` Richard
@ 2000-06-26 14:46   ` Xavier Bertou
  2000-06-26 18:03   ` Lyndon Nerenberg
  2 siblings, 0 replies; 8+ messages in thread
From: Xavier Bertou @ 2000-06-26 14:46 UTC (permalink / raw)
  To: 9fans

> Ok so I managed to hack the install scripts to function without rio.
> It wasnt too difficult and if anyone wants instructions on how I did
> it feel free to email me.

Hi...
I have a 16 Mo old 586, and plan9 is supposed to run on it, but not the
graphic installation. So if you have some easy way to install it without
rio, I would be quite interested.
--
Xavier


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Installing without graphics ?
  2000-06-24 19:42 ` R. J. Bradley
@ 2000-06-26  4:44   ` Richard
  2000-06-26 14:46   ` Xavier Bertou
  2000-06-26 18:03   ` Lyndon Nerenberg
  2 siblings, 0 replies; 8+ messages in thread
From: Richard @ 2000-06-26  4:44 UTC (permalink / raw)
  To: 9fans

R. J. Bradley writes:
>
>Ok so I managed to hack the install scripts to function without rio.
>It wasnt too difficult and if anyone wants instructions on how I did
>it feel free to email me.

does this hack reduce the memory requirements for the install
--I have only 24 megs?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Installing without graphics ?
  2000-06-14 20:36 Russ Cox
@ 2000-06-24 19:42 ` R. J. Bradley
  2000-06-26  4:44   ` Richard
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: R. J. Bradley @ 2000-06-24 19:42 UTC (permalink / raw)
  To: 9fans


Ok so I managed to hack the install scripts to function without rio.
It wasnt too difficult and if anyone wants instructions on how I did
it feel free to email me.

Could anyone provide a rough overview of the vga driver code in the kernal
and aux/vga ? I have a few ideas of where to start but there are quite a
few structs invloved whose members and purposes I can only guess at. Ive
managed to drag the source for the TGUI9680 out of SVGAlib and XFree86
as well as a register list so I have these as a starting point for talking
to my card.

Any help would be most appreciated.

Cheers

Robin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Installing without graphics ?
@ 2000-06-14 20:36 Russ Cox
  2000-06-24 19:42 ` R. J. Bradley
  0 siblings, 1 reply; 8+ messages in thread
From: Russ Cox @ 2000-06-14 20:36 UTC (permalink / raw)
  To: 9fans

  1) Is there any way to install the system without vga and rio up
  and running. I need an installed system if I am going to be able
  to play with writing a driver for my card.

You could carry out an install without
vga and rio, but only by hand.  You'll find
the system unusable in text mode for the
purposes of writing a video driver anyway.
Much better to get going on a different
video card first, so as to have a decent
development environment.

  2) Where would be the best place to look for starting to write a
  graphics driver. How much work is done by the card specific code ?

Not a lot, especially if you punt on the
hardware acceleration the first time 'round.
Mostly it's just setting up registers correctly
for the given mode.

Russ



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [9fans] Installing without graphics ?
@ 2000-06-14 20:18 R. J. Bradley
  0 siblings, 0 replies; 8+ messages in thread
From: R. J. Bradley @ 2000-06-14 20:18 UTC (permalink / raw)
  To: 9fans


Hi

After finaly managing to find a floppy disk without a bad sector
(had to buy some new disks) I have booted Plan 9 and as I expected
my graphics card (Trident TGUI96xx) isnt supported.

Any help with the following would be appreciated.

1) Is there any way to install the system without vga and rio up
and running. I need an installed system if I am going to be able
to play with writing a driver for my card.

2) Where would be the best place to look for starting to write a
graphics driver. How much work is done by the card specific code ?

Thanks for any help.

Robin




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-06-26 19:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-25  2:36 [9fans] Installing without graphics ? Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
2000-06-14 20:36 Russ Cox
2000-06-24 19:42 ` R. J. Bradley
2000-06-26  4:44   ` Richard
2000-06-26 14:46   ` Xavier Bertou
2000-06-26 18:03   ` Lyndon Nerenberg
2000-06-26 19:41     ` R. J. Bradley
2000-06-14 20:18 R. J. Bradley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).