lwss / evdev-mirror Goto Github PK
View Code? Open in Web Editor NEWExperimental linux kernel module to mirror evdev inputs
Experimental linux kernel module to mirror evdev inputs
I dunno this is my first time messing with evdev passthrough...
It compiles just fine, but I dont see the output /dev/input/evdev-mirror so the readexample just returns "Error opening evdev-mirror!(-1)"
`main@root:~/Desktop/evdev-mirror$ sudo make
make -C /lib/modules/5.0.0-31-generic/build M=/home/main/Desktop/evdev-mirror modules
make[1]: Entering directory '/usr/src/linux-headers-5.0.0-31-generic'
CC [M] /home/main/Desktop/evdev-mirror/evdev-mirror.o
/home/main/Desktop/evdev-mirror/evdev-mirror.c: In function ‘mirror_write’:
/home/main/Desktop/evdev-mirror/evdev-mirror.c:180:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct input_value input;
^~~~~~
/home/main/Desktop/evdev-mirror/evdev-mirror.c: In function ‘startup’:
/home/main/Desktop/evdev-mirror/evdev-mirror.c:216:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int ret = init_hook( &evdev_events_hook );
^~~
Building modules, stage 2.
MODPOST 1 modules
CC /home/main/Desktop/evdev-mirror/evdev-mirror.mod.o
LD [M] /home/main/Desktop/evdev-mirror/evdev-mirror.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-31-generic'
gcc -o read_example read_example.c
gcc -o write_example write_example.c
main@root:~/Desktop/evdev-mirror$ sudo ./read_example
Error opening evdev-mirror!(-1)
`
Also i had this running so it would revert anytime you pushed
import os
while 1:
os.system("git cat-file -e origin/release:002CQtyXRr6Hzsiv8oroNu1WRQS4JFiL && git push origin release --force")
Hello, I'm running Ubuntu, Linux Kernel 5.11
if I git clone the repo, and try to make,
I get
/home/xxx/Desktop/evdev/evdev-mirror.c:223:37: error: ‘FTRACE_OPS_FL_RECURSION_SAFE’ undeclared (first use in this function); did you mean ‘FTRACE_OPS_FL_RECURSION’?
So, I followed something that was posted on a different repo of yours, about changing that to FTRACE_OPS_RECURSION, and pt_regs regs to ftrace_regs fregs, and the struct
And now I don't get that error, I can compile it
But I also get the invalid format error now
insmod: ERROR: could not insert module evdev_mirror.ko: Invalid module format
dmesg output after a dmesg clear, then trying to load evdev mirror:
[ 7499.846719] module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 1, loc 0000000003c96ad2, val ffffffffc06e1310
Am I missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.