jens@zekra.se wrote:
> Hi
>
> I am trying to run a piece of software compiled for Linux on my
> OpenBSD box. Unfortunately I do not have the source code.
> It works perfectly on my Debian Linux box but not on my OpenBSD box
> (where I actually want to run the application.)
>
> The software communicates via a serial port with an external hardware,
> works perfectly on Linux but on OpenBSD it stops in the middle of the
> communication.
>
> To make this work I have:
>
> * Installed linux emulation
> $ pkg_info | grep redhat
> redhat_base-8.0p8 Linux compatibility package based on RedHat 8.0
> redhat_libc5-6.2p0 Linux libc5
>
> * I have made a hard link from /dev/cua00 to /dev/ttyS0
> $cd /dev/$ ls -l ttyS0
> ls -l
> crw-rw-rw- 2 root wheel 8, 128 Apr 27 02:26 ttyS0
> crw-rw-rw- 2 root wheel 8, 128 Apr 27 02:26 cua00
> + a lot more files
>
> * After doing this the software connects to the device via ttyS0
> (cua00), it sends some stuff on the port however it does not work as
> it should.
> I have run the exact same binary on a Debian Linux box where it
> succeeds.
> I am thankful for any help on:
> * What can differ these two machines apart?
> * Any way I can debug this? reverse engineer my binary and checn the
> ioctl settings
> * Anything else that I didnt thought about
I don't really know anything about serial devices, but you could try
ktrace(1). That should at least show you what the program is trying to
send. (This is your "reverse engineer the binary", but a lot easier. It
doesn't get you quite as much information, but...)
Also, did you try running Linux - perhaps via a LiveCD - on your OpenBSD
box? That would at least conclusively prove that the hardware is able to
do this. (Although it's not very likely that it wouldn't, of course.)
Joachim