From owner-freebsd-multimedia@FreeBSD.ORG Sun Apr 15 22:08:16 2007 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2184116A401 for ; Sun, 15 Apr 2007 22:08:16 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.238]) by mx1.freebsd.org (Postfix) with ESMTP id C49DA13C465 for ; Sun, 15 Apr 2007 22:08:15 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so1366369wra for ; Sun, 15 Apr 2007 15:08:15 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=ec75NMRMP+LEZ1nsVlZ3D8sTAscizqckx6Ltsi31jQqHXOH+gf6Z3HNXOlPo3RSh1g0T3WNpRcVDUyNNh2KzNCK2gldfOtYCDN1Biu90hXhQUj6pwOYhVqezkjdmJlxq2lVg7dg4tTXLwsw2OpWYGmtr9TyLFugOzD+hSkvoBgQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=SzBDi49ADDoytucWHkCQ547p7HMyWo0DlslCTU57tQqEjPxyyBjPwU74moYI2twtbVlNpEc0zsKkA1PFxZTiyy/JV64wBFPQppEfW120TC90gjpBDAQ6bBnX2yFBKjyyRYvwVIzGAQHUA10q9PoqgNaY/+hYTReRQXQekw8z7gs= Received: by 10.114.137.2 with SMTP id k2mr1702070wad.1176674894720; Sun, 15 Apr 2007 15:08:14 -0700 (PDT) Received: by 10.114.192.12 with HTTP; Sun, 15 Apr 2007 15:08:14 -0700 (PDT) Message-ID: Date: Mon, 16 Apr 2007 00:08:14 +0200 From: usleepless@gmail.com To: "Greg 'groggy' Lehey" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: freebsd-multimedia@freebsd.org Subject: pvrxxx, linux code and modules 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: Sun, 15 Apr 2007 22:08:16 -0000 Greg, i am writing you because i know you are an experienced freebsd developer and you are the maintainer of the mythtv port. i am trying to get the pvrxxx port to support as many cards as possible. in the process, i have been using linux source code to get the job done. i have defined a .h file full of defines and redefines so i can include linux-source with as little altertation as possible: - include fbsd-compat.h file - run sed over the source-file to replace "struct i2c_client" by "device_t" - uncomment some stuff i can't solve with the fbsd-compat.h file ( the linux attach routines ) - add some stuff ( couple of lines ) to support fbsd-compat.h - create an entry point to call the main function of the linux-module - link it in however, i feel that it should be possible to create separate kernel-modules of these linux-modules: tuner.ko, tveeprom.ko, cx25840.ko etc.... but i don't have the knowledge to make this happen: - how do i create an entry point into the module ( which i can call to get work done? ) i would appreciate if you would take a look at what i have done with tuner.c, tveeprom.c, tda9887.c, cx25840-core.c etc in the pvrxxx port. would it be possible to create an automated procedure to transform these linux-modules to freebsd-modules at the source level? for example: the bktr driver would be able to use the same tuner.ko as the pvrxxx driver does ( a module based on the linux source ). this way, we could construct a port which compiles as much as possible linux-modules to freebsd-kld-modules, which we could use! regards, usleep