Linux-mainline kernel更新方式是哪一个呀

请问kernel更新方式是什么?我使用make kernel-deb方式编译,使用https://docs.khadas.com/linux/zh-cn/vim3/UpgradeLinuxKernel.html的方式更新后,可以识别到pci桥,但是无法识别nvme硬盘了,请问是什么原因?

@qqqqqq20

  1. 确认你的VIM3已经切换到了PCIE
  1. 你的SSD是什么型号?

嗯嗯,这个设置过了,可以识别到pci桥呀;
ssd用的是aigo 的nvme p2000。

我不使用make kernel-deb生成的images时,可以识别nvme硬盘;但是一用这种方式替换了kernel就识别不到nvme硬盘了,只能识别到pci桥。

@qqqqqq20 你编译时的选项是怎么选择的?

make info可以查看到,贴出来。你使用的是最新的固件和最新的fenix代码么

image

fenix是十一月底下载的;固件是自己编译出来的替换的。

我只在uboot中设置了portmode为pcie。
linux中根本没有/sys/class/mcu/usb_pcie_switch_mode这个目录呀,麻烦您核实一下

@qqqqqq20

  1. 原始固件是哪个版本的,也是直接从fenix编译的么?
  2. 你修改了哪些内容

是的,原始固件就是从fenix编译出来的;
Linux下只是添加了一些打印;uboot把nvme和pcie编译进去了。

@qqqqqq20 那你还原你的修改,重新编译内核和uboot,然后替换,看看是不是正常的,如果是,就是你加的代码有问题

我试过不修改代码的方式。启动后可以识别pci桥和nvme硬盘,但是通过make kernel-deb更新kernel后,就只能识别pcie桥,识别不到nvme硬盘了。

linux中,dmesg 显示pcie: phy link never came up
会不会linux下也必须设置端口模式到pcie。网页中的Linux下的端口模式设置已经不能用了,没有对于的目录和文件

@qqqqqq20 这个是设置MCU的,设置过不用重复设置。你还原代码, 再编译包替换,如果可以识别,那就是你的修改的代码问题

Hi, sorry for replying in English as I don’t know Chinese (reading thread using Google Translate - and I’m excited how good it is at its job).

Recently I bought VIM3 Pro + second version of M.2 extender board and tried to use it with NVMe SSD.

Findings so far:

  1. Doesn’t work with last available official Ubuntu image based on mainline kernel 5.16rc2. There’s no /sys/class/mcu directory and its contents at all with this kernel version. Other symptoms are the same as @qqqqqq20 has - PCIe bridge is visible in lspci output but there are error lines in dmesg telling “phy link never came up”. NVMe SSD is not detected/recognized at all.
  2. Does work with Ubuntu image with kernel 4.9 from 2021/12/17. Directory /sys/class/mcu is available, its contents are as expected. lspci shows both PCIe bridge and NVMe device, /dev/nvme0n1 is in place and functional, nvme-cli utils are able to work with it, e.t.c., e.t.c.

By the looks of it problem seems to be in some incompatibilities with latest mainline kernel. I’m planning to do further experiments both with pre-built system images and also with custom kernel builds as my target goal is to get Rocky Linux 8 working on VIM3. Will report back any findings relevant to this forum thread if any.