OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 11:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: GRUB modules as drivers
PostPosted: Sun Sep 24, 2023 1:45 pm 
Offline
Member
Member

Joined: Sat Aug 12, 2023 1:48 am
Posts: 40
Location: Nizhny Novgorod, Russia
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.


Top
 Profile  
 
 Post subject: Re: GRUB modules as drivers
PostPosted: Sun Sep 24, 2023 4:19 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
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?


Top
 Profile  
 
 Post subject: Re: GRUB modules as drivers
PostPosted: Mon Sep 25, 2023 5:36 am 
Offline
Member
Member

Joined: Sat Aug 12, 2023 1:48 am
Posts: 40
Location: Nizhny Novgorod, Russia
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?


Top
 Profile  
 
 Post subject: Re: GRUB modules as drivers
PostPosted: Mon Sep 25, 2023 11:00 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
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.


Top
 Profile  
 
 Post subject: Re: GRUB modules as drivers
PostPosted: Mon Sep 25, 2023 12:43 pm 
Offline
Member
Member

Joined: Sat Aug 12, 2023 1:48 am
Posts: 40
Location: Nizhny Novgorod, Russia
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot], MichaelPetch and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group