20230521给coolpi4b开发板刷Android12和串口的使用
2023/5/21 9:31
所需要的配件:
1、2.0mm转2.54mm的杜邦线母头2条(2位一起的一条)
2、串口板:CH340(WIN7下使用)
3、USB的公头-公头线
首先,欢迎您入坑CoolPi 4B这一款开发板。
不用怀疑,您被坑了!绝对是天坑!
本文是入门,希望您没有被坑的那么惨。
大陆人不习惯写STEP-BY-STEP的文档, Coolpi 4b的技术支持sz_jack也不例外!
https://www.cool-pi.com/topic/127/coolpi-4b-%E9%95%9C%E5%83%8F%E5%9B%BA%E4%BB%B6%E5%9C%A8%E7%BA%BF%E5%88%B7%E6%9C%BA%E6%96%B9%E6%B3%95
Coolpi 4b 镜像固件在线刷机方法
Windows主机环境
必备条件:完成上述硬件刷机环境搭建
如果电脑运行Windows7及以上环境,请使用RKDevTool工具导入img固件进行升级
操作步骤如下:
a) 安装USB驱动
Windows 刷机工具及USB驱动
在线刷机专用镜像百度网盘
https://pan.baidu.com/s/1DVmWH4uvewYDJOK7mPu10Q?pwd=mqez#list/path=%2F
https://pan.baidu.com/s/1DVmWH4uvewYDJOK7mPu10Q
H:\BaiduNetdiskDownload\20230317[在线刷机]-RKDevTool专用镜像
总计13.3GB。
里面的coolpi-4b-android12-20230329.zip不能通过DP输出显示。coolpi-4b-android12-20230329.img【2GB出头的大小】
coolpi-4b-buildroot-for-rkdevtool.zip 可以通过DP输出显示。
coolpi-4b-ubuntu20.04.zip 可以通过DP输出显示。
coolpi-4b-ubuntu22-20230201.zip 可以通过DP输出显示。
下载Boot开始
下载Boot成功
等待Maskrom开始
等待Maskrom成功
测试设备开始
测试设备成功
校验芯片开始
校验芯片成功
获取FlashInfo开始
获取FlashInfo成功
准备IDB开始
准备IDB成功
下载IDB开始
下载IDB成功
下载固件开始
正在下载固件(100%)...
下载固件成功
https://www.cool-pi.com/topic/26/coolpi-4b-debug-console%E4%B8%B2%E5%8F%A3%E6%8E%A5%E7%BA%BF%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E
Coolpi 4b debug console串口接线配置说明
参考资料:
https://wiki.cool-pi.com/en/home/android_application_notes
Cool Pi 4B & CM5 Android Application Note
Android Application Note
https://wiki.cool-pi.com/en/home
Welcom to Cool Pi wiki
rockchip rk3588(s)
https://www.cool-pi.com/topic/126/coolpi-4b-%E9%95%9C%E5%83%8F%E5%9B%BA%E4%BB%B6%E7%A6%BB%E7%BA%BF%E5%88%B7%E6%9C%BA%E6%96%B9%E6%B3%95
Coolpi 4b 镜像固件离线刷机方法
https://wiki.cool-pi.com/en/home/quick_start
Cool Pi 4B Linux Quick Start Guide
Quick Start Guide
刷机的LOG:
[BEGIN] 2023/5/21 9:53:12
DDR V1.09 a930779e06 typ 22/11/21-17:50:56
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
Manufacturer ID:0x6
CH0 RX Vref:29.7%, TX Vref:23.8%,0.0%
CH1 RX Vref:29.7%, TX Vref:24.8%,0.0%
CH2 RX Vref:30.7%, TX Vref:22.8%,0.0%
CH3 RX Vref:28.7%, TX Vref:23.8%,0.0%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
Boot1 Release Time: Nov 22 2022 14:37:46, version: 1.10
Emmc IO init.
Emmc IO init.
mmc_set_bus_width: 1
SetEmmcClk: 375000, 2, 64
SetEmmcClk: 375000, 2, 64
mmc_set_bus_width: 8
SetEmmcClk: 200000000, 0, 3
Enable PHY CLK: 200000000, timing: 9
SdmmcInit=2 0
BootCapSize=100000
UserCapSize=59640MB
FwPartOffset=2000 , 100000
UsbBoot ...61071
powerOn 63353
SoftReset, 29062014 us
[END] 2023/5/21 9:55:16
重新商店的LOG:
[BEGIN] 2023/5/21 9:55:41
DDR V1.09 a930779e06 typ 22/11/21-17:50:56
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
Manufacturer ID:0x6
CH0 RX Vref:29.7%, TX Vref:23.8%,0.0%
CH1 RX Vref:28.7%, TX Vref:23.8%,0.0%
CH2 RX Vref:29.7%, TX Vref:21.8%,0.0%
CH3 RX Vref:28.7%, TX Vref:23.8%,0.0%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-481-g17b41886e:derrick.huang
NOTICE: BL31: Built : 16:20:07, Dec 7 2022
INFO: spec: 0x13
INFO: ext 32k is valid
INFO: ddr: stride-en 4CH
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO: system boots from cpu-hwid-0
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INFO: hdmirx_handler: dma not on, ret
I/TC:
I/TC: OP-TEE version: 3.13.0-652-g4542e1efd #derrick.huang (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #5 2022年 09月 20日 星期二 09:41:09 CST aarch64
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
COOLPI LOADER BY YANYI(Jan 04 2023)
DRAM: 4 GiB
Using default environment
0 2 1 3 6 8 7 9 trsv ln0 mon rx cdr lock timeout
dw-dp: Base DPCD: ebdabbe8
dw-dp: DPCD: ebdabbe8
dp@fde50000: detailed mode clock 148500 kHz, flags[5]
H: 1920 2008 2052 2200
V: 1080 1084 1089 1125
bus_format: 1018
VOP update mode to: 1920x1080p0, type: DP0 for VP2
rockchip_vop2_init: hdmi0_phy_pll may not define
rockchip_vop2_init: hdmi1_phy_pll may not define
VP2 set crtc_clock to 148500KHz
VOP VP2 enable Esmart2[356x124->356x124@782x478] fmt[1] addr[0xedf21000]
training link: 2 lanes at 5400 MHz
clock recovery succeeded
channel equalization succeeded
hdmi@fde80000 disconnected
Autoboot in 1 seconds
VOP VP2 enable Esmart2[356x124->356x124@782x478] fmt[1] addr[0xedf21000]
hdmi@fde80000 disconnected
starting USB...
Bus usb@fc880000: USB EHCI 1.00
scanning bus usb@fc880000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
MMC: no card present
mmc_init: -123, time 2
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Loading order: usb - tf - emmc
bank id invalid
request for 141 failed:-22
bank id invalid
request for 141 failed:-22
resetting USB...
Bus usb@fc880000: USB EHCI 1.00
scanning bus usb@fc880000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
MMC: no card present
mmc_init: -123, time 2
MMC: no card present
mmc_init: -123, time 2
** Bad device mmc 1 **
MMC: no card present
mmc_init: -123, time 2
** Bad device mmc 1 **
switch to partitions #0, OK
mmc0(part 0) is current device
reading cmdline.txt
switch to partitions #0, OK
mmc0(part 0) is current device
reading config.txt
reading /vmlinuz
17029361 bytes read in 97 ms (167.4 MiB/s)
reading /initrd.img
10290583 bytes read in 60 ms (163.6 MiB/s)
reading /rk3588s-cp4.dtb
225093 bytes read in 5 ms (42.9 MiB/s)
Uncompressed size: 37402632 = 0x23AB808
## Flattened Device Tree blob at 0x0a100000
Booting using the fdt blob at 0x0a100000
'reserved-memory' ramoops@110000: addr=110000 size=e0000
Loading Ramdisk to eb006000, end eb9d6597 ... OK
Loading Device Tree to 00000000eafcc000, end 00000000eb005f44 ... OK
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
Adding bank: 0x1f0000000 - 0x200000000 (size: 0x10000000)
Starting kernel ...
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
I/TC: Secondary CPU 4 initializing
I/TC: Secondary CPU 4 switching to normal world boot
I/TC: Secondary CPU 5 initializing
I/TC: Secondary CPU 5 switching to normal world boot
I/TC: Secondary CPU 6 initializing
I/TC: Secondary CPU 6 switching to normal world boot
I/TC: Secondary CPU 7 initializing
I/TC: Secondary CPU 7 switching to normal world boot
DDR V1.09 a930779e06 typ 22/11/21-17:50:56
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=1024MB
Manufacturer ID:0x6
CH0 RX Vref:29.7%, TX Vref:23.8%,0.0%
CH1 RX Vref:28.7%, TX Vref:23.8%,0.0%
CH2 RX Vref:30.7%, TX Vref:22.8%,0.0%
CH3 RX Vref:28.7%, TX Vref:23.8%,0.0%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-481-g17b41886e:derrick.huang
NOTICE: BL31: Built : 16:20:07, Dec 7 2022
INFO: spec: 0x13
INFO: ext 32k is valid
INFO: ddr: stride-en 4CH
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO: system boots from cpu-hwid-0
INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INFO: hdmirx_handler: dma not on, ret
I/TC:
I/TC: OP-TEE version: 3.13.0-652-g4542e1efd #derrick.huang (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #5 2022年 09月 20日 星期二 09:41:09 CST aarch64
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
COOLPI LOADER BY YANYI(Jan 04 2023)
DRAM: 4 GiB
Using default environment
0 2 1 3 6 8 7 9 trsv ln0 mon rx cdr lock timeout
dw-dp: Base DPCD: ebdabbe8
dw-dp: DPCD: ebdabbe8
dp@fde50000: detailed mode clock 148500 kHz, flags[5]
H: 1920 2008 2052 2200
V: 1080 1084 1089 1125
bus_format: 1018
VOP update mode to: 1920x1080p0, type: DP0 for VP2
rockchip_vop2_init: hdmi0_phy_pll may not define
rockchip_vop2_init: hdmi1_phy_pll may not define
VP2 set crtc_clock to 148500KHz
VOP VP2 enable Esmart2[356x124->356x124@782x478] fmt[1] addr[0xedf21000]
training link: 2 lanes at 5400 MHz
clock recovery succeeded
channel equalization succeeded
hdmi@fde80000 disconnected
Autoboot in 1 seconds
VOP VP2 enable Esmart2[356x124->356x124@782x478] fmt[1] addr[0xedf21000]
hdmi@fde80000 disconnected
starting USB...
Bus usb@fc880000: USB EHCI 1.00
scanning bus usb@fc880000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
MMC: no card present
mmc_init: -123, time 2
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Loading order: usb - tf - emmc
bank id invalid
request for 141 failed:-22
bank id invalid
request for 141 failed:-22
resetting USB...
Bus usb@fc880000: USB EHCI 1.00
scanning bus usb@fc880000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
MMC: no card present
mmc_init: -123, time 2
MMC: no card present
mmc_init: -123, time 2
** Bad device mmc 1 **
MMC: no card present
mmc_init: -123, time 2
** Bad device mmc 1 **
switch to partitions #0, OK
mmc0(part 0) is current device
reading cmdline.txt
switch to partitions #0, OK
mmc0(part 0) is current device
reading config.txt
reading /vmlinuz
17029361 bytes read in 97 ms (167.4 MiB/s)
reading /initrd.img
1351179 bytes read in 12 ms (107.4 MiB/s)
reading /rk3588s-cp4.dtb
225093 bytes read in 5 ms (42.9 MiB/s)
Uncompressed size: 37402632 = 0x23AB808
## Flattened Device Tree blob at 0x0a100000
Booting using the fdt blob at 0x0a100000
'reserved-memory' ramoops@110000: addr=110000 size=e0000
Loading Ramdisk to eb88c000, end eb9d5e0b ... OK
Loading Device Tree to 00000000eb852000, end 00000000eb88bf44 ... OK
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
Adding bank: 0x1f0000000 - 0x200000000 (size: 0x10000000)
Starting kernel ...
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
I/TC: Secondary CPU 4 initializing
I/TC: Secondary CPU 4 switching to normal world boot
I/TC: Secondary CPU 5 initializing
I/TC: Secondary CPU 5 switching to normal world boot
I/TC: Secondary CPU 6 initializing
I/TC: Secondary CPU 6 switching to normal world boot
I/TC: Secondary CPU 7 initializing
I/TC: Secondary CPU 7 switching to normal world boot
[END] 2023/5/21 9:57:02