eMMC booting (installing to and booting FreeBSD from eMMC)

Kubitz

New Member

Reaction score: 2
Messages: 8

Hello everyone,

I recently purchased an Acer Aspire One "cloudbook" that has a 64gb Hynix eMMC part as it's internal disk. My goal is to make this a lightweight FreeBSD-only machine for travel and daily mobile computing. When trying an install of 10.1-RELEASE the eMMC device was not found and therefore the install could not proceed. Some Internet and FreeBSD forum searching turned up a few posts from folks who have similar devices (HP Stream) and had the same outcome.

If eMMC install/booting is indeed unsupported at this time does anyone know if it is currently on the road-map? If so, is anyone currently working on this feature?

If the feature is not currently being worked on I would like to start developing a solution based on the eMMC 5.1 spec. Probably an eMMC driver providing the signal layer interactions with the eMMC part that hopefully can leverage an existing file system block-level driver already in the FreeBSD kernel. The goal would be to have FreeBSD install on an eMMC like it would on any other (S)ATA/IDE drive.

However I certainly do not want to duplicate anyone else's efforts. There is probably a way to check what features are already being worked on but I have not found it yet. My apologies to the moderators if there is.

Any feedback or advice pertaining to this feature, the development of it, who might be working on it already, any "gotchas" to look out for, etc. would be much appreciated!
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,205
Messages: 31,914

Have you tried the latest release candidate of 10.3? FreeBSD 10.1 came out more than a year ago, and things tend to move quite quickly.
 
OP
OP
Kubitz

Kubitz

New Member

Reaction score: 2
Messages: 8

Just downloaded and tried 10.3 RC3 ("Beta3") and it failed to detect the eMMC part. I could find no new dmesg lines referring to finding an unknown peripheral, etc. from the 10.1 to the 10.3 kernel. I'm going to keep playing with 10.3, maybe enable more boot/device probe logging. I haven't dug into this at any depth however my hunch is that the eMMC is on the PCI bus (everything else on this hardware seems to be, even video!). Failing any other intelligent means of finding it, I might try a custom kernel that attempts reads of the eMMC's device ID from the unused range in PCI's address space.
 
OP
OP
Kubitz

Kubitz

New Member

Reaction score: 2
Messages: 8

Hi all,

Just a quick follow up with my findings: Turns out this is not a traditional "PC" architecture but an Intel Braswell SoC (System on Chip) which has the cores, subsystem interconnects, and dedicated peripheral interfaces (storage, camera, etc.) all on a single chip. As such there are dedicated GPIOs for driving the eMMC part.

I have started working on the eMMC driver but progress is slow-going as I have had very little free time lately to spend on it. I will check back in once I am a bit closer to something working.

Ultimately my goal is to contribute this driver back to FreeBSD so if anyone has any guidance beyond whats already in the developer's handbook (i.e. making it available for consideration, review, submission, etc.) I would appreciate it very much.

Thanks!
 

johalun

New Member


Messages: 9

Hi Kubitz!

How is it going with the eMMC? I am in need of getting this to work ASAP and would like to coordinate efforts.
From what I understand the current sdhci_pci and mmc driver could work, we just need to figure out the GPIO pieces and how to activate the eMMC chip so that the driver can talk to it.
 
OP
OP
Kubitz

Kubitz

New Member

Reaction score: 2
Messages: 8

Hi yohanesu75,

Its been very slow going. I have been blocked by a lack of documentation and that translated to a lack of time to hack up a driver to probe GPIOs around memory addresses where I think the eMMC device is mapped in. This is still on my roadmap however I have not gotten around to doing the reverse engineering needed to take it to the next step. If you have time to contribute I'd be happy to share with you what I have learned this far.

The eMMC part on my board is hardwired to dedicated GPIOs on the Intel (Braswell [Celeron N3050]) SoC. From some Intel hardware designer's specs I found online I have a rough idea what the range is where the GPIOs are mapped into the SoC's memory space. I'm traveling now and do not have access to the docs but if you want them I can get them to you when I am back.

Given the above architecture, I am not confident in reusing the sdhc_pci driver as-is. There might be some parts of that driver on the eMMC host side of things that could help but I have not examined it in detail. I did get the JEDEC eMMC spec though just in case the host-side stuff needs to be implemented from scratch. It doesn't look too bad. The Hynix eMMC part on my board looks like it uses v4.5 of the eMMC host specification.

To speed things up I have considered two alternative paths:

1) Disassemble the BIOS to my board which has the capability to power up and ready the eMMC part to be able to access the boot sector pre-OS handoff.

2) Get the Braswell SoC GPIO addresses for the eMMC part from a compatible Linux driver. I think getting those addresses (just the addresses) from a Linux driver should not violate the GPL or restrict our rights as developers to release our work under a BSD license since Intel picked them and they are a "hardware feature". :)

Right now I am using my Braswell notebook with FreeBSD but using a side-loaded Sandisk flash drive (and its been pretty great) as the system volume. If you are really pressed for time perhaps that might be a workable solution to get you unblocked until we figure out the eMMC driver.

Thanks,

Rob
 

Al Poole

New Member


Messages: 2

Hello,

OpenBSD has a working driver since 6.0-beta. You might want to have a look at the latest source code. I think implemented by Mark Kettenis...
 
Top