Rock Pi 4B boot from NVMe

Hello all.
Can I buy Rock Pi 4B + M2 Extender and setup Ubuntu or Android only on NVM SSD?

I do not want boot from microSD or eMMC and I want use only NVM SSD.

This configuration should work?

Thanks.

2 Likes

Hello,
I once picked you out something on the subject.


Thanks.

Rock PI 4B can not boot from SSD (((

Orange PI 3 release with PCIe and can not boot from SSD too(((

None of my SBCs can boot directly from the hard drive. In the beginning nobody was interested in this, everyone was happy to boot from an SD card, or great from an eMMC. When I recently wanted to spice up my “old” Rock64 board with a cheap SSD, I noticed, oops, that you can’t do this without SD or eMMC.

But after a short thought, I remembered what it was like back then with my first real computer. No home computer with Basic in ROM, a SBC to work with, USARTs to which terminals could be connected, parallel interfaces for printers and connections for 8" floppy disks and for a SCSI hard disk, or Hard Drive, as we called it at that time.

WM-SB-640
Wave Mate Bullet Z-80 SBC

All computers at that time had at least one small ROM or EPROM (erasable with UV light) where the Boot Strap Loader was burned in. This was able to read the first sector of the floppy disk, or hard disk, where the second stage of the boot orgy was to read. Even the PCs and Macs had/have had boot roms with a BIOS “Basic Input Output System” until recently, where not only programs for reading the keyboard, writing to the screen and reading the first sectors of the hard disk were stored, but also a lot more.

Since the hardware became more and more complicated and the intervals between innovations, which made the old BIOSs unusable, became shorter and shorter, one deviated from the system again. Basically there are now only small loaders stored and some fairy dust to protect the operating systems from the users. Oh no, the system should be protected from burglars by establishing a network connection before booting. lol
Back to our pretty little SBCs, they would all actually need a Quad SPI Flash where the boot loader can be stored. The problem is, such a chip costs space on the motherboard, costs SPI lines and costs money, can hardly be marketed as an option. In other words, everyone would have to pay whether they have hardly any money and prefer to boot from an SD card, or whether they can really use it. I suppose that’s why no one’s using it.

1 Like

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?

Yes.

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.

4 Likes

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.

2 Likes

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.

1 Like

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.

1 Like

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.

1 Like

Cool. Can I or our community help You?

I found 2 links for add support nvme to u-boot
https://github.com/u-boot/u-boot/blob/master/doc/README.nvme
https://lists.denx.de/pipermail/u-boot/2017-August/300975.html

1 Like

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.

1 Like

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
wget http://ftp.debian.org/debian/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.7-3_arm64.deb
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.

1 Like

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.