Odroid C2 - eMMC 5.1 Module can't boot ?

Discussion about U-Boot and the kernel.

Odroid C2 - eMMC 5.1 Module can't boot ?

Postby Sagittarius » Sat Mar 16, 2019 2:21 pm

First, thank you all the archlinuxarm devs for your very good work.

Then, I'd like to ask if somehow it is normal that Odroid C2 can't boot on emmc with kernel 5.0.2-1-ARCH:

Code: Select all
dmesg|grep error
[    2.803254] mmc0: error -22 whilst initialising MMC card
sudo journalctl -b -p err
-- Logs begin at Fri 2018-04-13 02:25:13 UTC, end at Sat 2019-03-16 14:14:44 UTC. --
févr. 21 13:43:42 Odroid-C2 kernel: mmc0: error -22 whilst initialising MMC card


I'm sure bootloader files are well flashed on emmc for the blue led blinks at boot and also because the same emmc plugged into the sdcard slot via an adapter boots with no issue.

My config (microsd same as emmcc):
Code: Select all
sudo inxi -Fxz
System:    Host: Odroid-C2 Kernel: 5.0.2-1-ARCH aarch64 bits: 64 compiler: gcc v: 8.2.1 Console: tty 0 Distro: Arch Linux ARM
Machine:   Type: ARM Device System: Hardkernel ODROID-C2 details: N/A serial: <filter>
CPU:       Topology: Quad Core model: N/A variant: cortex-a53 bits: 64 type: MCP arch: ARMv8 rev: 4
           features: Use -f option to see features bogomips: 0
           Speed: N/A min/max: N/A Core speeds (MHz): No speed data found for 4 cores.
Graphics:  Device-1: meson-gxbb-dw-hdmi driver: meson_dw_hdmi v: kernel bus ID: N/A
           Device-2: meson-gxbb-mali driver: N/A bus ID: N/A
           Display: server: X.org 1.20.4 driver: modesetting unloaded: fbdev tty: 140x27
           Message: Advanced graphics data unavailable in console for root.
Audio:     Device-1: meson-gxbb-dw-hdmi driver: meson_dw_hdmi v: kernel bus ID: N/A
           Sound Server: ALSA v: k5.0.2-1-ARCH
Network:   Device-1: meson-gx-dwmac driver: meson8b_dwmac v: N/A port: N/A bus ID: N/A
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    Local Storage: total: 29.72 GiB used: 10.14 GiB (34.1%)
           ID-1: /dev/mmcblk1 model: SE32G size: 29.72 GiB
Partition: ID-1: / size: 29.13 GiB used: 10.14 GiB (34.8%) fs: ext4 dev: /dev/mmcblk1p1
Sensors:   Message: No sensors data was found. Is sensors configured?
Info:      Processes: 121 Uptime: 11m Memory: 1.92 GiB used: 380.6 MiB (19.4%) Init: systemd Compilers: gcc: 8.2.1 Shell: bash
           v: 5.0.0 inxi: 3.0.30


It's not a problem for me if it's due to the lack of support of the emmc with this kernel.
The same emmc version (from SanDisk EDEC/MMCA Version 5.1: HS400 interface with 8bit DDR mode) boots with no issue on my Odroid-C1 with the 3.x kernel.
4 x Dockstar - 2 x GoFlexNet booting on NFS - 1 x Odroid C1+ - 1 x Odroid C2
Sagittarius
 
Posts: 48
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby uncarvedblock » Mon Mar 18, 2019 3:51 pm

My C2 boots from an emmc on aarch64 however, my brother's will not.

I have been following a discussion over on the hardkernel fourms. Someone there has suggested that a kernel commit adjusting the clock phase of the emmc (https://lkml.org/lkml/2018/12/6/746) may be the cause. Not sure if anyone has tried recompiling the kernel, reverting the patch to verify it though.
uncarvedblock
 
Posts: 3
Joined: Mon Mar 18, 2019 3:40 pm

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby Sagittarius » Mon Mar 18, 2019 5:34 pm

Thank you very much for the information uncarvedblock.
It makes sense.

And I admit, this emmc card (eMMC 5.1 from Sandisk) may not be widely distributed. It comes from Ameridroid and it's not an official Hardkernel emmc.
4 x Dockstar - 2 x GoFlexNet booting on NFS - 1 x Odroid C1+ - 1 x Odroid C2
Sagittarius
 
Posts: 48
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby pigiron » Fri Apr 05, 2019 6:12 pm

I wrote the following, then stumbled upon your post, so I'll put it here because it may be related. But I'm running the standard "Red Dot" 32GB eMMC from Ameridroid. it may (or may not) be a "eMMC Version 4.5 - HS200 interface with 8bit DDR mode from Samsung". In my case, it had been working well...


After upgrading my Odroid C2 (using the mainline kernel and eMMC storage) to the latest level, it failed to boot. Attached the serial USB dongle, rebooted, and captured the failing output.

The group of major error messages was:
Code: Select all
...
Waiting 10 seconds for device /dev/disk/by-partuuid/8f3d0000-01 ...
ERROR: device 'PARTUUID=8f3d0000-01' not found. Skipping fsck.
:: mounting 'PARTUUID=8f3d0000-01' on real root
mount: /new_root: can't find PARTUUID=8f3d0000-01.
You are now being dropped into an emergency shell.

Also, none of the normal /dev/mmcblk* files were created.

Downgraded the failing linux-aarch64 5.0.5-1 mainline kernel back to my previous linux-aarch64 4.20.13-1 package and the boots are successful again.

When I compare the failing (5.0.5) dmesg log to the successful (4.20.13) log I'm fairly sure the problem occurs at this (top) line in the failing log, then it quickly produces the bottom line:
Code: Select all
[    2.790141] meson-gx-mmc d0074000.mmc: no support for card's volts
...
[    2.799730] mmc0: error -22 whilst initialising MMC card

EDIT: @uncarvedblock - Good catch! But the linux-aarch64 5.0.5-1 package had that change included. It was dropped in commit c5e1766d3ac0abe4dde14e7ee620f6f3ac2a0bb9 in Linus' git tree at v5.0-rc1.

Noticed that /boot/dtbs/amlogic/meson-gxbb-odroidc2.dtb has many changes between those mainline versions, mainly due to clocking. But other components with those changes seem like they worked correctly. And the mmc-ddr-1_8v and mmc-hs200-1_8v rules under mmc@74000 did not change. So I'm guessing that's not the problem, but OFDT is unfamiliar terrain for me.

Poked around in the kernel source code for quite a while, but didn't find the "smoking gun", or the git commit that caused the problem between those two versions. But I noticed that the 5.1 version of the kernel has changed many of the files in the drivers/mmc/ directory from version 5.0, including functions dealing with mmc voltage probing. So I think I'm just going to hang around with the 4.20.13 kernel until 5.1 is released, then try it again... and begin some new adventures. Actually, the recent mainline kernels had been working well for me until now. But I run headless.
pigiron
 
Posts: 6
Joined: Fri Apr 05, 2019 3:48 pm

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby Sagittarius » Sat May 04, 2019 7:02 am

@pigiron

Thank you very much for this well documented answer.
I'm going to try again to boot on the emmc as soon as the kernel 5.1 is available.
4 x Dockstar - 2 x GoFlexNet booting on NFS - 1 x Odroid C1+ - 1 x Odroid C2
Sagittarius
 
Posts: 48
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby pigiron » Sat May 11, 2019 9:05 pm

Thought I'd give an update.

Still had the same failure with the 5.1 kernel. So I rolled up my sleeves and performed a bunch of "git bisect" kernel
compiles until it pointed to the commit that caused the problem:
arm64: dts: meson: disable pad bias for mmc pinmuxes
96a13691c1ddfafc301d1ee451d91fc2cca48d27

When I reverted that commit in /boot/dtbs/amlogic/meson-gxbb-odroidc2.dtb it now boots successfully.

You can see that commit here (it was dropped in kernel version 5.0-rc1):

https://patchwork.kernel.org/patch/10675989/

I reported this info upstream, so we'll see what they do with it.
pigiron
 
Posts: 6
Joined: Fri Apr 05, 2019 3:48 pm

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby Sagittarius » Sun May 19, 2019 6:20 am

@pigiron

Excellent !

Thank you so much for reporting.

I'm going to try with this kernel: Linux Odroid-C2 5.1.2-1-ARCH #1 SMP Wed May 15 00:39:19 UTC 2019 aarch64 GNU/Linux
4 x Dockstar - 2 x GoFlexNet booting on NFS - 1 x Odroid C1+ - 1 x Odroid C2
Sagittarius
 
Posts: 48
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby Sagittarius » Thu May 23, 2019 3:07 pm

For information, it's not ready yet for the kernel v5.1.3
4 x Dockstar - 2 x GoFlexNet booting on NFS - 1 x Odroid C1+ - 1 x Odroid C2
Sagittarius
 
Posts: 48
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby lcard » Wed Jun 19, 2019 10:05 am

I think this is still a problem as of today with kernel 5.1.11.

I happen to have two C2 boards. One has a eMMC from HardKernel, the other has the Ameridroid eMMC. HardKernel's eMMC seems to work fine with kernel 5.1.11. Ameridroid's eMMC does not.
lcard
 
Posts: 4
Joined: Tue Oct 02, 2018 12:38 pm

Re: Odroid C2 - eMMC 5.1 Module can't boot ?

Postby lcard » Thu Jul 11, 2019 12:12 pm

@pigiron

I used your May 11 post to get a kernel to boot an eMMC that would not otherwise. I'm now running 5.2.0-1. Thank you very much.

I have not compiled my own kernel since circa 2006, but will read a little more about submitting a patch upstream to see if we can at least have the linux-aarch64 PKGBUILD work correctly for the C2...
lcard
 
Posts: 4
Joined: Tue Oct 02, 2018 12:38 pm

Next

Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 0 guests