[May 11] LibreELEC(KODI) - 20190324 - Pine A64 (+) |[May 11] LibreELEC(KODI) - 20190324 - PINE A64-LTS / SOPINE | [May 09] NEMS Linux 1.5 - Build1 - Pine A64 (+) | [May 09] NEMS Linux 1.5 - Build 1 - Rock64 | [May 09] NEMS Linux 1.5 - Build 1 - PINE A64-LTS / SOPINE | [May 09] NEMS Linux 1.5 - Build 1 - RockPro |[April 23] Q4OS ver 2.7-r5 - 1080P Pinebook / Pinebook

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


Not able to write u-boot to SPI
#1
Hello everyone.

I have a trouble flashing uboot to my RockPro64 4GB variant. I am trying to use rock64_write_spi_flash.sh script, but nothing is flashing.

I made all steps according to wiki, booted from SD card, used latest ubuntu image, but everything I get is following error:


Code:
[email protected]:/dev$ sudo su
[sudo] password for rock64:
[email protected]:/dev# rock64_write_spi_flash.sh
Doing this will overwrite data stored on SPI Flash
 and it will require that you use eMMC or SD
 as your boot device.

Type YES to continue or Ctrl-C to abort.
YES
Writing /dev/mtd0 with content of /usr/lib/u-boot-rockpro64/rkspi_loader.img
Erasing 4 Kibyte @ 0 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 0 (mtd0)
       error 110 (Connection timed out)
flash_erase: error!: /dev/mtd0: MTD Erase failure
            error 110 (Connection timed out)
Erasing 4 Kibyte @ 1000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 1 (mtd0)
       error 110 (Connection timed out)
flash_erase: error!: /dev/mtd0: MTD Erase failure
            error 110 (Connection timed out)
Erasing 4 Kibyte @ 2000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 2 (mtd0)
       error 110 (Connection timed out)
flash_erase: error!: /dev/mtd0: MTD Erase failure
            error 110 (Connection timed out)
Erasing 4 Kibyte @ 3000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 3 (mtd0)
       error 110 (Connection timed out)
flash_erase: error!: /dev/mtd0: MTD Erase failure
            error 110 (Connection timed out)
Erasing 4 Kibyte @ 4000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4 (mtd0)
       error 110 (Connection timed out)
flash_erase: error!: /dev/mtd0: MTD Erase failure
            error 110 (Connection timed out)
Erasing 4 Kibyte @ 5000 --  0 % complete ^C^C


I have even tried steps written here: https://forum.pine64.org/showthread.php?...e#pid40677   (,only changed the overlay address to "ff1d0000" to fit to RockPro64 dts).

I never flashed anything to SPI before, so it can't be messed up. I tried the SD card method with only ayufan uboot image and this don't work either. Nothing is written to it..

Output of "mtdinfo":

Code:
[email protected]:/dev# mtdinfo
Count of MTD devices:           3
Present MTD devices:            mtd0, mtd1, mtd2
Sysfs interface supported:      yes

[email protected]:/dev# mtdinfo /dev/mtd0
mtd0
Name:                           loader
Type:                           nor
Eraseblock size:                4096 bytes, 4.0 KiB
Amount of eraseblocks:          1016 (4161536 bytes, 4.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:0
Bad blocks are allowed:         false
Device is writable:             true

[email protected]:/dev# mtdinfo /dev/mtd1
mtd1
Name:                           env
Type:                           nor
Eraseblock size:                4096 bytes, 4.0 KiB
Amount of eraseblocks:          8 (32768 bytes, 32.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:2
Bad blocks are allowed:         false
Device is writable:             true

[email protected]:/dev# mtdinfo /dev/mtd2
mtd2
Name:                           vendor
Type:                           nor
Eraseblock size:                4096 bytes, 4.0 KiB
Amount of eraseblocks:          64 (262144 bytes, 256.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:4
Bad blocks are allowed:         false
Device is writable:             true


Output of dmesg:
Code:
[email protected]:/dev# dmesg | grep spi
[    2.015555] rockchip-spi ff1d0000.spi: Failed to request TX DMA channel
[    2.016160] rockchip-spi ff1d0000.spi: Failed to request RX DMA channel
[    2.016778] rockchip-spi ff1d0000.spi: no high_speed pinctrl state
[    2.017904] m25p80 spi32766.0: gd25q128 (16384 Kbytes)
[    2.018394] 3 ofpart partitions found on MTD device spi32766.0
[    2.018924] Creating 3 MTD partitions on "spi32766.0":
[  164.537097] m25p80 spi32766.0: flash operation timed out
[  204.537255] m25p80 spi32766.0: flash operation timed out
[  244.537347] m25p80 spi32766.0: flash operation timed out
[  284.537402] m25p80 spi32766.0: flash operation timed out
[  324.537509] m25p80 spi32766.0: flash operation timed out
[  364.537587] m25p80 spi32766.0: flash operation timed out


Thanks for any suggestions. This is really driving me nuts.. Any help will be appreciated.. :-)
Reply
#2
Hi! I have same issue.I tried all roms from https://github.com/ayufan-rock64/linux-build/releases

I found two solution:
1. https://github.com/ayufan-rock64/linux-u-boot/releases write image and do boot, spi will be writen, white led will blinking.
2. I was able to flash SPI using http://wiki.pine64.org/index.php/ROCKPro...htly_Build , do download files from first link in os
Reply
#3
Please use this image to write to spi.

https://github.com/ayufan-rock64/linux-u...o64.img.xz

Quick test


Code:
U-Boot SPL 2017.09-rockchip-ayufan-1035-gd646df03ac (Oct 26 2018 - 08:36:09)    
booted from SD                                                                  
Trying to boot from MMC2                                                        
NOTICE:  BL31: v1.3(debug):65aa5ce                                              
NOTICE:  BL31: Built : 10:47:37, Jun 19 2018                                    
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(1151): pd status 3e                            
INFO:    BL31: Initializing runtime services                                    
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE iniK
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-rockchip-ayufan-1035-gd646df03ac (Oct 26 2018 - 08:36:24 +0000)  
                                                                               
Model: Pine64 RockPro64                                                        
DRAM:  2 GiB                                                                    
[email protected]_center: ; enabling                                                
[email protected]_cpu_l: ; enabling                                                
[email protected]_ddr: ; enabling (ret: -38)                                        
[email protected]_1v8: set 1800000 uV; enabling                                    
[email protected]_dvp: set 1800000 uV; enabling                                  
[email protected]_touch: set 3000000 uV; enabling                                
[email protected]_pmu: set 1800000 uV; enabling                                  
[email protected]_sd: set 3300000 uV; enabling                                      
[email protected]_codec: set 3000000 uV; enabling                                
[email protected]_1v5: set 1500000 uV; enabling                                      
[email protected]_codec: set 1800000 uV; enabling                                
[email protected]_3v0: set 3000000 uV; enabling                                      
[email protected]_s3: ; enabling (ret: -38)                                    
[email protected]_s0: ; enabling (ret: -38)                                    
[email protected]_s0: set 1800000 uV; enabling (ret: -38)                        
[email protected]_12v: set 12000000 uV; enabling (ret: -38)                            
[email protected]_sys: set 5000000 uV; enabling (ret: -38)                            
[email protected]_sys: set 3300000 uV; enabling (ret: -38)                      
[email protected]_phy: ; enabling (ret: -38)                                
[email protected]_log: ; enabling (ret: -38)                                          
MMC:   [email protected]: 0, [email protected]: 1                                    
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB  
*** Warning - bad CRC, using default environment                                
                                                                               
In:    [email protected]                                                          
Out:   [email protected]                                                          
Err:   [email protected]                                                          
Model: Pine64 RockPro64                                                        
Net:   eth0: [email protected]                                                  
Hit any key to stop autoboot:  0                                                
Card did not respond to voltage select!                                        
mmc_init: -95, time 19                                                          
switch to partitions #0, OK                                                    
mmc1 is current device                                                          
Scanning mmc 1:2...                                                            
Found U-Boot script /boot.scr                                                  
reading /boot.scr                                                              
827 bytes read in 3 ms (268.6 KiB/s)                                            
## Executing script at 00500000                                                
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB  
reading rkspi_loader.img                                                        
1461372 bytes read in 156 ms (8.9 MiB/s)                                        
SF: 4194304 bytes @ 0x0 Erased: OK                                              
device 0 offset 0x0, size 0x164c7c                                              
SF: 1461372 bytes @ 0x0 Written: OK          


And please use image for rockpro64 Exclamation
Sorry for any mistakes. English is not my native language

1. RP64 v2.0 / PCIe NVMe as root / sd-card as boot / 2,5 Zoll HDD 1TB (USB3) using as Webserver .... (Kernel 4.4.167-1140-rockchip-ayufan-g6f266fb5d677)
2. RP64 v2.1 / PCIe SATA Marvell 88SE9230 Chipsatz / sd-card / 2 * 2,5 Zoll 2TB HDD (raid1) / using as NAS / Kernel 5.0.0-1101-ayufan-g41eeb7cd789e
3. RP64 v2.1 / testing.....testing....testing

https://forum.frank-mankel.org/category/14/rockpro64



Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  rockpro64 4gb dont boot mehdy 5 235 05-12-2019, 06:41 PM
Last Post: mehdy
  Rockpro64 boot issues larsgn 7 361 04-23-2019, 11:15 AM
Last Post: Bullet64
  Hardware issue overheating while booting and fail to boot DIDquest 13 901 03-23-2019, 02:50 AM
Last Post: nJoy.
  After power loss, boot never gets to white LED josepht 6 304 02-07-2019, 10:29 AM
Last Post: josepht
  Cannot get RockPro64 to boot randyc 7 660 01-24-2019, 09:11 PM
Last Post: 40four
  Can't get Rockpro to boot Crnppscls 4 389 12-15-2018, 05:16 PM
Last Post: Crnppscls
Sad No Boot mysli 7 851 12-10-2018, 03:54 PM
Last Post: drluispaulo
  Extremely low write speed on GB ethernet omer811 2 385 10-24-2018, 10:31 AM
Last Post: omer811
  u-boot serial port speed? zener 2 161 10-06-2018, 12:47 PM
Last Post: zener
  New RockPro64 4GB - No SD BOOT 2Play! 9 1,313 10-02-2018, 03:29 AM
Last Post: 2Play!

Forum Jump:


Users browsing this thread: 1 Guest(s)