danitool / openwrt-pkgs

my custom OpenWrt packages: lirc and others
GNU General Public License v2.0
9 stars 4 forks source link

making it work on ralink RT5350F #4

Closed vinceb87 closed 7 years ago

vinceb87 commented 7 years ago

Hi,

I tried to compile your package for OpenWRT running on ralink RT5350F but that is not working. logread prints the following error in loop : local0.err lircd-0.9.2a[1432]: Error: could not get file information for /dev/lirc0 local0.err lircd-0.9.2a[1432]: default_init(): No such file or directory Any insight would be very much appreciated. Thank you in advance,

Vince

danitool commented 7 years ago

Hi vinceb87, please provide the kernel dmesg to see if lirc modules are loaded

vinceb87 commented 7 years ago

Hi danitool, There is indeed no kernel module for lirc loaded : "dmesg | grep lirc" gives no output. Sorry for my late answer, I was trying to adapt the lirc-bcm63xx to the ralink rt5350f before coming back to you. I'm very new to kernel module development and GPIO interrupts so I don't really now what needs modifications and how... If you have any hints... Thanks. Vince

danitool commented 7 years ago

The package lirc-gpio-generic (also in this packages repo) should work with rt5350 (ramips). The only one condition is having GPIO interrupts implemented for your SoC, and as AFAIK ramips already have IRQs implemented.

Therefore using the lirc-gpio-generic kernel module should work out of the box.

2016-11-10 9:58 GMT+01:00 vinceb87 notifications@github.com:

Hi danitool, There is indeed no kernel module for lirc loaded : "dmesg | grep lirc" gives no output. Sorry for my late answer, I was trying to adapt the lirc-bcm63xx to the ralink rt5350f before coming back to you. I'm very new to kernel module development and GPIO interrupts so I don't really now what needs modifications and how... If you have any hints... Thanks. Vince

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danitool/openwrt-pkgs/issues/4#issuecomment-259635652, or mute the thread https://github.com/notifications/unsubscribe-auth/ALF74E_clN_28BmJUVyhOHONcH3rCUaOks5q8tytgaJpZM4KspT5 .

vinceb87 commented 7 years ago

I already tried the lirc-gpio-generic package (from branches bb or cc). However, I get this error when installing the package

Installing kmod-lirc_gpio_generic (3.18.19-1) to root... Configuring kmod-lirc_gpio_generic. [ 235.430000] lirc_gpio_generic: Unknown symbol lirc_unregister_driver (err 0) [ 235.440000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_poll (err 0) [ 235.460000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_open (err 0) [ 235.470000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_close (err 0) [ 235.480000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_read (err 0) [ 235.500000] lirc_gpio_generic: Unknown symbol lirc_register_driver (err 0) [ 235.510000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_ioctl (err 0)

The looked up symbols are defined in the lirc include/media/lirc_dev.h file that doesn't exist in the latest lirc versions. It could work if I knew which version of lirc is supported by this package and how to specify which version to download.

Many thanks for your help.

danitool commented 7 years ago

Are you using the LIRC package with your own custom firmware (same used to build the LIRC module)?

You should also build the firmware to let all lirc symbols be built into the kernel. Using the lirc package with official firmware won't work.

If you're already using your custom firmware, built with the same buildroot as LIRC, then I'm afraid I missed some configs for the kernel. Or you may also need to clean a rebuild the kernel.

2016-11-10 11:37 GMT+01:00 vinceb87 notifications@github.com:

I already tried the lirc-gpio-generic package (from branches bb or cc). However, I get this error when installing the package

Installing kmod-lirc_gpio_generic (3.18.19-1) to root... Configuring kmod-lirc_gpio_generic. [ 235.430000] lirc_gpio_generic: Unknown symbol lirc_unregister_driver (err 0) [ 235.440000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_poll (err 0) [ 235.460000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_open (err 0) [ 235.470000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_close (err 0) [ 235.480000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_read (err 0) [ 235.500000] lirc_gpio_generic: Unknown symbol lirc_register_driver (err 0) [ 235.510000] lirc_gpio_generic: Unknown symbol lirc_dev_fop_ioctl (err 0)

The looked up symbols are defined in the lirc include/media/lirc_dev.h file that doesn't exist in the latest lirc versions. It could work if I knew which version of lirc is supported by this package.

Many thanks for your help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

vinceb87 commented 7 years ago

Hi danitool,

You are right. I was building the kmod from the SDK and installing it on top of the already flashed firmware. I thought that the built kernel module had everything it needed to run and that it could patch the kernel if needed. In fact, I still don't understand why building from SDK is not sufficient. Have any good pointers or quick answer to enlighten me?

Now that I have the kmod loaded, I can start playing with the IR receiver/transmitter. Thanks again very much,

Vince

danitool commented 7 years ago

The package lirc-gpio-generic makes some kernel configuration itself at build time, like selecting LIRC underlying stuff (symbols and other modules). Not sure If I could make the package for the other LIRC modules, which should avoid to build a new kernel. I took this way because it was easier.

Since this package was never tested in rt5350, I really appreciate your feedback.

Regards.

2016-11-10 17:21 GMT+01:00 vinceb87 notifications@github.com:

Hi danitool,

You are right. I was building the kmod from the SDK and installing it on top of the already flashed firmware. I thought that the built kernel module had everything it needed to run and that it could patch the kernel if needed. In fact, I still don't understand why building from SDK is not sufficient. Have any good pointers or quick answer to enlighten me?

Now that I have the kmod loaded, I can start playing with the IR receiver/transmitter. Thanks again very much,

Vince

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.