From owner-freebsd-arm@FreeBSD.ORG Sat Jan 25 18:13:01 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 699653A2; Sat, 25 Jan 2014 18:13:01 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 430FA162D; Sat, 25 Jan 2014 18:13:00 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s0PICv1B022342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Jan 2014 10:12:57 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s0PICvEk022341; Sat, 25 Jan 2014 10:12:57 -0800 (PST) (envelope-from jmg) Date: Sat, 25 Jan 2014 10:12:57 -0800 From: John-Mark Gurney To: Warner Losh Subject: Re: Rasbperry Pi, what should TARGET_ARCH be? Message-ID: <20140125181256.GE13704@funkthat.com> Mail-Followup-To: Warner Losh , Glen Barber , freebsd-arm@freebsd.org References: <20140125044043.GT52955@glenbarber.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 25 Jan 2014 10:12:57 -0800 (PST) Cc: Glen Barber , freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 18:13:01 -0000 Warner Losh wrote this message on Sat, Jan 25, 2014 at 10:50 -0700: > On Jan 24, 2014, at 9:40 PM, Glen Barber wrote: > > > Hi, > > > > I've been working on adding support for embedded systems to the release > > scripts, which set up a chroot to ensure a clean build environment, then > > runs Tim's Crochet scripts. > > > > For the RPI-B, recent updates to the build scripts work fine for > > 11.0-CURRENT and 10.0-STABLE. However, 10.0-RELEASE images fail to > > boot. > > If that worked, it worked by accident. > > > I showed output from 'uname -pm' out-of-band of an 11.0-CURRENT image, > > and was suspicious that the output showed 'arm arm', not 'arm armv6'. > > Warner had the same impression it should be 'arm armv6'. > > > > Hiren poked around the Crochet code, and saw that 'TARGET_ARCH=arm' is > > set for the RaspberryPi board by default. > > This is incorrect. > > > As a "just in case" experiment, I retried the 10.0-RELEASE code > > (release/10.0.0/) with TARGET_ARCH=armv6, and sure enough, it works. > > > > But, I don't know *why*. > > It works because that's the architecture that the RPi runs. > > > Is this a change between head/ and stable/10/ versus releng/10.0/ ? > > > > I can handle a differentiation between the branches with regard to this > > (sort of), but I want to make sure the correct TARGET_ARCH is being set > > across the different branches, so it can be handled properly in the > > build scripts, and usable images can be produced. > > The definition should be the same on both branches. You must use TARGET_ARCH=armv6 on all known branches to produce working code. You might get lucky and get TARGET_ARCH=arm and have it work, but that's most definitely not a supported configuration. > > > So, what should be used? And where? > > For RPi, TARGET_ARCH=armv6 everywhere on all branches >= 9. RPi isn't supported 8 and lower. May I propose this patch: https://www.funkthat.com/~jmg/kerncheckarch.patch This uses either TARGET[_ARCH] or uname -[mp] to make sure that the they match w/ the new kernel being built... I believe I did get the -m and -p w/ the correct order, but as I don't have a machine where they different, I can't confirm... This would prevent the issue that Glen experienced... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."