OSDev.org
https://forum.osdev.org/

GRUB modules as drivers
https://forum.osdev.org/viewtopic.php?f=1&t=56965
Page 1 of 1

Author:  KrotovOSdev [ Sun Sep 24, 2023 1:45 pm ]
Post subject:  GRUB modules as drivers

I am starting with my first device driver and I'm trying to understand how to load it. Can I use GRUB "insmod" command or something like that for this?
And I also read Device Management article and it says that I can not to write my own drivers but write only an interface for them and use already existing drivers. Am I right?

Thanks for your reply.

Author:  Octocontrabass [ Sun Sep 24, 2023 4:19 pm ]
Post subject:  Re: GRUB modules as drivers

KrotovOSdev wrote:
I am starting with my first device driver and I'm trying to understand how to load it. Can I use GRUB "insmod" command or something like that for this?

GRUB's "insmod" command loads GRUB drivers for GRUB. If you want GRUB to load drivers (or any other files) for your OS, use the "module" command. From your OS, you can access those files through the Multiboot information structure.

KrotovOSdev wrote:
And I also read Device Management article and it says that I can not to write my own drivers but write only an interface for them and use already existing drivers. Am I right?

Yes. Which interface do you plan to use?

Author:  KrotovOSdev [ Mon Sep 25, 2023 5:36 am ]
Post subject:  Re: GRUB modules as drivers

Octocontrabass wrote:
KrotovOSdev wrote:
I am starting with my first device driver and I'm trying to understand how to load it. Can I use GRUB "insmod" command or something like that for this?

GRUB's "insmod" command loads GRUB drivers for GRUB. If you want GRUB to load drivers (or any other files) for your OS, use the "module" command. From your OS, you can access those files through the Multiboot information structure.

KrotovOSdev wrote:
And I also read Device Management article and it says that I can not to write my own drivers but write only an interface for them and use already existing drivers. Am I right?

Yes. Which interface do you plan to use?


I'm going to use EDI because it's easier to start with, isn't it? According to article about drivers, I can only choose UDI or EDI, or maybe there are some other interfaces?

Author:  Octocontrabass [ Mon Sep 25, 2023 11:00 am ]
Post subject:  Re: GRUB modules as drivers

KrotovOSdev wrote:
I'm going to use EDI because it's easier to start with, isn't it?

EDI should be easier than UDI.

KrotovOSdev wrote:
According to article about drivers, I can only choose UDI or EDI, or maybe there are some other interfaces?

According to the wiki, there's also CDI. But you could, in theory, implement the driver interface from any OS to use the drivers from that OS.

Author:  KrotovOSdev [ Mon Sep 25, 2023 12:43 pm ]
Post subject:  Re: GRUB modules as drivers

Octocontrabass wrote:
KrotovOSdev wrote:
I'm going to use EDI because it's easier to start with, isn't it?

EDI should be easier than UDI.

KrotovOSdev wrote:
According to article about drivers, I can only choose UDI or EDI, or maybe there are some other interfaces?

According to the wiki, there's also CDI. But you could, in theory, implement the driver interface from any OS to use the drivers from that OS.

I think I got it. Thank you.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/