can not write to a new device I just created
Posted: Tue Oct 13, 2020 12:32 am
I made or what I think I made is a minimally functioning device driver which has read/write capability following the instructions in "linux device drivers" 3rd ed. by Jonathan Corbet and 2 others.
The device itself obviously not a hardware device and writing and reading to device is implemented by implementing its own device memory created in kernel. So far it is compiling OK meaning all the functions implemented (well literally copied from gituhb starpos) correctly. The starpos project, which has full source for scull project, I noticed had some build issue so I am just moving over the functions from there one - by -one. The driver's load script will assign major number of the device and will create representative device in /dev/scull and several others.
Now i added some of my own code by implementing it dkms compatible and I can see it loads fine.
Toward the end of its device read/write implementation, the book instructs to try device's I/O functions by standard linux file operations i.e.
ls -l > /dev/scull0
but returns back to terminal with following error:
ls -l > /dev/scull
-bash: /dev/scull: No such device or address
I am not sure what I should check???
The device itself obviously not a hardware device and writing and reading to device is implemented by implementing its own device memory created in kernel. So far it is compiling OK meaning all the functions implemented (well literally copied from gituhb starpos) correctly. The starpos project, which has full source for scull project, I noticed had some build issue so I am just moving over the functions from there one - by -one. The driver's load script will assign major number of the device and will create representative device in /dev/scull and several others.
Now i added some of my own code by implementing it dkms compatible and I can see it loads fine.
Toward the end of its device read/write implementation, the book instructs to try device's I/O functions by standard linux file operations i.e.
ls -l > /dev/scull0
but returns back to terminal with following error:
ls -l > /dev/scull
-bash: /dev/scull: No such device or address
I am not sure what I should check???