From owner-freebsd-arm@FreeBSD.ORG Mon Mar 23 03:41:53 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4D655EE for ; Mon, 23 Mar 2015 03:41:53 +0000 (UTC) Received: from monday.kientzle.com (kientzle.com [142.254.26.11]) (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 95653251 for ; Mon, 23 Mar 2015 03:41:52 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id t2N3foCV064690; Mon, 23 Mar 2015 03:41:50 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.105] (192.168.1.65 [192.168.1.65]) by kientzle.com with SMTP id twdgbd9784pseezk938iaubtz6; Mon, 23 Mar 2015 03:41:50 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: beaglebone boot from eMMC From: Tim Kientzle In-Reply-To: Date: Sun, 22 Mar 2015 20:41:50 -0700 Message-Id: <756CA573-DBF6-4847-8D13-5D2586B2A1C8@kientzle.com> References: <3DF08C65-20E3-4524-B0E1-C5C096AA0FE8@hellmuth-michaelis.de> To: freebsd-arm X-Mailer: Apple Mail (2.2070.6) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Hellmuth Michaelis X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 03:41:53 -0000 For those following along at home: There seem to be at least three problems preventing eMMC booting on = BeagleBone Black right now. (For reference, I=E2=80=99m working with = up-to-date -CURRENT and the Crochet copy-to-emmc.sh script. I started = with a Crochet-built SD image from an amd64 system, then did a native = build to upgrade before experimenting with ways to format and populate = the eMMC image.) 1) FAT partition format. newfs_msdos trims the FAT format to an even = number of tracks, but the AM335x ROM insists that a valid FAT format = exactly fill the partition. Following a suggestion from Luiz Otavio O Souza, I=E2=80=99ve adjusted = the copy-to-emmc.sh script in Crochet with parameters that seem to = result in the FAT partition being aligned on a track boundary. Real Solution: Fix newfs_msdos to not trim or at least provide an = option. Guy Yur has filed = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D183234 = with some ideas on this. 2) Ubldr not finding boot device. I=E2=80=99m running into this now. = This could be related to U-Boot (ubldr uses U-Boot to identify and = access drives), but U-Boot seems to have no trouble reading the eMMC (in = particular, it loads ubldr successfully), so I=E2=80=99m skeptical = that=E2=80=99s the problem. 3) Geom rejects BSD labels with more than 255 sectors per track. The = BBB eMMC reads as 1024 sectors per track. Would it make sense to = remove the check in g_part_bsd.c that rejects labels with more than 255 = sectors? Related: Could someone please add GEOM_LABEL to the BEAGLEBONE kernel? = The eMMC shows up as either mmcsd0 or mmcsd1 depending on how you boot, = so label-based mounting is pretty essential.