Writing u-boot to SPI on VIM3

Dear all,

writing the latest u-boot version 2021.07 from dl.khadas.com - Index of /Firmware/uboot/main-line/ just gives me this on my VIM3 while booting / setting kbi bootmode spi:

G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:B;RCY:0;SPINOR:0;0.
                                                                  bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:20000703
L2:00008067
L3:14000000
B2:00402000
B1:e0f83180

TE: 58106

BL2 Built : 19:23:21, Sep 18 2020. g12b g9fde858 - gongwei.chen@droid11-sz

Board ID = 7
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00012b86
board id: 7
Load FIP HDR DDR from SPI, src: 0x00010000, des: 0xfffd0000, size: 0x00004000, part: 0
FIP HDR CHK: 0x000000ff ADDR 0xfffd0000
reset...
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:B;RCY:0;SPINOR:0;0.
                                                                  bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:20000703
L2:00008067
L3:14000000
B2:00402000
B1:e0f83180

TE: 58149

BL2 Built : 19:23:21, Sep 18 2020. g12b g9fde858 - gongwei.chen@droid11-sz

Board ID = 7
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00012bb1
board id: 7
Load FIP HDR DDR from SPI, src: 0x00010000, des: 0xfffd0000, size: 0x00004000, part: 0
FIP HDR CHK: 0x000000ff ADDR 0xfffd0000
reset...
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:B;RCY:0;SPINOR:0;

Same behaviour if written manually via sf probe / sf write or via Krescue - always the same. Any hints to get u-boot working from SPI?

Thanks!

Hello @mcbain

@hyphop will help you about this issue.

Thanks @numbqq and @hyphop - that would be nice.

I really need to get u-boot / booting working from SPI as my MMC is dying and I need the ability to boot from NVMe directly.

@mcbain you can follow these steps to get uboot flashed to spi flash

  1. Flash OOWOW/Krescue on SD card and boot.
  1. Enter rescue shell:

  2. run the command spi_update_uboot online -k

Reboot your device, SPI flash will now be populated with uboot firmware

Regards.

Hello guys

i will check latest image, possible problem is new board Revision V14 maybe have SPI uboot problem

old board must works well

i will update status soon

@Electr1 What I actually tried was the following:

1.) Downloaded latest Krescue on SD Card, booted, did go to advanced and write latest u-boot to spi. This succeeded, but got into boot-loop (see log above)

2.) Downloaded https://dl.khadas.com/Firmware/uboot/main-line/VIM3.u-boot.spi.bin, placed on mmc part, booted to u-boot from mmc, did the following:

load mmc 2,1 1080000 VIM3.u-boot.spi.bin
sf probe
sf erase 0 +$filesize
sf write 1080000 0 $filesize
kbi bootmode w spi
kbi poweroff

same behaviour as above. I mean I can try to use OOWOW as well but I think as I already tried with Krescue, it should be the same, no?

Best regards

@hyphop Great, thanks for letting me know. Just keep me updated, thanks!

@mcbain yes that means the uboot successfully on SPI flash, is your SSD not able to be detected ?

Please check that the PCIe/USB3 switch in Krescue is set to PCIe if you need to detect SSD.

In my case, eMMC has been cleared and bootloop occur, but triple press function key to get into upgrade mode. Then I can boot SD or USB disk easily.

will check/try later.

but shouldn’t I be able to skip u-boot with space key, even if mmc/nvme is empty while booting from spi? as it just gets me to bl2_stage_init 0x01 → reset… and no chance to get into u-boot cmd line to set options, etc.

Please check it VIM3 and VIM3L v14 [Khadas Docs]

i will update status very soon

UPDATE:

TRY only for old revisions board v12

~oowow shell# 

$ curl -OjkL https://github.com/khadas/khadas-uboot/releases/download/0.16.4/VIM3.u-boot.spi.bin
$ spi_update < VIM3.u-boot.spi.bin
$ kbi bootmode spi
$ kbi poweroff

2 Likes

I can confirm that this workaround works on V12 and gives me ability to boot from nvme directly. Thanks again!

1 Like