beaglebone boot from eMMC

Hellmuth Michaelis hm at hellmuth-michaelis.de
Wed Mar 18 07:23:33 UTC 2015


Am 12.03.2015 um 14:33 schrieb Warner Losh <imp at bsdimp.com>:
> 
> 
>> On Mar 12, 2015, at 10:27 PM, Bernd Walter <ticso at cicely7.cicely.de> wrote:
>> 
>> 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
>>> 
>>> GEOM_PART: integrity check failed (mmcsd1, MBR)
>>> GEOM_PART: integrity check failed (diskid/DISK-5F817AAF, MBR)
>>> 
>>> on the serial console. Is the internal SD broken ?
>>> 
>>> I got similar messages when i used the copy script and during probing while start of the kernel.
>> 
>> 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.
> 
> 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.
> 
> 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 „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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20150318/686e37fc/attachment.sig>


More information about the freebsd-arm mailing list