Hey all,
So... As I've mentioned on various forums here and there in the recent past, I'd really like to see fedora carry the lirc drivers (http://www.lirc.org/) in-kernel, and help push them into the upstream kernel. I finally got around to doing something significant about it this evening. The link below is the completion of my first attempt at a patch tailored for upstream, based partially on work done by Mario Limonciello for Ubuntu (cc'd).
http://people.redhat.com/jwilson/lirc/linux-2.6-lirc.patch
It includes all the latest bits from lirc cvs, save the lirc_gpio driver, which doesn't compile of late, but restructures the code in a few ways:
1) header include paths have been altered to match the file layout as patched into the kernel tree
2) in theory, all '#if LINUX_VERSION_CODE' and similar bits have been eliminated, along with all code sections for older kernels dropped, which trims down the patch by over 1000 lines and definitely makes it more manageable.
3) a few minor changes from the upstream code base to compile with the latest rawhide gcc (a few "error: void value not ignored as it ought to be" messages, which I've not yet properly fixed).
--
I've done a local x86_64 test build with this patch against 2.6.23-rc3-git6, which upon initial inspection, looks good, though I have yet to try it out on actual hardware (on my todo list this weekend). See resulting build file listing below.
If deemed appropriate, I'd like to slap this patch into the rawhide kernel builds as soon as possible. Would also rather like to get it into F7 and FC6 kernels after its had a bit of soak time...
Next up, I'd like to get the patch broken up into manageable chunks and sent off to lkml for review so we can get this thing up to kernel coding standards and hopefully included in the kernel proper.
$ rpm -qpl RPMS/x86_64/kernel-2.6.23-0.133.rc3.git6.lirc1.fc8.x86_64.rpm | grep -e 'lirc_.*.ko' /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_atiusb/lirc_atiusb.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_bt829/lirc_bt829.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_cmdir/commandir.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_cmdir/lirc_cmdir.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_dev/lirc_dev.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_i2c/lirc_i2c.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_igorplugusb/lirc_igorplugusb.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_imon/lirc_imon.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_it87/lirc_it87.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_mceusb/lirc_mceusb.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_mceusb2/lirc_mceusb2.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_pvr150/lirc_pvr150.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_serial/lirc_serial.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_sir/lirc_sir.ko/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc7/kernel/drivers/input/lirc/lirc_streamzap/lirc_streamzap.ko /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_ttusbir/lirc_ttusbir.ko
Thanks for listening, time for z's...
Jarod Wilson wrote:
Hey all,
So... As I've mentioned on various forums here and there in the recent past, I'd really like to see fedora carry the lirc drivers (http://www.lirc.org/) in-kernel, and help push them into the upstream kernel. I finally got around to doing something significant about it this evening. The link below is the completion of my first attempt at a patch tailored for upstream, based partially on work done by Mario Limonciello for Ubuntu (cc'd).
http://people.redhat.com/jwilson/lirc/linux-2.6-lirc.patch
It includes all the latest bits from lirc cvs, save the lirc_gpio driver, which doesn't compile of late, but restructures the code in a few ways:
- header include paths have been altered to match the file layout as
patched into the kernel tree
- in theory, all '#if LINUX_VERSION_CODE' and similar bits have been
eliminated, along with all code sections for older kernels dropped, which trims down the patch by over 1000 lines and definitely makes it more manageable.
- a few minor changes from the upstream code base to compile with the
latest rawhide gcc (a few "error: void value not ignored as it ought to be" messages, which I've not yet properly fixed).
--
I've done a local x86_64 test build with this patch against 2.6.23-rc3-git6, which upon initial inspection, looks good, though I have yet to try it out on actual hardware (on my todo list this weekend). See resulting build file listing below.
If deemed appropriate, I'd like to slap this patch into the rawhide kernel builds as soon as possible. Would also rather like to get it into F7 and FC6 kernels after its had a bit of soak time...
Next up, I'd like to get the patch broken up into manageable chunks and sent off to lkml for review so we can get this thing up to kernel coding standards and hopefully included in the kernel proper.
$ rpm -qpl RPMS/x86_64/kernel-2.6.23-0.133.rc3.git6.lirc1.fc8.x86_64.rpm | grep -e 'lirc_.*.ko' /lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_atiusb/lirc_atiusb.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_bt829/lirc_bt829.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_cmdir/commandir.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_cmdir/lirc_cmdir.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_dev/lirc_dev.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_i2c/lirc_i2c.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_igorplugusb/lirc_igorplugusb.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_imon/lirc_imon.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_it87/lirc_it87.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_mceusb/lirc_mceusb.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_mceusb2/lirc_mceusb2.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_pvr150/lirc_pvr150.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_serial/lirc_serial.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_sir/lirc_sir.ko/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc7/kernel/drivers/input/lirc/lirc_streamzap/lirc_streamzap.ko
/lib/modules/2.6.23-0.133.rc3.git6.lirc1.fc8/kernel/drivers/input/lirc/lirc_ttusbir/lirc_ttusbir.ko
Thanks for listening, time for z's...
Note also, lirc-pvr150 hasn't been submitted upstream to lirc for some reason or another. It really should be in the near future.
Mario Limonciello superm1@ubuntu.com
Jarod Wilson wrote:
Hey all,
So... As I've mentioned on various forums here and there in the recent past, I'd really like to see fedora carry the lirc drivers (http://www.lirc.org/) in-kernel, and help push them into the upstream kernel. I finally got around to doing something significant about it this evening. The link below is the completion of my first attempt at a patch tailored for upstream, based partially on work done by Mario Limonciello for Ubuntu (cc'd).
Cool, I tossed a few build-related fixes (warnings, deprecated interfaces/flags, etc..) on top of this up at
http://people.redhat.com/esandeen/lirc/
(There's also usb stuff going on I don't understand in the commandir driver :) but with the warning about the callback it will probably explode when run.)
Also given that each subdir under drivers/input/lirc generally has just one .c file, I'd probably flatten it out, and drop everything into drivers/input/lirc/*.c
Also in Kconfig, INPUT_LIRC and LIRC_DEV seem a little redundant - perhaps each individual driver should just do "select LIRC_DEV" rather than "depends on?" and remove the prompt for LIRC_DEV?
-Eric
Eric Sandeen wrote:
Also given that each subdir under drivers/input/lirc generally has just one .c file, I'd probably flatten it out, and drop everything into drivers/input/lirc/*.c
Until then, I tossed up a kbuild patch that will get make O=foo M=drivers/input/lirc working properly too (kbuild didn't like the files-in-subdirs when building with an object tree... unless I've forgotten any kbuild-foo I ever had). :)
-Eric
Eric Sandeen wrote:
Jarod Wilson wrote:
Hey all,
So... As I've mentioned on various forums here and there in the recent past, I'd really like to see fedora carry the lirc drivers (http://www.lirc.org/) in-kernel, and help push them into the upstream kernel. I finally got around to doing something significant about it this evening. The link below is the completion of my first attempt at a patch tailored for upstream, based partially on work done by Mario Limonciello for Ubuntu (cc'd).
Cool, I tossed a few build-related fixes (warnings, deprecated interfaces/flags, etc..) on top of this up at
Very nice. Gah, at least one of those fixes some things I screwed up merging in the latest bits from cvs...
(There's also usb stuff going on I don't understand in the commandir driver :) but with the warning about the callback it will probably explode when run.)
Hrm, that's not so good... I was thinking of seeing if I could find one somewhere for cheap, but ouch, those things look pricey...
http://www.commandir.com/order/
Also given that each subdir under drivers/input/lirc generally has just one .c file, I'd probably flatten it out, and drop everything into drivers/input/lirc/*.c
Yeah, that idea crossed my mind too after I'd sent the mail off before drifting off to sleep. I'll do that for the next rendition.
Also in Kconfig, INPUT_LIRC and LIRC_DEV seem a little redundant - perhaps each individual driver should just do "select LIRC_DEV" rather than "depends on?" and remove the prompt for LIRC_DEV?
Sounds like a good idea to me.
Jarod Wilson wrote:
Eric Sandeen wrote:
Jarod Wilson wrote:
Hey all,
So... As I've mentioned on various forums here and there in the recent past, I'd really like to see fedora carry the lirc drivers (http://www.lirc.org/) in-kernel, and help push them into the upstream kernel. I finally got around to doing something significant about it this evening. The link below is the completion of my first attempt at a patch tailored for upstream, based partially on work done by Mario Limonciello for Ubuntu (cc'd).
Cool, I tossed a few build-related fixes (warnings, deprecated interfaces/flags, etc..) on top of this up at
Very nice. Gah, at least one of those fixes some things I screwed up merging in the latest bits from cvs...
(There's also usb stuff going on I don't understand in the commandir driver :) but with the warning about the callback it will probably explode when run.)
Hrm, that's not so good... I was thinking of seeing if I could find one somewhere for cheap, but ouch, those things look pricey...
http://www.commandir.com/order/
Also given that each subdir under drivers/input/lirc generally has just one .c file, I'd probably flatten it out, and drop everything into drivers/input/lirc/*.c
Yeah, that idea crossed my mind too after I'd sent the mail off before drifting off to sleep. I'll do that for the next rendition.
Also in Kconfig, INPUT_LIRC and LIRC_DEV seem a little redundant - perhaps each individual driver should just do "select LIRC_DEV" rather than "depends on?" and remove the prompt for LIRC_DEV?
Sounds like a good idea to me.
All of the work Eric and I did over the weekend is now in a proper git tree, which can be browsed (and cloned) here:
http://git.wilsonet.com/linux-2.6-lirc.git/
A few more clean-ups and we'll slap this puppy into an actual rawhide kernel build to start getting some wider testing...
Jarod Wilson wrote:
All of the work Eric and I did over the weekend is now in a proper git tree, which can be browsed (and cloned) here:
I restructured the order of commits a bit, so if anyone did a checkout before noon eastern US time, you probably want to throw it away and start over.
A few more clean-ups and we'll slap this puppy into an actual rawhide kernel build to start getting some wider testing...
Its been added to the build, and is working its way through the build system right now. Local build worked, but that was just one arch and variant, so here's hoping it makes it through the gamut.
Still need to get more feedback from upstream LIRC to see how they want to move forward with this (query submitted, awaiting reply), since the git tree is already starting to diverge a bit...
Jarod Wilson wrote:
Its been added to the build, and is working its way through the build system right now. Local build worked, but that was just one arch and variant, so here's hoping it makes it through the gamut.
Ran into a hiccup on ppc64, but got that ironed out, and the second try just finished building for all arches and flavors.
http://koji.fedoraproject.org/packages/kernel/2.6.23/0.142.rc3.git10.fc8/
kernel@lists.fedoraproject.org