From owner-freebsd-questions@FreeBSD.ORG Mon Dec 24 21:02:44 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E295616A417 for ; Mon, 24 Dec 2007 21:02:43 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id AA8BD13C465 for ; Mon, 24 Dec 2007 21:02:43 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so3019219waf.3 for ; Mon, 24 Dec 2007 13:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=mYv16uisQdIwj9LTcYP38l1rHnXmz8Q8sTcXu8Tu5hg=; b=ko0tDV2Jp9JE8GasHNAfBIl2EC5sByYW7w0bm7ihx3pEbcGwKfXe4OeH/aAQCErQ7nOI7oKvsc/v8pNXJqpxC4gYeVJizRET5+bFJjHOcybN3e+1JGjgL2/BX5h7aPfI25JsBIwyQFEIe6V+kLL0tPJyciHLl/CRETCwRehCYoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=SU/voYtefpVZNkAYydNofKGsDIZ9f/qT6LqJ1xzeZSuGCG+hcCGcmMHPHlkALb/NJ7Py7idLra+r9VjJvCsAxlmupxcsB2AXe5qASeBhGXON9xx9/VXDrgEdgixU80l9w14P0FqNDB2wQq4uJjyD3+cbALoGyiT/CXpU2cOnxQQ= Received: by 10.142.155.4 with SMTP id c4mr1595008wfe.208.1198530163216; Mon, 24 Dec 2007 13:02:43 -0800 (PST) Received: by 10.142.194.10 with HTTP; Mon, 24 Dec 2007 13:02:43 -0800 (PST) Message-ID: <539c60b90712241302q273dadafif945276bbbe71050@mail.gmail.com> Date: Mon, 24 Dec 2007 14:02:43 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: rsmith@xs4all.nl, "User Questions" In-Reply-To: <20071127221142.GA64385@slackbox.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <539c60b90711271248o6eb0b9fw757e40fbcdfdb3c2@mail.gmail.com> <20071127221142.GA64385@slackbox.xs4all.nl> X-Google-Sender-Auth: b8b87b2b681b0cc9 Cc: Subject: Re: how to compile and install a new driver X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2007 21:02:44 -0000 On Nov 27, 2007 3:11 PM, Roland Smith wrote: > On Tue, Nov 27, 2007 at 01:48:28PM -0700, Steve Franks wrote: > > Hi, > > > > I found this thread > > http://lists.freebsd.org/pipermail/freebsd-stable/2006-August/027445.html > > to a driver I need for my system. > > > > (1) The file extension > > (http://www.dons.net.au/~darius/ucp-0.01.diff.gz) is .diff, not .c, so > > what exactly do I do with it to compile it? > > First, use gunzip to extract it. This will leave a file ucp-0.01.diff. > Next, su to root and cd to /usr/src/sys. > To apply the patch, do 'patch > Note that the patch doesn't apply cleanly (/usr/src/sys/dev/usb/usbdevs) > on 7.0-BETA2. If that's also the case on the version you're using, > you'll have to look at /usr/src/sys/dev/usb/usbdevs.orig and > /usr/src/sys/dev/usb/usbdevs.rej to fix it manually. > > Next, build and install a kernel according to the handbook. ('make > kernel' in /usr/src) > > > (2) Assuming I can get it to compile, which I've never done, what do I > > do with the object/driver file? > > The 'make kernel' command will install the module automagically. > On the next boot, you should be able to load the ucp driver module with > kldload(8). > > > This driver is long overdue, the part has been in usb devices for > > several years, and support is in OpenBSD and Linux already (so I'm > > told by google). I'll happily document the process if someone holds > > my hand. > > If it works, submit a PR. It doesn't. From the directory structure and filenames, "ucp" appears to be nearly identical to "ucom", and the src/sys/modules/ucp/Makefile is identical to the one for ucom (except it points to ucp.c instead of ucom.c, of course), but I still get: cd /usr/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules KMODDIR=/boot/kernel MODULES_OVERRIDE="ucp" DEBUG_FLAGS="-g" MACHINE=amd64 KERNBUILDDIR="/usr/obj/usr/src/sys/GENERIC" make depend "/usr/src/share/mk/bsd.subdir.mk", line 84: warning: duplicate script for target "files" ignored "/usr/src/share/mk/bsd.subdir.mk", line 84: warning: duplicate script for target "includes" ignored @ -> /usr/src/sys machine -> /usr/src/sys/amd64/include make: don't know how to make ucp.c. Stop *** Error code 2 Stop in /usr/obj/usr/src/sys/GENERIC. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. Thanks, Steve