There is utility rkdeveloptool
which i using for flashing chip from this guide.
I want to upload image from Radxa after setting it up.
My Radxa has 16Gb eMMC and I tried did so:
sudo rkdeveloptool rl 0 33554432 image.img
33554432 is a count of sectors with 512 bytes in 16Gb. I got an error:
Read LBA to file (91%)
Read LBA failed!
Then i just multiply 33554432 to 0.9 and
sudo rkdeveloptool rl 0 30198988 image.img
Read LBA to file (100%)
Reading was success))
Then tried to flash empty Radxa :
sudo rkdeveloptool db rk356x_spl_loader_ddr1056_v1.10.111.bin
sudo rkdeveloptool wl 0 image.img
Write LBA from file (100%)
sudo rkdeveloptool rd
Nothing was loaded (( In Debug UART I saw:
DDR Version V1.13 20220218
ln
ddrconfig:7
LP4 MR14:0x4d
LPDDR4, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=14 CS1 Row=14 CS=2 Die BW=16 Size=1024MB
tdqss: cs0 dqs0: 409ps, dqs1: 313ps, dqs2: 337ps, dqs3: 241ps,
tdqss: cs1 dqs0: 385ps, dqs1: 313ps, dqs2: 313ps, dqs3: 217ps,
change to: 324MHz
PHY drv:clk:38,ca:38,DQ:30,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
change to: 528MHz
PHY drv:clk:38,ca:38,DQ:30,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x78
change to: 780MHz
PHY drv:clk:38,ca:38,DQ:30,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x5d
change to: 1056MHz(final freq)
PHY drv:clk:38,ca:38,DQ:30,odt:60
vrefinner:16%, vrefout:29%
dram drv:40,odt:80
vref_ca:00000068
clk skew:0x3f
cs 0:
the read training result:
DQS0:0x3d, DQS1:0x3c, DQS2:0x3c, DQS3:0x34,
min : 0xc 0xe 0x10 0xd 0x2 0x5 0x8 0x4 , 0x7 0x7 0x3 0x1 0xb 0xb 0xf 0xa ,
0x10 0xd 0xd 0xb 0x5 0x1 0x3 0x6 , 0x9 0x4 0x3 0x1 0xc 0xc 0x8 0xb ,
mid :0x2a 0x2a 0x2d 0x2a 0x1f 0x21 0x25 0x22 ,0x24 0x23 0x20 0x1d 0x28 0x28 0x2a 0x25 ,
0x2b 0x29 0x27 0x26 0x20 0x1c 0x1e 0x20 ,0x24 0x20 0x21 0x1d 0x28 0x28 0x24 0x27 ,
max :0x48 0x47 0x4a 0x47 0x3d 0x3d 0x43 0x40 ,0x41 0x3f 0x3d 0x3a 0x46 0x45 0x46 0x41 ,
0x46 0x45 0x41 0x42 0x3c 0x38 0x39 0x3b ,0x40 0x3d 0x3f 0x39 0x45 0x44 0x41 0x43 ,
range:0x3c 0x39 0x3a 0x3a 0x3b 0x38 0x3b 0x3c ,0x3a 0x38 0x3a 0x39 0x3b 0x3a 0x37 0x37 ,
0x36 0x38 0x34 0x37 0x37 0x37 0x36 0x35 ,0x37 0x39 0x3c 0x38 0x39 0x38 0x39 0x38 ,
the write training result:
DQS0:0x76, DQS1:0x69, DQS2:0x6c, DQS3:0x5f,
min :0x97 0x9b 0x9b 0x98 0x8f 0x93 0x95 0x95 0x94 ,0x87 0x87 0x83 0x80 0x8b 0x8d 0x8e 0x8d 0x88 ,
0x8e 0x8d 0x8b 0x8b 0x85 0x82 0x85 0x8b 0x89 ,0x84 0x83 0x80 0x7c 0x89 0x89 0x87 0x89 0x83 ,
mid :0xb4 0xb7 0xb8 0xb4 0xac 0xaf 0xb1 0xb1 0xb0 ,0xa4 0xa3 0x9f 0x9d 0xa8 0xa9 0xa9 0xa9 0xa4 ,
0xab 0xaa 0xa7 0xa7 0xa0 0x9c 0x9e 0xa4 0xa5 ,0xa2 0x9e 0x9c 0x99 0xa5 0xa6 0xa3 0xa6 0x9f ,
max :0xd2 0xd3 0xd5 0xd1 0xc9 0xcc 0xce 0xcd 0xcc ,0xc2 0xc0 0xbb 0xba 0xc5 0xc5 0xc5 0xc5 0xc0 ,
0xc8 0xc7 0xc4 0xc4 0xbc 0xb6 0xb8 0xbd 0xc1 ,0xc0 0xba 0xb9 0xb7 0xc2 0xc4 0xc0 0xc3 0xbb ,
range:0x3b 0x38 0x3a 0x39 0x3a 0x39 0x39 0x38 0x38 ,0x3b 0x39 0x38 0x3a 0x3a 0x38 0x37 0x38 0x38 ,
0x3a 0x3a 0x39 0x39 0x37 0x34 0x33 0x32 0x38 ,0x3c 0x37 0x39 0x3b 0x39 0x3b 0x39 0x3a 0x38 ,
cs 1:
the read training result:
DQS0:0x3c, DQS1:0x3a, DQS2:0x3e, DQS3:0x35,
min : 0xc 0xf 0xf 0xd 0x1 0x4 0x8 0x4 , 0x6 0x7 0x3 0x1 0xb 0xa 0xe 0x9 ,
0xf 0xd 0xd 0xb 0x4 0x1 0x4 0x6 , 0x7 0x3 0x1 0x1 0xb 0xb 0x7 0xa ,
mid :0x29 0x2b 0x2c 0x29 0x1e 0x20 0x24 0x21 ,0x22 0x22 0x1f 0x1c 0x27 0x26 0x29 0x24 ,
0x2b 0x2a 0x28 0x27 0x20 0x1d 0x1f 0x21 ,0x24 0x20 0x20 0x1d 0x28 0x28 0x25 0x27 ,
max :0x47 0x47 0x49 0x45 0x3c 0x3c 0x41 0x3e ,0x3f 0x3d 0x3c 0x38 0x43 0x42 0x44 0x3f ,
0x47 0x47 0x44 0x44 0x3d 0x3a 0x3b 0x3d ,0x41 0x3d 0x40 0x39 0x46 0x45 0x43 0x44 ,
range:0x3b 0x38 0x3a 0x38 0x3b 0x38 0x39 0x3a ,0x39 0x36 0x39 0x37 0x38 0x38 0x36 0x36 ,
0x38 0x3a 0x37 0x39 0x39 0x39 0x37 0x37 ,0x3a 0x3a 0x3f 0x38 0x3b 0x3a 0x3c 0x3a ,
the write training result:
DQS0:0x76, DQS1:0x69, DQS2:0x6c, DQS3:0x5f,
min :0x95 0x98 0x99 0x96 0x8d 0x90 0x92 0x93 0x92 ,0x88 0x88 0x83 0x81 0x8c 0x8e 0x8e 0x8d 0x89 ,
0x8c 0x8a 0x88 0x88 0x82 0x7e 0x82 0x87 0x86 ,0x82 0x7e 0x7d 0x7b 0x86 0x86 0x84 0x87 0x7e ,
mid :0xb1 0xb4 0xb5 0xb2 0xa9 0xac 0xae 0xae 0xad ,0xa5 0xa4 0x9f 0x9e 0xa8 0xaa 0xaa 0xa9 0xa5 ,
0xa9 0xa8 0xa5 0xa5 0x9e 0x99 0x9c 0xa1 0xa3 ,0x9f 0x9b 0x9a 0x98 0xa3 0xa4 0xa0 0xa4 0x9c ,
max :0xce 0xd0 0xd2 0xce 0xc6 0xc9 0xcb 0xc9 0xc9 ,0xc3 0xc1 0xbc 0xbb 0xc5 0xc6 0xc6 0xc5 0xc1 ,
0xc7 0xc6 0xc2 0xc3 0xbb 0xb5 0xb7 0xbb 0xc0 ,0xbc 0xb8 0xb7 0xb5 0xc1 0xc3 0xbc 0xc2 0xba ,
range:0x39 0x38 0x39 0x38 0x39 0x39 0x39 0x36 0x37 ,0x3b 0x39 0x39 0x3a 0x39 0x38 0x38 0x38 0x38 ,
0x3b 0x3c 0x3a 0x3b 0x39 0x37 0x35 0x34 0x3a ,0x3a 0x3a 0x3a 0x3a 0x3b 0x3d 0x38 0x3b 0x3c ,
CA Training result:
cs:0 min :0x47 0x43 0x3e 0x38 0x3e 0x36 0x48 ,0x42 0x3b 0x3b 0x34 0x3a 0x32 0x48 ,
cs:0 mid :0x82 0x84 0x7a 0x79 0x79 0x78 0x70 ,0x7e 0x7b 0x76 0x74 0x77 0x73 0x6f ,
cs:0 max :0xbe 0xc5 0xb6 0xbb 0xb5 0xba 0x98 ,0xba 0xbc 0xb2 0xb5 0xb4 0xb5 0x97 ,
cs:0 range:0x77 0x82 0x78 0x83 0x77 0x84 0x50 ,0x78 0x81 0x77 0x81 0x7a 0x83 0x4f ,
cs:1 min :0x49 0x45 0x3f 0x38 0x3e 0x39 0x3d ,0x45 0x3c 0x3d 0x37 0x3d 0x34 0x39 ,
cs:1 mid :0x84 0x86 0x7c 0x7a 0x7b 0x7a 0x70 ,0x81 0x7e 0x79 0x77 0x79 0x76 0x6f ,
cs:1 max :0xc0 0xc7 0xba 0xbc 0xb8 0xbb 0xa4 ,0xbe 0xc1 0xb6 0xb7 0xb6 0xb8 0xa5 ,
cs:1 range:0x77 0x82 0x7b 0x84 0x7a 0x82 0x67 ,0x79 0x85 0x79 0x80 0x79 0x84 0x6c ,
out
U-Boot SPL board init
U-Boot SPL rk356x-2017.09-1-15c53b0-g387f49e #runner (Mar 21 2023 - 04:18:44)
unknown raw ID phN
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
MMC error: The cmd index is 1, ret is -110
Card did not respond to voltage select!
mmc_init: -95, time 9
spl: mmc init failed with error: -95
Trying to boot from MMC1
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(fe4f274c06...) + OK
## Checking uboot 0x00a00000 ... sha256(9fa1a14245...) + OK
## Checking fdt 0x00b31218 ... sha256(1b9a4fe58a...) + OK
## Checking atf-2 0x00068000 ... sha256(8d44036095...) + OK
## Checking atf-3 0xfdcd0000 ... sha256(e410275b51...) + OK
## Checking atf-4 0xfdcc9000 ... sha256(990c53fc01...) + OK
## Checking atf-5 0x00066000 ... sha256(315a4195a9...) + OK
Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000)
Total: 223.538 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-181-gc9a647cae:cl
NOTICE: BL31: Built : 10:55:41, Oct 18 2021
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: pmu v1 is valid
INFO: dfs DDR fsp_param[0].freq_mhz= 1056MHz
INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO: dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
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 = 0xa00000
INFO: SPSR = 0x3c9
U-Boot rk356x-2017.09-1-15c53b0-g387f49e #runner (Mar 21 2023 - 04:18:41 +0000)
Model: Radxa CM3 SODIMM IO
PreSerial: 2, raw, 0xfe660000
DRAM: 1022 MiB
Sysmem: init
Relocation Offset: 3d347000
Relocation fdt: 3b9f6ee0 - 3b9fecc8
CR: M/C/I
Using default environment
failed to find reset-gpios property
dwmmc@fe2b0000: 1, dwmmc@fe2c0000: 2, sdhci@fe310000: 0
Bootdev(atags): mmc 0
MMC0: HS200, 200Mhz
PartType: EFI
No misc partition
boot mode: None
FIT: No boot partition
No resource partition
No resource partition
Failed to load DTB, ret=-19
Failed to get kernel dtb, ret=-19
I2c0 speed: 100000Hz
vsel-gpios- not found! Error: -2
vdd_cpu init 900000 uV
PMIC: RK8170 (on=0x40, off=0x00)
vdd_logic init 900000 uV
vdd_gpu init 900000 uV
io-domain: OK
Model: Radxa CM3 SODIMM IO
rockchip_set_serialno: could not find efuse/otp device
CLK: (sync kernel. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
apll 816000 KHz
dpll 528000 KHz
gpll 1188000 KHz
cpll 1000000 KHz
npll 24000 KHz
vpll 24000 KHz
hpll 24000 KHz
ppll 200000 KHz
armclk 816000 KHz
aclk_bus 150000 KHz
pclk_bus 50000 KHz
aclk_top_high 300000 KHz
aclk_top_low 200000 KHz
hclk_top 150000 KHz
pclk_top 50000 KHz
aclk_perimid 300000 KHz
hclk_perimid 150000 KHz
pclk_pmu 100000 KHz
No misc partition
Net: No ethernet found.
Hit key to stop autoboot('CTRL+C'): 0
failed to find reset-gpios property
Device 0: unknown device
MMC error: The cmd index is 1, ret is -110
Card did not respond to voltage select!
mmc_init: -95, time 10
switch to partitions #0, OK
mmc0(part 0) is current device
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
starting USB...
Bus dwc3@fcc00000: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus dwc3@fd000000: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus dwc3@fcc00000 for devices... 1 USB Device(s) found
scanning bus dwc3@fd000000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
failed to find reset-gpios property
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rockchip
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
failed to find reset-gpios property
No ethernet found.
No ethernet found.
## Booting FIT Image FIT: No boot partition
FIT: No FIT image
Could not find misc partition
ANDROID: reboot reason: "(none)"
optee check api revision fail: -1.0
optee api revision is too low
### ERROR ### Please RESET the board ###
How can I properly upload a full image from Radxa for flashing with it another Radxa?