不正常,进行了如下实验:
- 准备开发板:T113-S3 EVB1,eMMC 型号:FEMDRW008G-88A39


刷写时间,5分17秒:

刷写 LOG 如下:
[858]fes begin commit:fccdad5de4-dirty
[861]set pll start
[867]periph0 has been enabled
[870]set pll end
[872][pmu]: bus read error
[874]board init ok
[876]beign to init dram
[878]ZQ value = 0x30
[880]get_pmu_exist() = -1
[883]ddr_efuse_type: 0xa
[885]trefi:7.8ms
[888][AUTO DEBUG] single rank and full DQ!
[892]ddr_efuse_type: 0xa
[894]trefi:7.8ms
[896][AUTO DEBUG] rank 0 row = 13
[899][AUTO DEBUG] rank 0 bank = 8
[903][AUTO DEBUG] rank 0 page size = 2 KB
[907]DRAM BOOT DRIVE INFO: V0.34
[910]DRAM CLK = 792 MHz
[912]DRAM Type = 3 (2:DDR2,3:DDR3)
[915]DRAMC read ODT off.
[918]DRAM ODT value: 0x42.
[920]ddr_efuse_type: 0xa
[923]DRAM SIZE = 128 MB
[927]DRAM simple test OK.
[929]rtc standby flag is 0x0, super standby flag is 0x0
[935]init dram ok
U-Boot 2018.07-00006-g65ea3f1459 (Aug 31 2023 - 08:08:04 +0000) Allwinner Technology
[03.646]CPU: Allwinner Family
[03.649]Model: sun8iw20
[03.651]DRAM: 0 Bytes
[03.654]Relocation Offset is: 04eaf000
[03.683]secure enable bit: 0
[03.690]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[03.697]gic: normal mode
[03.700]sunxi flash map init
SPI ALL: ready
[03.745]line:703 init_clocks
[03.765]init_clocks:finish
[03.767]flash init start
[03.769]workmode = 16,storage type = 0
try card 2
set card number 2
get card number 2
[03.777][mmc]: mmc driver ver uboot2018:2023-07-4 16:18:00
[03.823][mmc]: Is not Boot mode!
[03.826][mmc]: SUNXI SDMMC Controller Version:0x50310
[03.838][mmc]: ************Try SD card 2************
[03.843][mmc]: mmc 2 cmd timeout 100 status 100
[03.847][mmc]: smc 2 err, cmd 8, RTO
[03.851][mmc]: mmc 2 close bus gating and reset
[03.856][mmc]: mmc 2 cmd timeout 100 status 100
[03.860][mmc]: smc 2 err, cmd 55, RTO
[03.863][mmc]: mmc 2 close bus gating and reset
[03.868][mmc]: ************Try MMC card 2************
[03.890][mmc]: mmc 2 cmd timeout 100 status 100
[03.894][mmc]: smc 2 err, cmd 8, RTO
[03.898][mmc]: mmc 2 close bus gating and reset
[03.903][mmc]: mmc 2 cmd timeout 100 status 100
[03.907][mmc]: smc 2 err, cmd 55, RTO
[03.910][mmc]: mmc 2 close bus gating and reset
[03.927][mmc]: gen_tuning_blk_bus8: total blk 10
[03.933][mmc]: gen_tuning_blk_bus4: total blk 6
[03.938][mmc]: Using 4 bit tuning now
[03.941][mmc]: write_tuning_try_freq: write ok
[03.947][mmc]: Pattern compare ok
[03.950][mmc]: Write tuning pattern ok
[03.954][mmc]: ================== HSSDR52_SDR25...
[03.958][mmc]: skip freq 400000
[03.961][mmc]: skip freq 25000000
[03.964][mmc]: freq: 2-50000000-64-4
[05.493][mmc]: [0-63|64]
[05.495][mmc]: ================== HSDDR52_DDR50...
[05.499][mmc]: skip freq 400000
[05.502][mmc]: freq: 1-25000000-64-4
[06.658][mmc]: freq: 2-50000000-64-4
[07.766][mmc]: [0-48|49]
[07.768][mmc]: [0-48|49]
[07.771][mmc]: DS26/SDR12: 0xffffffff 0xffffffff
[07.775][mmc]: HSSDR52/SDR25: 0xff20ffff 0xffffffff
[07.780][mmc]: HSDDR52/DDR50: 0xff1818ff 0xffffffff
[07.784][mmc]: HS200/SDR104: 0xffffffff 0xffffffff
[07.789][mmc]: HS400: 0xffffffff 0xffffffff
[07.793][mmc]: HS400: 0xffffffff 0xffffffff
[07.797][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 4
[07.810]Loading Environment from SUNXI_FLASH... OK
[07.821]try to burn key
[07.826]out of usb burn from boot: not boot mode
Hit any key to stop autoboot: 0
sunxi work mode=0x10
run usb efex
delay time 2500
weak:otg_phy_config
usb init ok
set address 0xf
set address 0xf ok
SUNXI_EFEX_ERASE_TAG
erase_flag = 0x12
origin_erase_flag = 0x1
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
the 0 mbr table is ok
the 1 mbr table is ok
the 2 mbr table is ok
the 3 mbr table is ok
*************MBR DUMP***************
total mbr part 8
part[0] name :boot-resource
part[0] classname :DISK
part[0] addrlo :0x1f8
part[0] lenlo :0x1f8
part[0] user_type :32768
part[0] keydata :0
part[0] ro :0
part[1] name :env
part[1] classname :DISK
part[1] addrlo :0x3f0
part[1] lenlo :0x1f8
part[1] user_type :32768
part[1] keydata :0
part[1] ro :0
part[2] name :env-redund
part[2] classname :DISK
part[2] addrlo :0x5e8
part[2] lenlo :0x1f8
part[2] user_type :32768
part[2] keydata :0
part[2] ro :0
part[3] name :boot
part[3] classname :DISK
part[3] addrlo :0x7e0
part[3] lenlo :0x4ec0
part[3] user_type :32768
part[3] keydata :0
part[3] ro :0
part[4] name :rootfs
part[4] classname :DISK
part[4] addrlo :0x56a0
part[4] lenlo :0x2329a0
part[4] user_type :32768
part[4] keydata :0
part[4] ro :0
part[5] name :private
part[5] classname :DISK
part[5] addrlo :0x238040
part[5] lenlo :0x2760
part[5] user_type :32768
part[5] keydata :0
part[5] ro :0
part[6] name :recovery
part[6] classname :DISK
part[6] addrlo :0x23a7a0
part[6] lenlo :0x5a90
part[6] user_type :32768
part[6] keydata :0
part[6] ro :0
part[7] name :UDISK
part[7] classname :DISK
part[7] addrlo :0x240230
part[7] lenlo :0x0
part[7] user_type :0
part[7] keydata :0
part[7] ro :0
total part: 9
mbr 0, 1f8, 8000
boot-resource 1, 1f8, 8000
env 2, 1f8, 8000
env-redund 3, 1f8, 8000
boot 4, 4ec0, 8000
rootfs 5, 2329a0, 8000
private 6, 2760, 8000
recovery 7, 5a90, 8000
UDISK 8, 0, 0
[10.886]erase all part start
need erase flash: 18
[10.893][mmc]: erase from: 0, to: 15269887, cnt: 15269888, erase_group: 1024
[10.971][mmc]: sunxi_mmc_do_send_cmd_common: cmd 38 wait rsp busy 0x46 ms
[10.977]read item0 copy0
[11.016]Item0 (Map) magic is bad
[11.019]the secure storage item0 copy0 magic is bad
[11.060]Item0 (Map) magic is bad
[11.063]the secure storage item0 copy1 magic is bad
[11.068]Item0 (Map) magic is bad
[11.071]the secure storage map is empty
[11.147]erase secure storage: 0 ok
SUNXI_EFEX_MBR_TAG
mbr size = 0x10000
write primary GPT success
write Backup GPT success
[11.163]update partition map
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
******Has init
FEX_CMD_fes_verify_value, start 0x1f8, size high 0x0:low 0x14000
FEX_CMD_fes_verify_value 0xe6f75b5c
FEX_CMD_fes_verify_value, start 0x3f0, size high 0x0:low 0x20000
FEX_CMD_fes_verify_value 0xa367d787
FEX_CMD_fes_verify_value, start 0x5e8, size high 0x0:low 0x20000
FEX_CMD_fes_verify_value 0xa367d787
FEX_CMD_fes_verify_value, start 0x7e0, size high 0x0:low 0x429800
FEX_CMD_fes_verify_value 0x97662167
FEX_CMD_fes_verify_value, start 0x56a0, size high 0x0:low 0x43460000
FEX_CMD_fes_verify_value 0x3fee63cb
bootfile_mode=4
SUNXI_EFEX_BOOT1_TAG
boot1 size = 0x15c000, max size = 0x200000
uboot size = 0x15c000
storage type = 2
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
bootfile_mode=4
SUNXI_EFEX_BOOT0_TAG
boot0 size = 0xa000
[327.990][mmc]: write mmc 2 info ok
dram para[0] = 318
dram para[1] = 3
dram para[2] = 7b7bfb
dram para[3] = 0
dram para[4] = 10d2
dram para[5] = 800000
dram para[6] = 1c70
dram para[7] = 42
dram para[8] = 18
dram para[9] = 0
dram para[10] = 4a2195
dram para[11] = 2423190
dram para[12] = 8b061
dram para[13] = b4787896
dram para[14] = 0
dram para[15] = 48484848
dram para[16] = 48
dram para[17] = 1620121e
dram para[18] = 0
dram para[19] = 0
dram para[20] = 0
dram para[21] = 340000
dram para[22] = 46
dram para[23] = b4006103
dram para[24] = 0
dram para[25] = 0
dram para[26] = 0
dram para[27] = 0
dram para[28] = 0
dram para[29] = 0
dram para[30] = 0
dram para[31] = 0
storage type = 2
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
sunxi_efex_next_action=2
exit usb
next work 2
[28]HELLO! BOOT0 is starting!
[30]BOOT0 commit : fccdad5de4-dirty
[34]set pll start
[40]periph0 has been enabled
[43]set pll end
[44][pmu]: bus read error
[47]board init ok
[49]enable_jtag
[50]ZQ value = 0x2f
[52]get_pmu_exist() = -1
[54]DRAM BOOT DRIVE INFO: V0.34
[57]DRAM CLK = 792 MHz
[60]DRAM Type = 3 (2:DDR2,3:DDR3)
[63]DRAMC read ODT off.
[65]DRAM ODT value: 0x42.
[68]ddr_efuse_type: 0xa
[71]DRAM SIZE = 128 MB
[77]DRAM simple test OK.
[79]rtc standby flag is 0x0, super standby flag is 0x0
[85]dram size =128
[87]card no is 2
[89]sdcard 2 line count 4
[91][mmc]: mmc driver ver 2021-05-21 14:47
[100][mmc]: Wrong media type 0x0, but host sdc2, try mmc first
[106][mmc]: ***Try MMC card 2***
[130][mmc]: RMCA OK!
[132][mmc]: mmc 2 bias 0
[136][mmc]: MMC 5.1
[138][mmc]: HSSDR52/SDR25 4 bit
[141][mmc]: 50000000 Hz
[143][mmc]: 7456 MB
[145][mmc]: ***SD/MMC 2 init OK!!!***
[243]Loading boot-pkg Succeed(index=0).
[247]Entry_name = u-boot
[254]Entry_name = optee
[258]Entry_name = dtb
[261]tunning data addr:0x430003e8
[264]Jump to second Boot.
M/TC: OP-TEE version: 8b49ce62-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Fri Aug 12 08:24:15 UTC 2022 arm
U-Boot 2018.07-00006-g65ea3f1459 (Aug 31 2023 - 08:08:04 +0000) Allwinner Technology
[00.316]CPU: Allwinner Family
[00.319]Model: sun8iw20
[00.321]DRAM: 128 MiB
[00.325]Relocation Offset is: ffeaf000
[00.354]secure enable bit: 0
E/TC:0 fdt_getprop_u32:343 prop trace_level not found
[00.367]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.374]gic: sec monitor mode
SPI ALL: ready
[00.379]line:703 init_clocks
[00.382]flash init start
[00.384]workmode = 0,storage type = 2
[00.387][mmc]: mmc driver ver uboot2018:2023-07-4 16:18:00
[00.394][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.418][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 4
[00.424]sunxi flash init ok
[00.427]drv_disp_init
partno erro : can't find partition bootloader
** Unable to read file lcd_compatible_index.txt **
[00.447]disp_fat_load for lcd config failed
[00.474]boot_hdmi20: [info] hdmi_init start
[00.479]boot_hdmi20: [info] hdmi use aw phy!
[00.483]boot_hdmi20: [info] hdmi_init finish
[00.487]drv_disp_init finish
[00.492]Loading Environment from SUNXI_FLASH... OK
[00.505]boot_gui_init:start
partno erro : can't find partition Reserve0
bad fb1_cfg[w=0,h=0,bpp=32,format=0]
[00.520]boot_gui_init:finish
partno erro : can't find partition bootloader
[00.527]bmp_name=bootlogo.bmp size 38454
[00.536]Item0 (Map) magic is bad
[00.539]the secure storage item0 copy0 magic is bad
[00.547]Item0 (Map) magic is bad
[00.549]the secure storage item0 copy1 magic is bad
[00.554]Item0 (Map) magic is bad
[00.557]usb burn from boot
delay time 0
weak:otg_phy_config
[00.568]usb prepare ok
[00.698]LCD open finish
[00.775]usb sof ok
[00.776]usb probe ok
[00.778]usb setup ok
set address 0x10
set address 0x10 ok
try to update
[01.183]do_burn_from_boot usb : have no handshake
List file under ULI/factory
** Unrecognized filesystem type **
root_partition is rootfs
set root to /dev/mmcblk0p5
[01.199]update part info
[01.202]update bootcmd
[01.205]change working_fdt 0x40e6ee68 to 0x40e4ee68
[01.210][mmc]: can't find node "sunxi-mmc2" try "mmc"
[01.215][mmc]: no mmc-hs400-1_8v!
[01.218][mmc]: delete mmc-hs200-1_8v from dtb
[01.222][mmc]: get max-frequency ok 50000000 Hz
[01.227][mmc]: get sunxi-mmc2 string failed
[01.231]The storage not support sample function
partno erro : can't find partition bootloader
** Unable to read file lcd_compatible_index.txt **
[01.257]disp_fat_load for lcd config failed
partno erro : can't find partition bootloader
writing lcd_compatible_index.txt
16 bytes written
save lcd compatible disp0 index 0 to flash
partno erro : can't find partition bootloader
[01.281]update dts
Hit any key to stop autoboot: 0
input addr exceed dram scope
[01.385]no vendor_boot partition is found
Android's image name: sun8i_arm
[01.480]Starting kernel ...
[01.483][mmc]: mmc exit start
[01.500][mmc]: mmc 2 exit ok
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.61 (kunyao@AwExdroid89) (arm-linux-gnueabi-gcc (Linaro GCC 5.3-2016.05) 5.3.1 20160412, GNU ld (Linaro_Binutils-2016.05) 2.25.0 Linaro 2016_02) #1 SMP PREEMPT Wed Sep 6 10:23:35 CST 2023
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: sun8iw20
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created DMA memory pool at 0x42200000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@42200000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x42244000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node dsp0_rpbuf@42244000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 4 MiB at 0x47c00000
[ 0.000000] On node 0 totalpages: 32420
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32420 pages, LIFO batch:7
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] percpu: Embedded 15 pages/cpu s30784 r8192 d22464 u61440
[ 0.000000] pcpu-alloc: s30784 r8192 d22464 u61440 alloc=15*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32164
[ 0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/init rdinit=/rdinit partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:private@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=4M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun8iw20p1 boot_type=2 androidboot.boot_type=2 gpt=1 uboot_message=2018.07-00006-g65ea3f1459(08/31/2023-08:08:04) mbr_offset=1032192 disp_reserve=1536000,0x40efb000 androidboot.dramfreq=792 androidboot.dramsize=128 mtdparts=<NULL>
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 103624K/129680K available (6144K kernel code, 303K rwdata, 2200K rodata, 1024K init, 1166K bss, 21960K reserved, 4096K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x25c/0x3dc with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000017] Switching to timer-based delay loop, resolution 41ns
[ 0.000190] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000836] Console: colour dummy device 80x30
[ 0.000875] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000887] pid_max: default: 32768 minimum: 301
[ 0.001015] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001027] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001620] CPU: Testing write buffer coherency: ok
[ 0.001944] /cpus/cpu@0 missing clock-frequency property
[ 0.001963] /cpus/cpu@1 missing clock-frequency property
[ 0.001974] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002490] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002593] rcu: Hierarchical SRCU implementation.
[ 0.003017] smp: Bringing up secondary CPUs ...
[ 0.004175] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.004303] smp: Brought up 1 node, 2 CPUs
[ 0.004317] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[ 0.004323] CPU: All CPU(s) started in SVC mode.
[ 0.004775] devtmpfs: initialized
[ 0.016429] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.017002] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.017028] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.017372] pinctrl core: initialized pinctrl subsystem
[ 0.018649] NET: Registered protocol family 16
[ 0.020217] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.058181] rtc_ccu: sunxi ccu init OK
[ 0.060672] ccu: sunxi ccu init OK
[ 0.061209] r_ccu: sunxi ccu init OK
[ 0.092454] sun6i-dma 3002000.dma-controller: sunxi dma probed
[ 0.097123] iommu: Default domain type: Translated
[ 0.097336] sunxi iommu: irq = 24
[ 0.098409] SCSI subsystem initialized
[ 0.098800] usbcore: registered new interface driver usbfs
[ 0.098879] usbcore: registered new interface driver hub
[ 0.098996] usbcore: registered new device driver usb
[ 0.099231] videodev: Linux video capture interface: v2.00
[ 0.101776] Advanced Linux Sound Architecture Driver Initialized.
[ 0.102463] Bluetooth: Core ver 2.22
[ 0.102547] NET: Registered protocol family 31
[ 0.102556] Bluetooth: HCI device and connection manager initialized
下略
考虑可能的问题:
- 使用USB HUB进行刷写,影响速率
- 使用的 eMMC 速度较慢
- USB 连接不稳定,出现断连情况
- 供电不足,cpu 在烧写状态下缺电
- eMMC 布局走线不合理
- 选择全盘擦除升级而不是分区擦除升级
