Rock Pi 4B boot from NVMe


Yes, I understand.

RK3399 have not command for work with NVM directly.

If SBC had SPI Flash, when I can write drivers for NVM SSD on SPI flash end then send command to boot from NVM SSD?

It is connect?



We have implemented the NVMe driver in the bootloader, and booting from SPI flash. Now working on Android running on NVMe(Linux is already). Soon we will have ‘directly’ NVMe booting.


BTW, we are considering some 128M Byte Nand Flash and make a ‘eMMC module’ so that user can just put the bootloader and kernel ramdisk inside and leave the rest to NVMe or USB3.


Personally, I think it’s a great idea. However, I have to consider whether this product has a good chance of commercial success. Compared to an eMMC, the development costs are the same, the board and connectors cost the same, the production will hardly be cheaper and the transport costs are the same. The only saving factor is the price of the Flash device. Even if many now ask for booting without an SD card, the module would compete with the SD card.


Its cool.

May be I dont understand. SSD can get more IO speed.
Search in amazon
emmc $48 32 Gb emmc ODROID
cheap noname 256 Gb SSD - $39 ADATA SU800 256GB M.2


The eMMCs offered for the RockPi 4 are cheaper in price.


I ordered the smallest eMMC this time (16GB), planning to use it for booting only, put the entire rootfs on SSD, I don’t know how feasible is that, will see.


That’s what i did originally and later on upgraded to 32gigs. Unless you plan on using a lot of disk space like docker images or compiling a lot of code 16gigs should work. I’m using Docker so I want more space


hmm, I’m not a deep expert in flash storage chips, but it looks to me like there would be a huge benefit in having a “boot-from and run-on nvme only” option.

@jack may a dumb question, but where to find actual (debian) images? download page on radxa wiki is still linked to an image from 2018-11


The boot and run on nvme image itself will be the same as current images, it’s just the bootloader can support nvme disks. We are still working on merge other functions(such as device tree overlay) to the bootloader with newer version of u-boot that supporting nvme.


Cool. Can I or our community help You?

I found 2 links for add support nvme to u-boot


If you can introduce a little bit about yourself, we are very happy that you help us. The status is, currently u-boot for ROCK Pi 4 is vendor version, which old, 2017.1 version. NVMe stack is supported in the mainline u-boot in your second link and there still are changes in recent latest mainline. So we need to work on the latest mainline u-boot, which means we need to port all our work previously on the mainline u-boot.


I am .NET developer, I have small experience with Linux, python.
I want use ROCK Pi 4 for Home automation/Smart house with domotics, future check person(NLP) and use scenarios for each person.

I do not want use google home, amazon echo because all my private data should stay my home )))

I hope I can start Windows 10 IOT on this SBC.


Not sure if it useful here: With the help from Armbian forum I figured out how to enable/disable and configure some GPIO ports (eg I2C) on the current armbian RockPi4 image (beta)

# enable i2c7

cd /tmp
chmod +x device-tree-compiler_1.4.7-3_arm64.deb
dpkg -i device-tree-compiler_1.4.7-3_arm64.deb

cp /boot/dtb/rockchip/rk3399-rockpi4b.dtb /boot/dtb/rockchip/rk3399-rockpi4b.dtb.bkp

dtc -@ -I dtb -O dts -o rk3399-rockpi4b.dts /boot/dtb/rockchip/rk3399-rockpi4b.dtb

#edit section i2c@ff160000 in .dts file
		status = "okay";
		clock-frequency = <400000>;

dtc -@ -I dts -O dtb -o /boot/dtb/rockchip/rk3399-rockpi4b.dtb rk3399-rockpi4b.dts

status can be disabled or okay.
clock-frequency is optional and can be increased for use-cases like the OLED display from default 100kHz to 400kHz.


Can you can explain how to put bootloader in SPI or SDcard to boot nvme and usb3 hd?
Thank you.


At least 2 people on this forum including myself are running smart home on RP4. I’m using HA in python virtual env on Debian, the other using HA in docker on Ubuntu. Both of us have posts on this forum you may look up. I’ve tried all 3 (OA2, HA and Domo) and settled with HA.


You can refer the partitions table of the image here:

For SDcard,

dd if=/path/to/image of=/dev/sdx count=32768

You have a bootable sdcard with bootloader only now.

For USB3 device or NVME device,

dd if=/path/to/image of=/dev/sdx bs=4M

Write the whole image to USB3/NVME device.


Finally, someone whose old enough to speak my language! ‘Well, I remember back in the days’ when VAX servers were the size of Volkswagens, running VMS, doing nightly backups on reel to reel tape, printing out logs on a 24" continuous roll dot matrix printer, and connecting to VT-100 dumb terminals via a rats-nest of serial cables with ‘D’ connectors.

You can call me old fashioned (or whatever you like) but, you wanna know what I really miss (probably not)? It’s a good old fashioned power button on electrical devices, switching nasty unregulated 12 VDC (from a battery, dumb wall wart, or bench PSU), that plugs into a cheap but indestructible barrel connector.

But, we have become so advanced that wall warts need to be certified in order to ‘negotiate’ voltage levels with whatever device it is connected to. Then, we need to add POE devices to the device, just to power up or down. The old 12 VDC batteries have become expensive 30000 mah LiPo power packs w/ USB-C outputs, now. But, what the heck? That’s progress for ya.:thinking:

I’m getting too old to be crawling around under the desk to get to the surge protector’s switch (makes my knees hurt) and don’t want a mess of power cables cluttering up my desk. So, I end up wearing out the flimsy USB-C connector, instead.:man_facepalming:

I could easily install a 50 cent barrel jack on my newly built aluminum case and internally wire it to a 50 cent power switch. But, what am I supposed to do with the +12 VDC wire? (hold on, let me rephrase that question):man_shrugging:


Sorry if I’m being slow-witted here, but if I understand this: If I can copy the 5 partition images to my NVMe using the correct offsets then the RockPi will boot from NVMe and I no longer need to boot from a microSD? Thanks in advance for your understanding.


I have installed recalbox with your help, but recalbox is in sd card.
I don’t understand if must execute all 2 command dd or only second.
Sorry for my bad english.