Anyway, just a small note on the 2.6 build process. I had trouble
getting compile_2.6 to work, and came up with a (somewhat simplified)
script that works much better for me.
$ cat bin-2.6/c26.sh
mv linice_kernel.o linice_kernel.o_shipped
make -C /lib/modules/`uname -r`/build M=$PWD
cp linice.ko linice_`uname -r`/linice.o
The Makefile in bin-2.6 remains unchanged. The '_shipped' is the key
to getting the kernels makefile to recognize that linice_kernel.o is
already compiled. the M=$PWD is just a shorter way of saying
'SUBDIRS=...' Its weird, but well documented in the 2.6 tree at
'Documentation/kbuild/modules.txt'
On an unrelated note, I looked briefly at the keyboard code and it
looks like maybe the functions kbd_keycode() and kbd_event()
(drivers/char/keyboard.c) are the right places to hook for 2.6. The
only real difference is the names of the functions and some extra
parameters, the actual function KeyboardHook looks like it will work
without modification, as long as the function pointer declarations are
changed to reflect the new parameters. I did this, and got linice to
load up on 2.6, (it displayed on the console), and went away (restored
my console) when I hit F5, but then the machine was then hung. It was
neat to see it up at least.
anyway, I really dont know what I'm doing quite yet, so maybe none of
this makes sense.
I'm sure there are some other issues beyond the keyboard code that need
to be fixed to make it run on 2.6. It would be great if there was a
small list of things that need to get fixed to get it up and running at
least.
I tried on Fedora Core2 with the kernel 2.6.5-1.358 but the default
Symbol.map file that is in /boot does not contain neither of the
symbols that we'd need. I did not recompile that kernel since I'd like
to have a pristine (out-of-the-box) platform. Is the reason you see
symbols "kbd_event" and "modules" because you recompiled your kernels,
or because you run newer versions? For example, in the sources for
2.6.9 "kbd_event" is static, so it's not exported.
What do you test on? I will try to get the same versions installed.
So right now we seem to hit at least one difference with kernel
mid-versions, and that is the prototype of handle scancode in the
keyboard. However, that one is easy to fix - we just use the newer
prototype since the parameters are pushed on the stack from left to
right, they are backward compatible the way they happen to grow.
Since this appers to be a major milestone, I will add these few changes
and do a minor release.
Thanks!
- Goran