Jump to content

Recommended Posts

Posted

Hello everyone,

 

I would like to thank @lurk101 very much for his patience in helping me how to boot Armbian directly to NVMe in my ROCK5B.

 

I could do that with the Official release 22.11 Jammy with Gnome from the website.

 

The PSU I am using is a dumb 5V 3A which I used to power my Raspberry Pi 4.

 

As I could boot the OS directly from NVMe, I asked if he would mind if I shared the information with you.

 

He answered he doesn't, so here we go...


 

Quote

 

 For the bootloader image I used

 

https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img

 

For the Armbian image I used the current Armbian 22.11 Jammy Gnome image.

 

Assuming you have a bootable system with NVME SSD plugged in, The first thing to do is to zero out the NVME  partition table with

 

sudo dd if=/dev/zero of=/dev/nvme0n1 count=100

 

power down, then boot from an SD with the downloaded Armbian image, proceed with all the setup stuff till you get to a command prompt. You then need to transfer both downloaded images to the booted system by whatever mean is available to you. I use sftp after installing ssh.

 

Now program the SPI flash with

 

sudo dd if=rkspi_loader.img of=/dev/mtdblock0

 

It will takes 3-5 minutes to program 16MB of SPI flash.

 

Then program the NVME SSD with the Armbian image with

 

sudo dd if=Armbian_22.11.2_Rock-5b_jammy_legacy_5.10.110_gnome_desktop.img of=/dev/nvme0n1

 

Shutdown, remove the SD card, power cycle. Should boot to NVME. Redo all the setup stuff.

 

However, I was not able to use Ethernet port neither my wifi m.2 adapter, so there is no network connection...

 

If I have more information I will share with you, thanks a lot!!

 

 

Posted (edited)

I suspect that the Ethernet and wifi failures are because of the 5V 15 watt rpi brick. I've had no problem with my PD supply, but with NVME and Ethernet working I've noticed 1.5 A peak current draw at 12 V (18 W). This is more power than the 5V brick can supply.

Edited by lurk101
Posted (edited)
I tried to boot my system to NVMe and the result of my trying was:
- powered with constant 12v1.5W (i.e. PD problems are ruled out)
- bootable SD-card and NVMe
or
- bootable eMMC and NVMe

If there is no problem with the power (PD problems should be ruled out since you use the Radxa SPI image) the bootable NVMe overrules the SD or eMMC. This means the system won't start if the partitions was not setup correctly.

I think you can only try this method with an NVMe which has no boot partition already. Which means the "dd if=/dev/zero of=/dev/nvme0n1 count=100" might have to be  executed with an USB-NVMe drive or something.
Without bootable NVMe partition, the system might start correctly. Since my eMMC is only 32GB I will have to try to boot from NVMe, so I will try to boot the NVMe.

If I have to use an USB-NVMe module I would prefer to setup the NVMe without SD or eMMC. I'll try if that works.

Edit: I did see you used the method mentioned in the Radxa Wiki, this is where you probabbly found the link for the SPI image.
If the SPI image fails there is allways the rkdeveloptool-option. Edited by specs
Posted

Worked for me too, thanks!

Armbian does report that my nvme is slow (after motd there is a message that my 'sdcard' is slow).

Posted

I have an issue with NVMe booting after following this guide and installing this image:

 

Armbian_23.5.1_Rock-5b_jammy_legacy_5.10.160.img.xz

 

The Rock 5B SBC now boots correctly only about 30% of the time:

 

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Will now check root file system ... fsck from util-linux 2.37.2
[/usr/sbin/fsck.ext4 (1) -- /dev/nvme0n1p1] fsck.ext4 -a -C0 /dev/nvme0n1p1
/dev/nvme0n1p1: clean, 46623/3276800 files, 906832/13107200 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.

 

and when it fails, it does so with this error message:

 

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/mmcblk0p1 does not exist.  Dropping to a shell!

 

Is anyone else having the same behavior?

 

Could it be the power supply even if no boot loop is actually occurring?

 

My NVMe is a 1TB Samsung 980 Pro.

 

Thx.

Posted

An update to my own post.

 

There are two issues going on with the spi image:

 

1)

 

the Rock 5B fails to boot and hangs inefinetly here:
 

...

WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9

 

this happens when rebooting from a previous successful boot.

 

2)

 

the Rock 5B fails to boot since it cannot find the root file system on the NVMe (see my previous post)

 

Now,

 

I've tested the following two spi images:

 

image1)

 

/usr/lib/linux-u-boot-legacy-rock-5b_23.02.2_arm64/rkspi_loader.img

 

which can be found in Armbian_23.5.1_Rock-5b_jammy_legacy_5.10.160.img.xz

 

image2)

 

https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img

 

which can be downloaded from the web

 

My findings are:

 

With image2, the Rock 5B always boots fine when powering up the board by plugging in the power

supply and always fails to reboot when rebooting the board using the reboot command.

 

With image1, the Rock 5B rarely fails to reboot (issue 1 rarely occurs) and often fails to reboot or

boot (issue 2 occurs quite often i.e. ~70% of the time).

 

 

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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines