Fail to boot armbian images after spi bootloader upgrade

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

This is done from the PC where the UART console output is started (when the terminal starts to output data to the console). :slight_smile:

I understand correctly that you now have a bootloader in SPI with support for running different systems (including NVMe). ? Can you do a little checking ?

Show more UART console output if you disable all media (SD card, NVMe module and USB stick).

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=0x3
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 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=0x3
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 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:cmd8,32
mmc0:cmd5,32
mmc0:cmd55,32
mmc0:cmd1,32
mmc0:cmd8,32
mmc0:cmd5,32
mmc0:cmd55,32
mmc0:cmd1,32
mmc0:cmd8,32
mmc0:cmd5,32
mmc0:cmd55,32
mmc0:cmd1,32
SdmmcInit=0 1
StorageInit ok = 21717
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT vendor signature is wrong
LoadTrust Addr:0x1800
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 1000
Load OK, addr=0x200000, size=0xef1e8
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):0e7a845
NOTICE: BL31: Built : 16:13:46, Apr 17 2019
NOTICE: BL31: Rockchip release version: v1.1
INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: plat_rockchip_pmu_init(1181): pd status 3e
INFO: BL31: Initializing runtime services
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

U-Boot 2017.09-2681-geb41d9a6ce (Nov 04 2019 - 09:32:53 +0000), Build: jenkins-linux-build-testing-2-85

Model: Rockchip RK3399 rockpi4b Board
PreSerial: 2
DRAM: 3.9 GiB
Relocation Offset is: f5bdf000
Sysmem: init
I2c speed: 400000Hz
PMIC: RK808
vdd-center init 950000 uV
MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0
Using default environment

Model: Rockchip RK3399 rockpi4b Board

Error: “rkimg_bootdev” not defined

Bootdev: mmc 1
MMC: no card present
mmc_init: -123, time 0
rockchip_get_bootdev: can’t find dev_desc!
[Vendor ERROR]:Invalid boot device type(0)
MMC: no card present
mmc_init: -123, time 0
rockchip_get_bootdev: can’t find dev_desc!
[Vendor ERROR]:Invalid boot device type(0)
MMC: no card present
mmc_init: -123, time 0
rockchip_get_bootdev: can’t find dev_desc!
rockchip_get_boot_mode: dev_desc is NULL!
MMC: no card present
mmc_init: -123, time 0
rockchip_get_bootdev: can’t find dev_desc!
init_resource_list: dev_desc is NULL!
Can’t find file:logo.bmp
failed to display uboot logo
CLK: (uboot. arml: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
CLK: (uboot. armb: enter 24000 KHz, init 24000 KHz, kernel 0N/A)
aplll 816000 KHz
apllb 24000 KHz
dpll 800000 KHz
cpll 24000 KHz
gpll 800000 KHz
npll 600000 KHz
vpll 24000 KHz
aclk_perihp 133333 KHz
hclk_perihp 66666 KHz
pclk_perihp 33333 KHz
aclk_perilp0 266666 KHz
hclk_perilp0 88888 KHz
pclk_perilp0 44444 KHz
hclk_perilp1 100000 KHz
pclk_perilp1 50000 KHz
Net: eth0: ethernet@fe300000
Hit key to stop autoboot(‘CTRL+C’): 0

Device 0: unknown device
MMC: no card present
mmc_init: -123, time 0
Card did not respond to voltage select!
mmc_init: -95, time 26
starting USB…
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
USB2: failed to get usb phy
Port not available.
USB3: failed to get usb phy
Port not available.
USB4: Can’t get the usbphy register address
probe failed, error -6
USB5: Can’t get the usbphy register address
probe failed, error -6
scanning bus 0 for devices… 1 USB Device(s) found
scanning bus 1 for devices… 1 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found

Device 0: unknown device
ethernet@fe300000 Waiting for PHY auto negotiation to complete… done
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.149 (258 ms)
*** Warning: no boot file name; using ‘C0A80195.img’
Using ethernet@fe300000 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.149
Filename ‘C0A80195.img’.
Load address: 0x800800
Loading: T T T T T T T T T T

Oh, I see a number of interesting things in the log. :slight_smile: Try now the following check. Download, unpack and burn to USB flash drive (not SD card) any last image for TV boxes Armbian or LE for rk3399 (links are in these topics). Check in (/extlinux/extlinux.conf) DTB setting for rock-pi-4. Connect the USB stick and turn on the power. Log run show here. I think you should normally start the system c USB flash drive. After that, can solve the issue of starting the system with NVMe.

extlinux.conf
ABEL LibreELEC
LINUX /KERNEL
FDT /rk3399-rock-pi-4.dtb
APPEND boot=UUID=2211-5513 disk=UUID=a321c910-4860-4321-bec0-31d20884f00c quiet console=uart8250,mmio32,0xff1a0000 console=tty0

not boot, not find USB stick

I can not