Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2009 11:22:20 -0500
From:      "J.R. Oldroyd" <fbsd@opal.com>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Emulation of Linux V4L ioctls
Message-ID:  <20091124112220.6b4b742f@shibato.opal.com>
In-Reply-To: <20091124091151.12733pwkk9ha1yyo@webmail.leidinger.net>
References:  <20091119153159.610debc2@shibato.opal.com> <20091120103535.815072bwgvis0io0@webmail.leidinger.net> <20091120103622.0db845c8@shibato.opal.com> <20091123144251.11055vw9sv236voc@webmail.leidinger.net> <20091123125403.20e3a63e@shibato.opal.com> <20091124091151.12733pwkk9ha1yyo@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/drtcgybMn8.uAXXWWAIXjQj
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 24 Nov 2009 09:11:51 +0100, Alexander Leidinger <Alexander@leidinge=
r.net> wrote:
>
> Quoting "J.R. Oldroyd" <fbsd@opal.com> (from Mon, 23 Nov 2009 12:54:03 -0=
500):
>=20
> > My test app is the net/skype port which installs:
> > /usr/local/share/skype/skype: ELF 32-bit LSB executable, Intel =20
> > 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), =20
> > for GNU/Linux 2.4.1, stripped
> >
> > I am running this on an amd64 with the code using the same
> > videodev.h.  The video is working.  Ergo, the structures appear
> > to be compatible.
>=20
> Your "appear" is the right word. Licensing issues aside (I try to get =20
> someone to have a look at it), I would import the code as is because =20
> of this and try to fix possible edge cases afterwards. The point is, =20
> we do not really know how much of the structure is used. It may be the =20
> case that the structure is partly compatible (and skype only uses this =20
> part), or compatible by accident (automatic padding by the compiler). =20
> With the right program (printing total size, ofsset of members, and =20
> size of memebers), you can detect both and take appropriate action.
>=20
> Bye,
> Alexander.
>=20

OK, I have placed such a program together with its output on
an amd64 and i386 here:
    http://opal.com/freebsd/sys/compat/linux/linux_vidsize.c
    http://opal.com/freebsd/sys/compat/linux/linux_vidsize_out.amd64
    http://opal.com/freebsd/sys/compat/linux/linux_vidsize_out.i386

There are differences in sizes in the following:
	video_tuner	unsigned long rangelow
	video_tuner	unsigned long rangehigh
	video_window	struct video_clip * clips
	video_buffer	void * base
	video_code	__u8 * data
All are 8 bytes on the amd64 and 4 bytes on the i386.

	-jr

--Sig_/drtcgybMn8.uAXXWWAIXjQj
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAksMCDwACgkQls33urr0k4mEVQCfS66iC4J8NMncQE7901cILkSs
TDsAn1yA/pLLPJrUcd9aXyjDfdJFgxTm
=ArcB
-----END PGP SIGNATURE-----

--Sig_/drtcgybMn8.uAXXWWAIXjQj--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091124112220.6b4b742f>