Booting ROCK Pi 4(A/B/C) with mainline u-boot in SPI, NVMe and Armbian v20.11.x


piter75
 Share

7 7

Recommended Posts

2 hours ago, piter75 said:

I am not sure of that.

 

My understanding is that we are still building release images from master branch and the removal of this line from targets.conf:


-rockpi-4b			legacy			focal		cli			stable	yes

means that focal legacy image for rockpi-4b will not be built.

Lack of focal legacy image among 20.02.3 release images (built after the referred commit was merged) seems to corroborate that theory ;-)

 

Hmm. when I doubt just blame @Igor

Link to post
Share on other sites

Donate and support the project!

11 minutes ago, lanefu said:

Hmm. when I doubt just blame


Haha. Well, it's possible that its my fault. I tend to enforce cleaning activities to save some space. If we need focal image(s) for those boards, someone just add them (best is that person that needs it send a PR) and ping me for remake.

Link to post
Share on other sites

11 minutes ago, Igor said:

I tend to enforce cleaning activities to save some space

+1 We need to do that from time to time.

 

9 minutes ago, Igor said:

If we need focal image(s) for those boards, someone just add them

I am not particularly missing them ;p

Link to post
Share on other sites

Am 9.3.2021 um 20:51 schrieb madmailman:

Never-mind! It seems to be a problem with the Focal (4.4.y) image. I downloaded the Focal (5.10.y) image and it's worked as described. Which also means that the XPG SX6000 Lite 128GB PCIe 3D NAND PCIe Gen3x4 M.2 2280 NVMe (ASX6000LNP-128GT-C) works well with this setup. Its a cheap and cheerful NVME purchased from Amazon.

 

Now I just need to get nfs server working to share data between my Macs and other servers (ubuntu and Raspbian). I've found a few hundred tutorials and they are all just a little different and so far none have worked. :-/

 

Thanks for the great work on this!

 

 

i have the same when i use a 4.4.y Image after adding the line "param_spinor_spi_bus=1" and reboot -> Kernel Crash

i tried two different 4.4.y Images instead of the 5.10.x because of the behaviour with the reboot Problem booting from nvme

Link to post
Share on other sites

Hi,

 

can you add an additional SPI NOR Flash chip, please? I have a 32MBit MX25L25645 SPI Nor flash.

 

Boot log:

 

U-Boot 2020.10-armbian (May 06 2021 - 19:22:15 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... unrecognized JEDEC id bytes: c2, 20, 19
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

 

PS: Maybe it's also not such a good idea to white-list individual Flash chips, since this breaks users' setup by default when there is no real reason to do so. Imho it is a better idea to blacklist chips, if they are known to not work.

 

Thanks and best regards!

Link to post
Share on other sites

My friends Rockpi4 has lost audio output, it got less and less and then it was gone. Still warranty, Allnet reacted PERFECTLY, sent replacement within days.

I am the one to install it. Easy job, same computer, fully installed M.2 HD. So I thought...

When I ran Nand-Sata-install it asked me if I am ok with formatting the HD, I said of course NO - and got thrown out.

So I had to swallow it and do it all  again, keyboard-layout, editor, his software, bring in the backup of data (lots of music) etc.

 

Can't it accept a NO and still do it's job i.e. write to SPI?

Is this a valid suggestion?

Link to post
Share on other sites

On 8/15/2021 at 11:13 PM, Joaho said:

Can't it accept a NO and still do it's job i.e. write to SPI?

Is this a valid suggestion?

You have probably used the option "Boot from SPI - system on SATA, USB or NVMe" which transfers the current system to SSD and needs to clean it.

There is another option - better suited for your case - "Install/Update the bootloader to SPI Flash". It does not touch the existing partitions only writes to SPI Flash.

Link to post
Share on other sites

On 11/30/2020 at 3:53 AM, piter75 said:
 

With Armbian v20.11 one can write mainline u-boot image to board's SPI and enjoy booting nvme drives without any mmc devices.

Prerequisities: ROCK Pi 4(A/B/C) v1.4 or 1.3 with SPI soldered in (v1.3 comes without SPI flash from the factory).

 

  1. If you already have Radxa's u-boot written to SPI you need to short pins 23 and 25 for Armbian to boot
  2. Boot fresh image of Armbian v20.11.x for ROCK Pi 4(A/B/C)
  3. Add the following lines to /boot/armbianEnv.txt
    • overlays=spi-jedec-nor
    • param_spinor_spi_bus=1
  4. Reboot
  5. If you shorted 23-25 pins in 1.) then:
    • disconnect them after the ROCK Pi 4 fully boot's 
    • enable spi-nor by executing (as root):
      echo spi1.0 > /sys/bus/spi/drivers/spi-nor/bind
    • verify that the SPI mtd interface is enabled by running
      ls /dev/mtdblock0
    • if the last command does not list any file then something went wrong between 3.) and 5.)
  6. Run nand-sata-install
    • choose option: "Boot from SPI - system on SATA, USB or NVMe"
    • choose NVMe partition, eg. /dev/nvme0n1p1
    • accept erasing of the choosen partition with "Yes"
    • choose fs type (tested with ext4)
    • wait a few minutes for rootfs transfer to chosen partition
    • choose writing SPI bootloader with "Yes"
    • confirm that you want to flash it with "Yes"
    • wait ~60 seconds for writing
    • choose Exit
  7. Reboot
  8. Enjoy Armbian booting with SPI / NVMe

 

Why bother with mainline u-boot?

It is known to boot some NVMe drives that legacy u-boot from Radxa has issues with, eg. SAMSUNG 970 EVO Plus and SAMSUNG PM981.

This does not mean that all NVMe drives are supported, YMMV.

 

Which NVMe drives are known to be working?

Corsair MP510 240GB/480GB/960GB

Gigabyte SSD M.2 2280 PCIe x2 Model:GP-GSM2NE8128GNTD

HP SSD EX900 M.2 NVMe 120GB. Model: 2YY42AA#ABB
Intel SSD 660p Model:SSDPEKNW512GB
Kingston A1000 SSD 240GB (PHISON PS5008-E8-10)

Kingston A2000 M.2 2280 PCIe NVMe

PNY 250GB XLR8 CS3030 M.2 NVMe SSD PCIe Gen3 x4

Sabrent Rocket 256GB NVMe PCIe M.2 2280

Samsung 970 EVO Plus SSD 250GB M.2 2280, PCIe 3.0 x4, NVMe, 3500/2300 MB/s

Samsung PM981 256GB

XPG SX6000 Lite 128GB (ASX6000LNP-128GT-C)

 

 

 

Two questions:

1. In addition to the above NVME SSDs, how do I know whether other NVME SSD, say ADATA XPG SX8200 Pro 256GB, can  be used ?

2. Does the above steps still work for Armbian v21.08 ?

Thanks

Link to post
Share on other sites

On 9/11/2021 at 6:31 AM, wureka said:

In addition to the above NVME SSDs, how do I know whether other NVME SSD, say ADATA XPG SX8200 Pro 256GB, can  be used ?

 

If this device is not along known to work ones, nobody knows until its plugged. None of those vendors (Radxa / Adata) are supporting us, so we don't have devices you are asking about in the lab. Also even hardware would be on the table, who will cover the time for testing? I don't need to know this to waste my precious time ...

 

On 9/11/2021 at 6:31 AM, wureka said:

Does the above steps still work for Armbian v21.08 ?


No idea. There is almost no interest from community to improve testings which means we can only run basic testing and what you are asking is certainly not. It would require manual testing, which is simply too expensive if we pay everything. For you and the vendor of your choice.
 

Download and test. I would need to do the same. Then report. It might help someone.

Link to post
Share on other sites


Hi.
Thanks for this guide.
I tried it with Armbian 21.08.1 and can confirm that Patriot Scorch M2 PS256GPM280SSDR (PCIe Gen3 x2) works well.
I always get the warning message:

*** Warning - bad CRC, using default environment


But I can boot my Rock Pi only from the 1-st partition.
In case of installing Armbian to the non 1-st NVME partiotion i get 'Filed to load ...' errors.
2.thumb.jpeg.d0496f6940fc32895fc69d2150daf2ef.jpeg

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

7 7