Monday, November 06, 2006


Linux 2.6 Block Device Driver

Recently, I had to make an MMC card work under Linux 2.6.

I found a very simple block device driver on this page:

Source is here:

The article is about porting a block device from 2.4 to 2.6, but it gave a good description of Linux block devices in general.

The source implements a ram disk, but it is very easy to substitute your own code for your device.

To use the device, find its major_number in /proc/devices and create the device with:
mknod /dev/sbd0 b major_number minor_number

Usually the minor_number is the partition number.
Then you can mount it and use it.

Does this work?
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?