Difficulties with an E25

Greetings and Salutations!

Oh boy where do I start! This is my first experience with a radxa unit, shipping was quick and it seems like a quality product!

But alas Im having issues with getting ANYTHING flashed to it. Im looking to run openwrt on it, but actually any linux distro (armbian, debian, ubuntu) will do.

I was using the windows versions of the rk flash tools to load the required imgs. I did get it to flash the “no check todly” firmware. Now I can get console output under windows, and it appears that I have a boot loop happening. It will sit and loop forever, never getting past the “Green” ring color… (console output attached below)

However, when I plug it into my linux box (there was a issue with that too, i had to remove the ch341 driver and compile a custom ch34x kernell module), I do not get console output, but i get the cycling led colors on the ring (im not sure if that is important or not). Ive tried with “cu” and “screen” to no avail…

I am also unsure if I am able to flash to the emmc… Every time ive tried to load an image with the windows tools, it crashes. Also, the buttons on the advanced tab rarely output any useful information. Is there an easy way to check if I can write to the emmc?

Also, the serial port information on the “Getting Started” wiki page has the wrong baud rate… it should be 1500000, instead of 115200…

So if anyone has any information, a walk thru, or better tools/instructions. I’d love to get my hands on them…


Boot Loop, E25 4gb/32gb, Debian Image.

U-Boot 2017.9-g26d3b6963ed-211223 #stephen (Oct 28 2022 - 10:54:28 +0800)

Model: Radxa E25
PreSerial: 2, raw, 0xfe660000
Sysmem: init
Relocation Offset: ed350000
Relocation fdt: eb9f6fd0 - eb9fece0
Using default environment

DDR Vesion V1.12 20220105
BW=32 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=4096MB
tdqss: cs0 dqs0: -48ps, dqs1: -120ps, dqs2: -96ps, dqs3: -168ps,
tdqss: cs1 dqs0: -24ps, dqs1: -120ps, dqs2: -96ps, dqs3: -168ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x63

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vreiner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58

change to: 1560MHz(final freq)
PHY dr:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
clk skew:0x26
cs 0:
the read training result:
DQS0:0x33, DQS1:0x36, DQS2:0x36, DQS3:0x32,
min : 0xa 0xd 0x10 0xd 0x2 0x4 0x7 0x5 , 0xa 0xa 0x2 0x5 0xf 0xf 0x12 0xd ,
0xf 0xf 0xc 0xa 0x5 0x2 0x5 0x5 , 0xa 0x7 0x7 0x3 0x11 0x11 0xf 0x11 ,
mid :0x26 0x27 0x29 0x28 0x1c 0x1f 0x22 0x1f ,0x25 0x24 0x1d 0x1f 0x2b 0x29 0x2b 0x26 ,
0x2a 0x2a 0x26 0x24 0x1f 0x1c 0x1d 0x1f ,0x26 0x22 0x21 0x1d 0x2c 0x2a 0x29 0x2b ,
max :0x42 0x42 0x4 0x43 0x37 0x3b 0x3e 0x39 ,0x40 0x3f 0x39 0x39 0x47 0x43 0x44 0x3f ,
0x46 0x46 0x40 0x3f 0x39 0x36 0x36 0x39 ,0x42 0x3e 0x3c 0x37 0x47 0x44 0x44 0x46 ,
0x37 0x37 0x34 0x35 0x34 0x34 0x31 0x34 ,0x38 0x37 0x35 0x34 0x36 0x33 0x35 0x35 ,
the write training result:
DQS0:0x1d, DQS1:0xf, DQS2:0x13, DQS3:0x5,
min :0x63 0x66 0x68 0x64 0x56 0x5b 0x5e 0x61 0x5d ,0x52 0x50 0x4b 0x4b 0x55 0x56 0x56 0x56 0x4f ,
0x5c 0x5a 0x56 0x53 0x4c 0x4b 0x4d 0x53 0x52 ,0x4a 0x48 0x46 0x43 0x4 0x4f 0x4e 0x52 0x47 ,
mid :0x7f 0x82 0x84 0x7f 0x72 0x76 0x79 0x7a 0x77 ,0x6e 0x6d 0x65 0x66 0x71 0x70 0x71 0x70 0x6a ,
0x78 0x77 0x70 0x6f 0x68 0x66 0x68 0x6e 0x6d ,0x67 0x65 0x61 0x5d 0x6b 0x6c 0x69 0x6e 0x62 ,
max :0x9b 0x9e 0xa0 0x9b 0x8e 0x91 0x94 0x3 0x91 ,0x8b 0x8a 0x7f 0x81 0x8e 0x8b 0x8d 0x8a 0x86 ,
0x95 0x95 0x8b 0x8c 0x85 0x81 0x84 0x89 0x88 ,0x84 0x82 0x7c 0x78 0x88 0x89 0x84 0x8a 0x7d ,
range:0x38 0x38 0x38 0x37 0x38 0x36 0x36 0x32 0x34 ,0x39 0x3a 0x34 0x36 0x39 0x35 0x37 0x34 0x37 ,
0x39 0x3b 0x35 0x39 0x39 0x36 0x37 0x36 0x36 ,0x3a 0x3a 0x36 0x35 0x3a 0x3a 0x36 0x38 0x36 ,
cs 1:
the read training result:
DQS0:0x33, DQS1:0x35, DQS2:0x36, DQS3:0x32,
min : 0xb 0xd 0xf 0xc 0x1 0x5 0x6 0x3 , 0x8 0x7 0x1 0x3 0xd 0xd 0xf 0xa ,
0x10 0x11 0xd 0xa 0x5 0x1 0x5 0x5 , 0x9 0x7 0x7 0x1 0xf 0x10 0xd 0xf ,
mid :0x25 0x27 0x28 0x27 0x1b 0x20 0x21 0x1d ,0x23 0x22 0x1d 0x1d 0x29 0x26 0x28 0x23 ,
0x2a 0xb 0x26 0x24 0x1f 0x1b 0x1d 0x1f ,0x25 0x22 0x22 0x1b 0x2a 0x2a 0x28 0x2a ,
max :0x40 0x41 0x42 0x42 0x36 0x3b 0x3d 0x38 ,0x3f 0x3d0x39 0x38 0x45 0x40 0x42 0x3d ,
0x45 0x46 0x40 0x3e 0x39 0x36 0x36 0x39 ,0x41 0x3d 0x3d 0x36 0x46 0x44 0x44 0x45 ,
range:0x35 0x34 0x33 0x36 0x35 0x36 0x37 0x35 ,0x37 0x36 0x38 0x35 0x38 0x33 0x33 0x33 ,
0x35 0x35 0x33 0x34 0x34 0x35 0x31 0x34 ,0x38 0x36 0x36 0x35 0x37 0x34 0x37 0x36 ,
the write training result:
DQS0:0x1d, DQS1:0xf, DQS2:0x13, DQS3:0x5,
min :0x69 0x6b 0x6d 0x69 0x5d 0x62 0x65 0x66 0x62 ,0x55 0x53 0x4c 0x4f 0x58 0x58 0x5a 0x58 0x52 ,
0x5d 0x5c 0x58 0x56 0x4e 0x4c 0x4e 0x54 0x53 ,0x4a 0x4a 0x47 0x43 0x4f 0x50 0x4e 0x54 0x47 ,
mid :0x85 0x87 0x8a 0x85 079 0x7d 0x80 0x7f 0x7c ,0x70 0x6e 0x66 0x69 0x74 0x72 0x75 0x72 0x6d ,
0x7a 0x79 0x73 0x72 06a 0x67 0x69 0x6f 0x6e ,0x67 0x66 0x61 0x5e 0x6b 0x6d 0x69 0x6f 0x63 ,
max :0xa2 0xa4 0xa7 0xa1 0x95 0x99 0x9c 0x99 0x97 ,0x8c 0x8a 0x81 0x83 0x90 0x8c 0x9 0x8c 0x8 ,
0x97 0x96 0x8e 0x8e 0x86 0x83 0x85 0x8b 0x8a ,0x84 0x82 0x7c 0x79 0x88 0x8a 0x85 0x8b 0x80 ,
range:0x39 0x39 0x3a 0x38 0x38 0x37 0x37 0x33 0x35 ,0x37 0x37 0x35 0x34 0x38 0x34 0x36 0x34 0x36 ,
0x3a 0x3a 0x36 0x38 0x38 0x37 0x37 0x37 0x37 ,0x3a 0x38 0x35 0x36 0x39 0x3a 0x37 0x37 0x39 ,
CA Training result:
cs:0 min :0x50 0x4b 0x45 0x43 0x45 0x3d 0x4b ,0x4b 0x46 0x44 0x3d 0x40 0x3a 0x4d ,
cs:0 mid :0x8d 0x8b 0x82 0x82 0x82 0x7d 0x7b ,0x8a 0x87 0x81 0x7d 0x7d 0x7b 0x7b ,
cs:0 max :0xca 0xcb 0xc0 0xc1 0xbf 0xbd 0xac ,0xc9 0xc8 0xbf 0xbd 0xbb 0xbd 0xaa ,
cs:0 range:0x7a 0x80 0x7b 0x7e 0x7a 0x80 0x61 ,0x7e 0x82 0x7b 0x80 0x7b 0x83 0x5d ,
cs:1 min :0x4c 0x50 0x44 0x46 0x44 0x41 0x4b ,0x4a 0x48 0x42 0x42 0x40 0x40 0x4b ,
cs:1 mid :0x8d 0x8c 0x84 0x82 0x83 0x7e 0x7c ,0x89 0x85 0x81 0x7d 0x7e 0x7c 0x7b ,
cs:1 max :0xce 0xc9 0xc5 0xbf 0xc3 0xbb 0xae ,0xc9 0xc3 0xc1 0xb9 0xbc 0xb9 0xab ,
cs:1 range:0x82 0x79 0x81 0x79 0x7f 0x7a 0x63 ,0x7f 0x7b 0x7f 0x77 0x7c 0x79 0x60 ,
U-Boot SPL board init
U-Boot SPL 2017.09-gaaca6ffec1-211203 #zzz (Dec 03 2021 18:42:16)
unknown raw ID phN
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
No misc partition
spl: partition error
Tryng fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-10x00040000 … sha256(fe4f274c06…) + OK
## Checking uboot 0x00a00000 … sha256(d54f1a0827…) + OK
## Checking fdt 0x00b282f0 … sha256(98f55678bd…) + 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: 322.138 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= 1560MHz
INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO: fs DDR fsp_param[3].freq_mhz= 780MHz
INFO: Using opteed sec cpu_context!
INFO: boot pu mask: 0
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destind for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
NFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0xa00000
INFO: SPSR = 0x3c9

U-Boot 2017.09-g26d3b6963ed-211223 #stephen (Oct 28 2022 - 10:54:28 +0800)

Model: Radxa E25
PreSerial: 2, raw, 0xfe660000
Sysmem: init
Relocation Offset: ed350000
Relocation fdt: eb9f6fd0 - eb9fece0
Using default environment


Which mirror are you using? Please make sure that the USB power supply of your debugging host can meet the requirements, or you can try to use an adapter for power supply and use SSH for debugging.

Hi Alvin.

I managed to get it installed… it was not getting enough current thru the usb port…

Odd question tho… the script for the led ring that loads on startup… It normal to use 20% cpu just changing colors? Lol

Thanks for your suggestion… it worked perfectly.

Hi Jameszy,

To fix the 20% CPU for the colors, I modified the colorful() function to not use ‘expr’, which takes a lot of cpu. (This is one fix. I have other changes in mind for the script, give me a few days).


while true ;

    local s=0.1
    local r=255000
    local g=0
    local b=1000
    for ((i=0;i<255;i++))
        let r=$r-1000
        let g=$g+1000
        echo $r  > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
        echo $g  > /sys/class/pwm/pwmchip1/pwm0/duty_cycle
        echo $b  > /sys/class/pwm/pwmchip2/pwm0/duty_cycle
        sleep $s
    for ((i=0;i<255;i++))
        let g=$g-1000
        let b=$b+1000
        echo $r  > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
        echo $g  > /sys/class/pwm/pwmchip1/pwm0/duty_cycle
        echo $b  > /sys/class/pwm/pwmchip2/pwm0/duty_cycle
        sleep $s

    for ((i=0;i<255;i++))
        let r=$r+1000
        let b=$b-1000
        echo $r  > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
        echo $g  > /sys/class/pwm/pwmchip1/pwm0/duty_cycle
        echo $b  > /sys/class/pwm/pwmchip2/pwm0/duty_cycle
        sleep $s

1 Like

Thank you very much. Looking forward to your optimization code.

2023-01-22: Major modifications to radxa-e25-led.sh:

  • Rewrote colourful() to not use “expr” and added some sleep(). Instead of taking 20-30% of the CPU, the usage is now about 3%.
  • Changed color order for colorful(). Before, the unit would boot with a green color, then switch immediately to red. This was potentially misleading for a first-time user, who might imply the red meant an error condition. Now the order is green(boot), then blue->red, red->green, and green->blue. The unit is ready for ssh when the colow tends towards blue-purple.
  • Added tricolor() method, meant as an alert to the user, to be used when upgrading software, etc.
  • Added suspend, to reset leds to black, with without disabling the PWM. When disabled and script running in background, the script was spewing error messages.
  • Added “killall” to be able to start/restart/stop scripts.
  • Added the $2 optional parameter to be able to start the script with a specific pattern <colorful|blink|rgb_breathe|tricolor|none>.radxa-e25-led.zip (1.1 KB)

Thanks a lot for your code !

1 Like