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.
GRUB modules as drivers
-
- Member
- Posts: 40
- Joined: Sat Aug 12, 2023 1:48 am
- Location: Nizhny Novgorod, Russia
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: GRUB modules as drivers
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: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?
Yes. Which interface do you plan to use?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?
-
- Member
- Posts: 40
- Joined: Sat Aug 12, 2023 1:48 am
- Location: Nizhny Novgorod, Russia
Re: GRUB modules as drivers
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?Octocontrabass wrote: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: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?
Yes. Which interface do you plan to use?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?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: GRUB modules as drivers
EDI should be easier than UDI.KrotovOSdev wrote:I'm going to use EDI because it's easier to start with, isn't it?
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.KrotovOSdev wrote:According to article about drivers, I can only choose UDI or EDI, or maybe there are some other interfaces?
-
- Member
- Posts: 40
- Joined: Sat Aug 12, 2023 1:48 am
- Location: Nizhny Novgorod, Russia
Re: GRUB modules as drivers
I think I got it. Thank you.Octocontrabass wrote:EDI should be easier than UDI.KrotovOSdev wrote:I'm going to use EDI because it's easier to start with, isn't it?
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.KrotovOSdev wrote:According to article about drivers, I can only choose UDI or EDI, or maybe there are some other interfaces?