From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 26 14:48:12 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F7BB1065672 for ; Mon, 26 Mar 2012 14:48:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 227768FC1D for ; Mon, 26 Mar 2012 14:48:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id C745246B35; Mon, 26 Mar 2012 10:48:11 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 02095B963; Mon, 26 Mar 2012 10:48:11 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 26 Mar 2012 10:21:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203261021.42524.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 10:48:11 -0400 (EDT) Cc: cz li Subject: Re: I want to write a 64-bit version of the driver, the MAKEFILE on how to write? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 14:48:12 -0000 On Sunday, March 25, 2012 10:38:17 pm cz li wrote: > I want to write a 64-bit version of the driver, the MAKEFILE on how to > write?I can compile 64-bit version of the driver in the 32 system? > Thank you! Drivers generally use the same makefiles (if you mean a module makefile) for both i386 and amd64. If you want to cross-build a driver you will need a cross toolchain (e.g. 'make toolchain TARGET=amd64'). You can then either cross-build a kernel whose config includes your module, or you can do this to cross-build just your module: % cd /path/to/world % make buildenv TARGET=amd64 % cd sys/modules/ % make -- John Baldwin