Anderson Yin
Anderson Yin

Reputation: 21

How to control video card in my self-developed OS?

I am developing my own OS and for days I’ve been wondering how to control video card, audio card to build a delicate GUI. It seems that the procedure is a bit different from that of controlling mouse or keyboard.

By the way,

1.How does an OS recognize hardware drivers?

2.Are all hardware drivers written for specific platforms (such as Windows,Linux,etc.)?

Still freshman in the university and failed to find relevant information

thanks for help =)

Upvotes: 1

Views: 102

Answers (1)

Xypron
Xypron

Reputation: 2483

how to control video card

Graphics cards typically support a VGA mode and the VESA 2.0 standard. So this could be a good starting point for your first video driver.

  1. How does an OS recognize hardware drivers?

Linux uses a device tree describing the hardware which has a compatible field for every item that needs a driver. All hardware drivers are kept in linker generated lists. If a driver has the same compatible value it can be used to drive the hardware. The linker list item is generated from a macro in the driver code using a specialized linker script.

  1. Are all hardware drivers written for specific platforms (such as Windows, Linux, etc.)?

If you provide the right wrappers you may be able to reuse existing drivers. E.g. U-Boot reuses Linux drivers for USB devices. And the NDISwrapper can be used to run Windows WLAN drivers on Linux.

Upvotes: 1

Related Questions