From owner-freebsd-arm@FreeBSD.ORG Wed Mar 18 18:16:56 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 AFF7941D for ; Wed, 18 Mar 2015 18:16:56 +0000 (UTC) Received: from mail-yh0-x236.google.com (mail-yh0-x236.google.com [IPv6:2607:f8b0:4002:c01::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 660BE289 for ; Wed, 18 Mar 2015 18:16:56 +0000 (UTC) Received: by yhjf44 with SMTP id f44so17848413yhj.3 for ; Wed, 18 Mar 2015 11:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+VHoC0yeNWIIhLVYRBQVO4hKg+tlkuIlpInRwNQ5uK4=; b=c7el5fIaUpy8HML7pHf9rTVVDoxH01Xrz2BrhEV49Ba7oQ2Ql5madzsXPdra4otHwV 8uy1EFOINsmrIU+jDP2iYIfd+DhLhr1Z16b39kYEYiE+s/AWOj4bmW3MbTI5HH2s1UXw 66d7BGfbkPjMZq04Ot85Fk85S9idJGWr+wZE7iAQuScvz15BtgBsWPbFKw76mOOjrwta RfZ1VFADu1HcMWUfBqJ8PTR5rnUk+rlgmLltvr5gAaRp/bEl8t/yiUuVxiaLXxjNqC/s 4VxqrzN9TCetublbyLbweJZdXUfQz15T5rcatEgqZT9rWgTcg1nb/prCxLchLJowxrVs wmGw== MIME-Version: 1.0 X-Received: by 10.236.26.47 with SMTP id b35mr74731867yha.144.1426702615539; Wed, 18 Mar 2015 11:16:55 -0700 (PDT) Received: by 10.170.217.69 with HTTP; Wed, 18 Mar 2015 11:16:55 -0700 (PDT) In-Reply-To: <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> <3EF47A05-60B2-4BB0-8688-018E50CF7D4A@hellmuth-michaelis.de> Date: Wed, 18 Mar 2015 20:16:55 +0200 Message-ID: Subject: Re: beaglebone boot from eMMC From: Guy Yur To: Hellmuth Michaelis Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: 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 18:16:56 -0000 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 MB= R 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. T= he 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 a= dd 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, t= hey 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 > > 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. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D183234 Regards, Guy