From owner-freebsd-arm@FreeBSD.ORG Wed Mar 18 07:23:33 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA7BB887 for ; Wed, 18 Mar 2015 07:23:33 +0000 (UTC) Received: from mail.agsec.de (mail.kts.org [IPv6:2a00:14b0:f000:1::222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6176487B for ; Wed, 18 Mar 2015 07:23:32 +0000 (UTC) Received: from hh01.agsec.de (localhost [127.0.0.1]) by mail.agsec.de (Postfix) with ESMTP id ECF968929D for ; Wed, 18 Mar 2015 08:23:27 +0100 (CET) X-Virus-Scanned-AGSEC: MailMurkxDeScraCxler at agsec.de Received: from mail.agsec.de ([194.55.156.222]) by hh01.agsec.de (hh01.agsec.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ro-sOyJVXbbX for ; Wed, 18 Mar 2015 08:23:12 +0100 (CET) Received: from ernie.int.kts.org (ernie.int.kts.org [IPv6:2001:6f8:1c56:42::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.agsec.de (Postfix) with ESMTPS id 717C78929C for ; Wed, 18 Mar 2015 08:23:12 +0100 (CET) X-Virus-Scanned-KTS: Mail-UnWroks-U-Laksler at KTS.ORG Received: from frazzle.int.kts.org (frazzle.int.kts.org [IPv6:2001:6f8:1c56:42::11]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ernie.int.kts.org (Postfix) with ESMTPSA id 2C995E042E for ; Wed, 18 Mar 2015 08:23:01 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_BEDA3965-4DAD-4927-AC64-49F0E257E944"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: beaglebone boot from eMMC X-Pgp-Agent: GPGMail 2.5b5 From: Hellmuth Michaelis In-Reply-To: Date: Wed, 18 Mar 2015 08:23:00 +0100 Message-Id: <3EF47A05-60B2-4BB0-8688-018E50CF7D4A@hellmuth-michaelis.de> References: <3DF08C65-20E3-4524-B0E1-C5C096AA0FE8@hellmuth-michaelis.de> <54BA6DB9-DC61-4A6F-B948-777BB9800F54@bocal.org> <20150312132739.GA28385@cicely7.cicely.de> To: freebsd-arm@freebsd.org 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: Wed, 18 Mar 2015 07:23:33 -0000 --Apple-Mail=_BEDA3965-4DAD-4927-AC64-49F0E257E944 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Am 12.03.2015 um 14:33 schrieb Warner Losh : >=20 >=20 >> On Mar 12, 2015, at 10:27 PM, Bernd Walter = wrote: >>=20 >> On Wed, Mar 11, 2015 at 11:38:39AM +0100, Hellmuth Michaelis wrote: >>> Further investigation shows, if i dd the local image from = /dev/mmcsd0 or a fresh image from remote to /dev/mmcsd1 i get sooner or = later >>>=20 >>> GEOM_PART: integrity check failed (mmcsd1, MBR) >>> GEOM_PART: integrity check failed (diskid/DISK-5F817AAF, MBR) >>>=20 >>> on the serial console. Is the internal SD broken ? >>>=20 >>> I got similar messages when i used the copy script and during = probing while start of the kernel. >>=20 >> I remember having seen similar problems when I tried using the eMMC = last >> year. >> I also used crochet and the copy script, but IIRC ended when it = didn't boot. >> Details should be on this list somewhere. >=20 > Last time I looked into issues like this it was due to gpart putting = too much stock > in the BIOS returned geometry. usb devices rarely match each-other, = let alone > the fake geometry we return from mmcsd. I suspect the root of these = weird to > diagnose issues lies here. >=20 > Warner Its really weird. I fetched the Angstroem flasher to put back an = original image onto the eMMC and that worked. I dumped the MBR for Linux = and the MBR which was generated by the install script and they are both = pretty OK and legal. I reordered files on the MSDOS partition. I played = with different =E2=80=9EBIOS=E2=80=9C geometries (because Linux and = FreeBSD have a rather different sight on this) to produce the = partitions. Nothing helps - it does not boot FreeBSD from the eMMC MSDOS Partition. = The only thing which made a difference was, when i used the = Linux-generated MSDOS partition, removed the files in it and populated = it with the FreeBSD-generated MLO and things - then it booted from it. I = failed completely to add an UFS partition after the Linux-generated = MSDOS partition, tried gpart, fdisk, bsdlabel. The UFS mmcsd1s2a can be = generated, populated, fsck=E2=80=99d, tested, checked - after the next = powercycle it simply disappeared. It seems to me that there is a bit more magic involved than only = generate the partitions. In the Linux script to generate the image onto = the eMMC, they check for: HEADER=3D$(hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom -s 5 = -n 3) and possibly write to an eeprom - has someone an idea why this is needed = ? Hellmuth --Apple-Mail=_BEDA3965-4DAD-4927-AC64-49F0E257E944 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJVCSfUAAoJEDc16e0fOQ8Bw9UH/2yVzk8+TCOsWlM7qN2EXK0f cb5IqQPr6nWZYMdvNkncTrYyhAqhmYZm8URSupFI2HKFgif6fiAvG4wO8AjIAuSD ZoLy2/wYKKWxKn/HULyQidUEkOBlbxEiGb97ZOwhTV+/96J8rO2pHWlxnuWRYwzu 7PsEIj1RSf/gq+UzBme10m6TmEGGaepuBtpuC2TYjlsIAbIapmrGpKf8dbqg2CWG MxM0GuzI/iiFElKL53peuK9ibYeqiEKPHwctlaDpP7VBLJ2Vem9StbM6ldJomRH7 7DvNNfyMN5glxrF5fV945l8WwT9gWDln1saMMaimfMZKMy8b7kGNom+M3WNBiP0= =Y9Gl -----END PGP SIGNATURE----- --Apple-Mail=_BEDA3965-4DAD-4927-AC64-49F0E257E944--