From owner-freebsd-multimedia@FreeBSD.ORG Mon Sep 8 20:30:52 2008 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76B1D1065695; Mon, 8 Sep 2008 20:30:52 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 4D7598FC20; Mon, 8 Sep 2008 20:30:52 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 0D4CE15D969; Mon, 8 Sep 2008 16:13:10 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 08 Sep 2008 16:13:10 -0400 X-Sasl-enc: pdIvJLAz0rLqqV2D2m6mL19OM2tQHNZr5KG7HSS2ex15 1220904789 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 6FB3029D20; Mon, 8 Sep 2008 16:13:09 -0400 (EDT) Message-ID: <48C58754.6040802@incunabulum.net> Date: Mon, 08 Sep 2008 21:13:08 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Luigi Rizzo X-Enigmail-Version: 0.95.6 Content-Type: multipart/mixed; boundary="------------060804090600060807080109" Cc: freebsd-multimedia@FreeBSD.org, pedagand@gmail.com Subject: devel/linux-kmod-compat bit me X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 20:30:52 -0000 This is a multi-part message in MIME format. --------------060804090600060807080109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit "link_elf: symbol msleep undefined"... Further here: http://www.daemonforums.org/showthread.php?p=12764#post12764 This just bit me, the attached fixes seem to work for me (I can load the drivers into the kernel). It turns out that the __FreeBSD_version cpp conditional is incorrect for 7.0-RELEASE shipping systems. The key observation was that on line 76 of linux_compat.c, msleep() is in fact undefined. The only cam I have at the moment is the Trust Spacec@m 380 which is not supported by the ported ov511 driver, I'm waiting on more units arriving. --------------060804090600060807080109 Content-Type: text/plain; name="1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="1" --- ./linux/module.h.bak 2008-09-08 20:55:25.000000000 +0100 +++ ./linux/module.h 2008-09-08 21:01:06.000000000 +0100 @@ -209,7 +209,7 @@ #define udelay(t) DELAY(t) void linux_msleep(int ms); -#if __FreeBSD_version > 700100 +#if __FreeBSD_version > 700054 // adapt to a change between FreeBSD 6.x and 7.x #define msleep_compat(ms) linux_msleep(ms) #undef msleep --------------060804090600060807080109 Content-Type: text/plain; name="2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="2" --- ./linux_compat.c.bak 2008-09-08 20:55:37.000000000 +0100 +++ ./linux_compat.c 2008-09-08 21:01:14.000000000 +0100 @@ -69,7 +69,7 @@ void linux_msleep(int ms) { -#if __FreeBSD_version > 700100 +#if __FreeBSD_version > 700054 _sleep("linux-msleep", NULL, 0 /* PRI */, #else /* call the FreeBSD msleep */ --------------060804090600060807080109--