Pregunta

I am writing a new operating system for learning and exploration purposes. And I would like to be able to scan the machine for connected devices (network, keyboard, HDDs, and what have you). This will be used as a first step to install the appropriate drivers.

I have been searching for this on the Internet for a while, but nothing that is of help.

¿Fue útil?

Solución

There is no general simple way to scan for all different hardware on a computer. Probably that is the reason you were not successful when searching for it.

You could start scanning trough PCI devices, then scan for USB devices, etc. However, each of these steps will not be trivial. The osdev wiki will provide some pointers. You could start with scanning pci devices (code examples are in C), and you could look at the source of an operating system written entirely in assembly, like kolobrios, if writing your OS in a C/assembly combination is not an option for you.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top