0.7.9 Linux release from ayufan
#42
(09-02-2018, 07:16 AM)dukla2000 Wrote:
(08-31-2018, 12:05 PM)Deathcrow Wrote: Now to my question: Is it possible to get the eMMC module to work with linux-mainline kernel (4.18-rc8)? I encounter the following error:
...
I also tried to compile kernel for myself and tried the torvalds 4.19 sources. Both with similar results. 4.4 kernel works without problems.
...
Is usage of eMMC module currently impossible with mainline kernel?

I have the exact same fault with 4.18 rc8 from Ayufan, never a problem with 4.4. I suspect it is fixable - my guess is something DTS? But way beyond my skills so have to sit and wait. (I was gonna wait till Ayufan does a 4.18 "final" release and then figure a thread on what works/does not at 4.18. Because the memory and NVMe stuff is really enticing, it is a question if I can work around the limitations. e.g. also lots of modules missing in Ayufan rc builds, e.g. btusb)


I had these same problems too with 32GB Foresee card + mainline kernel. Two 16GB Foresee cards were working just fine. After comparing boot logs I found out that 32GB Foresee card supports command queue (CMDQ) but 16GB ones don't. CMDQ support also be checked with mmc command.

Here's a snippet from boot log ("Command Queue Engine enabled" gave it away, it was missing from boot with 16GB card):
Code:
$ grep mmc1 bootlog-4.19.0-1073-ayufan-ga6e013135a6e.txt | head
[    3.635052] mmc1: CQHCI version 5.10
[    3.661556] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
[    3.719489] mmc1: Command Queue Engine enabled
[    3.720004] mmc1: new HS200 MMC card at address 0001
[    3.721546] mmcblk1: mmc1:0001 NCard  28.9 GiB
[    3.722177] mmcblk1boot0: mmc1:0001 NCard  partition 1 4.00 MiB
[    3.722961] mmcblk1boot1: mmc1:0001 NCard  partition 2 4.00 MiB
[    3.723748] mmcblk1rpmb: mmc1:0001 NCard  partition 3 4.00 MiB, chardev (236:0)
[    4.016480] mmc1: running CQE recovery
[   64.505863] mmc1: cqhci: timeout for tag 5

32GB card's CMDQ as seen by mmc command (be carefull with it if you use other commands than 'extcsd read', man says many of them cause "one-time programmable (unreversible) changes"!):
Code:
$ sudo mmc extcsd read /dev/mmcblk1 | grep CMDQ
Command Queue Support [CMDQ_SUPPORT]: 0x01
Command Queue Depth [CMDQ_DEPTH]: 8
Command Enabled [CMDQ_MODE_EN]: 0x00


So I guessed CMDQ was the problem and decided to add a new kernel command line parameter which could be used to disable CMDQ. After little kernel hacking (mmc: core: Add MMC Command Queue Support kernel parameter) and new parameter added to command line:
Code:
$ dmesg | egrep "Linux version|mmc1"
[    0.000000] Linux version 4.19.0-dev (nuumio@cmbuilder) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #10 SMP PREEMPT Mon Nov 19 13:34:57 EET 2018
[    4.226195] mmc1: CQHCI version 5.10
[    4.252623] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
[    4.315567] mmc1: CMDQ support disabled in kernel
[    4.316014] mmc1: new HS200 MMC card at address 0001
[    4.317121] mmcblk1: mmc1:0001 NCard  28.9 GiB
[    4.317923] mmcblk1boot0: mmc1:0001 NCard  partition 1 4.00 MiB
[    4.318831] mmcblk1boot1: mmc1:0001 NCard  partition 2 4.00 MiB
[    4.319497] mmcblk1rpmb: mmc1:0001 NCard  partition 3 4.00 MiB, chardev (236:0)

$ sudo mmc extcsd read /dev/mmcblk1 | grep CMDQ
[sudo] password for rock64:
Command Queue Support [CMDQ_SUPPORT]: 0x01
Command Queue Depth [CMDQ_DEPTH]: 8
Command Enabled [CMDQ_MODE_EN]: 0x00

$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mtdblock0     31:0    0    4M  0 disk
mtdblock1     31:1    0   32K  0 disk
mtdblock2     31:2    0  256K  0 disk
mmcblk1      179:0    0 28.9G  0 disk
|-mmcblk1p1  179:1    0  3.9M  0 part
|-mmcblk1p2  179:2    0   64K  0 part
|-mmcblk1p3  179:3    0    4M  0 part
|-mmcblk1p4  179:4    0    4M  0 part
|-mmcblk1p5  179:5    0    4M  0 part
|-mmcblk1p6  179:6    0  112M  0 part /boot/efi
`-mmcblk1p7  179:7    0 28.8G  0 part /
mmcblk1boot0 179:32   0    4M  1 disk
mmcblk1boot1 179:64   0    4M  1 disk

$ head /boot/extlinux/extlinux.conf
timeout 10
menu title select kernel
default kernel-4.19.0-dev

label kernel-4.19.0-dev
    kernel /boot/vmlinuz-4.19.0-dev
    initrd /boot/initrd.img-4.19.0-dev
    devicetreedir /boot/dtbs/4.19.0-dev
    append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=linux-root rootwait rootfstype=ext4 mmc_cmdqueue=off

I now have 32GB Foresee card working with mainline kernel. Of course there's the trouble of manually adding the new parameter to extlinux.conf but it's certainly less annoying than non-booting system Big Grin This is not a fix for the problem and I don't know if the real problem is with eMMC card, driver or RP64 itself. But at least there's now a workaround. I'm just about to open a pull request for the change to ayufan's repo so it can be merged if seen appropriate.


Messages In This Thread
0.7.9 Linux release from ayufan - by Luke - 07-24-2018, 03:31 PM
RE: 0.7.8 Linux release from ayufan - by ab1jx - 07-24-2018, 04:52 PM
RE: 0.7.8 Linux release from ayufan - by Luke - 07-25-2018, 03:52 AM
RE: 0.7.8 Linux release from ayufan - by ab1jx - 07-27-2018, 06:09 PM
RE: 0.7.8 Linux release from ayufan - by ab1jx - 07-28-2018, 06:36 AM
RE: 0.7.9 Linux release from ayufan - by Luke - 07-30-2018, 05:01 AM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-05-2018, 02:37 PM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-06-2018, 09:45 AM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-06-2018, 11:17 AM
RE: 0.7.9 Linux release from ayufan - by lucho - 08-07-2018, 03:41 AM
RE: 0.7.9 Linux release from ayufan - by lucho - 08-09-2018, 05:08 AM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-07-2018, 04:45 PM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-07-2018, 08:15 PM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-07-2018, 06:35 PM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-07-2018, 06:56 PM
RE: 0.7.9 Linux release from ayufan - by ab1jx - 08-08-2018, 01:44 PM
RE: 0.7.9 Linux release from ayufan - by Bullet64 - 08-08-2018, 09:24 PM
RE: 0.7.9 Linux release from ayufan - by festor89 - 11-16-2018, 03:54 PM
RE: 0.7.9 Linux release from ayufan - by festor89 - 11-17-2018, 02:35 AM
RE: 0.7.9 Linux release from ayufan - by Bullet64 - 11-17-2018, 03:26 AM
RE: 0.7.9 Linux release from ayufan - by nuumio - 11-19-2018, 08:04 AM
RE: 0.7.9 Linux release from ayufan - by nuumio - 12-04-2018, 02:03 PM
RE: 0.7.9 Linux release from ayufan - by Luke - 02-25-2019, 02:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  irradium (based on crux linux) RockPro64 riscv64, aarch64 mara 5 1,142 07-20-2024, 11:18 PM
Last Post: mara
Exclamation Ethernet regression on Linux Kernel 6.5.4? Deathcrow 3 1,149 09-22-2023, 04:27 AM
Last Post: diederik
  Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 Thisone 4 1,747 07-14-2023, 04:22 AM
Last Post: hunderteins
  GPIO on Ayufan 0.9.14 Build Thisone 7 2,691 04-23-2023, 01:32 PM
Last Post: diederik
  Linux laptop does not detect the board when plugged in via USB soupy 1 4,245 04-13-2023, 03:01 AM
Last Post: Reynold Grady
  RockPro64 linux console video mode callegar 0 988 09-06-2022, 02:32 PM
Last Post: callegar
Brick Maintained Linux booting from eMMC ootoovak 10 8,987 04-30-2022, 03:57 PM
Last Post: TRS-80
  Armbian 22.02 Release Announcement TRS-80 0 1,262 02-28-2022, 05:08 PM
Last Post: TRS-80
  How I Got Fedora Linux to Boot From eMMC (or microSD, for that matter) whitecat23 4 4,797 01-03-2022, 10:32 AM
Last Post: whitecat23
  Compiling ayufan mainline - DT-overlay missing Mentaluproar 0 1,558 07-24-2021, 09:46 PM
Last Post: Mentaluproar

Forum Jump:


Users browsing this thread: 1 Guest(s)