From owner-freebsd-arm@FreeBSD.ORG Wed Mar 18 18:57:55 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 C8802AFD for ; Wed, 18 Mar 2015 18:57:55 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7369991B for ; Wed, 18 Mar 2015 18:57:54 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id t2IIv6om082885 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 18 Mar 2015 19:57:11 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id t2IIux5a076873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Mar 2015 19:56:59 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id t2IIuxID068204; Wed, 18 Mar 2015 19:56:59 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id t2IIuv7a068203; Wed, 18 Mar 2015 19:56:57 +0100 (CET) (envelope-from ticso) Date: Wed, 18 Mar 2015 19:56:56 +0100 From: Bernd Walter To: Guy Yur Subject: Re: beaglebone boot from eMMC Message-ID: <20150318185656.GO53586@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <3DF08C65-20E3-4524-B0E1-C5C096AA0FE8@hellmuth-michaelis.de> <54BA6DB9-DC61-4A6F-B948-777BB9800F54@bocal.org> <20150312132739.GA28385@cicely7.cicely.de> <3EF47A05-60B2-4BB0-8688-018E50CF7D4A@hellmuth-michaelis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, DNS_FROM_AHBL_RHSBL=2.699, T_RP_MATCHES_RCVD=-0.01 autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: freebsd-arm@freebsd.org, 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: Wed, 18 Mar 2015 18:57:56 -0000 On Wed, Mar 18, 2015 at 08:16:55PM +0200, Guy Yur wrote: > Hi, > > On Wed, Mar 18, 2015 at 9:23 AM, Hellmuth Michaelis > wrote: > > > > 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 ???BIOS??? 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???d, 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=$(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 > > > > > > Is your msdosfs slice on the eMMC aligned to 1 MB? > > I had the same "CCC" problem when I aligned the partition > and used newfs_msdos. > Removing the sector count adjustment calculation in newfs_msdos > as was done in NetBSD worked for me. I really have problems understanding why this is different to using a card. TI must have some subtile differences in handling MMC vs SD media. Wonder how it behaves if using an external MMC. Unfortunately it became hard to buy MMC cards, especially big ones and they only share same formfactor as full size cards. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.