wendlers / rcswitch-kmod

Linux Kernel Module to control 434Mhz based RC switches through sysfs.
6 stars 3 forks source link

Enable build for kernel > 3.17 and more #2

Open edillmann opened 9 years ago

edillmann commented 9 years ago

Enable build for kernel > 3.17 Enable power before send Disable power after send

466 commented 7 years ago

Hi there, i gave compiling rcswitch on kernel 4.4.14 a chance, but I am unable to get it working ... .

At first rcswitch did not get compiled due to missing functions - As i have no clue where they shold come from, i defined them myself:

void _mcount(void); void stack_chk_guard(void); void stack_chk_fail(void);

afterwards rcswitch did compile and i was able to load it into my system. It creates the directory /sys/module/rcswitch, containig:

/sys/module/rcswitch# ls -l

-r--r--r-- 1 root root 4096 Jan 2 19:40 coresize drwxr-xr-x 2 root root 0 Jan 2 19:40 holders -r--r--r-- 1 root root 4096 Jan 2 19:40 initsize -r--r--r-- 1 root root 4096 Jan 2 19:40 initstate drwxr-xr-x 2 root root 0 Jan 2 19:40 notes -r--r--r-- 1 root root 4096 Jan 2 19:40 refcnt drwxr-xr-x 2 root root 0 Jan 2 19:40 sections -r--r--r-- 1 root root 4096 Jan 2 19:40 srcversion -r--r--r-- 1 root root 4096 Jan 2 19:40 taint --w------- 1 root root 4096 Jan 2 19:40 uevent

sadly there is no entrie like /sys/kernel/rcswitch exported to sysfs ....

I suppose this is due to defining theses functions by myself, but without them, building the module was not possible at all.

Any ideas on how to deal with this problem? Is this somehow kernel related?

BR 466

edillmann commented 7 years ago

Hi,

On which platform did you try this ? I have successfully build this on bananapi with kernel 4.6.0 and C.H.I.P with kernel 4.4.13

466 commented 7 years ago

Hi,

this is an AR9331 device i am on, using up to date openwrt gittree.

edillmann commented 7 years ago

Unfortunately, i have no access to this kind of device

466 commented 7 years ago

Do you know anything about those functions? Perhaps some place within the kernel itself?

edillmann commented 7 years ago

google is your friend https://www.google.fr/search?q=stack_chk_guard