因为喜欢用ADB,因为不喜欢插拔TF卡,所以D1直接用PhoenixSuit烧录TF(SDNAND)
-
如题
因为不喜欢插拔卡搞来搞去,喜欢直接USB插上直接干活烧录到底,
那就,看下D1怎么搞TF直接通过PhoenixSuit烧录 TF卡或者SDNAND第一步,看启动过程的LOG:
U-Boot 2018.05-g0a62f10 (Dec 31 2021 - 07:53:57 +0000) Allwinner Technology [03.820]DRAM: 512 MiB [03.825]Relocation Offset is: 1def0000 [03.847]secure enable bit: 0 [03.851]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [03.858]flash init start [03.860]workmode = 16,storage type = 0 try card 2 set card number 2 get card number 2 [03.867][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1 [03.876][mmc]: get sdc_type fail and use default host:tm4. [03.900][mmc]: Is not Boot mode! [03.903][mmc]: SUNXI SDMMC Controller Version:0x50310 [03.914][mmc]: ************Try SD card 2************ [03.919][mmc]: mmc 2 cmd timeout 100 status 100 [03.924][mmc]: smc 2 err, cmd 8, RTO [03.927][mmc]: mmc 2 close bus gating and reset [03.932][mmc]: mmc 2 cmd timeout 100 status 100 [03.936][mmc]: smc 2 err, cmd 55, RTO [03.940][mmc]: mmc 2 close bus gating and reset [03.944][mmc]: ************Try MMC card 2************ [03.953][mmc]: mmc 2 cmd timeout 100 status 100 [03.957][mmc]: smc 2 err, cmd 1, RTO [03.960][mmc]: mmc 2 close bus gating and reset [03.965][mmc]: Card did not respond to voltage select! [03.969][mmc]: ************SD/MMC 2 init error!************ [03.975][mmc]: mmc init product failed MMC init failed try emmc fail [03.988]sunxi-spinand: AW SPINand MTD Layer Version: 1.5 20200407 [03.994]sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.9 20200306 [04.041]sunxi-spinand-phy: request spi0 gpio ok [04.045]sunxi-spinand-phy: request general tx dma channel ok! [04.050]sunxi-spinand-phy: request general rx dma channel ok! [04.056]sunxi-spinand-phy: set spic0 clk to 20 Mhz [04.060]sunxi-spinand-phy: init spic0 clk ok [04.085]sunxi-spinand-phy: read id failed : -110 try nand fail [04.132]unrecognized JEDEC id bytes: ff, ff, ff try spinor fail initcall sequence 000000005ff948c8 failed at call 000000004200d70e (err=-1) ### ERROR ### Please RESET the board ###
看到关键的点
try card 2
set card number 2
get card number 2
这里默认从card 2 开始
那么咱就先试试看,直接从card 0 行不行?
直接搜索到代码中定位到的是:
tina_d1_open_v1.0.1\lichee\brandy-2.0\u-boot-2018\drivers\sunxi_flash\mmc\sdmmc.c
中的接口:int sunxi_sprite_mmc_probe(void) { #ifndef CONFIG_MACH_SUN50IW11 return sdmmc_init_for_sprite(0, 2); #else int workmode = uboot_spare_head.boot_data.work_mode; if (workmode == WORK_MODE_CARD_PRODUCT) return -1; else return sdmmc_init_for_sprite(0, 0); #endif }
这里 CONFIG_MACH_SUN50IW11 没有定义
默认是执行 return sdmmc_init_for_sprite(0, 2);那么咱就是说,直接改return sdmmc_init_for_sprite(0, 0); 试试看?
好的说改就改了。
int sunxi_sprite_mmc_probe(void) { #ifndef CONFIG_MACH_SUN50IW11 return sdmmc_init_for_sprite(0, 0); #else int workmode = uboot_spare_head.boot_data.work_mode; if (workmode == WORK_MODE_CARD_PRODUCT) return -1; else return sdmmc_init_for_sprite(0, 0); #endif }
改动了下,直接烧录测一下:
U-Boot 2018.05-g0a62f10-dirty (Jan 28 2022 - 22:35:17 +0800) Allwinner Technology [03.804]DRAM: 512 MiB [03.809]Relocation Offset is: 1def0000 [03.831]secure enable bit: 0 [03.835]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [03.842]flash init start [03.844]workmode = 16,storage type = 0 running in sunxi_sprite_mmc_probe try card sdmmc_init_for_sprite try card 0 set card number 0 get card number 0 [03.857][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1 [03.866][mmc]: get sdc_type fail and use default host:tm1. [03.891][mmc]: can't find node "mmc0",will add new node [03.896][mmc]: fdt err returned <no error> [03.900][mmc]: Using default timing para [03.904][mmc]: SUNXI SDMMC Controller Version:0x50310 [03.922][mmc]: card_caps:0x3000000a [03.925][mmc]: host_caps:0x3000003f [03.933]Loading Environment from SUNXI_FLASH... OK [03.939]try to burn key [03.943]out of usb burn from boot: not need burn key 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 0x30 set address 0x30 ok set address 0x31 set address 0x31 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 9 part[0] name :boot-resource part[0] classname :DISK part[0] addrlo :0x1f8 part[0] lenlo :0x1f80 part[0] user_type :32768 part[0] keydata :0 part[0] ro :0 part[1] name :env part[1] classname :DISK part[1] addrlo :0x2178 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 :0x2370 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 :0x2568 part[3] lenlo :0x50b8 part[3] user_type :32768 part[3] keydata :0 part[3] ro :0 part[4] name :dsp0 part[4] classname :DISK part[4] addrlo :0x7620 part[4] lenlo :0x3f0 part[4] user_type :32768 part[4] keydata :0 part[4] ro :0 part[5] name :recovery part[5] classname :DISK part[5] addrlo :0x7a10 part[5] lenlo :0x6e40 part[5] user_type :32768 part[5] keydata :0 part[5] ro :0 part[6] name :rootfs part[6] classname :DISK part[6] addrlo :0xe850 part[6] lenlo :0x1000000 part[6] user_type :32768 part[6] keydata :0 part[6] ro :0 part[7] name :rootfs_data part[7] classname :DISK part[7] addrlo :0x100e850 part[7] lenlo :0x6400 part[7] user_type :32768 part[7] keydata :0 part[7] ro :0 part[8] name :UDISK part[8] classname :DISK part[8] addrlo :0x1014c50 part[8] lenlo :0x0 part[8] user_type :33024 part[8] keydata :0 part[8] ro :0 total part: 10 mbr 0, 1f8, 8000 boot-resource 1, 1f80, 8000 env 2, 1f8, 8000 env-redund 3, 1f8, 8000 boot 4, 50b8, 8000 dsp0 5, 3f0, 8000 recovery 6, 6e40, 8000 rootfs 7, 1000000, 8000 rootfs_data 8, 6400, 8000 UDISK 9, 0, 8100 [07.119]erase all part start need erase flash: 18 [07.125][mmc]: mmc_mmc_erase: sd card don't support erase [07.130]read item0 copy0 [07.132][mmc]: memalign dst_align is NULL! read first backup failed in fun sunxi_sprite_mmc_secread line 468 [07.142][mmc]: memalign dst_align is NULL! read first backup failed in fun sunxi_sprite_mmc_secread line 468 [07.152]unknown error happen in item 0 read [07.155]get secure storage map err [07.159][mmc]: memalign src_align is NULL! write first backup failed in fun sunxi_sprite_mmc_secwrite line 533 [07.168]erase secure storage block 0 err SUNXI_EFEX_MBR_TAG mbr size = 0x10000 write primary GPT success write Backup GPT success [08.043]update partition map FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 running in sunxi_sprite_mmc_init try card 2 ******Has init FEX_CMD_fes_verify_value, start 0x1f8, size high 0x0:low 0x2f8c00 FEX_CMD_fes_verify_value 0x3481d9f0 FEX_CMD_fes_verify_value, start 0x2178, size high 0x0:low 0x20000 FEX_CMD_fes_verify_value 0xcb347ad3 FEX_CMD_fes_verify_value, start 0x2370, size high 0x0:low 0x20000 FEX_CMD_fes_verify_value 0xcb347ad3 FEX_CMD_fes_verify_value, start 0x2568, size high 0x0:low 0x91d000 FEX_CMD_fes_verify_value 0xe5a32b17 FEX_CMD_fes_verify_value, start 0x7620, size high 0x0:low 0x4059c FEX_CMD_fes_verify_value 0x413a5c54 FEX_CMD_fes_verify_value, start 0xe850, size high 0x0:low 0x6400000 FEX_CMD_fes_verify_value 0x87284509 bootfile_mode=4 SUNXI_EFEX_BOOT1_TAG boot1 size = 0xfc000, max size = 0x200000 uboot size = 0xfc000 storage type = 7 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 bootfile_mode=4 SUNXI_EFEX_BOOT0_TAG boot0 size = 0x10000 [36.353][mmc]: write mmc 0 info ok dram para[0] = 318 dram para[1] = 3 dram para[2] = 7b7bfb dram para[3] = 1 dram para[4] = 10f210f2 dram para[5] = 4001000 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] = 870000 dram para[22] = 24 dram para[23] = b4056103 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 = 7 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 sunxi_efex_next_action=2 exit usb next work 2 ▒[33]HELLO! BOOT0 is starting!T [36]BOOT0 commit : 603490b [38]set pll start [40]periph0 has been enabled [43]set pll end [44][pmu]: bus read error [47]board init ok [49]DRAM only have internal ZQ!! [52]get_pmu_exist() = -1 [54]DRAM BOOT DRIVE INFO: V0.24 [57]DRAM CLK = 792 MHz [59]DRAM Type = 3 (2:DDR2,3:DDR3) [62]DRAMC ZQ value: 0x7b7bfb [65]DRAM ODT value: 0x42. [67]ddr_efuse_type: 0x0 [70]DRAM SIZE =1024 M [74]DRAM simple test OK. [76]dram size =1024 [78]card no is 0 [79]sdcard 0 line count 4 [82][mmc]: mmc driver ver 2021-04-2 16:45 [91][mmc]: Wrong media type 0x0 [94][mmc]: ***Try SD card 0*** [103][mmc]: HSSDR52/SDR25 4 bit [106][mmc]: 50000000 Hz [108][mmc]: 15280 MB [110][mmc]: ***SD/MMC 0 init OK!!!*** [158]Loading boot-pkg Succeed(index=0). [162]Entry_name = opensbi [165]Entry_name = u-boot [169]Entry_name = dtb [171]mmc not para [173]Jump to second Boot.
23333 还真就烧录进去了,也不知道这会有什么隐患没,反正我用着很舒服,不用插拔卡了。若有啥隐患还请大佬们指正。
同时呢,这个烧录口USB还能做adb shell调试用,美滋滋了。而且呢额外挂载的 /mnt/SDCARD 空间等可以在烧录后保留,不会被擦除。
芜湖,起飞!
-
@tevet 有用,鬼才!
-
@mangogeek
太巧了,改一个数字解决了,期待没有什么毛病 -
D1S好改不?烧录速度多少?
我现在烧录D1S的SDNAND,是改写了xfel来实现的
https://whycan.com/t_7730.html -
@aozima 一样的改法,亲测有效,烧录速度,200MB的固件我用tf卡烧录大概50秒
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
这里的“try card 2”是尝试启动什么介质呢?sd卡?
-
-
[37.465]workmode = 16,storage type = 0 try card 0 set card number 0 get card number 0 [37.473][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00 [37.481][mmc]: get sdc_type fail and use default host:tm1. [37.507][mmc]: can't find node "mmc0",will add new node [37.512][mmc]: fdt err returned <no error> [37.516][mmc]: Using default timing para [37.519][mmc]: SUNXI SDMMC Controller Version:0x50310 [37.537][mmc]: card_caps:0x3000000a [37.540][mmc]: host_caps:0x3000003f [37.548]Loading Environment from SUNXI_FLASH... OK [37.559]try to burn key [37.562]out of usb burn from boot: not need burn key [37.566]Net: [37.568]No ethernet found. 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 0x1d set address 0x1d ok
卡在 set address 0x1d ok 这里就不动了。
-
要是能不用按任何物理按键,那就可以远程电脑进行烧录了?
-
@aldfaaa OTG接口连电脑,修改之前只有用flash可以这么烧录,用tf卡要拔卡用读卡器烧录。按键楼主的方法修改后,用tf卡也能直接OTG烧录。
-
@aldfaaa
上电之后一直按数字2就可以进入烧录模式 -
@tevet t113是否同样适用,我改了,好像不行。晚点上日志
-
@soso90 适用的,大佬, 记得muboot
-
-
谢谢楼主,V853也可以!
-
-
-
大佬同样的问题什么原因导致的
卡这就不动了 -
@cfxcfx
换个卡看看? -
正想找这个,感谢分享
Copyright © 2023 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号