Fail to boot armbian images after spi bootloader upgrade

@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

I managed to format my nvme SSD via my laptop (temporary replaced ā€œwindows 10 nvmeā€ with the ā€œrock pi nvmeā€, booted Linux via USB and format with Gparted. So far thatā€™s working again.

Been searching the web this evening but still couldnā€™t find a solution.

Now Iā€™m too fed up that the maker of this product doesnā€™t provide a solution, let alone respond to the issue. I contacted the shop where I bought the rock pi and asked what options are available to return the itemā€¦

Apparantely a new kernel has been released (see here). It might lead to a solutionā€¦

1 Like

Hey @alotje

Could you try again with the latest Armbian Buster current image (with Linux 5.3.x)?
It worked for me when booting from Radxa eMMC + Armbian SD card. Only needed to change /boot/armbianEnv.txt and add fdtfile=rockchip/rk3399-rock-pi-4.dtb as specified in the other thread. First boot can take a bit of time though!

Can confirm that this still does NOT work. SPI flashed properly with latest loader and trust image, attempting to boot Buster Minimal Nightly from SD ends in failure.

GPT  signature is wrong
LoadTrust Addr:0x1800
LoadTrust Addr:0x1c00
LoadTrust Addr:0x2000
LoadTrust Addr:0x2400
LoadTrust Addr:0x2800
LoadTrust Addr:0x2c00
LoadTrust Addr:0x3000
LoadTrust Addr:0x3400
Addr:0x1800 No find trust.img!
LoadTrustBL error:-3
SecureMode = 0
SecureInit ret = 0, SecureMode = 0

Then it hangs. With no SD card in, it attempts to boot from the network.

UPDATE: Shorting the SPI clock to GND allows the SD Card to boot successfully.

UPDATE2: Erasing UBoot from SPI Flash will also allow the SD Card to boot successfully.

2 Likes

Can you (or someone else who has a UART console) show the output of the ā€œprintenvā€ and ā€œhelpā€ commands from the latest version of u-boot SPI ? Or where can I see the sources from which it is going ? It seems there are several causes of the problem and they are related to different parts of the startup process (u-boot settings, user settings of the system being started, etc.).

By the way, for those who check different Armbian images, you need to take into account that the kernel 4 and 5 may need different settings of the name used by DTB.

I donā€™t have such hardware, so I might be wrong, but I would check to remove the u-boot (after writing the Armbian image) from the recorded SD or NVMe media. They may conflict with the SPI and interfere with the startup process.

1 Like

I did this
apt-get install -y rockpi4b-rk-u-boot-latest
/usr/local/sbin/rockpi4b_upgrade_bootloader.sh

boot SDcard Armbian 4.4.198, and same Armbian 5.3.11

DDR Version 1.20 20190314
In
channel 0
CS = 0
MR0=0x98
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
CS = 1
MR0=0x18
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 1
CS = 0
MR0=0x98
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
CS = 1
MR0=0x18
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 0 training pass!
channel 1 training pass!
change freq to 400MHz 0,1
channel 0
CS = 0
MR0=0x98
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
CS = 1
MR0=0x18
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 1
CS = 0
MR0=0x98
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
CS = 1
MR0=0x18
MR4=0x81
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 0 training pass!
channel 1 training pass!
change freq to 800MHz 1,0
Channel 0: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x2020
ch 1 ddrconfig = 0x101, ddrsize = 0x2020
pmugrf_os_reg[2] = 0x3AA1FAA1, stride = 0xD
OUT
Boot1: 2018-06-26, version: 1.14
CPUId = 0x0
ChipType = 0x10, 221
Spi_ChipId = ef4017
SpiBootInit:0
mmc0:cmd5,32
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30436MB
FwPartOffset=2000 , 0
StorageInit ok = 149915
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT signature is wrong
LoadTrust Addr:0x1800
LoadTrust Addr:0x1c00
LoadTrust Addr:0x2000
LoadTrust Addr:0x2400
LoadTrust Addr:0x2800
LoadTrust Addr:0x2c00
LoadTrust Addr:0x3000
LoadTrust Addr:0x3400
Addr:0x1800 No find trust.img!
LoadTrustBL error:-3
SecureMode = 0
SecureInit ret = 0, SecureMode = 0

stops here

I need other information. Turn off all media (SD NVMe etc.). Turn on the power and immediately stop running u-boot (press and hold the space bar). U-boot should stop and prompt for commands. Type printenv and press Enter. The result show here. So same for command ā€œHelp.ā€ By the way, judging by the attached conclusion, the problem is not the correct u-boot (the system tries to take the u-boot from the SD card, but it is not correct).

Try to write to SD card image for TV box for aml-g12, configure dtb in (extlinux.conf) and check startup (there is initially no u-boot for rk3399 and the system should try to use SPI). The result show here.

the keyboard (usb) does not work in this mode