OPNsense Forum

English Forums => 19.7 Production Series => Topic started by: casper1980 on September 09, 2019, 01:49:01 pm

Title: eMMC Device not recognised
Post by: casper1980 on September 09, 2019, 01:49:01 pm
Dear Forum,

I am in the process of migrating away from pfSense to Opnsense and have run into a minor issue that I have been unable to resolve. So far I have spent a few days and trawled the forums to no avail so I thought I would post to see if anyone can help.

I am using the following hardware:

CPU: Intel(R) Atom(TM) x5-Z8350  CPU @ 1.44GHz (1440.00-MHz K8-class CPU)
4GB RAM
Intel Bay Trail/Braswell eMMC 4.5/4.5.1 Controller with 60GB MMC/SD

Opnsense Release: 19.7[11.2-RELEASE-p14-HBSD]

I have had this up and running on the latest pfSense release 2.4.4-p3 outwith the nagging UART issue that initially prevented the system from booting (solved with unsetting hint.uart.1.at).

I then wanted to move to Opnsense - for the usual reasons but have run into another issue with the MMC/SD not being recognized.   I have so far been able to install to an external USB drive which has at least got me off pfSense but I'd really like to get the MMC working. I know it was working on the pfSense release.

I am guessing that this may be because there is some issue with FreeBSD 11.x and that 12.x solves the issue, this being the primary difference between Opnsense 19 and pfSense 2.4.4 but having spent a long time looking at various threads both here and on freebsd.org etc it does seen to suggest that eMMC support should be there.

I have run a boot -v with the following settings in /boot/loader.conf.local:

hw.mmc.debug=2
boot_verbose=1

and attach the boot log.  I can see if recognizes the card OK:

mmc0:  card: MMCHC S0J38Y 1.0 SN 0816F9A4 MFG 10/2018 by 19 0x004e

but the subsequent log entries suggest that it's not attaching in the end:

mmc0:  quirks: 0
mmc0:  bus: 8bit, 200MHz (HS400 with enhanced strobe timing)
mmc0:  memory: 122142720 blocks, erase sector 1024 blocks
mmc0: REQUEST: CMD7 arg 0 flags 0
mmc0: REQUEST: CMD2 arg 0 flags 0x67
mmc0: CMD2 RESULT: 1
mmc0: REQUEST: CMD2 arg 0 flags 0x67
mmc0: CMD2 RESULT: 1
mmc0: REQUEST: CMD2 arg 0 flags 0x67
mmc0: CMD2 RESULT: 1
mmc0: REQUEST: CMD2 arg 0 flags 0x67
mmc0: CMD2 RESULT: 1
mmc0: REQUEST: CMD7 arg 0x20000 flags 0x1d
mmc0: REQUEST: CMD7 arg 0 flags 0
sdhci_acpi0-slot0: Divider 250 for freq 400000 (base 200000000)
mmc0: setting transfer rate to 52.000MHz (dual data rate timing)
mmc0: REQUEST: CMD7 arg 0x20000 flags 0x1d
uhub0: 13 ports with 13 removable, self powered
random: harvesting attach, 8 bytes (4 bits) from uhub0
mmc0: REQUEST: CMD6 arg 0x3b90101 flags 0x1d
sdhci_acpi0-slot0: Divider 250 for freq 400000 (base 200000000)
mmc0: REQUEST: CMD13 arg 0x20000 flags 0x15
mmc0: REQUEST: CMD7 arg 0 flags 0
sdhci_acpi0-slot0: Divider 2 for freq 50000000 (base 200000000)
sdhci_acpi0-slot0: Divider 2 for freq 50000000 (base 200000000)
mmc0: REQUEST: CMD7 arg 0x20000 flags 0x1d
mmc0: REQUEST: CMD8 arg 0 flags 0x35 data 512
mmc0: CMD8 RESULT: 2
mmc0: REQUEST: CMD8 arg 0 flags 0x35 data 512
mmc0: CMD8 RESULT: 2
mmc0: REQUEST: CMD8 arg 0 flags 0x35 data 512
mmc0: CMD8 RESULT: 2
mmc0: REQUEST: CMD8 arg 0 flags 0x35 data 512
mmc0: CMD8 RESULT: 2
mmcsd0: Error reading EXT_CSD Bad CRC
device_attach: mmcsd0 attach returned 6

I cant seem to get any further forward.. I would really appreciate any help.
Title: Re: eMMC Device not recognised
Post by: casper1980 on September 10, 2019, 10:33:43 am
Since this was my first post.. I am wondering if I posted this in the right forum?
Title: Re: eMMC Device not recognised
Post by: chemlud on September 10, 2019, 11:21:25 am
In principle yes, I guess....

Maybe sumefink comparable to this here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228340
Title: Re: eMMC Device not recognised
Post by: franco on September 10, 2019, 04:25:09 pm
We talked about it here in German: https://forum.opnsense.org/index.php?topic=13396.0

The gist is that eMMC driver has an incompatibility with older MMC drivers so we had to not bring eMMC support to OPNsense yet. I am unsure what that means for OPNsense 20.1 and up that will supposedly use HardenedBSD 12.1, but I can say that all tests on version 11 so far concluded the same outcome: it is not compatible.


Cheers,
Franco
Title: Re: eMMC Device not recognised
Post by: casper1980 on September 11, 2019, 09:55:11 am
OK - that's fair enough. TBH I am getting pretty good results from my usb hdd so I am not too bothered.

Thanks for the clarification.