Fail to boot armbian images after spi bootloader upgrade

We found an issue that might be related and we have updated a u-boot-spi image today:

https://dl.radxa.com/rockpi/images/loader/spi/

Can you try to update the u-boot in SPI to this one?

Is it possible to update the u-boot in SPI via the mtd tool, similar as explained here:
https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD

If not, what is the process to update u-boot from a Windows 10 laptop?

Background info
I also want to use the Rock Pi 4b v1.4 together with armbian and an Intel 660P nvme SSD.
I started of by using method two (using mtd tool) explained in the link above.

Since I only have a laptop with Windows 10 I used a USB stick to boot Linux and follow the steps listed below:
https://wiki.radxa.com/Rockpi4/dev/spi-install

However I cannot succeed in installing the rkdeveloptool.
Errors:
configure: error: in `/home/mint/temp/rkdeveloptoolā€™:
configure: error: C++ preprocessor ā€œ/lib/cppā€ fails sanity check

Yes,

apt update rockpi4b-rk-u-boot-latest package to the rockpi4b-rk-u-boot-latest_2017.09-2681-geb41d9a6ce, it already contains the rockpi4b-uboot-trust-spi_2017.09-2681-geb41d9a6ce_20191104.img

@raleonardo hi, have your disconnected PIN 23 and 25 when update the bootloader?

BTW,i need more then 10s to update.

oops, i guess i missed the step: "* Remove the cable and disconnect PIN23 and PIN25 "

And as mentioned, it strangely it took less than 2 secondsā€¦

I will try again,
Thanks

Update from my side regarding rockpi4b-rk-u-boot-latest_2017.09-2681-geb41d9a6c

Since I already had SPI flashed and was unable to flash it via Windows 10 PC I updated the SPI by starting from scratch via this topic:

Iā€™ve followed step 1, did sudo apt-get update && sudo apt-get upgrade*, followed by step 2

*: in the CLI I noticed rockpi4b-rk-u-boot-latest_2017.09-2681-geb41d9a6ce, so it updated the u-boot package.

Via sftp I transfered two ARMbian images, the one provided by Radxa (v5.67) and the latest Debian Stretch version from the ARMbian website (v5.90).

First I DDā€™ed the ARMBian-ā€œofficialā€ image via:
sudo dd if=ā€™ your image pathā€™ of=ā€™ your NVME SSD device pathā€™ bs=1M

This didnā€™t boot.

Second I DDā€™ed the Radxa-ARMbian. This version is able to boot. I assume because this image is gpt instead of ARMbians mbr.

Also, when I run lsblk I see a different ā€œstructureā€ as I would expect from https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD. (I noticed that I should do lsusb instead of lsblk, Iā€™ll try that this afternoon/evening.

Please let me know what I can test to help solving this issue.

Another thing, maybe related to the issue:
root@rockpi4b:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
zram0 254:0 0 50M 0 disk /var/log
nvme0n1 259:0 0 477.9G 0 disk
ā””ā”€nvme0n1p1 259:1 0 472.2G 0 part /

Another thing 2, maybe related to the issue:
In the Linux system runs on M.2 NVME SSD instruction it is mentioned to:
Modify file, /boot/hw_intfc.conf. Uncomment these lines. Thus we can use SPI Flash device (/dev/mtd0)

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

But in all Radxa images that I experimented with these options are already uncommented. Maybe this step is not required anymore and can be removed from that Wiki?

1 Like

Another thing, maybe related to the issue:
root@rockpi4b:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
zram0 254:0 0 50M 0 disk /var/log
nvme0n1 259:0 0 477.9G 0 disk
ā””ā”€nvme0n1p1 259:1 0 472.2G 0 part /

I think this is lsblk of Armbian in nvme, right?

Can you try to edit the /boot/armbianEnv.txt in nvme after you write the image to nvme? add one line below:

fdtfile=rockchip/rk3399-rock-pi-4.dtb

The official armbain and radxa armbian both use mbr, the radxa armbian is build with the same armbian build system.

Another thing 2 , maybe related to the issue:
In the Linux system runs on M.2 NVME SSD instruction it is mentioned to:
Modify file, /boot/hw_intfc.conf. Uncomment these lines. Thus we can use SPI Flash device (/dev/mtd0)

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

But in all Radxa images that I experimented with these options are already uncommented. Maybe this step is not required anymore and can be removed from that Wiki?

You are right. Maybe we should edit it to let the reader confirm that instead of remove it.

I think this is lsblk of Armbian in nvme, right?

Correct

Can you try to edit the /boot/armbianEnv.txt in nvme after you write the image to nvme? add one line below:

fdtfile=rockchip/rk3399-rock-pi-4.dtb

The armbianEnv.txt of the armbian image already contained the following:

fdtfile=rockchip/rockpi-4b-linux.dtb

Iā€™ve replaced that according your proposal, still no boot. Only a green LED, followed by a permanent red LED is the result.

The official armbain and radxa armbian both use mbr, the radxa armbian is build with the same armbian build system.

Thanks, I was under the incorrect impression that the radxa armbian was converted to gpt.

You are right. Maybe we should edit it to let the reader confirm that instead of remove it.

:ok_hand:

@alotje can you also boot from a official raspbian image from a uSD card?
I cannot, unless i short the spi clock on the gpio, which makes me think thereā€™s actually a problem with the SPI

@raleonardo, you mean the Debian 9 image which can be found here: https://wiki.radxa.com/Rockpi4/downloads?

Since the Raspbian image is (only?) compatible with Raspberry Piā€™s. If you can give me a direct link to the image then I can try it on my end.

No, the Debian stretch for rockpi4 from Raspbian Armbian
They have images for several supported boards

@raleonardo This morning I was able to dd the image below to the nvme SSD and it booted fine.

rockpi4-debian-stretch-desktop-arm64-20190730_2022-gpt.img

That one works for me too (radxa debian stretch desktop gpt)

Sorry for the confusion, I meant Official Armbian Stretch.

https://dl.armbian.com/rockpi-4b/Debian_stretch_default_desktop.7z

The Official Armbian Stretch is not working on my side either.

For info: I think I used a different way to flash u-boot than you:

So two ways to update the u-boot which results the same: unable to boot Official Armbian :frowning:

So that matches my experience.

Also its not possible to boot from an mbr image on a uSD card after the SPI upgrade.

*still to have to re-test flashing the SPI bootloader via OTG, with the pins 23-25 disconnected tho

1 Like

I hope it will make a difference but my expectations are opposite that itā€™ll not make a difference.
Hopefully @jack is able to do some magic :grin:

@raleonardo, @jack, any update on this issue?

In the meantime Iā€™ve tried the follow images from the armbian website. All have failed to boot from the uSD card and failed from the nvme ssd.

Armbian_5.90_Rockpi-4b_Debian_stretch_default_4.4.182_desktop
Armbian_5.98_Rockpi-4b_Ubuntu_bionic_default_4.4.192_desktop
Armbian_5.98_Rockpi-4b_Debian_buster_default_4.4.192_desktop
Armbian_5.99.191030_Rockpi-4b_Debian_buster_dev_5.3.0-rc4_minimal
Armbian_5.99.191113_Rockpi-4b_Debian_buster_dev_5.3.0-rc4_minimal

Hi,
So I successfully flashed the SPI with rockpi4b-uboot-trust-spi_2017.09-2681-geb41d9a6ce_20191104.img.
It took more than 7 seconds and i could see the progress increasing.

Tried to boot from the last armbian stretch desktop (mbr) on the SD card and on the nvme: no success (fixed green light) on either.
I included ā€˜fdtfile=rockchip/rk3399-rock-pi-4.dtbā€™ in /boot/armbianEnv.txt in the uSD card, with the same result.

@radxa please provide a SPI fix that allows booting from mbr images and TEST IT before recommending solutions.

I donā€™t want to be tied to radxa custom distribution images.

Iā€™m pretty frustrated with the lack of maturity and support to this product!

1 Like

I just found another topic which is related to the issue we have:

Maybe this leads to a solutionā€¦
For info: at step 3 (Write the image to NVME drive. I used an USB to NVME adapter): it is also possible to burn the ā€œRadxaā€ Debian on a uSD or eMMC card, copy a image onto this system and DD it to the nvme SSD. So thereā€™s no need to buy additional hardware.

Currenty I have a nvme SSD with a written /boot partition which I canā€™t delete, so my progress is at a halt the comming days.

1 Like

thanks, i boot from radxa custom gpt images with no problem, either from SD or nvme.
It just doesnā€™t work with other mbr images