-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux/device/class.h: No such file or directory #1
Comments
Zabrane
It builds and installs cleanly on Ubuntu 20.04 if you
comment out the mknod define:
//#define DEV_MKNOD
Interestingly, it works unmodified on 22.04.
This is not so much a coding bug as a documentation
error, which I'll fix. Thanks for bring this to my
attention.
thanks
Bob Smith
…On 10/17/22 12:08, Zabrane wrote:
I'm unable to compile the kernel module on my `Ubuntu 20.04 LTS`.
```bash
$ make
make -C /lib/modules/5.4.0-128-generic/build M=/home/zab/fanout modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-128-generic'
CC [M] /home/zab/fanout/fanout.o
/home/zab/fanout/fanout.c:28:12: fatal error: linux/device/class.h: No such file or directory
28 | # include <linux/device/class.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:270: /home/zab/fanout/fanout.o] Error 1
make[1]: *** [Makefile:1762: /home/zab/fanout] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-128-generic'
make: *** [Makefile:8: all] Error 2
```
Advice please?
|
@bob-linuxtoys thanks a lot. Now it compiles but i still can't see the 08 nodes: $ sudo modprobe fanout
$ sudo lsmod | grep fanout
fanout 16384 0
$ ls /dev/fanout*
"/dev/fanout*": No such file or directory (os error 2) |
On 10/17/22 13:41, Zabrane wrote:
@bob-linuxtoys thanks a lot. Now it compiles but i still can't see the 08 nodes:
```bash
$ sudo modprobe fanout
$ sudo lsmod | grep fanout
fanout 16384 0
$ ls /dev/fanout*
"/dev/fanout*": No such file or directory (os error 2)
Right, without the mknod define the fanout devices
are not created automatically. You have to create
them manually. As root...
modprobe fanout
grep fanout /proc/devices # note the major number
mknod /dev/fanout0 c 242 0 # my major # was 242
Bob
|
Wow, real magic: $ grep fanout /proc/devices
240 fanout
$ for i in `seq 0 7`; do mknod /dev/fanout$i c 240 $i; done You could maybe update the doc for newcomers like myself ;-) |
@bob-linuxtoys how fast this PubSub can be? I'm now really intrigued. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm unable to compile the kernel module on my
Ubuntu 20.04 LTS
.Advice please?
The text was updated successfully, but these errors were encountered: