Page 1 of 3

inputattach [SOLVED]

Posted: 01 Apr 2013, 18:06
by quotaholic
Hey Guys,

Its been forever since I stopped by. Congrats on Porteus 2. Looks cool but I am on decrepid hardware and I really like KDE3 so I stuck with Porteus 1.2.

My hardware is Geode LX800 series with 512mb of ram, 500mhz cpu and a penmount touchscreen on /dev/ttyS0 reporting at 19200

Here is my dilemma. Touchscreen:

Found me a little script that takes the existing penmount.ko and patches it so that it reports to the linux event layer. :Yahoo!:

Only problem is that I need inputattach to tie that serial instance to a node in /dev/input/eventX and the existing inputattach in Porteus1.2 does not have provisions for Penmount.

I need a -pm mode and only by installing a newer inputattach do I get the -pm mode needed for the penmount hardware

I downloaded an rpm of a inputattach that is a little newer and converted it to a xzm. Inserted only to get a glibc.s0 errir. Libc6.so ....... not found.

I have a feeling that if I swing at that one I am going to break several other things. Libc6 seems like a bad thing to change.


Anyways I thought I would ask here if there was a way to work around my dilemma? :wall:

Thank you in advance!
quotaholic from webdt.org

Re: inputattach

Posted: 01 Apr 2013, 22:11
by fanthom
hello quotaholic,

just checked and 'gpm' was not updated (and even recompiled) in slackware world since 2008, which is slackware-12.1
Pat must have a good reason for that....

anyway - you may try to do it yourself:

a) please grab all files from here:
http://ftp.heanet.ie/mirrors/ftp.slackw ... rce/a/gpm/

b) update gpm to latest version from here:
http://www.nico.schottelius.org/software/gpm/archives/

c) modify slackbuild (if needed, some patches may be too old) and run on your system to compile new version.

d) probably you get a failure so some hints (and extra patches) may be obtained from gentoo ebuild tree:
http://sources.gentoo.org/cgi-bin/viewv ... iew=markup
(check 'src_prepare' function)

if gentoo has latest version then it also must be possible to compile it on slackware :wink:
good luck!

Re: inputattach

Posted: 02 Apr 2013, 22:39
by quotaholic
Wow,

Thanks for the investigative and the suggestions. I tend to agree on the reasoning as to why there is such an old package in "current". Not the first time S-ware has shown its age.
Anyways I have some progress to report. I took the cheap way out and downloaded .debs of all the packages I need. Converted and installed. I still dont see the -pm or --PenMount option in inputattach that I need. hrm

Plan B
Vendor for the touchscreen offered me a script a while back that is supposed to make a "patched" kernel module for Debian. The patch forces the kernel module to report to the linux event layer or register a /dev/input/eventX. Normally vendor forces all to download a severely proprietary solution from their site. This severely proprietary driver has never lined up with both the kernel and xorg versions on Porteus. They follow Debian, Suse, Ubuntu and Fedora's kernel / xorg versions. So if I want a touchscreen on Porteus I am working for it.

I poked around in the source and decided to run this script on the Porteus 2.0 I installed last night. Ran the script and I see that it wants to add a modprobe to /etc/rc.d/rc.modules. Actually it was aiming for rc.local but knowing that debian and slackware differ in this way. To my surprize I see that slackware and Porteus differ as well. No /etc/rc.d/rc.modules in Porteus!

If I needed to add a kernel module at boot what is the recommended way of doing so on Porteus?

I see in /var/log/Xorg.0.log that penmount module is not found. Thinking this is my missing link, for now.

Thank you in advance
quotaholic

Re: inputattach

Posted: 02 Apr 2013, 22:49
by fanthom
To my surprize I see that slackware and Porteus differ as well. No /etc/rc.d/rc.modules in Porteus!
please create this file and all will be ok :wink:
(putting there 'modprobe driver_name' string is enough).
i'll add empty file to 001-core.xzm for 2.1 release to not confuse others.
thanks.
I see in /var/log/Xorg.0.log that penmount module is not found.
yes you are first who complains about it so will be added to next release. for now please grab manually from relevant slackware repository.

Cheers

Re: inputattach

Posted: 03 Apr 2013, 00:35
by quotaholic
I should explain better,

I have a udev rule that will look for "vendor PenMount" and it tries to associate it to the input layer. I think this is why I see a touchscreen get spotted by XINPUT in Zorg.0.log and this touchscreen gets called PenMount but since I dont have an input layer or inputattach action that is taking place cleanly this is why I see the module not found later in Xorg.0.log.

There is a penmount.ko in the stock kernel but again it will never report to the event layer until it is patched. Since the T/S I have is a serial that sets up on /dev/ttyS0 tslib does not support it and I need to make it report to /dev/input/eventX

Dont need to grab anything from slackware nor include on next release.

Just struggling to get inputattach working.

Thank you
quotaholic

Re: inputattach

Posted: 03 Apr 2013, 01:30
by quotaholic
Is there a way to debug inserted modules?

I am on my sixth different version of inputattach. I erased the non functioning one from /usr/bin, swapped modules and 6 xzm inserts later I have no inputattach available on the computer.....?

Re: inputattach

Posted: 03 Apr 2013, 07:42
by fanthom
i do not own this type of hardware, i do not have any experience with it so it's hard for me to give you exac answer.
anyway - i'll tell you what i know and maybe some of this info will be useful for you.

1) first of all you need to recompile porteus kernel with your patched penmount.ko driver (i hope you did it at this stage?)
2) to check if your module was loaded please run 'lsmod | grep penmount'
3) to check kernel messages after inserting penmount.ko please run 'dmesg' or inspect /var/log/messages.
btw: Xorg.0.log has nothing to do with the kernel, it logs only userspace drivers: input (xf86-input-*), 2D (xf86-video-*) and 3D (Mesa)
4) there is userspace driver called xf86-input-penmount which is missing in stock porteus (that's why i asked you for grabbing it from slackware repository) and i believe is required to "talk" to kernel penmount.ko driver.
5) gpm is a mouse server for 'text mode' only. are you interested in getting your device to work in text mode? if yes then why are you referring to Xorg.0.log? if you want to get your device to work in GUI then you do not need gpm (inputattach).
6) if you want to get your device to work in GUI then stock penmount.ko + xf86-input-penmount should be enough (no need to patch the kernel for inputattach)
7) if you want both: text mode + GUI then kernel still need to be patched

again - i may be wrong about some statements above.
hope this info helps (somehow).

EDIT:\\
good news: slackware-current has latest version of gpm:
http://ftp.heanet.ie/mirrors/ftp.slackw ... i486-2.txz
bad news: couldn't find support for '-pm' in it (probably external patch is needed)

in which distro did you see '-pm' mode for inputattach and which version of gpm was it?
maybe grab their sources and recompile on porteus-1.2?

Re: inputattach

Posted: 03 Apr 2013, 15:12
by quotaholic
Hi Fanthom,

Thank you for your explanation. I now understand what you meant by pull from slackware.

Penmount is tricky. Anyone working with their touchscreens just has no luck unless they get the severely proporietary driver from penmount. I know what you are saying with regards to the kernel driver and supporting package but nobody gets this t work. Here is the original email from penmount:
Checked your email further, here are the best suggestions we have:

(1) For using PenMount 9000 with standard PenMount device driver

Please change the protocol in penmount.ini to PM9000 instead of PM9000COM
and perform installation again. Please do not use the kernel driver (the driver from Linux kernel) in
this case.

(2) For using PenMount 9000 kernel driver that comes with the Linux kernel.

If you prefer the open source solution, please try the attached file. This
file contains a install script for automatically install the PenMount
kernel driver and tslib in Debian 6.

The installation is for installing PenMount device on /dev/ttyS0. If using
other ports, please modify the rc.local file in the driver package and
perform installation again.

For more information, please check the README file in the device driver
package.

Hope this helps.

Shane
Shane also indicated in another email:

Code: Select all

When  you use the tslib, you will need to setup the following:

(1) Modify  /etc/ts.conf and setup module_raw, the tslib will read “/dev/inut/eventX”  device.
(2) Set the environment variable: TSLIB_TSDEVICE to PenMount  event device (for example, /dev/input/event2).
(3) Calibration reads  /dev/fb0. Your system needs to support frame  buffer.

Regards,
In the referenced package http://daryl.no-ip.org:5000/fbsharing/5PY35bpp here there is a script that makes a new penmount.ko and inserts it.

No I did not recompile the kernel, the kernel sources package was needed for the makefile script that came in the linked package and I thought that it may be enough.

Penmount or Salt.tw reports that stock kernel penmount.ko does not report to event layer without patch. The instructions for using inputattach in the linked files is why I thought I needed it. The vendor for the touchscreen indicates its needed. When I asked about inputattach on my first message it was you who references the gpm package so I was just following your lead. I did find a gpm and input attach that has the options that I need in debian squeeze, wheezy and sid. I have made modules seven times over last night from the debian packages. When I insert the modules in to porteus dialogs indicate success however the command "inputattach" is not found after insertion and even rebooting leaving module in /mnt/sda1/porteus/modules. Rebooting with and without the module numerous times did not help.

For whateverreason Porteus reports success on inputattach module but the command is not found.

This is why I asked if there was a way to debug modules. I meant porteus modules. I can make a xzm from deb2xzm but after inserting inputattach.xzm I get errors on the command.

I made the rc.local file as you mentioned and I can see penmount get loaded on init and its being used by 8 whatever 8 is. I was my intentions to use tslibs and not the severely proprietary penmount driver that led me to inputattach and trying to get the device on /dev/ttyS0 moved over to /dev/input/eventX.

I have tried to make a custom kernel for this device from porteus kernel documentation in the past but did not complete the instructions due to various errors. Left off with Brokenman with a "I will ship you one of these tablets once I get the money". Today I am still unemployed and cant afford to ship otherwise I would make you the offer. Any chance you are in Denver?

Re: inputattach

Posted: 03 Apr 2013, 16:56
by fanthom
i think it would be better to use proprietary driver and compilation against crippled_sources should be enough.
i could check it myself but this link is not valid:
http://daryl.no-ip.org:5000/fbsharing/5PY35bpp
I did find a gpm and input attach that has the options that I need in debian squeeze, wheezy and sid. I have made modules seven times over last night from the debian packages. When I insert the modules in to porteus dialogs indicate success however the command "inputattach" is not found after insertion and even rebooting leaving module in /mnt/sda1/porteus/modules.
works fine here:

Code: Select all

inputattach --help
Usage: inputattach [--daemon] [--baud <baud>] [--always] [--noinit] <mode> <device>
Modes:
  --sunkbd         -skb      Sun Type 4 and Type 5 keyboards
  --lkkbd          -lk       DEC LK201 / LK401 keyboards
  --vsxxx-aa       -vs       DEC VSXXX-AA / VSXXX-GA mouse and VSXXX-A tablet
  --spaceorb       -orb      SpaceOrb 360 / SpaceBall Avenger
  --spaceball      -sbl      SpaceBall 2003 / 3003 / 4000 FLX
  --magellan       -mag      Magellan / SpaceMouse
  --warrior        -war      WingMan Warrior
  --stinger        -sting    Gravis Stinger
  --mousesystems   -msc      3-button Mouse Systems mouse
  --sunmouse       -sun      3-button Sun mouse
  --microsoft      -bare     2-button Microsoft mouse
  --mshack         -ms       3-button mouse in Microsoft mode
  --mouseman       -mman     3-button Logitech / Genius mouse
  --intellimouse   -ms3      Microsoft IntelliMouse
  --mmwheel        -mmw      Logitech mouse with 4-5 buttons or a wheel
  --iforce         -ifor     I-Force joystick or wheel
  --newtonkbd      -newt     Newton keyboard
  --h3600ts        -ipaq     Ipaq h3600 touchscreen
  --stowawaykbd    -ipaqkbd  Stowaway keyboard
  --ps2serkbd      -ps2ser   PS/2 via serial keyboard
  --twiddler       -twid     Handykey Twiddler chording keyboard
  --twiddler-joy   -twidjoy  Handykey Twiddler used as a joystick
  --elotouch       -elo      ELO touchscreen, 10-byte mode
  --elo4002        -elo6b    ELO touchscreen, 6-byte mode
  --elo271-140     -elo4b    ELO touchscreen, 4-byte mode
  --elo261-280     -elo3b    ELO Touchscreen, 3-byte mode
  --mtouch         -mtouch   MicroTouch (3M) touchscreen
  --tsc            -tsc      TSC-10/25/40 serial touchscreen
  --touchit213     -t213     Sahara Touch-iT213 Tablet PC
  --touchright     -tr       Touchright serial touchscreen
  --touchwin       -tw       Touchwindow serial touchscreen
  --penmount9000   -pm9k     PenMount 9000 touchscreen
  --penmount6000   -pm6k     PenMount 6000 touchscreen
  --penmount3000   -pm3k     PenMount 3000 touchscreen
  --penmount6250   -pmm1     PenMount 6250 touchscreen
  --fujitsu        -fjt      Fujitsu serial touchscreen
  --ps2mult        -ps2m     PS/2 serial multiplexer
  --zhen-hua       -zhen     Zhen Hua 5-byte protocol
  --taos-evm       -taos     TAOS evaluation module
  --dump           -dump     Just enable device
  --w8001          -w8001    Wacom W8001
this is why I asked if there was a way to debug modules. I meant porteus modules.
you could check what's inside the module in /mnt/live/memory/images/module-name.xzm
I can make a xzm from deb2xzm but after inserting inputattach.xzm I get errors on the command.
which errors? as posted above it's working fine here.
please run 'ldd /usr/bin/inputattach' and check if all deps are resolved.
Any chance you are in Denver?
nope - i'm in Cork, Ireland :)

Re: inputattach

Posted: 03 Apr 2013, 20:52
by quotaholic
Sorry about the file,

I just pasted this in a browser and it downloaded:

http://daryl.no-ip.org:5000/fbsharing/iGAaf6Fl

When I saw that I only get about 25 percent of the options versus your inputattach --help I reinstalled porteus. Didnt help. I still only have about 25 percent of the return you get for options. Would there be any 64bit 32 bit differences? I can only use 32 bit and I cant use the proprietary penmount driver due to porteus kernel and xorg not lining up with mainstream linux. IE Ubuntu, Fedora, Suse, Debian, Tizen etc..these are the only versions that penmount supports. Kernel and xorg need to line up. I tried the penmount opensuse driver as Porteus is now on current xorg. No avail.

Before I installed the debian squeeze inputattach I erased the stock version of inputattach from /usr/bin. Rebooted and then installed the deb2xzm module I created from debian package. "inputattach command not found" was the error I referenced. If I didnt reinstall I could have looked in the module to see why it wasnt giving me an inputattach command to use.

The hard drive on these tablets is only 500 megabytes so a live distro is ideal. I do have two of these and debian squeeze in non compressed form is installed on number two. Currently I have tslib associating with penmount on that tablet however it just hits full cpu and locks as soon as x loads. Input attach shows me penmount or -pm options on that tablet. Same framework in place and no penmount option shown on inputattach in 2.0 Porteus on tablet number one. Hmm..... I really hate puppy too.... So would have rather used Porteus.

Guess I will just wait until Porteus version 3 comes out and hope that kernel and xorg versions line up with a popular version of linux and also pray for things like atlas acpi button controller in the kernel. I am more vocal than most webdt owners. www.webdt.org is my site. Lots of these out there. Thank you for your help Fanthom but I think I will take a crack at openembedded after round two and walking away with tail between legs on Porteus.

quotaholic

Re: inputattach

Posted: 03 Apr 2013, 21:50
by fanthom
bad news:
- i was able to compile penount.ko without problems
- i was able to compile libts
- i was not able to compile xf86-input-tslib
compilation failed with:

Code: Select all

root@porteus:/home/guest/Downloads/pmLinux-tslib-Debian6-src/xf86-input-tslib-0.0.6# make
make  all-recursive
make[1]: Entering directory `/home/guest/Downloads/pmLinux-tslib-Debian6-src/xf86-input-tslib-0.0.6'
Making all in src
make[2]: Entering directory `/home/guest/Downloads/pmLinux-tslib-Debian6-src/xf86-input-tslib-0.0.6/src'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1    -I../src -MT tslib.lo -MD -MP -MF .deps/tslib.Tpo -c -o tslib.lo tslib.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I../src -MT tslib.lo -MD -MP -MF .deps/tslib.Tpo -c tslib.c  -fPIC -DPIC -o .libs/tslib.o
tslib.c:111:14: error: unknown type name ‘LocalDevicePtr’
tslib.c:140:24: error: unknown type name ‘LocalDevicePtr’
tslib.c: In function ‘xf86TslibControlProc’:
tslib.c:387:13: error: too few arguments to function ‘InitValuatorAxisStruct’
In file included from tslib.c:48:0:
/usr/include/xorg/exevents.h:58:23: note: declared here
tslib.c:397:13: error: too few arguments to function ‘InitValuatorAxisStruct’
In file included from tslib.c:48:0:
/usr/include/xorg/exevents.h:58:23: note: declared here
tslib.c: In function ‘xf86TslibUninit’:
tslib.c:437:2: warning: ‘Xfree’ is deprecated (declared at /usr/include/xorg/os.h:233) [-Wdeprecated-declarations]
tslib.c: At top level:
tslib.c:447:35: error: unknown type name ‘IDevPtr’
tslib.c:549:2: error: ‘xf86TslibInit’ undeclared here (not in a function)
make[2]: *** [tslib.lo] Error 1
make[2]: Leaving directory `/home/guest/Downloads/pmLinux-tslib-Debian6-src/xf86-input-tslib-0.0.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/guest/Downloads/pmLinux-tslib-Debian6-src/xf86-input-tslib-0.0.6'
make: *** [all] Error 2
xf86-input-tslib comes from 2009 and probably does not compile against newer version of Xorg anymore.
changelog says that pretty clearly:

Code: Select all

2009-10-19  Michael Olbrich <m.olbrich@pengutronix.de>

	Add various patches from downstream (debian and openWrt)

2007-10-19  Michael Olbrich <m.olbrich@pengutronix.de>

	Port to Xorg 7.3

2006-04-18  Sascha Hauer <s.hauer@pengutronix.de>

	Initial version derived from the xf86-input-void driver
	and modified for tslib.
i would suggest you to use slax-6.1.2 as Porteus is simply too new i'm afraid.
sorry about that.

Re: inputattach

Posted: 04 Apr 2013, 15:26
by quotaholic
I really appreciate you trying all options.

The penmount-src package I linked instructed to use a different command than "make" but I am sure you know what you are doing. To be honest I could not get xf86-tslib to build either.

xf86-input-tslib is replaced with xorg-input-tslib. xf86 is deprecated you are right.

Took packages from other distros and converted to modules. For whatever reason the Porteus2.0 you are using shows more options than the Porteus2.0 that I am using when

Code: Select all

inputattach --help
is sent. Possibly understanding that better may help me with associating /dev/ttyS0 to the input layer.

I have tried all versions of slax including remix. Never do the kernel and xorg versions line up with the penmount proprietary driver. That and acpi-atlas_btns kernel driver is not in any slax. Needed for hard buttons & dpad on the hardware I am working on. I understand your reasoning but Slax 6.1.2 does not support the hardware.

On that note: Any Slax built past on slackware kernel 2.6.29 and beyond should have the atlas_btn thanks to a conversation with AlienBob. I could not find much in slax remix that didnt have a pae kernel in it.

I see kernel docs have changed some since I last tried to do rebuild one. I may try to take 2.0 or 1.2 and swap the kernel to a "supported" kernel for the proprietary driver. I forget the version but I tried Porteus on an Asus T101MT a couple years ago on a tablet computer and it got everything down on first boot with the touchscreen. It used tslibs from memory too. Encouraging.

I will say that aiming xorg at a frame buffer yielded a 1024x768 resolution on this tablet. The manufacturer only boasts a 800x600 capability.

Re: inputattach

Posted: 04 Apr 2013, 16:15
by fanthom
good news:
found a patch which should let me compile xf86-input-tslib against xorg-server-12.x (porteus-2.0 and earlier):
http://sources.gentoo.org/cgi-bin/viewv ... lib/files/

please tell me - will it be enough if i provide for you:
- penmount.ko
- tslib
- xf86-input-tslib
- inputattach (with penmount support)
(basically it's everything from debian tarball you linked in this thread)
?

if yes then please tell me which porteus version do you want them to be compiled against (1.2 or 2.0?)

btw: proprietary driver sucks as for sure if wont match porteus kernel (probably they have drivers for big players only like ubuntu, fedora, suse, etc..). let's stick to opensource solution (as we have no other choice i'm afraid).

Re: inputattach

Posted: 04 Apr 2013, 16:49
by quotaholic
Fanthom,

That is a little above and beyond however if you want to go for it I will evangelize Porteus to no end. If I had a job I would offer to buy one of these and send it out to you in Cork. BTW Cork, not a bad place to be. One of my favorite concerts to watch on XBMC is Chili Peppers at Slain.

I just did looked around for versions that lined up with Xorg 1.9.5 and then again a big players kernel. Looks like I am going to be on Porteus 2.0 as the newer xorg just provides more flexibility.

Rumors are that ts_calibrate does not work. http://www.elesoftrom.com.pl/blog/penmo ... 18aksj.htm

Any time I have tried I get a ts_open command not found. The one thing that made penmount very proprietary was their calibration utility: gCal. FWIW I think their util is a modified version of xinput_calibrator:

http://www.freedesktop.org/wiki/Softwar ... calibrator

I cant tell you how much I appreciate your willingness. If it is not too much to ask can xinput_calibrator be included as well as calibration of touchscreen is a needed thing for functionality...... wait a second.....

Just remembered that someone on the webdt forum made linux from scratch (non conpressed - non live) and they reported that the eGalax touchscreen driver compiled and built on his webdt: http://webdt.org/forum/viewtopic.php?f= ... alax#p4761

I am going to try the eGalax possibility on Porteus 1.2 now that I am remembering things better. I have a .deb for xvkbd from trinity that I am crossing my fingers on. Once touchscreen works finding a non ancient looking keyboard is next task. I know open source will be better and as such using tslib is end goal. eGalax may be as bad as penmount. I will report back in a short while.

Re: inputattach

Posted: 04 Apr 2013, 18:56
by quotaholic
eGalax driver fails to install due to uinput module not being available. uinput is a pretty basic one, kinda surprised it was not included. That and I dont see the atlas_btn module in Porteus 1.2.

Back to square one.

I will try Porteus 2.0 xfce version with no compsiting and the eGalax solution.

Had anyone been successful in building blueman for porteus?

https://launchpad.net/blueman