[uClinux-dev] Kernel modules don't work on read-only filesystems ?
Josue de Freitas
josue.freitas at gmail.com
Thu Oct 11 09:15:53 EDT 2007
On 10/10/07, Gavin Lambert <gavinl at compacsort.com> wrote:
>
> Quoth Josue de Freitas:
> > I already do it. I add "scull0,c,222,0" to the DEVICES variable on this
> > Makefile, it was created on /dev but I cannot write data to it. The
> > /dev/console ("console,c,5,1" on the Makefile) is writable since a
> > "echo test > /dev/console" prints 'test' on the console.
>
> Are you sure the major/minor numbers are correct?
I do think they are. I edit the scull.h and change the value of SCULL_MAJOR
to 222 (just an arbitrary number that I choose because dynamic allocation
cannot be done since I cannot create the device with mknod because the read
only fs).
The value of SCULL_MAJOR is used on register_chrdev.
Also, try adding debugging output to the driver, getting it to display its
> major/minor numbers, and when key routines (such as open, write, etc) are
> getting called.
I try but this is another problem since printk doesn't work on modules. I
have syslogd/klogd running and recording log on the writable
/etc/config/messages but nothing about my printks are recorded there.
I saw a lot of people in forums and lists that says that their kernel
modules are working... then I started to think there's something related to
the read-only filesystem that I'm using.
Thanks for your comments Gavin.
Regards, Josue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20071011/2b8ee0bd/attachment.html
More information about the uClinux-dev
mailing list