Jump to content

Booting ROCK Pi 4(A/B/C) with mainline u-boot in SPI, NVMe and Armbian v20.11.x


piter75

Recommended Posts

With Armbian v20.11 one can write mainline u-boot image to board's SPI and enjoy booting nvme drives without any mmc devices.

Prerequisities: ROCK Pi 4(A/B/C) v1.4 or 1.3 with SPI soldered in (v1.3 comes without SPI flash from the factory).

 

  1. If you already have Radxa's u-boot written to SPI you need to short pins 23 and 25 for Armbian to boot
  2. Boot fresh image of Armbian v20.11.x for ROCK Pi 4(A/B/C)
  3. Add the following lines to /boot/armbianEnv.txt
    • overlays=spi-jedec-nor
    • param_spinor_spi_bus=1
  4. Reboot
  5. If you shorted 23-25 pins in 1.) then:
    • disconnect them after the ROCK Pi 4 fully boot's 
    • enable spi-nor by executing (as root):
      echo spi1.0 > /sys/bus/spi/drivers/spi-nor/bind
    • verify that the SPI mtd interface is enabled by running
      ls /dev/mtdblock0
    • if the last command does not list any file then something went wrong between 3.) and 5.)
  6. Run nand-sata-install
    • choose option: "Boot from SPI - system on SATA, USB or NVMe"
    • choose NVMe partition, eg. /dev/nvme0n1p1
    • accept erasing of the choosen partition with "Yes"
    • choose fs type (tested with ext4)
    • wait a few minutes for rootfs transfer to chosen partition
    • choose writing SPI bootloader with "Yes"
    • confirm that you want to flash it with "Yes"
    • wait ~60 seconds for writing
    • choose Exit
  7. Reboot
  8. Enjoy Armbian booting with SPI / NVMe

 

Why bother with mainline u-boot?

It is known to boot some NVMe drives that legacy u-boot from Radxa has issues with, eg. SAMSUNG 970 EVO Plus and SAMSUNG PM981.

This does not mean that all NVMe drives are supported, YMMV.

 

Which NVMe drives are known to be working?

Corsair MP510 240GB/480GB/960GB

Gigabyte SSD M.2 2280 PCIe x2 Model:GP-GSM2NE8128GNTD

HP SSD EX900 M.2 NVMe 120GB. Model: 2YY42AA#ABB
Intel SSD 660p Model:SSDPEKNW512GB
Kingston A1000 SSD 240GB (PHISON PS5008-E8-10)

Kingston A2000 M.2 2280 PCIe NVMe

PNY 250GB XLR8 CS3030 M.2 NVMe SSD PCIe Gen3 x4

Sabrent Rocket 256GB NVMe PCIe M.2 2280

Samsung 970 EVO Plus SSD 250GB M.2 2280, PCIe 3.0 x4, NVMe, 3500/2300 MB/s

Samsung PM981 256GB

XPG SX6000 Lite 128GB (ASX6000LNP-128GT-C)

 

Why not using Radxa's u-boot SPI image?

Ambian's u-boot configuration is incompatible with Radxa's SPI image :(

 

Why Armbian is using u-boot that is incompatible with Radxa's?

It uses mainline u-boot with Open Source TPL/SPL/proper and BL31 from Rockchip packaged into u-boot and we may switch to using open source ATF instead of the BL31 in the future.

 

Can I boot Radxa's images with Armbian's u-boot written to SPI?

Yes. Armbian's SPI u-boot is compatible with Radxa's images available here: https://github.com/radxa/rock-pi-images-released/releases

It may not be compatible with some older images (released before July 2020) because of the device tree filename change.

Link to comment
Share on other sites

Good day

 

I dont understand, sorry i noob in this.

1. You need flash the image with only this step https://wiki.radxa.com/Rockpi4/dev/spi-install#Case_2:_Update_SPI_flash_with_bootloader_inside? only leave to mask mode? and is this over? in my case no working, later again flash but with sudo rkdeveloptool db /path/to/rk3399_loader_spinor_v1.15.114.bin and nothing no boot, and later with

For ROCK Pi 4B

sudo rkdeveloptool wl 0 /etc

 

all i make with emmc for try, for later use nvme

 

and no working, i do something wrong? thanks if you can help

 

Link to comment
Share on other sites

  • Igor pinned this topic
U-Boot SPL 2020.07-armbian (Nov 30 2020 - 18:39:44 +0100)
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

i try with 7 nvme, also sdcard not boot

Link to comment
Share on other sites

7 hours ago, atula said:

i try with 7 nvme, also sdcard not boot

That's interesting. Seems like it is not trying to load u-boot proper from SPI at all.

You can short the 23-25 for a short moment during boot to disable SPI and boot with SD to revive your ROCK Pi.

 

Do you know exactly what SPI flash device you have soldered in? What is your ROCK Pi model and version?

The SPI model should be printed when booted with the SD card and overlay enabled - be sure to disconnect pins 23-25 as soon as the u-boot starts.

 

It should rather look something like this (with Corsair MP510):

Spoiler

U-Boot TPL 2020.07-armbian (Dec 01 2020 - 21:26:42)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.07-armbian (Dec 01 2020 - 21:26:42 +0100)
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 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:    If lpddr4 need support multi frequency,
INFO:    please update loader!
INFO:    Current ctl index[0] freq=400MHz
INFO:    Current ctl index[1] freq=800MHz
INFO:    plat_rockchip_pmu_init(1190): 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 2020.07-armbian (Dec 01 2020 - 21:26:42 +0100)

SoC: Rockchip rk3399
Reset cause: RST
Model: Radxa ROCK Pi 4C
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPI Flash... SF: Detected XT25F32B with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Model: Radxa ROCK Pi 4C
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
Card did not respond to voltage select!

Device 0: Vendor: 0x1987 Rev: ECFM22.6 Prod: xxxxxxxxxxxxxxxxxxxxx
            Type: Hard Disk
            Capacity: 457862.8 MB = 447.1 GB (937703088 x 512)
... is now current device
Scanning nvme 0:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 2 ms (1.5 MiB/s)
## Executing script at 00500000
Boot script loaded from nvme 0
288 bytes read in 2 ms (140.6 KiB/s)
12435905 bytes read in 25 ms (474.4 MiB/s)
27574784 bytes read in 52 ms (505.7 MiB/s)
74642 bytes read in 3 ms (23.7 MiB/s)
1314 bytes read in 2 ms (641.6 KiB/s)
Applying kernel provided DT overlay rockchip-spi-jedec-nor.dtbo
2698 bytes read in 2 ms (1.3 MiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    12435841 Bytes = 11.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f1336000, end f1f12181 ... OK
   Loading Device Tree to 00000000f12bb000, end 00000000f1335fff ... OK

Starting kernel ...

 

 

Link to comment
Share on other sites

U-Boot TPL 2020.07-armbian (Nov 30 2020 - 18:39:44)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.07-armbian (Nov 30 2020 - 18:39:44 +0100)
Trying to boot from MMC1
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 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:    If lpddr4 need support multi frequency,
INFO:    please update loader!
INFO:    Current ctl index[0] freq=400MHz
INFO:    Current ctl index[1] freq=800MHz
INFO:    plat_rockchip_pmu_init(1190): 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 2020.07-armbian (Nov 30 2020 - 18:39:44 +0100)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPI Flash... unrecognized JEDEC id bytes: ef, 40, 17
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Model: Radxa ROCK Pi 4B
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 6 ms (517.6 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
251 bytes read in 4 ms (60.5 KiB/s)
13480044 bytes read in 579 ms (22.2 MiB/s)
27574784 bytes read in 1173 ms (22.4 MiB/s)
74167 bytes read in 12 ms (5.9 MiB/s)
1314 bytes read in 8 ms (160.2 KiB/s)
Applying kernel provided DT overlay rockchip-spi-jedec-nor.dtbo
2698 bytes read in 8 ms (329.1 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    13479980 Bytes = 12.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f1237000, end f1f1202c ... OK
   Loading Device Tree to 00000000f11bc000, end 00000000f1236fff ... OK

Starting kernel ...
 

Link to comment
Share on other sites

3 minutes ago, atula said:

Loading Environment from SPI Flash... unrecognized JEDEC id bytes: ef, 40, 17

That's the cultprit - u-boot does not recognise your SPI flash chip.

I only enabled XTX flash chips for ROCK Pi 4 as those come preinstalled but I should enable some more of them especially for owners of v1.3 that did the soldering themselves.

I will try to squeeze it into v20.11.2

Link to comment
Share on other sites

1 hour ago, atula said:

how to get it, xxxU-Boot 2020.07-armbianxxx.bin? i try flash it with prommer direct to SPI 

It is rkspi_loader.img file in /usr/lib/linux-u-boot-${BRANCH}-${BOARD}_${VERSION}_${ARCH} folder but yours will not work anyway.

Try this one: https://users.armbian.com/piter75/rkspi_loader-v20.11.2-trunk.img

It contains the fix and should work with your board.

You can flash it with dd if=... of=/dev/mtdblock0 bs=4K

Link to comment
Share on other sites

Hi Piter!

I have a problem with this line of your Howto:

> echo spi1.0 > /sys/bus/spi/drivers/spi-nor/bind

 

I log in as root, top right corner acknowledges it. I have the flash chip (Rock Pi 4 A V. 1.4)

If I put the line in I get "no such device"

If I change the greater symbol to the pipe-symbol I get "no permission"

The file bind is there, owned by root and with "write only" permission.

 

When I run "ls /dev/mtdblock0" I get "mtdblock0"

So I went on. Everything does do, flashing, copying. Only next boot does not...

 

After that the SD-card does not boot anymore, not with NVME taken out and not with 23-25 shorted, I have to flash it new.

 

I have tried this now several times on two rock Pi 4, it's always the same.

 

What am I missing?

 

Thank you for your work!

 

Joaho

Link to comment
Share on other sites

1 hour ago, Joaho said:

> echo spi1.0 > /sys/bus/spi/drivers/spi-nor/bind

This is only needed if already have Radxa's bootloader in SPI and if you kept pins 23,25 shorted all the time during boot.

 

1 hour ago, Joaho said:

When I run "ls /dev/mtdblock0" I get "mtdblock0"

This means your SPI flash is recognised in kernel and you probably did not short pins 23,25 during boot and that you don't need to do steps in point 5) ;-)

 

1 hour ago, Joaho said:

What am I missing?

Current u-boot image in released images (<= v20.11.1) is only compatible with XTX SPI flash chips and I think you may have different chip - similar to @atula's situation.

 

9 hours ago, piter75 said:

Try this one: https://users.armbian.com/piter75/rkspi_loader-v20.11.2-trunk.img

It contains the fix and should work with your board.

You can flash it with dd if=rkspi_loader-v20.11.2-trunk.img of=/dev/mtdblock0 bs=4K

Try if writhing file mentioned above with dd fixes your issue.

 

Can you post your serial console logs during failed boot?

Can you also verify what SPI flash chip you have?

Link to comment
Share on other sites

2 minutes ago, thc013 said:

but isnt it just for every rk3399 board with a spi on the pinout to boot from spi .

 

All of them can probably do that but it needs to be properly configured in u-boot.

This is only configured for ROCK Pi 4 in Armbian now - OrangePi 4 is not supported for this boot method at this point.

Link to comment
Share on other sites

something väärin järjestelmissäni

 

root @ rockpi-4a: / boot # dd if = rkspi_loader-v20.11.2-trunk.img / = dev / mtdblock0 bs = 4K
1016 + 0 tietuetta
1016: ssa + 0 tietuetta
kopioitu 4161536 tavua (4,2 Mt, 4,0 Mt) , 70,186 s, 59,3 kB / s

 

U-Boot SPL 2020.07-armbian (03.12.2020 - 21:19:03 +0100)
Käynnistysyritys MMC1-
kortilta ei vastannut jännitteen valintaan!
spl: mmc init epäonnistui virheellä: -95
Käynnistäminen MMC2-
kortilta ei vastannut jännitteen valintaan!
spl: mmc init epäonnistui virheellä: -95
SPL: käynnistys epäonnistui kaikilta käynnistyslaitteilta
### ERROR ### PALAUTA taulu ###

 

Link to comment
Share on other sites

Whow! Are you fast! What time zone are you in? Here is lazy evening...

 

>> echo spi1.0 > /sys/bus/spi/drivers/spi-nor/bind

> This is only needed if already have Radxa's bootloader in SPI and if you kept pins 23,25 shorted all the time during boot.

My mistake! I only left out the first line of that block. Facepalm...

 

>Try if writhing file mentioned above with dd fixes your issue.

Of course! Tomorrow.

 

> Can you post your serial console logs during failed boot?

I don't have one. Yet.

 

Can you also verify what SPI flash chip you have?

You know that this is under the heatsink? That I have to take the thing completely apart?

OK. I do it if I have to. First I try the dd-fix.

 

Thanks a lot!

 

Joaho

 

 

 

 

Link to comment
Share on other sites

5 minutes ago, atula said:

samting wrong in my systems

I remember seeing your post about running Radxa's u-boot in SPI so it's probably rather something wrong with our image ;-)

 

Can you clear the SPI and boot this image: https://users.armbian.com/piter75/Armbian_21.02.0-trunk_Rockpi-4b_buster_current_5.9.12_minimal.img.xz

Do you still see this line when booting? "Loading Environment from SPI Flash... unrecognized JEDEC id bytes: ef, 40, 17".

Or is your spi chip recognised now?

 

6 minutes ago, Joaho said:

You know that this is under the heatsink? That I have to take the thing completely apart?

Don't do that! ;-) There is a simpler way - your spi flash chip is recognised by kernel.

Do the following: "dmesg | grep spi" and post the results.

Link to comment
Share on other sites

34 minutes ago, Joaho said:

> Can you post your serial console logs during failed boot?

I don't have one. Yet.

 

(emphasis mine)

 

That's the spirit!  :thumbup:  :beer:

 

IMO, everyone who play with SBC should own at least one.  In fact, it's on my list to add that to the docs, right in "Getting Started" section...

Link to comment
Share on other sites

@atula @Joaho I have made a mistake while publishing the spi flash image - it actually did not fix the support for other flash chips :(

 

Please try to use this one: https://users.armbian.com/piter75/rkspi_loader-v20.11.2-trunk-v2.img (I double checked it).

And write it with: dd if=rkspi_loader-v20.11.2-trunk-v2.img of=/dev/mtdblock0 bs=4K

Link to comment
Share on other sites

Thank you for very nice work!


~# dd if=rkspi_loader-v20.11.2-trunk-v2.img of=/dev/mtdblock0 bs=4K
1016+0 records in
1016+0 records out
4161536 bytes (4.2 MB, 4.0 MiB) copied, 67.6658 s, 61.5 kB/s


Armbian 20.11.1 Buster ttyS2

rockpi-4a login:
U-Boot TPL 2020.07-armbian (Dec 04 2020 - 22:10:39)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.07-armbian (Dec 04 2020 - 22:10:39 +0100)
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 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:    If lpddr4 need support multi frequency,
INFO:    please update loader!
INFO:    Current ctl index[0] freq=400MHz
INFO:    Current ctl index[1] freq=800MHz
INFO:    plat_rockchip_pmu_init(1190): 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 2020.07-armbian (Dec 04 2020 - 22:10:39 +0100)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPI Flash... SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Model: Radxa ROCK Pi 4B
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 6 ms (517.6 KiB/s)
## Executing script at 00500000
Boot script loaded from mmc 1
251 bytes read in 4 ms (60.5 KiB/s)
13478362 bytes read in 574 ms (22.4 MiB/s)
27574784 bytes read in 1169 ms (22.5 MiB/s)
74167 bytes read in 12 ms (5.9 MiB/s)
1314 bytes read in 10 ms (127.9 KiB/s)
Applying kernel provided DT overlay rockchip-spi-jedec-nor.dtbo
2698 bytes read in 10 ms (262.7 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    13478298 Bytes = 12.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f1237000, end f1f1199a ... OK
   Loading Device Tree to 00000000f11bc000, end 00000000f1236fff ... OK

Starting kernel ...

Link to comment
Share on other sites

tested and works rkspi_loader-v20.11.2-trunk-v2.img

 

Kingston A2000 M.2 2280 PCIe NVMe
Gigabyte SSD M.2 2280 PCIe x2 Model:GP-GSM2NE8128GNTD

Kingston 240GB A1000 SSD = PHISON PS5008-E8-10
Samsung 250GB 970 EVO Plus SSD-levy, M.2 2280, PCIe 3.0 x4, NVMe, 3500/2300 MB/s
Intel SSD 660p Model:SSDPEKNW512GB
PNY 250GB XLR8 CS3030 M.2 NVMe SSD PCIe Gen3 x4

 

5.9.11

also old 4.4.213 boot from spi

Link to comment
Share on other sites

2 hours ago, atula said:

tested and works rkspi_loader-v20.11.2-trunk-v2.img

Thanks for taking the time and testing :)

I will add a paragraph for known working drives in in the opening post.

 

This fixed image will be integrated in v20.11.2 in a few days so it should be easier to use it.

Link to comment
Share on other sites

Am 4.12.2020 um 21:04 schrieb piter75:

Can you also verify what SPI flash chip you have?

OK. I've seen your message about Fix V2 before trying, lucky.

Flashing kind of worked, i got the messages 1600 something in, etc., but this went incredibly fast, not even one second.

Next boot not good.

 

Unfortunately your hint how to find out the flash chip did not work. When I run "dmesg | grep spi" I get NOTHING except the cursor in the next line.

 

Do you have another hint or do I take it apart tomorrow?

 

Joaho

 

BTW: Can you point me to something where i can learn what a serial console is and what I need? Thanks!

Edited by Joaho
Only allowed 1 post
Link to comment
Share on other sites

12 hours ago, Joaho said:

Flashing kind of worked, i got the messages 1600 something in, etc., but this went incredibly fast, not even one second.

 

 

12 hours ago, Joaho said:

When I run "dmesg | grep spi" I get NOTHING except the cursor in the next line.

Are you sure you have spi-nor-jedec overlay enabled and configured (as outlined in point 3))?

Do you see the /dev/mtdblock0 file straight after reboot?

Can you post the link to the file generated by running: armbianmonitor -u

 

12 hours ago, Joaho said:

BTW: Can you point me to something where i can learn what a serial console is and what I need? Thanks!

In this case it allows you to easily debug all stages of the boot process and see what's wrong.

https://wiki.radxa.com/Rockpi4/dev/serial-console

Link to comment
Share on other sites

And USB stick

 

Spoiler

Device 0: unknown device
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus dwc3: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus dwc3 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: Mass     Rev: 1.00 Prod: Storage Device
            Type: Removable Hard Disk
            Capacity: 30436.5 MB = 29.7 GB (62333952 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 4 ms (777.3 KiB/s)
## Executing script at 00500000
Boot script loaded from usb 0
251 bytes read in 5 ms (48.8 KiB/s)
13478362 bytes read in 717 ms (17.9 MiB/s)
27574784 bytes read in 1457 ms (18 MiB/s)
74167 bytes read in 13 ms (5.4 MiB/s)
1314 bytes read in 9 ms (142.6 KiB/s)
Applying kernel provided DT overlay rockchip-spi-jedec-nor.dtbo
2698 bytes read in 10 ms (262.7 KiB/s)
Applying kernel provided DT fixup script (rockchip-fixup.scr)
## Executing script at 09000000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    13478298 Bytes = 12.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f1237000, end f1f1199a ... OK
   Loading Device Tree to 00000000f11bc000, end 00000000f1236fff ... OK

Starting kernel ...


Armbian 20.11.1 Buster ttyS2

rockpi-4a login:

 

 

 

its all what need.....SPI.....

Edited by TRS-80
put moderate length output inside code block inside spoiler
Link to comment
Share on other sites

Hello,

I have a Rock Pi 4B 4GB rev. 1.3 without SPI-Flash. Now all newer Armbian-Images does not boot from SD-Card.  With old U-Boot, for example June 15 I can boot from SD all new images on nvme, USB and SD. Maybe with new SPI-Boot we have lost to boot without SPI?

The complete serial out is:

 

Spoiler

U-Boot TPL 2020.07-armbian (Nov 23 2020 - 19:42:11)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.07-armbian (Nov 23 2020 - 19:42:11 +0100)
Trying to boot from MMC1
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 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:    If lpddr4 need support multi frequency,
INFO:    please update loader!
INFO:    Current ctl index[0] freq=400MHz
INFO:    Current ctl index[1] freq=800MHz
INFO:    plat_rockchip_pmu_init(1190): 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 2020.07-armbian (Nov 23 2020 - 19:42:11 +0100)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM:  3.9 GiB

 

 

 

Please can you help me to find the reason?

Thanks a lot,

BrUser

 

 

 

Edited by TRS-80
put moderate length output inside code block inside spoiler
Link to comment
Share on other sites

Awesome, I have been waiting for this possibility for so long.

 

I can confirm that it also runs with an HP SSD EX900 M.2 NVMe 120GB. Model: 2YY42AA#ABB

Armbian 20.11.3 Focal with Linux 5.9.14-rockchip64

Rock Pi 4A v1.4

 

Thank you @piter75

Edited by BiNiCKNiCH
Link to comment
Share on other sites

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