Debian / Ubuntu Kernel for BPI-R3 Mini (MT7986) – Anyone Built One?

I think your AI gave the answer already.

1x M.2 Key B USB interface
1x M.2 KEY M PCIe interface

You type a long story , but which hardware are you trying in which m 2 slot?

As he uses a modem and a nvme normally one one combination is possible without adapters. Nvme in key-m which should work and modem in key-b which is recognized via usb (afair no pcie there).

So then everything functions as it should then.

atf.dts (28.2 KB) ubuntu_clean_new.txt (27.1 KB) Something I’ve been working on lately—can you verify it?

I found an article that may explain the PCIe/NVMe issue I’m experiencing on the Banana Pi BPI-R3 Mini:

After reading it, I think it explains why my Crucial P310 2 TB NVMe SSD is not detected automatically after every reboot.

What the article explains

The normal boot chain is:

BootROM ↓ Stock U-Boot ↓ Linux

However, the article states that stock OpenWrt/U-Boot does not initialize the PCIe controller on the BPI-R3 Mini, so it cannot boot directly from an NVMe SSD.

To work around this, the author uses a modified U-Boot with PCIe support.

The modified bootloader executes:

pci enum nvme scan

before booting Debian.

What these commands do

pci enum

Initializes the MT7986 PCIe controller.

Trains the PCIe link.

Detects PCIe devices.

Example:

Before:

PCIe controller └── No devices detected

After:

PCIe controller └── NVMe SSD found

Then:

nvme scan

searches the PCIe bus for NVMe drives.

Example output:

NVMe 0: Model: Crucial P310 2TB Namespace: 1

After that, U-Boot can load EFI/GRUB from the SSD and boot Linux.

Why I think this relates to my issue

On my BPI-R3 Mini:

The Crucial P310 works in a USB adapter.

The SSD can be detected after I manually run initialization commands.

After a reset, it disappears again until I reinitialize it.

This makes me think the SSD itself is compatible, but the PCIe controller is not being initialized automatically during the boot process.

My question

Could this be caused by differences in:

BL2

BL31/FIP

U-Boot

Device Tree

PCIe initialization sequence

between the stock firmware and the modified U-Boot described in the article?

I’d really appreciate your thoughts on whether this is the likely root cause and what would be the best way to enable reliable PCIe/NVMe initialization on every boot.

Thank you!

Afair stock uboot misses the pcie nodes in dts as my attempt to upstream them was rejected due to OF_upstream attempts

1 Like

Is it possible have SSD support by any chance in future.now I’m trying to upgrade Emma to256gb if it’s succeed I would be happy :blush: and SSD is in my favour.

Just try a different nvme, looks like your make/model has to many troubles with the board.