SPI + NVMe booting(beta)

Sorry for the typo. I edited the original post. It should be right now.

1 Like

PCIE to SATA is not tested in u-boot yet. Currently the boot device is added as nvme in u-boot together with mmc0, mmc1, usb, network. We can have a try but I am afraid it will not be supported.

Doesn’t really matter to be honest as likely the main purpose of slower multiple drives is to provide storage space rather than system.
The 4port Sata is perfect for a micro server and the system can either be SD or eMMC as it is preferable to be have the system separate.

Saying that if you can boot via pcie nvme then surely its just a find and replace of /dev/sda that probably could be implemented via overlay.

As said its likely its not a big deal for many, certainly isn’t for me.

Thx for the correction, but still no luck activating SPI flash:

Jun 28 16:10:31 ropi-ra kernel: rockchip-spi ff1d0000.spi: Failed to request TX DMA channel
Jun 28 16:10:31 ropi-ra kernel: rockchip-spi ff1d0000.spi: Failed to request RX DMA channel
Jun 28 16:10:31 ropi-ra kernel: rockchip-spi ff1d0000.spi: no high_speed pinctrl state
Jun 28 16:10:31 ropi-ra kernel: m25p80 spi32766.0: unrecognized JEDEC id bytes: ff, ff, ff
Jun 28 16:10:31 ropi-ra kernel: m25p80: probe of spi32766.0 failed with error -2

any ideas?

One more question: No more radxa products on reichelt? And no RockPi model A in stock in other european stores? Or should I better make a new thread about that topic?

I would wait for @jack but think you might be alone for a while as not many of of have v1.4 or purchased flash.
You are blazing a trial :slight_smile: prob pointless creating another and its just timezone to the radxa team now.

If I purchase one from allnet today, is it guaranteed to be 1.4?

Just looking into the Rock Pi’s today, would really prefer to start with bootloader in SPI and full OS on NVMe. :slight_smile:

We have uploaded a new version of u-boot with red(or blue) led on, which would help to see if the image is installed to SPI Flash successfully.
See https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD

1 Like

Just ordered the model from allnet today
Rock pi 4B 4GB v1.3+ Limited Edition Bundle (incl. mounted 16MB SPI Flash)

  • plus Lenovo NVME SSD 256GB

Now I am not sure how to proceed to get the debian image to boot.

  1. do I proceed with install as described for mico sd ?
  2. or do I flash a emmc and follow that route ?

Thanx, now I can clearly see that u-boot installed correctly, red led is on, but system still doesn’t want to boot from nvme. (boot the system on nvme using /boot on sdcard works fine)
How can the issue be solved?
My nvme is kingston a1000
The partitioning is following:
root@home:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 59.6G 0 disk
├─mmcblk0p1 179:1 0 3.9M 0 part
├─mmcblk0p2 179:2 0 4M 0 part
├─mmcblk0p3 179:3 0 4M 0 part
├─mmcblk0p4 179:4 0 112M 0 part /boot
└─mmcblk0p5 179:5 0 59.5G 0 part
nvme0n1 259:0 0 223.6G 0 disk
├─nvme0n1p1 259:1 0 3.9M 0 part
├─nvme0n1p2 259:2 0 4M 0 part
├─nvme0n1p3 259:3 0 4M 0 part
├─nvme0n1p4 259:4 0 112M 0 part
└─nvme0n1p5 259:5 0 223.5G 0 part /

And one more interesting detail: /dev/mtd0 appears only when I boot from uSD, when the system loaded from nvme, there is no SPI in devices

Checkout the system on nvme ssd is new enough including the newest version of kernel and spi1flash.dtbo loaded.

uname -a, to see the kernel version(>=87). If it is not new enough, update it.

Modify file, /boot/hw_intfc.conf. Uncomment these lines. (Maybe need to update rockpi4-dtbo package)

intfc:uart4=off
intfc:spi1=on
intfc:dtoverlay=spi1-flash

Reboot the Pi.

1 Like

Seems everything is ok. System was copied from SD card. How can I check that dtbo loaded?
https://pastebin.com/CPLaRWWw

Please show the contents of file , /boot/hw_intfc.conf when /dev/mmcblk0p4 is mounted on /boot

Here is
https://pastebin.com/FttVcjLy

Shouldn’t really matter but just for reference

#intfc:dtoverlay=pcie-gen2 means you are running at pcie gen1 speeds.

intfc:dtoverlay=pcie-gen2 = gen 2

Found one more issue. Aside from actions in the wiki article you probably need to update fstab, to have /boot on nvme. But still it didn’t help to boot without SD-card.
Any ideas, what’s wrong?

My board has V1.4 on the box and I remember specifically ordering the 1.4 version so I assume I was sent the correct version of Rock Pi 4A.

I have done everything verbatim as described in the installation wiki here:
https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD

I’m trying to Write image to SPI flash using mtd tool

After typing YES to execute the rockpi4b_write_spi_flash.sh, I receive the following error:
grep: /proc/mtd: No such file or directory
loader partition on MTD is not found

if I try:
$ sudo gdisk /dev/mtd0
I got error: /dev/mtd0 does not exist.

Do you have red or blue led?
Red led + v1.4 = no SPI
See: https://forum.radxa.com/t/v1-4-vs-1-3-compare/1288/7

Thank you so much for your reply.

The board has white fonts on it, saying “v1.4, Rock Pi 4A”.

I only see a steady bright gree LED light on the board when I turn on electricity. Sometimes I see a smaller blue LED light almost next to the green one, usually blinking. Then there are the green steady and blinking orange LED on the ethernet port. I do NOT see any other LED lights on the board so far.

Everytime I update kernel using:
$ sudo apt-get install -y linux-4.4-latest
I see a lot of things gets updated.
After it’s done updating, I could be following the .conf editing or I could skip it – doens’t matter. As long as I type: sudo reboot, the board shuts off and bricks on me.

Please help. Thanks a bunch.

Do you have spi flash on the board physically?
I had the same issue, and I don’t know why, but there’s no mtd0 when I boot from NVME, but if I disconnect NVME and not from sd card, mtd0 appears.