From owner-freebsd-arm@FreeBSD.ORG Sat Jun 7 19:01:22 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC4995E7 for ; Sat, 7 Jun 2014 19:01:22 +0000 (UTC) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B917A27C1 for ; Sat, 7 Jun 2014 19:01:22 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id s57J1ETS089093; Sat, 7 Jun 2014 19:01:14 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.101] (192.168.1.66 [192.168.1.66]) by kientzle.com with SMTP id exsrzdgv8suyitysfdywxsjxzs; Sat, 07 Jun 2014 19:01:14 +0000 (UTC) (envelope-from tim@kientzle.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: Compilation for ARM From: Tim Kientzle In-Reply-To: <53935D02.2030604@narod.ru> Date: Sat, 7 Jun 2014 12:01:13 -0700 Content-Transfer-Encoding: 7bit Message-Id: <6D7645D2-9C08-4B5D-BAA5-5B6EC8F66F0B@kientzle.com> References: <53935D02.2030604@narod.ru> To: Stepan Dyatkovskiy X-Mailer: Apple Mail (2.1878.2) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 19:01:22 -0000 On Jun 7, 2014, at 11:42 AM, Stepan Dyatkovskiy wrote: > I'm trying to cross-compile FreeBSD kernel with clang for ARM,... For what board? There are a few high-level tools now for building ready-to-run system images for particular boards. > As base I used this guide: > http://people.freebsd.org/~cognet/arm.html That looks pretty old; there are much simpler approaches available now. The basic process for cross-building is: $ make TARGET_ARCH=armv6 buildworld $ make TARGET_ARCH=armv6 KERNCONF=XYZ buildkernel In particular, buildworld builds all of the cross-compile tools for you. Also, clang is the default for FreeBSD on ARM now, so the above commands all use clang. If you want to do kernel development (which involves repeatedly making changes and rebuilding), you'll want to experiment with $ make TARGET_ARCH=armv6 buildenv This starts a shell with all the necessary environment variables already correctly set for cross-buildling. (It assumes you have already done a cross-buildworld to build the tools.) Note: For some targets, you need to also specify TARGET_CPUTYPE. Cheers, Tim