RAMDISK pseudo device driver

hi, I am doing a course in embedded system designed and I have been assigned a project named 'developing RAMDISK pseudo device drivers in Linux'. I am fairly new to linux and i have little knowledge about device drivers in linux.

plz help

Ravs

Reply to
Rav
Loading thread data ...

Why do you do the course if you don't want to do the work yourself ?

The book "Linux Device Drivers" by Rubini is a must-read if you want to do your own device driver.

Linux comes with RAMFS, so the source code for a ram based file system is available in the Kernel sources.

-Michael

Reply to
Michael Schnell

Thanx michael...despite the solution u said, thanks for making me realize the thing that i thought i was doing things myself...linux is big and i am so obsessed that i wanted to do things in a night. It has been a month only being aquainted with linux. I will give my best.

thanx

Ravs

Michael Schnell wrote:

Reply to
Rav

| Thanx michael...despite the solution u said, thanks for making me | realize the thing that i thought i was doing things myself...linux is | big and i am so obsessed that i wanted to do things in a night. It has | been a month only being aquainted with linux. I will give my best.

Since it is coursework you are doing, and I believe you said it was to implement a RAMDISK, then you can't just take the free open source code and claim your assignment is done ... there's no learning process in doing that. But, IMHO, looking at the existing implementation would be a way to get some valid hints about all the steps needed and resolve any misunderstandings about the API a device driver needs to work with. But don't just use the example working code as the only means to learn. There are many aspects of device drivers you might need to learn that are not used in any one single implementation.

One possibility is instead of using the existing RAMDISK implementation as a guide to implementing RAMDISK, take a look at something similar, such as the network block device (NBD) driver. Normally that is a driver that implements a block device but uses space on the other end of a network connection, whatever the NBD protocol compliance server there implements it as (the server reference implementation lets you export a file or block device to be used as an NBD device). This way you'll still have to think about how you want to change what you are looking at, as opposed to the temptation of copying too much literally.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org)  /  Do not send to the address below |
 Click to see the full signature
Reply to
phil-news-nospam

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.