WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CM4 no PCI-E SSD detected  (Read 2956 times)

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
CM4 no PCI-E SSD detected
« on: July 14, 2021, 09:11:21 AM »
I installed the latest 64 bit 13.0 piCore on my CM4 module.

Code: [Select]
Disk /dev/mmcblk0: 29 GB, 31268536320 bytes, 61071360 sectors
954240 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1    128,0,1     127,3,16          8192     139263     131072 64.0M  c Win95 FAT32 (LBA)
/dev/mmcblk0p2    128,0,1     639,3,16        139264     172031      32768 16.0M 83 Linux

No PCI-E M.2 SSD seems to be present. I'm suspecting there is missing drivers, but it works on raspbian.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: CM4 no PCI-E SSD detected
« Reply #1 on: July 14, 2021, 04:14:12 PM »
piCore is not RaspiOS.   While support for the CM4 is there, there is no standard CM4 hardware.  Very few drivers are included in the initrd.    You will need to build your own packages of drivers needed for that to work.  Popular ones are pre-packaged into extensions.   The complete set of kernel modules is provided in an archive on the repo.

http://www.tinycorelinux.net/13.x/aarch64/releases/RPi/src/kernel/
« Last Edit: July 14, 2021, 04:18:08 PM by Paul_123 »

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
Re: CM4 no PCI-E SSD detected
« Reply #2 on: July 14, 2021, 04:55:24 PM »
When you say the complete set, do you mean if I compile all kernel modules it will also include the ones for CM4 or do I have to get them from the raspbian repo?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11699
Re: CM4 no PCI-E SSD detected
« Reply #3 on: July 14, 2021, 05:07:00 PM »
Hi mbivol10
Is it possible you're missing a kernel module? If you run  lsmod  on raspbian, do you see any needed modules that
don't show up when you run  lsmod  on piCore? If you do, see if it's available in  modules-5.10.39-piCore-v8.tar.xz
which can be downloaded from here:
http://tinycorelinux.net/13.x/aarch64/releases/RPi/src/kernel/

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
Re: CM4 no PCI-E SSD detected
« Reply #4 on: July 14, 2021, 05:30:42 PM »
I'm hoping I don't have to recompile the kernel.

Code: [Select]
tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
squashfs               49152 25
zram                   28672  1
zsmalloc               36864  1 zram
raspberrypi_hwmon      16384  0

it does look like there are no modules loaded. I'll copy them across from raspbian if I can.

I'll check if they are in the modules tar.xz archive. otherwise:
there is this repo: https://github.com/raspberrypi/firmware which contains drivers it seems.
If plan A doesn't work, I'll try compiling them based on the kernel version of the picore.
« Last Edit: July 14, 2021, 05:32:55 PM by mbivol10 »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: CM4 no PCI-E SSD detected
« Reply #5 on: July 14, 2021, 05:49:41 PM »
The kernels for piCore are built with almost the identical config as RPi Foundation uses.   So all the possible modules you might need are in that archive.

You cannot use modules from RaspiOS or their github.
« Last Edit: July 14, 2021, 05:52:25 PM by Paul_123 »

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
Re: CM4 no PCI-E SSD detected
« Reply #6 on: July 15, 2021, 04:11:32 AM »
Oh, Thank you.

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
Re: CM4 no PCI-E SSD detected
« Reply #7 on: July 15, 2021, 04:19:55 AM »
is it ok if build & source is missing ?

Code: [Select]
tc@box:/mnt/mmcblk0p2/modules/lib/modules/5.10.39-piCore-v8$ ls -la
total 2436
drwxr-xr-x    3 tc       staff         4096 Jul 15 08:16 ./
drwxr-xr-x    3 tc       staff         4096 Jul 15 08:16 ../
lrwxrwxrwx    1 tc       staff           63 Jul 15 08:16 build -> /home/paul/git/picoreplayer-picoreplayer/build/kernel/linux-git
drwxr-xr-x   11 tc       staff         4096 Jul 15 08:16 kernel/
-rw-r--r--    1 tc       staff       587240 Jun  6 15:21 modules.alias
-rw-r--r--    1 tc       staff       609942 Jun  6 15:21 modules.alias.bin
-rw-r--r--    1 tc       staff        14645 Jun  6 15:21 modules.builtin
-rw-r--r--    1 tc       staff        27375 Jun  6 15:21 modules.builtin.alias.bin
-rw-r--r--    1 tc       staff        16186 Jun  6 15:21 modules.builtin.bin
-rw-r--r--    1 tc       staff        82135 Jun  6 15:21 modules.builtin.modinfo
-rw-r--r--    1 tc       staff       196349 Jun  6 15:21 modules.dep
-rw-r--r--    1 tc       staff       271814 Jun  6 15:21 modules.dep.bin
-rw-r--r--    1 tc       staff          352 Jun  6 15:21 modules.devname
-rw-r--r--    1 tc       staff        65107 Jun  6 15:21 modules.order
-rw-r--r--    1 tc       staff          380 Jun  6 15:21 modules.softdep
-rw-r--r--    1 tc       staff       259370 Jun  6 15:21 modules.symbols
-rw-r--r--    1 tc       staff       316362 Jun  6 15:21 modules.symbols.bin
lrwxrwxrwx    1 tc       staff           63 Jul 15 08:16 source -> /home/paul/git/picoreplayer-picoreplayer/build/kernel/linux-git

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14850
Re: CM4 no PCI-E SSD detected
« Reply #8 on: July 15, 2021, 04:44:30 AM »
build and source symlinks are sometimes needed to compile out of tree modules, but are not required for normal operations

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14850
Re: CM4 no PCI-E SSD detected
« Reply #9 on: July 15, 2021, 06:13:07 AM »
From the piCore64 kernel config: http://tinycorelinux.net/13.x/aarch64/releases/RPi/src/kernel/5.10.39-piCore-v8_.config.xz

Code: [Select]
# PCI controller drivers
...
CONFIG_PCIE_BRCMSTB=y
..which might mean your pci-e ssd controller is compiled into the kernel.

In any case: http://tinycorelinux.net/13.x/aarch64/releases/RPi/src/kernel/modules-5.10.39-piCore-v8.tar.xz

..is missing drivers/pci/pcie, so nothing has been compiled as a module.

Does:
Code: [Select]
$ dmesg | grep -i pci..turn up anything useful in comparison with the raspberrypi os?

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
Re: CM4 no PCI-E SSD detected
« Reply #10 on: July 16, 2021, 01:23:50 PM »
No, dmsg command you gave me returns nothing.

I am also afraid the flag
Code: [Select]
CONFIG_BLK_DEV_NVME=y might be missing. I'll try install the suggested driver path you mentioned.


also version 13.0 64 bit has typing lag sometimes. I wonder if that could possibly be from lack of power.

Thank you for all the support so far.

Offline mbivol10

  • Newbie
  • *
  • Posts: 39
Re: CM4 no PCI-E SSD detected
« Reply #11 on: July 17, 2021, 07:39:27 AM »
I ran dmesg command on the raspbian:


Code: [Select]
pi@raspberrypi:~ $ dmesg | grep -i pci
[    1.166738] PCI: CLS 0 bytes, default 64
[    1.190139] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.190170] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.190250] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.190339] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x003fffffff -> 0x0400000000
[    1.783171] brcm-pcie fd500000.pcie: link down

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: CM4 no PCI-E SSD detected
« Reply #12 on: July 17, 2021, 08:34:10 AM »
Compare configs between what is reported in /proc/config.gz. On both pCP and raspiOS.  But as I told you we use the rpi defconfigs to compile, I only change the local version.

Partial dmesg is not useful.   Also look at every module that is loaded in raspbian.   Look up information about the module, it will point you to what you need.