SPI flash from USB OTG port for NVME SSD setup

Hello Guys,

New user here. I am following the following guide https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD so that I can run an Ubuntu Server on my 970 plus evo NVME SSD. I began to follow the guide to flash the bootloader onto SPI https://wiki.radxa.com/Rockpi4/dev/spi-install# As I am following the steps I have the USB OTG switched to the side with the H and I connected my USB type A to A cable and run lsusb. Although I do not see any device with an ID 2207:330c and when I run the command rkdeveloptool ld it returns not found any devices!. I am not sure what I am doing wrong and what is happening so any help would be appreciated.

You need to short cut SPI clock to gnd on GPIO (25-23).
And power off/on your Rock pi, after 3-4 s, you can remove the shortcut for have the SPI can be programed (on Windows with AndroidTool, you need to connect 25-23 short time too during flash process, when happend OTG reset MASKROm step, not sure how is work on linux).

Your problem indicate your SPI contains a boot (working or not), for re-program it, you need to erase it in first.

I managed to figure out it was due to faulty USB type A cable that caused me not to see the device. After replacing it I managed to flash SPI bootloader on to the device. Now the Blue and Green LED are always on. The new problem I am encountering is when going back to the following guide on the NVME drive https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD. I was on Step 3 and I am still connected type a to type a through host computer and rockpi device. Although I am not able to see the device at all anymore lsusb is not returning anything. How do I boot from the NVME drive after correctly flashing the bootloader on to the SPI?

after step 1, you don’t need to connect the rockpi with USB A to A on your computer, set back the USB-A to Host mode (switch)
And connect Ethernet cable

For me, i’m finish to install Debian on my m.2 SSD, it’s a Kingston A1000, so a one with SPi can’ t boot directly: I’m install debian on SD Card, after doing sudo apt-get update, it propose flash the SPI from debian to a new version, and i’m accept it.

It’s seem from debian, it flash the SPI with a newer version who are not availabel on web site.

I’m follow all step, but as previsted, i’m can’t boot directly on this SSD M.2, but with the mSD card inserted, the system start boot on the mSD card and switch to the SSD M.2 and continue intializing on it. At final i’m need the sd card for the bootstrap, but all debian are running on the SSD M.2

they are an error on the wiki, for see the mounted partition, the right command is not lsusb, who list usb device, it’s lsblk (like the screen capture)

1 Like

You can always correct the wiki by register an account :slight_smile:

Thank you for that. It turns out after reading various forms that the Samsung 970 EVO plus NVME does not work with SPI and NVME boot. I successfully flashed the boot loader on to the SPI, I also swapped out the NVME SSD or an Adata XPG SSD. This drive showed a response from the HDMI output although I faced another issue during boot. I encounter an “end of trace” during the Ubuntu boot and it never completed. I am wondering what has caused this and if there is a way to correct the boot.

i have absolutly no idea with is the pb, your power supply deliver 5v 2.5A ? or 9v 2A ? or 12V 1.5 A? else you can have not enought power.

Managed to solve end of trace problem after doing a fresh install and spi update. The issue I encounter now when logging on and finishing the process for NVME is that the hw_init.conf file is not located in /boot/ directory and if I try and reboot before finishing this process I no longer have any display output from HDMI. I have made a new forum question about this in Modifying hw_intfc.conf for NVME boot

Hi rockPi4b,

I’m re-installing many time a debian on my nvme, and each time the process are different.
In reality, they are some problems in the process, at least when installing this from mSD card. In first updating kernel not work from mSD used for boot the Rock Pi (for what i’m understand, it try to made an alias, but the mSD is in fat format for this part, and it’s not supportedt o made an alias on fat partition).
Anyway, i’m discovered doing kernel update / spi update is not necessary (if you spi load/boot are done before and you have /dev/mtd0 device and /boot/hw_intfc.conf file populated), you can directly jump to step 2, install the package dependency in first:
$ sudo apt-get install -y rockchip-fstab
$ sudo apt-get install -y rockchip-overlay
$ sudo apt-get install -y rockpi4-dtbo
copy your system image on M.2 NVME SSD (i’m use dd if=imagefile of=nvme device path)
and them solve the remaning problems, like complete /etc/fstab (on mSD card and nvme after you boot on it), and set /boot/hw_intfc.conf.
It’s help to re-install the dependency rockchip-fstab, rockchip-overlay, rockpi4-dtbo, (rockpi4b-rk-u-boot-latest ?) after the first boot on nvme (because they are installed on mSD at the first time, but not in nvme.

When you achived to boot on nvme, you can try upgrade the kernel (sudo apt-get install -y linux-4.4-latest # Will update kernel, or not…)

Good luck (i’m re-install all about 8 times, with arround 4 success times;)

I updated my kernel and managed to correctly modify the hw_intfc.conf file. Although even after completing all of the steps correctly and after performing a reboot I suffered the same problem. If i reboot my device or power cycle it the HDMI output is a black screen. I am not able to see the linux terminal or type any commands it is completely blank.

can you use another computer and connect in ssh for have a console for be able to enter commands ?

What is the host name for SSH connection and how to determine this

Another question I have is when modifying the default kernel do you just replace label with default to select that kernel ?

they don’t have hostname, you need found the ip: it’s something like 192.168.0.xxx, better to lock client list on your router, because you can’t ask this to the rock pi system is you don’t have display.

I not replace nothing with the kernel, juste launch the update or not. But it’s still something i’m not understand with the procedure, this time i’m stuck to install Debian on my SSD, it’s seem flashing the spi populate the /boot/hw_intfc.conf, i’m need doing more tests.

I’m doing this many time sbecause i’m try to install Debian and Recalbox with multiboot on my SSD, but without success at this time.