eMMC problems [SOLVED - well work arround found]

Post Reply
summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

eMMC problems [SOLVED - well work arround found]

Post by summers »

Hi,

After using Arch linux on an SD card for some time, I installed arch to the EMMC. On my desktop the install seemed to go fine. However on attempting to boot on the odroid-c2 it boots the SD card! Removing the SD card, I can get it to boot the EMMC, but the card comes up in read only mode.

Specifically I get errors like:

Code: Select all

mount / -o remount,rw
[  306.990240] EXT4-fs (mmcblk0p1): previous I/O error to superblock detected
[  306.992317] mmcblk0: response CRC error sending r/w cmd command, card status 0xd00
So what could cause this? I've tried removing the emmc card and reinstalling in case of bad connection several times, but I always get the same error.

Any ideas?

David

P.S. Tried some more options. On my PC I can read and write the card. On the odroid-c2 I can dd to the card, but trying anything like fdisk or mounting a partition and I get CRC errors ... I never got these error before I wrote Arch to the emmc, even when I chroot onto arch on the SD card. Also dd doesn't write the full card - it work for a bit - then bombs out ....

P.P.S. Of try to restore the ubuntu filesystem, and try some dding:

Code: Select all

dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=2048
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0792423 s, 13.2 MB/s
dd if=dd.root of=/dev/mmcblk0 bs=512 count=2048
First command runs with /dev/zero, second command with a file gives CRC errors. So seems like the odroid-c2 hardware fails in the CRC count. So what have I done to my odroid?
Last edited by summers on Tue Feb 20, 2018 3:29 am, edited 3 times in total.

User avatar
rooted
Posts: 8277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 728 times
Been thanked: 306 times
Contact:

Re: EMMC problems

Post by rooted »

I think it may be your SD reader, which one are you using?

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: EMMC problems

Post by summers »

The sd card boots fine. The problem is the eMMC card.

I wrote on the eMMC card using the adaptor from Hardkernel, to sd card. That worked fine.

Problem is with the eMMC card plugged into the odroid-c2, thats where I get the error. The card is mounted directly onto to odroid-c2 onto the eMMC adaptor.

That I only get the problem when on the odroid-c2 have I caused a problem on the c2? Seems a fault there, as it only place a fault arises ...

User avatar
rooted
Posts: 8277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 728 times
Been thanked: 306 times
Contact:

Re: EMMC problems

Post by rooted »

summers wrote:The sd card boots fine. The problem is the eMMC card.

I wrote on the eMMC card using the adaptor from Hardkernel, to sd card. That worked fine.

Problem is with the eMMC card plugged into the odroid-c2, thats where I get the error. The card is mounted directly onto to odroid-c2 onto the eMMC adaptor.

That I only get the problem when on the odroid-c2 have I caused a problem on the c2? Seems a fault there, as it only place a fault arises ...
I mean the USB SD card reader you are using to write the eMMC.

Try writing and verifying with etcher.io if you haven't already

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: EMMC problems

Post by summers »

Well it goes through several.
. Hardkernel eMMC to mini SD adaptor
. Sandisk mini SD to full size SD
. integral SD to USB
This bit though work, it can read and write the eMMC fine.

The problem is when the eMMC is plugged directly into the odroid-c2, then *any* attempt to write information to the card gives CRC errors. So the problem seems with the odroid-c2 hardware ....

User avatar
rooted
Posts: 8277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 728 times
Been thanked: 306 times
Contact:

Re: EMMC problems

Post by rooted »

No you can't use a eMMC to micro SD to SD, something about this causes this type of issue.

You must use micro SD to USB.

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: EMMC problems

Post by summers »

Possible breakthrough - I had updated (via arch) to the latest 4.15 kernel.

I've just gone back to the default kernel, based on the hardkernel 3.14 kernel

With 3.14 I seem to be able to write to the eMMC. So its looking like a problem on the arch/linux-meson side of things ....

... I'll dig some more.

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: EMMC problems

Post by summers »

rooted wrote:No you can't use a eMMC to micro SD to SD, something about this causes this type of issue.

You must use micro SD to USB.
Well I've a samsung micro SD to USB convertor - alas thgough the hard kernel eMMC to mircoSD connected refused to click into the samsung, so the spring in the samsung always pushes the card out ...

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: EMMC problems

Post by summers »

And chasing back on the meson-gx-mmc development, this recent revert sounds like it could be the cause:

https://github.com/torvalds/linux/commi ... 82d61a5edf

Not convinced I want to compile my own kernel, so may have to wait for 4.16 to come out ...

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: EMMC problems

Post by summers »

And checking on the arch forum, and someone else had the same problem. And confirms its a timing problem on the oidroid-c2 with HS200 or HS400 eMMC cards.

Hack solution is to down clock the eMMC, thats done in the device tree. Need to modify the:

Code: Select all

			mmc@74000 {
				max-frequency = <0xbebc200>;
			};


to

Code: Select all

			mmc@74000 {
				max-frequency = <0x8f0d180>;
			};
That downclocks the eMMC to 150MHz. So slower access, but it cures the CRC errors.

Half suspect that HS200/HS400 doesn't cope well across the Hardkernel eMMC socket ...

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: eMMC problems [SOLVED - well work arround found]

Post by summers »

Easiest way I've found of solving the problem, is to have uboot change the device tree maximum speed. So somewhere in the uboot commands you need something like:

Code: Select all

fdt addr ${fdt_addr_r}
fdt set /soc/apb@d0000000/mmc@74000 max-frequency <0x8f0d180>
In arch, you add this into /boot/boot.txt, then compile with mksrc in the same directory.

That means that uboot sets the eMMC maximum speed to 150MHz, and for me that cures the CRC error.

User avatar
rooted
Posts: 8277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 728 times
Been thanked: 306 times
Contact:

Re: eMMC problems [SOLVED - well work arround found]

Post by rooted »

Nice job.

campbell
Posts: 433
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: C4, N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 9 times
Been thanked: 10 times
Contact:

Re: eMMC problems [SOLVED - well work arround found]

Post by campbell »

Have we reported this to the upstream devs? Several of us are having this problem - I'm having it with both a red and a black eMMC module, so it's not confined to one type of eMMC.

summers
Posts: 20
Joined: Sun Feb 18, 2018 2:36 am
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 0
Been thanked: 0
Contact:

Re: eMMC problems [SOLVED - well work arround found]

Post by summers »

Hi campbell. The question is what would we report upstream?

My understanding is that the linux kernel amlogic maintainers are aware that odroid-c2 + eMMC has this CRC problem. They know it can be cured by underclocking the eMMC. They have checked what should be done with amlogic. Sounds like other boards don't have this problem, when things done the default way.

So problem is sounding localised to the odroid-c2.

If this is the case, what would you report and to whom?

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 3 guests