Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2013 11:14:22 -0800
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Carl Delsey <carl@freebsd.org>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: GSOC 2013
Message-ID:  <CAOgwaMtRAS1dZM09gr2whx_jaEttB67knfpFEyVrqix%2BvrsCKw@mail.gmail.com>
In-Reply-To: <5127B473.1070604@FreeBSD.org>
References:  <CA%2BOH21-fdqCTAGj7cKrvYDAWer-kW_Z=%2BcSw3V9t_a=TcaHTdw@mail.gmail.com> <5127B473.1070604@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 22, 2013 at 10:09 AM, Carl Delsey <carl@freebsd.org> wrote:

> On 02/20/13 10:12, Ananya H wrote:
> > Hello !
> > I am Ananya , a second year undergrad student !  am new to the open
> source
> > community but want to be able to contribute ! I intend to apply for gsoc
> > this summer . I know c and am acquainted with system programming in
> Linux .
> > I would like to extend my knowledge by delving deeper and am interested
> in
> > writing device drivers and kernel programming ,even though my knowledge
> is
> > minimal ! However I am willing to learn about the art of writing device
> > drivers and would like to work on writing a device driver as a project
> for
> > gsoc this summer ! I would like some suggestions on what steps I should
> > take to get a start to eventually reach my goal for this summer
> >
> I would start by going through Chapter 9 - Writing FreeBSD Device
> Drivers in the Architecture Handbook.
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/devicedrivers.html
> That will introduce you to the basics of loading drivers on FreeBSD.
>
> After that, trying to write an actual driver of some sort would be worth
> a try. You could write a driver for a pseudo device like a memory disk
> or loop back device. There are existing drivers for these things in
> FreeBSD (see man md and lo) to use as a reference.
>
> If you want to write a driver for real hardware, make sure it is
> something you can get documentation for. Parallel and serial ports used
> to be popular devices to write experimental drivers for, but they are
> becoming rare on PC's. You could write a driver for a USB device or a
> common network card if you can get documentation. In this case, there
> may be an existing driver in FreeBSD that you would have to disable so
> that you don't conflict. This driver would also be useful to use as a
> reference.
>
> You will find that different types of hardware fits into the OS in
> different ways, so that writing a network device driver is very
> different from writing a storage device driver or USB device driver,
> etc. If one type of device interests you more than others, I'd say start
> with that. Each new type of device brings a new learning curve.
>
> Regards,
> Carl
>
>

Perhaps one problem may be the following :


When X is running in a computer with a desktop manager such as KDE , the
console is not visible anymore , especially "stdin" , "stdout" , and
"stderr" .

The console output may be diverted to a serial console . When there is no
any serial console , another computer may be used as a serial console .
These may be difficult applications .


Assume that there are multiple monitors attached to the computer by VGA
cards or
USB to VGA devices , such as


http://www.amazon.com/s/ref=nb_sb_ss_i_4_10?url=search-alias%3Dcomputers&field-keywords=usb%20to%20vga%20external%20video%20card%20multi%20monitor%20adapter

http://www.amazon.com/s/ref=nb_sb_ss_i_1_10?url=search-alias%3Dcomputers&field-keywords=usb%20to%20vga%20adapter

These are cheap units and there are cheap monitors , especially 1280 x 768
size , such as

http://www.tigerdirect.com/applications/Category/guidedSearch.asp?CatId=12&sel=Detail%3B51_283_457_457



By defining suitable "loader.conf" ( or another file ) definitions ,
divert  "stdin" , "stdout" , "stderr" outputs to those additional monitors
( different from monitors used by desktop window managers , where they may
be multiple also ) .

The "stdin" monitor will display all key presses only , and key press
requests .

The graphical desktop environment should not prevent use of these monitors
and they will be used if the X and graphical desktop environment is not
running .

When a terminal window is opened in the desktop environment , its use will
not be interfered .

This setup will be very useful during program development , because all of
the messages not visible at present will be visible and , if it is not
exactly required , serial console will not be required .


As a resource , there is also the following book :

http://www.nostarch.com/bsddrivers.htm
FreeBSD Device Drivers

Thank you very much .

Mehmet Erol Sanliturk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMtRAS1dZM09gr2whx_jaEttB67knfpFEyVrqix%2BvrsCKw>