LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Graphis and fonts in the Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/graphis-and-fonts-in-the-kernel-883920/)

Nickew 06-01-2011 06:30 AM

Graphis and fonts in the Kernel
 
Hello everyone,

I would like to study the low level graphic drivers of the kernel, where the cursor is controlled and where it puts each and every character on the screen and moves the cursor one character forward.

Kernel doesn't have graphics and windows, but it shows a screen and command line. where does it control all this. which fonts does it use? what are font size limitations? where are the font files?

I am not into programming new graphics. I want to hack around with the linux kernel a bit. I found many articles about programming high level graphics.

If you can send me some links to related tutorials and how tos would be great.

Thanks in advance.
Nickew

ButterflyMelissa 06-02-2011 01:27 AM

Hi,

Curses does that - not the swearing but the API. I'd check out either curses of the (newer) ncurses...

Chances are it's in your distro, somewhere, then: on to the docs... :)

Luck

Thor

Nickew 06-02-2011 02:26 AM

Thanks a lot. but I am more into low level programming, as low as BIOS.
I am looking to change the way windows behave somewhere down the roots, somewhere that the high level programs don't feel any changes but the user sees a different view !

You see what I am saying?

Cheers,

ButterflyMelissa 06-02-2011 02:57 AM

Hi,

You realise you'll be restricting your efforts to one brand, and possibly one model, mainboard? The BIOS is part of the motherboard and is specifically written for that type of board. Your program will only work on that board. To further make matters worse, the installation will require flashing the BIOS chip on-board. Risky at best.

Ar'nt you more interested in embedded systems, instead?

Beacause the BIOS only concerns itself with the (very) Basic in-out, not the graphical side.

Of course, the representation of the BIOS screen (when setting things) can be graphical, examples can be found all over the place, but again, this would be restricted to ONE type motherboard...

Maybe hiding the clutter would suffice, dunnow...because, granted, there can be quite some clutter at startup... :)

Thor

Nickew 06-02-2011 03:45 AM

In terms of BIOS, I have heard of the Ami BIOS. is that a kind of generic BIOS suitable for the most of the motherboards?
Is there any generic BIOS which I can use?
My main question is:
What basic driver or program do high level programs use to write on the screen? do they call the programs loaded in the BIOS?
If graphic card has its own memory and "Graphic BIOS"? (i'm not sure of that), does it still make calls to the graphic drivers of the BIOS or they override those programs, and then the high level programs, do they make calls to the "Graphic BIOS"?

How can I modify that program or driver(in BIOS controling the screen) ?

ButterflyMelissa 06-02-2011 04:02 AM

Hi,

The thing

Quote:

generic BIOS
does not exist. The history is a more down-to-earth affair. IBM came up with the BIOS (way-way back when) - so, in order to be "IBM compatible" - manufacturers faced two options: buy an expensive licence to use the IBM BIOS, or make one of their own. The common denominator was (and is) a vector table that has the same structure (the INT calls) but each entry jumps to a proprietry piece of code that only works on THAT one line of mainboards.

If there were a generic BIOS, all motherboards would have to be exactly the same, they're not.

Quote:

What basic driver or program do high level programs use to write on the screen? do they call the programs loaded in the BIOS?
They dont. The sequence is (from a 10.000 mile view) power - BIOS gets to work with POST activity - BIOS finds the boot section (MBR) on the main drive - BIOS hands over control to that program, typically the bit that further loads the OS - that program further handles the boot-up.
Then, whatever software gets loaded, seeks (and hopefully finds) additional chunks of code on the hard drive: drivers. These drivers (for video, for example) are specific to the video hardware and only work on that hardware. To get an NVIDIA to work, you cannot use an Intel driver...

Quote:

If graphic card has its own memory and "Graphic BIOS"? (i'm not sure of that), does it still make calls to the graphic drivers of the BIOS or they override those programs, and then the high level programs, do they make calls to the "Graphic BIOS"?
A videocard has come a long way. It is in effect a mini-computer that does one thing (very well) : display stuff. The memory/BIOS on the card is only there for that purpose. The supplying of the data to the card is the task of the driver...

Quote:

How can I modify that program or driver(in BIOS controling the screen) ?
Ehrm...here I'm a bit lost...just what is the goal? To write an extension for the BIOS? To write your own BIOS? If so, you may need to look into machine code...again, specific to the target system...

Some things to ponder about ;)

Thor

Nickew 06-02-2011 04:37 AM

OK. I am getting the big picture slowly.
Probably, I have to start with one specific graphic card and work on its driver.
There are Linux open source drivers, "I believe/hope", Can you recommend a good/simple one?
How about the shared memory dirvers which use the memory on the RAM. Are they kind of common/similar/compatible/generic on different motherboards?

Thanks again.

ButterflyMelissa 06-02-2011 04:59 AM

Quote:

Can you recommend a good/simple one?
Hmm...driver building is not simple by default... :)

Well...it pays to find out what's in the target machine right now...I assume you are using Linux, if so issue the following command in the console

Quote:

lspci
One line should be in there, something like this:

Quote:

00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
That's my card, in my machine right now...

Okay, now you'll have to find the source code for that card, just to get going...Google will help you there as I do not know what card you're targetting.

Once there, you'll have to compile the package for the target system...make a distro-centered deployment package (rpm, deb, ...) and you're done.

I'd "sneak-peek" to see what others do to learn...

Luck!

Thor

Nickew 06-02-2011 05:03 AM

Thanks a million billion !

ButterflyMelissa 06-02-2011 05:04 AM

Quote:

Thanks a million billion !
Hey, no sweat! :D

Luck with your project(s)!

THor


All times are GMT -5. The time now is 10:40 AM.