Missing "SPI Flashing Step"

Hi all,

I bought a Rock Pi 4A v1.4. I would like to follow the guide (https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD) to install NVME.

The guide said the step to upgrade SPI image should have following output
“”" You are currently running on board:
ROCK PI 4B
There will be two steps that you have to confirm. One is upgrading bootloader on SPI Flash.
The other is upgrading bootloader on eMMC or uSD card.

Step one: upgrade bootloader on SPI Flash
One boot device, SPI Flash, is found, would you like to upgrade bootloader on it?
The installation would cost several minutes.
If yes, type Y/y. If no, type N/n."""

However, what I can see is “”"
rock@rockpi4a:~$ sudo /usr/local/sbin/rockpi4a_upgrade_bootloader.sh
[sudo] password for rock:
You are currently running on board:
ROCK PI 4A
There will be two steps that you have to confirm. One is upgrading bootloader on SPI Flash.
The other is upgrading bootloader on eMMC or uSD card.

Step two: upgrade bootloader on uSD card or eMMC
Boot device, uSD card or eMMC, is found. Would you like to upgrade bootloader on it?
If yes, type Y/y. If no, type N/n. “”"

The step of upgrade bootloader on SPI Flash is missing…

What should I do next? Appreciate for any help.

Best regards,
William

/dev/mtd* devices can be found.

rock@rockpi4a:~$ ls -ld /dev/mtd*
crw------- 1 root root 90, 0 Mar 18 05:36 /dev/mtd0
crw------- 1 root root 90, 1 Mar 18 05:36 /dev/mtd0ro
brw-rw---- 1 root disk 31, 0 Mar 18 05:36 /dev/mtdblock0
rock@rockpi4a:~$

I also cannot see the device on /dev/nvme0n1

rock@rockpi4a:~$ sudo fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mtdblock0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk1: 14.42 GiB, 15468593152 bytes, 30212096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: CBA42AAD-20EB-4016-A0E1-BA830D6E585D

Device Start End Sectors Size Type
/dev/mmcblk1p1 64 8063 8000 3.9M Microsoft basic data
/dev/mmcblk1p2 16384 24575 8192 4M Microsoft basic data
/dev/mmcblk1p3 24576 32767 8192 4M Microsoft basic data
/dev/mmcblk1p4 32768 1081343 1048576 512M EFI System
/dev/mmcblk1p5 1081344 30210143 29128800 13.9G Linux filesystem

Disk /dev/mmcblk1boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk1boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

The SSD is ‘Kingston’ A2000, NVMe PCIe Gen 3.0x4 250G

And the OS using is ’ rockpi4a_ubuntu_focal_server_arm64_20210125_2342-gpt.img.gz’ Download from Radxa’s GitHub release page

Show us

dmesg | grep pci

having the same exact problem, the SPI is showing, however it always skips a step(goes to step 2). Anyway to fix this?

Does your system see nvme?

no, it only see’s the SPI flash when NVME isn’t plugged in, and visa versa. Not sure why but when I plug in the NVME it can’t see the SPI anymore

And when you plug-in nvme, do you have /dev/nvme* ?

i found out only very specific models of NVME work, i managed to find a page on this forum that lists those models. Once i purchased and installed it worked right out of the box.

I have this exact same issue. However I’m using an approved NVME device, HP Ex900 m.2 120GB SSD.
I’m using the latest Ubuntu Server download from the Radxa site on a RockPi 4A

The /dev/mtd* devices are:

rock@rockpi4b:~$ ls /dev/mtd*
/dev/mtd0 /dev/mtd0ro /dev/mtdblock0

The name devices are:

rock@rockpi4b:~$ ls /dev/n*
/dev/network_latency /dev/network_throughput /dev/null /dev/nvme0 /dev/nvme0n1 /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3 /dev/nvme0n1p4 /dev/nvme0n1p5

The output of dmesg | grep pci gives:

[ 1.521222] of_get_named_gpiod_flags: parsed ‘gpio’ property of node ‘/vcc3v3-pcie-regulator[0]’ - status (0)
[ 1.521269] reg-fixed-voltage vcc3v3-pcie-regulator: Looking up vin-supply from device tree
[ 1.521303] vcc3v3_pcie: supplied by vcc3v3_sys
[ 1.521755] vcc3v3_pcie: at 3300 mV
[ 1.521917] reg-fixed-voltage vcc3v3-pcie-regulator: vcc3v3_pcie supplying 0uV
[ 1.760854] phy phy-pcie-phy.9: Looking up phy-supply from device tree
[ 1.760864] phy phy-pcie-phy.9: Looking up phy-supply property in node /pcie-phy failed
[ 1.762353] rockchip-pcie f8000000.pcie: GPIO lookup for consumer ep
[ 1.762363] rockchip-pcie f8000000.pcie: using device tree for GPIO lookup
[ 1.762391] of_get_named_gpiod_flags: parsed ‘ep-gpios’ property of node ‘/pcie@f8000000[0]’ - status (0)
[ 1.762631] rockchip-pcie f8000000.pcie: Looking up vpcie3v3-supply from device tree
[ 1.762641] rockchip-pcie f8000000.pcie: Looking up vpcie3v3-supply property in node /pcie@f8000000 failed
[ 1.762654] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[ 1.763216] rockchip-pcie f8000000.pcie: Looking up vpcie1v8-supply from device tree
[ 1.763225] rockchip-pcie f8000000.pcie: Looking up vpcie1v8-supply property in node /pcie@f8000000 failed
[ 1.763235] rockchip-pcie f8000000.pcie: no vpcie1v8 regulator found
[ 1.763796] rockchip-pcie f8000000.pcie: Looking up vpcie0v9-supply from device tree
[ 1.763805] rockchip-pcie f8000000.pcie: Looking up vpcie0v9-supply property in node /pcie@f8000000 failed
[ 1.763815] rockchip-pcie f8000000.pcie: no vpcie0v9 regulator found
[ 1.799592] PCI host bridge /pcie@f8000000 ranges:
[ 1.801252] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00
[ 1.801841] pci_bus 0000:00: root bus resource [bus 00-1f]
[ 1.802334] pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff]
[ 1.802944] pci_bus 0000:00: root bus resource [io 0x0000-0xfffff] (bus address [0xfbe00000-0xfbefffff])
[ 1.803808] pci 0000:00:00.0: [1d87:0100] type 01 class 0x060400
[ 1.803908] pci 0000:00:00.0: supports D1
[ 1.803916] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 1.804166] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 1.804986] pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-1f] (conflicts with (null) [bus 00-1f])
[ 1.805027] pci 0000:01:00.0: [126f:2263] type 00 class 0x010802
[ 1.805107] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
[ 1.813236] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 1.813270] pci 0000:00:00.0: BAR 8: assigned [mem 0xfa000000-0xfa0fffff]
[ 1.813872] pci 0000:01:00.0: BAR 0: assigned [mem 0xfa000000-0xfa003fff 64bit]
[ 1.814533] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 1.814982] pci 0000:00:00.0: bridge window [mem 0xfa000000-0xfa0fffff]
[ 1.815629] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[ 1.816390] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
[ 1.817008] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
[ 1.817599] pcie_pme 0000:00:00.0:pcie01: service driver pcie_pme loaded
[ 1.817712] aer 0000:00:00.0:pcie02: service driver aer loaded
[ 2.023950] ehci-pci: EHCI PCI platform driver

And fdisk -l give:

rock@rockpi4b:~$ sudo fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mtdblock0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

GPT PMBR size mismatch (3906249 != 234441647) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/nvme0n1: 111.81 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2FB28F4F-022B-41F7-853C-46644A69AE4C

Device Start End Sectors Size Type
/dev/nvme0n1p1 64 8063 8000 3.9M Microsoft basic data
/dev/nvme0n1p2 16384 24575 8192 4M Microsoft basic data
/dev/nvme0n1p3 24576 32767 8192 4M Microsoft basic data
/dev/nvme0n1p4 32768 1081343 1048576 512M EFI System
/dev/nvme0n1p5 1081344 3906216 2824873 1.4G Linux filesystem

Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2FB28F4F-022B-41F7-853C-46644A69AE4C

Device Start End Sectors Size Type
/dev/mmcblk0p1 64 8063 8000 3.9M Microsoft basic data
/dev/mmcblk0p2 16384 24575 8192 4M Microsoft basic data
/dev/mmcblk0p3 24576 32767 8192 4M Microsoft basic data
/dev/mmcblk0p4 32768 1081343 1048576 512M EFI System
/dev/mmcblk0p5 1081344 62331999 61250656 29.2G Linux filesystem

Any suggestions or hints?

Well…
This is exactly why and how I got terribly disappointed by Rock Pi 4.

Here’s the answer:

If you go to the bottom of that installation script, rockpi4a_upgrade_bootloader.sh
(use “sudo nano /usr/local/sbin/rockpi4a_upgrade_bootloader.sh”)

You will see this line which is commented :rage:
upgrade_bootloader_on_spi_flash loader “$LOADER_ON_SPI”
Uncomment it, then run, you will see “step One”.

Who the hell wrote that misleading guide?!:rage::rage::rage:

And… why the hell is that line commented?! :rage::rage::face_with_symbols_over_mouth:


The documentation is just TERRIBLE.