LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 06-01-2011, 07:30 AM   #1
Nickew
LQ Newbie
 
Registered: May 2011
Posts: 15

Rep: Reputation: Disabled
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
 
Old 06-02-2011, 02:27 AM   #2
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
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
 
Old 06-02-2011, 03:26 AM   #3
Nickew
LQ Newbie
 
Registered: May 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
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,
 
Old 06-02-2011, 03:57 AM   #4
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
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

Last edited by Thor_2.0; 06-02-2011 at 04:01 AM.
 
Old 06-02-2011, 04:45 AM   #5
Nickew
LQ Newbie
 
Registered: May 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
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) ?
 
Old 06-02-2011, 05:02 AM   #6
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
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
 
Old 06-02-2011, 05:37 AM   #7
Nickew
LQ Newbie
 
Registered: May 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
Old 06-02-2011, 05:59 AM   #8
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
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

Last edited by Thor_2.0; 06-02-2011 at 06:02 AM.
 
Old 06-02-2011, 06:03 AM   #9
Nickew
LQ Newbie
 
Registered: May 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks a million billion !
 
Old 06-02-2011, 06:04 AM   #10
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,228
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Quote:
Thanks a million billion !
Hey, no sweat!

Luck with your project(s)!

THor
 
  


Reply

Tags
cursor, font, graphic, kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC session, unable to view graphis use_id Linux - Desktop 1 06-24-2010 01:26 AM
Slow GLX with 855GM graphis card... cobrajs Linux - Hardware 2 06-13-2006 09:24 PM
tiny fonts after kernel upgrade sms043 Debian 6 07-14-2004 12:38 AM
Fonts not configured in fonts.o/kernel compile gizmogadgetus Linux - General 0 02-08-2004 11:50 AM
Fonts after compiling the kernel MeatAbstract Slackware 4 10-23-2003 06:25 PM


All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration