Installing Ubuntu 21.04 on the HiFive Unmatched

freedom-u-sdk has an /etc/fstab line that tries to mount /dev/mmbclk0p3 on /boot.

Thanks alot everyone! That solved it and I should have suspected that given the speed of the error (compared to actual SD card processing).
I only had renamed the extlinux.conf to old.extlinux.conf - maybe that wasn’t sufficient.
Now just thinking of an efficient way to dd that image to nvme as well.
EDIT: booting with the aforementioned method renders the nvme drive invisible in ubuntu.
lsblk, nvme list (from nvme-cli) or /dev/nvme* shows nothing.
“nvme_load=YES run bootcmd_mmc0” didnt help either.
Any ideas? Sorry for this but it hopefully helps others that end up here as well.

Same here. No NVME device after booting from SD card. PCI seems non-functional.

ubuntu@ubuntu:~$ lspci                                                                                                                                                                                
00:00.0 PCI bridge: SiFive, Inc. FU740-C000 RISC-V SoC PCI Express x8 to AXI4 Bridge                                                                                                                  
ubuntu@ubuntu:~$

Here’s the PCI kernel messages from 21.10 and 21.04. Big difference. It doesn’t look like 21.10 is enumerating the bus.

21.10

Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie: host bridge /soc/pcie@e00000000 ranges:
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie:       IO 0x0060080000..0x006008ffff -> 0x0060080000
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie:      MEM 0x0060090000..0x0070ffffff -> 0x0060090000
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie:      MEM 0x2000000000..0x3fffffffff -> 0x2000000000
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie: invalid resource
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie: iATU unroll: enabled
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie: Detected iATU regions: 8 outbound, 8 inbound
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie: Link up
Oct 04 09:23:40 ubuntu kernel: fu740-pcie e00000000.pcie: PCI host bridge to bus 0000:00
Oct 04 09:23:40 ubuntu kernel: pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x60080000-0x6008ffff])
Oct 04 09:23:40 ubuntu kernel: pci_bus 0000:00: root bus resource [mem 0x60090000-0x70ffffff]
Oct 04 09:23:40 ubuntu kernel: pci_bus 0000:00: root bus resource [bus 00-ff]
Oct 04 09:23:40 ubuntu kernel: pci_bus 0000:00: root bus resource [mem 0x2000000000-0x3fffffffff pref]
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: [f15e:0000] type 01 class 0x060400
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: supports D1
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: PME# supported from D0 D1 D3hot
Oct 04 09:23:40 ubuntu kernel: pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff]
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: BAR 6: assigned [mem 0x60090000-0x6009ffff pref]
Oct 04 09:23:40 ubuntu kernel: pci 0000:00:00.0: PCI bridge to [bus 01]
Oct 04 09:23:40 ubuntu kernel: pcieport 0000:00:00.0: AER: enabled with IRQ 46

21.04

Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie: host bridge /soc/pcie@e00000000 ranges:
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie:       IO 0x0060080000..0x006008ffff -> 0x0060080000
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie:      MEM 0x0060090000..0x0070ffffff -> 0x0060090000
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie:      MEM 0x2000000000..0x3fffffffff -> 0x2000000000
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie: invalid resource
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie: iATU unroll: enabled
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie: Detected iATU regions: 8 outbound, 8 inbound
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie: Link up
Oct 19 03:52:35 riscv64 kernel: fu740-pcie e00000000.pcie: PCI host bridge to bus 0000:00
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:00: root bus resource [bus 00-ff]
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x60080000-0x6008ffff])
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:00: root bus resource [mem 0x60090000-0x70ffffff]
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:00: root bus resource [mem 0x2000000000-0x3fffffffff pref]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: [f15e:0000] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: supports D1
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: PME# supported from D0 D1 D3hot
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0: [1b21:2824] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0: enabling Extended Tags
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:00.0: [1b21:2824] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:00.0: enabling Extended Tags
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0: [1b21:2824] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0: enabling Extended Tags
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0: PME# supported from D0 D3hot D3cold
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:03.0: [1b21:2824] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:03.0: enabling Extended Tags
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:03.0: PME# supported from D0 D3hot D3cold
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0: [1b21:2824] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0: enabling Extended Tags
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0: PME# supported from D0 D3hot D3cold
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:08.0: [1b21:2824] type 01 class 0x060400
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:08.0: enabling Extended Tags
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:08.0: PME# supported from D0 D3hot D3cold
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0: bridge configuration invalid ([bus 00-00]), reconfiguring
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:08.0: bridge configuration invalid ([bus 00-00]), reconfiguring
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03
Oct 19 03:52:35 riscv64 kernel: pci 0000:04:00.0: [1b21:1142] type 00 class 0x0c0330
Oct 19 03:52:35 riscv64 kernel: pci 0000:04:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
Oct 19 03:52:35 riscv64 kernel: pci 0000:04:00.0: PME# supported from D3cold
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:04: busn_res: [bus 04-ff] end is updated to 04
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 05
Oct 19 03:52:35 riscv64 kernel: pci 0000:06:00.0: [15b7:5002] type 00 class 0x010802
Oct 19 03:52:35 riscv64 kernel: pci 0000:06:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
Oct 19 03:52:35 riscv64 kernel: pci 0000:06:00.0: reg 0x20: [mem 0x00000000-0x000000ff 64bit]
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:06: busn_res: [bus 06-ff] end is updated to 06
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:07: busn_res: [bus 07-ff] end is updated to 07
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 07
Oct 19 03:52:35 riscv64 kernel: pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 07
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: BAR 14: assigned [mem 0x60200000-0x603fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: BAR 6: assigned [mem 0x60090000-0x6009ffff pref]
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0: BAR 14: assigned [mem 0x60200000-0x603fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0: BAR 14: assigned [mem 0x60200000-0x602fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0: BAR 14: assigned [mem 0x60300000-0x603fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:00.0: PCI bridge to [bus 03]
Oct 19 03:52:35 riscv64 kernel: pci 0000:04:00.0: BAR 0: assigned [mem 0x60200000-0x60207fff 64bit]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0: PCI bridge to [bus 04]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:02.0:   bridge window [mem 0x60200000-0x602fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:03.0: PCI bridge to [bus 05]
Oct 19 03:52:35 riscv64 kernel: pci 0000:06:00.0: BAR 0: assigned [mem 0x60300000-0x60303fff 64bit]
Oct 19 03:52:35 riscv64 kernel: pci 0000:06:00.0: BAR 4: assigned [mem 0x60304000-0x603040ff 64bit]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0: PCI bridge to [bus 06]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:04.0:   bridge window [mem 0x60300000-0x603fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:02:08.0: PCI bridge to [bus 07]
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0: PCI bridge to [bus 02-07]
Oct 19 03:52:35 riscv64 kernel: pci 0000:01:00.0:   bridge window [mem 0x60200000-0x603fffff]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0: PCI bridge to [bus 01-07]
Oct 19 03:52:35 riscv64 kernel: pci 0000:00:00.0:   bridge window [mem 0x60200000-0x603fffff]
Oct 19 03:52:35 riscv64 kernel: pcieport 0000:00:00.0: AER: enabled with IRQ 46
Oct 19 03:52:35 riscv64 kernel: pcieport 0000:01:00.0: enabling device (0000 -> 0002)
Oct 19 03:52:35 riscv64 kernel: pcieport 0000:02:02.0: enabling device (0000 -> 0002)
Oct 19 03:52:35 riscv64 kernel: pcieport 0000:02:04.0: enabling device (0000 -> 0002)
Oct 19 03:52:35 riscv64 kernel: pci 0000:04:00.0: enabling device (0000 -> 0002)

21.10 is working fine for me from NVMe [initial boot via SDCard]

Radeon RX 550 working with no issues


I did the 21.04 → 21.10 upgrade in-place [the normal way], and didn’t touch the image I had on the microSDCard
 [it wasn’t in the slot
].

I’m trying to re-image the entire NVME. A completely fresh install.

I think trying to boot with run bootcmd_mmc0 is causing the problem.

The distro commands are dodgy, at least in the version of U-Boot shipped with the board; bootcmd_mmc0 won’t enumerate the PCI bus (and thus USB too), and bootcmd_nvme0 will enumerate the PCI bus but not USB, so you can end up with missing devices in your bootloader. It’s quite possible something broke in the Linux kernel such that it is now relying on the firmware having enumerated, and allocated bus numbers and windows for, the PCI bus.

I keep forgetting about this u-boot issue. Doing “pci enum” before “run bootcmd_mmc0” solves the problem, and Ubuntu 21.10 comes up able to mount the nvme drive.

3 Likes

Yup, that’s the trick.

Thank you very much, that was most helpful!