Skip to content
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

enable support for BPF IR decoders #4196

Merged
merged 9 commits into from
Feb 22, 2020
Merged

Conversation

HiassofT
Copy link
Member

@HiassofT HiassofT commented Feb 9, 2020

The kernel and v4l-utils gained support for BPF IR decoders a while ago but we hadn't enabled it yet in our configs.

With BPF IR decoder support enabled a lot of remotes that previously required userspace lircd can now be decoded by the kernel.

This PR also includes the (experimental) lircd2toml.py script from the v4l-utils contrib directory which can convert lircd.conf files into toml files usable by ir-keytable. While it's not perfect yet and may struggle with some lircd.conf files it's already doing a very good job.

Compiling the BPF decoders requires clang and since adding clang as a (rather hefty) dependency to build 8 very small object files didn't look like a great idea to me I decided to just build them locally and include the precompiled binaries via the separate ir-bpf-decoders package. These protocol decoders don't seem to change too often so this shouldn't be a huge problem to update them every now and then.

Note: this PR depends on #4191 otherwise the BPF decoders won't be included in the image

enable CONFIG_BPF_SYSCALL and CONFIG_CGROUP_BPF

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
autoreconf trips over the newer ax_proc_doxygen.m4 file from our
autoconf-archive which is not compatible with the ancient
version used in v4l-utils, just disable it as we don't want to
build docs anyways.

Signed-off-by: Matthias Reichl <hias@horus.com>
note: building bpf decoders is disabled as that would require clang
in the toolchain.

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
…ries

Note: when bumping v4l-utils the BPF decoders in util/keytable/bpf_protocols
should be locally rebuilt (requires clang and libelf-dev installed) and this
package bumped with updated versions.

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
@HiassofT
Copy link
Member Author

updated the kernel configs and added the missing # CONFIG_MEDIA_CEC_RC is not set where needed - thanks @MilhouseVH

@MilhouseVH
Copy link
Contributor

No reported issues, ready to go?

@HiassofT
Copy link
Member Author

this is good to go from my side, no further changes planned ATM.

Better push the button before we start getting conflicts with kernel configs

@MilhouseVH MilhouseVH merged commit e49037d into LibreELEC:master Feb 22, 2020
@HiassofT HiassofT deleted the le10-lirc-bpf branch January 16, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants