全志R16平台配SPI的NOR FLASH的刷tinav2.1系统的解决过程(分色
全志R16平台配SPI的NOR?FLASH的刷tinav2.1系统的解决过程 2017/9/12 16:13 版本:V1.0 ? ? 平台:全志R16。客户提供平台刷tinav0.1的系统可以正常工作 SDK:tinav2.1 FLASH:GD25Q128CSIGR(128Mb==16MB) 解决时间:2017/9/4 ? ? 客户只带了一台机器过来(万幸是这台机器在调试过程中没有挂掉!),并且客户也没有带硬件过来(委婉地说在开会)没有带工作环境(WIN7)过来。(帮客户在带来的笔记本电脑上ubuntu14.04 64位系统下装好了LiveSuit!) ? 感谢郭工(伟)在分析刷机的错误log的时候的帮助。感谢Jason和苏工(广海)的帮助。 Jason连少为人知的NOR FLASH的强制刷机也知道,确实让人佩服得五体投地! 对于NOR FLASH:短接SPI0-CS0(PC3/ND_CE1/SPI0_CS)球号D11到地,开机的时候可以强制刷机。看来Jason曾经浸淫刷机界多年(刷机达人!对于各种ARM开发板/平台^_) ? 陈工带了板和tinav0.1系统,重新刷机:确认板子是可以正常工作的(可以跑,可以正常刷机)。拷贝了客户的配置文件:env.cfg、sys_config.fex和sys_partition_nor.fex。 ? ? 1、先易后难:验证了客户陈工带来的全志R16的开发板SC3817R是好的,默认是android4.4.2的系统,刷tinav2.1正常。将客户陈工在CSDN最新下载的tinav2.1的系统所编译的IMG刷在开发板SC3817R上正常,但是客户的板子刷不进去,刷城茗发布给客户的SDK默认编译的IMG也同样异常! ? 刷默认编译的IMG(对地短接短接SPI0-CS0之后强制刷机:反复重新刷机): fes commit : 6503c6e0a6a8756bd8ab1a6a806f5036c6484ae7 ? beign to init dram DRAM DRIVE INFO: V1.7 DRAM Type =3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3) DRAM zq value: 00003bbbDRAM CLK =552 MHZ ID CHECK VERSION: V0.1 using ic R16 USE PLL DDR1 USE PLL NORMAL PLL FREQUENCE = 1104 MHZ DRAM PLL DDR1 frequency extend open ! DRAM master priority setting ok. Auto calculate timing parameter! para_dram_tpr0 = 0047214f para_dram_tpr1 = 01c2294b para_dram_tpr2 = 00061043 tcl = 6,tcwl = 4 DRAM TIMING PARA0 = 0b0e180b DRAM TIMING PARA1 = 0003040f DRAM TIMING PARA2 = 0406050a DRAM TIMING PARA3 = 0000400c DRAM TIMING PARA4 = 05020405 DRAM TIMING PARA5 = 05050403 DRAM TIMING PARA8 = 90003310 DRAM PHY INTERFACE PARA = 02040102 DRAM VTC is disable DRAM dynamic DQS/DQ ODT is on DRAM SIZE AUTO SCAN ENABLE. NOW,the work mode register value is 004318e5 DRAM DQS gate is open. DRAM two rank training is on,the value is 93003587 DRAM training error,PGSR0 = 9040005f DRAM low 8 ?DQs information,DXnGSR = 02399c80 DRAM high 8 DQs information,DXnGSR = 02389c00 DRAM do not have two rank,NOW set one rank DRAM recovery DQS gate mode 0 DRAM DQS gate is close. DRAM work mode register value = 004318d4 DRAM SIZE =256 M set one rank ODTMAP DRAM simple test OK. init dram ok [ ?????5.237] ? U-Boot 2011.09-rc1-00000-g2455f9d-dirty (Jul 19 2017 - 10:48:49) Allwinner Technology ? [ ?????5.246]version: 1.1.0 [ ?????5.249]uboot commit : 2455f9dae5dc72bea4879f553dafdc73b24c8d4b ? [ ?????5.256]pmbus: ??normal or secure os ready [ ?????5.261]PMU: AXP221 [ ?????5.263]PMU: AXP22x found bat_vol=2,ratio=0 [ ?????5.268]PMU: dcdc3 1200 [ ?????5.271]PMU: pll1 1008 Mhz,PLL6=600 Mhz AXI=336 Mhz,AHB=200 Mhz,APB1=100 Mhz dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo2_vol = 2500 aldo3_vol = 3000 find power_sply to end vbus exist dram_para_set start dram_para_set end [ ?????5.376]DRAM: ?256 MiB relocation Offset is: 0e1f4000 save config for small mem_size workmode = 16 NAND_UbootProbe start NB1 : enter phy init NandHwInit: Start Nand Hardware initializing ..... uboot:nand version: 3 5001 20160411 1437 [NAND] channel cnt is 1 ndfc version: 1 ndfc dma mode: MBUS DMA Reset NDFC 0 NFC Randomizer start. NFC_ResetChip: 0x101,0x100 0x10095 NFC_ResetChip: 0xff,ch: 0 [PHY_DBG] CH 0 Nand flash chip id is:0x0 0x0 0x0 0x0 0x0 0x0 nand id of two channel is not the same,set to 1 channel mode [SCAN_DBG] Nand flash chip id is:0x0 0x0 0x0 0x0 0x0 0x0 [SCAN_ERR] search nand physical architecture parameter failed! [ERR]NandHwInit: SCN_AnalyzeNandSystem() failed! NandHwInit: End Nand Hardware initializing ..... FAIL! NB1 : nand phy init fail NB1 : enter phy Exit nand release dma:0 NAND_UbootProbe end: 0xffffffff flash size =32 M sunxi spinor is initing... Reg pull reg_val=0x5150,read=0x5150 ? read CCM_AHB1_RST_REG0[0x1006040] ? read CCM_AHB1_RST_REG0[0x1006040] ? read enable CCM_AHB1_RST_REG0[0x1106040] read s CCM_AHB1_GATE0_CTRL[0x1106040] SPI clock source :0x23c34600 spi spic->sclk =0x28df2b6 spic_set_clk:mclk=0x28df2b6 sunxi spi init OK spinor id is 1840c8 try nor successed sunxi sprite has installed spi function read flash error In: ???serial Out: ??serial Err: ??serial --------fastboot partitions-------- mbr not exist Net: ??usb_etherWarning: failed to set MAC address ? [ ?????5.598]Hit any key to stop autoboot: ?0 work mode=0x10 run usb efex delay time 2500 usb init ok set address 0x1a SUNXI_EFEX_ERASE_TAG erase_flag = 0x1 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 flash size =32 M sunxi spinor is already inited flash sectors: 0x10000 algin 512 byte ?fullimg_size 14876672? FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 eGON.BT0? dram para[0] = 228 dram para[1] = 3 dram para[2] = 3bbb dram para[3] = 1 dram para[4] = 10e20100 dram para[5] = 0 dram para[6] = 1c70 dram para[7] = 40 dram para[8] = 18 dram para[9] = 0 dram para[10] = 47214f dram para[11] = 1c2294b dram para[12] = 61043 dram para[13] = 0 dram para[14] = 0 dram para[15] = 0 dram para[16] = 0 dram para[17] = 0 dram para[18] = 0 dram para[19] = 0 dram para[20] = 0 dram para[21] = 0 dram para[22] = a8 dram para[23] = 10901 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 update dram para success before sunxi_sprite_setdata_finish force sunxi spinor exit sunxi_efex_next_action=2 exit usb next work 2 SUNXI_UPDATE_NEXT_ACTION_REBOOT set next mode 14 [ ???128.629][mmc]: MMC Device 2 not found [ ???128.633][mmc]: ?mmc ???????GˉN not find,so not exit sunxi spinor has not inited dma 0x4ebb1a0c int is not used yet dma 0x4ebb1a0c int is free,you do not need to free it again dma 0x4ebb1a28 int is not used yet dma 0x4ebb1a28 int is free,you do not need to free it again ? ? ? ? 2、 步骤一: 替换:sys_config.fex和sys_partition_nor.fex,还是出错。直接在uboot中给SPI NOR赋值为32M。烧机了又烧机(反复烧机)!拔掉USB断电出问题:不能启动。只有在短接SPI0-CS0引脚的时候可以强制刷机! rootroot@rootroot-E400:~$ cd wyb/? rootroot@rootroot-E400:~/wyb$ tar zxvf tinaV2.1_wyb_20170302_patch_leo_20161102.tar.gz? rootroot@rootroot-E400:~/wyb$ cd feimi_tinav2.1/ rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ source build/envsetup.sh? including target/allwinner/azalea-perf3/vendorsetup.sh including target/allwinner/azalea-perf2/vendorsetup.sh including target/allwinner/octopus-dev/vendorsetup.sh including target/allwinner/astar-parrot/vendorsetup.sh including target/allwinner/octopus-sch/vendorsetup.sh including target/allwinner/azalea-evb/vendorsetup.sh including target/allwinner/astar-evb/vendorsetup.sh including target/allwinner/generic/vendorsetup.sh including target/allwinner/tulip-d1/vendorsetup.sh including target/allwinner/azalea-perf1/vendorsetup.sh including target/allwinner/astar-spk/vendorsetup.sh rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ lunch ? You're building on Linux ? Lunch menu... pick a combo: ?????1. azalea_perf3-tina ?????2. azalea_perf3-dragonboard ?????3. azalea_perf2-tina ?????4. azalea_perf2-dragonboard ?????5. octopus_dev-tina ?????6. octopus_dev-dragonboard ?????7. astar_parrot-tina ?????8. astar_parrot-dragonboard ?????9. octopus_sch-tina ?????10. octopus_sch-dragonboard ?????11. azalea_evb-tina ?????12. azalea_evb-dragonboard ?????13. astar_evb-tina ?????14. tulip_d1-tina ?????15. tulip_d1-dragonboard ?????16. azalea_perf1-tina ?????17. azalea_perf1-dragonboard ?????18. astar_spk-tina ?????19. astar_spk-dragonboard ? Which would you like?7 ? ============================================ PLATFORM_VERSION_CODENAME=Neptune PLATFORM_VERSION=2.0.0 TARGET_PRODUCT=astar_parrot TARGET_BUILD_VARIANT=tina TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a7 TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=57513AA3 OUT_DIR= ============================================ ? rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ make -j8 rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ pack -d No kernel param,parse it from astar copying tools file copying configs file image/aultls32.fex image/aultools.fex image/boot_package.fex image/cardscript.fex image/cardscript_secure.fex image/cardtool.fex image/env.cfg image/env_burn.cfg image/env_dragonboard.cfg image/image.cfg image/image_linux.cfg image/split_xxxx.fex image/sunxi.fex image/sys_config - 副本.fex image/sys_config.fex image/sys_partition - 副本.fex image/sys_partition.fex image/sys_partition_dragonboard.fex image/sys_partition_dump.fex image/sys_partition_nor - 副本.fex image/sys_partition_nor.fex image/sys_partition_private.fex image/test_config.fex image/toc0.fex image/toc1.fex image/usbtool.fex image/usbtool_test.fex /home/rootroot/wyb/feimi_tinav2.1 copying boot resource copying boot file uart -> card0 packing for tina linux normal load file: boot0_spinor.fex ok load file: u-boot-spinor.fex ok load file: sunxi_mbr.fex ok load file: sys_partition.bin ok load file: env.fex ok load file: boot.fex ok error: file size of boot.fex(4194304) > part size(3145728) merge_package fail ERROR: merge_full_img failed rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ ? ? 将boot分区翻倍: R:wybfeimi_tinav2.1targetallwinnerastar-parrotconfigssys_partition_nor.fex [partition] ????name ????????= boot ????size ????????= 12288 ????;size ????????= 6144 ????downloadfile = "boot.fex" ????user_type ???= 0x8000 ? ? 可以打包了! rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ pack -d rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ ? ? 由于IMG达到接近28MB+,客户陈工说SPI NOR FLASH有32MB(实际16MB),他们还要存储一些其他的东西,为了保险起见,想干掉sys_partition.fex。结果:悲剧了。R:wybfeimi_tinav2.1targetallwinnerastar-parrotconfigssys_partition.fex ? rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ unix2dos: can't open 'sys_partition.fex': No such file or directory packing for tina linux normal mv: cannot stat 'sys_partition.bin': No such file or directory load file: boot0_spinor.fex ok load file: u-boot-spinor.fex ok load file: sunxi_mbr.fex ok load file: sys_partition.bin ok load file: env.fex ok load file: boot.fex ok unable to open ?file system.fex unable to open ?file userdata.fex this is not a partition key merge_package ok mv: cannot stat 'sys_partition.bin_back': No such file or directory /home/rootroot/wyb/feimi_tinav2.1/out/host/bin/ /home/rootroot/wyb/feimi_tinav2.1/out/astar-parrot/image Begin Parse sys_partion.fex sys_config.fex Len: 0xf55b config.fex Len: 0x9c34 split_xxxx.fex Len: 0x200 The file sys_partition.fex length = 0 BuildImg 400 Dragon execute image.cfg Failed ! ArgCnt = 3,400 pack finish rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ ? ? 刷机报错: fes commit : 6503c6e0a6a8756bd8ab1a6a806f5036c6484ae7 ? beign to init dram DRAM DRIVE INFO: V1.7 DRAM Type =3 (2:DDR2,DXnGSR = 023a9c80 DRAM high 8 DQs information,DXnGSR = 02399c80 DRAM do not have two rank,NOW set one rank DRAM recovery DQS gate mode 0 DRAM DQS gate is close. DRAM work mode register value = 004318d4 DRAM SIZE =256 M set one rank ODTMAP DRAM simple test OK. init dram ok [ ?????5.264] ? U-Boot 2011.09-rc1-dirty (Jun 03 2016 - 17:25:02) Allwinner Technology ? [ ?????5.272]version: 1.1.0 [ ?????5.274]uboot commit : 6503c6e0a6a8756bd8ab1a6a806f5036c6484ae7 ? [ ?????5.281]pmbus: ??normal or secure os ready [ ?????5.286]PMU: AXP221 [ ?????5.288]PMU: AXP22x found bat_vol=2,ratio=0 [ ?????5.293]PMU: dcdc3 1200 [ ?????5.296]PMU: pll1 1008 Mhz,APB1=100 Mhz dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo2_vol = 2500 aldo3_vol = 3000 find power_sply to end vbus exist dram_para_set start dram_para_set end [ ?????5.402]DRAM: ?256 MiB relocation Offset is: 0e1f4000 save config for small mem_size workmode = 16 NAND_UbootProbe start NB1 : enter phy init NandHwInit: Start Nand Hardware initializing ..... uboot:nand version: 3 5001 20160401 1437 [NAND] channel cnt is 1 ndfc version: 1 ndfc dma mode: MBUS DMA Reset NDFC 0 NFC Randomizer start. NFC_ResetChip: 0x101,set to 1 channel mode [SCAN_DBG] Nand flash chip id is:0x0 0x0 0x0 0x0 0x0 0x0 [SCAN_ERR] search nand physical architecture parameter failed! [ERR]NandHwInit: SCN_AnalyzeNandSystem() failed! NandHwInit: End Nand Hardware initializing ..... FAIL! NB1 : nand phy init fail NB1 : enter phy Exit nand release dma:0 NAND_UbootProbe end: 0xffffffff flash size =0 M get flash_size warning sunxi spinor is initing... Reg pull reg_val=0x5150,read=0x5150 ? read CCM_AHB1_RST_REG0[0x1006040] ? read CCM_AHB1_RST_REG0[0x1006040] ? read enable CCM_AHB1_RST_REG0[0x1106040] read s CCM_AHB1_GATE0_CTRL[0x1106040] SPI clock source :0x23c34600 spi spic->sclk =0x28df2b6 spic_set_clk:mclk=0x28df2b6 sunxi spi init OK spinor id is 1840c8 try nor successed sunxi sprite has installed spi function read flash error In: ???serial Out: ??serial Err: ??serial --------fastboot partitions-------- mbr not exist Net: ??usb_etherWarning: failed to set MAC address ? [ ?????5.626]Hit any key to stop autoboot: ?0 work mode=0x10 run usb efex delay time 2500 usb init ok set address 0x20 SUNXI_EFEX_ERASE_TAG erase_flag = 0x1 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 flash size =0 M get flash_size warning sunxi spinor is already inited flash size =0 M flash sectors: 0x4000 force sunxi spinor exit ? 在我使劲用grep查找uboot跟踪的时候,郭工提醒看完整的LOG,从第一条错误FLASH SIZE=0开始入手分析!然后查出来需要是否可以先临时解决,给uboot直接赋值16M(刚开始客户坚称是32M,估计浪费了1/5的时间,当然自己也不能完全相信客户,自己先行核实的!)实在不行就去修改sys_config.fex了。 rootroot@rootroot-E400:~/wyb/feimi_tinav2.1/lichee/brandy$ grep "force sunxi spinor exit" . -R grep: ./.git/svn: No such file or directory ./u-boot-2011.09/drivers/spinor/sunxi_spinor.c:printf("force sunxi spinor exitn"); rootroot@rootroot-E400:~/wyb/feimi_tinav2.1/lichee/brandy$ ? ? 的时候,郭工告诉从最开始出错的地方找: flash size =0 M rootroot@rootroot-E400:~/wyb/feimi_tinav2.1/lichee/brandy$ grep "flash size =" . -R grep: ./.git/svn: No such file or directory printf("flash size =%d Mn",size); rootroot@rootroot-E400:~/wyb/feimi_tinav2.1/lichee/brandy$ ? ? /* ************************************************************************************************************ * * ????????????????????????????????????????????function * * ???name ?????????: * * ???parmeters ????: * * ???return ???????: * * ???note ?????????: * * ************************************************************************************************************ */ int spinor_size(void) { int size = 0; int ret = 0; ret = script_parser_fetch("spi_board0","sflash_size",&size,sizeof(int)); if (ret) { size = 8*1024*1024/512; printf("get flash_size warningn"); } else size = ?size*1024*1024/512; } return size; } ? ? 根据经验:script_parser_fetch是从sys_config.fex文件中获取容量。 ? 直接修改: int spinor_size(void) { int size = 0; int ret = 0; ret = script_parser_fetch("spi_board0",sizeof(int)); printf("flash size =%d Mn",size); if (ret) { //size = 8*1024*1024/512; size = 32*1024*1024/512; // printf("get flash_size warning wyb n"); printf("**** wyb %s-%d-%s get flash_size warningn",__FILE__,__LINE__,__func__); } else printf("**** wyb %s-%d-%s get flash_size warning ret=%d size=%dn",__func__,ret,size); size = ?size*1024*1024/512; } return size; } ? ? 修改uboot部分的代码需要重新编译uboot再打包: rootroot@rootroot-E400:~/wyb/feimi_tinav2.1/lichee/brandy$ ./build.sh -p sun8iw5p1 rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ cd ../.. rootroot@rootroot-E400:~/wyb/feimi_tinav2.1$ pack -d ? ? ? ? 步骤2:替换为飞米的:env.cfg R:wybfeimi_tinav2.1targetallwinnergenericconfigsenv-3.4.cfg bootdelay=0 #default bootcmd,will change at runtime according to key press bootcmd=run setargs_nand boot_normal#default nand boot #kernel command arguments console=ttyS0,115200 nor_root=/dev/mtdblock4 nand_root=/dev/nandd mmc_root=/dev/mmcblk0p7 init=/sbin/init loglevel=8 #set kernel cmdline if boot.img or recovery.img has no cmdline we will use this setargs_nor=setenv bootargs console=${console} root=${nor_root} rootwait init=${init} ion_cma_list="8m,32m,64m,128m,256m"loglevel=${loglevel} partitions=${partitions} setargs_nand=setenv bootargs console=${console} root=${nand_root} rootwait init=${init} ion_cma_list="8m,256m" loglevel=${loglevel} partitions=${partitions} setargs_mmc=setenv bootargs console=${console} root=${mmc_root} rootwait init=${init} ion_cma_list="8m,255)">#nand command syntax: sunxi_flash read address partition_name read_bytes #0x40007800 = 0x40008000(kernel entry) - 0x800(boot.img header 2k) boot_normal=fatload sunxi_flash boot 43800000 uImage;bootm 43800000 boot_recovery=fatload sunxi_flash extend 43800000 uImage;bootm 43800000 boot_fastboot=fastboot #recovery key recovery_key_value_max=0x13 recovery_key_value_min=0x10 #fastboot key fastboot_key_value_max=0x8 fastboot_key_value_min=0x2 ? 修改为(貌似干掉了setargs_nor): bootdelay=0 #default bootcmd,will change at runtime according to key press bootcmd=run setargs_nand boot_normal#default nand boot #kernel command arguments console=ttyS0,115200 nand_root=/dev/nandd mmc_root=/dev/mmcblk0p7 init=/init loglevel=8 #set kernel cmdline if boot.img or recovery.img has no cmdline we will use this setargs_nand=setenv bootargs console=${console} root=${nand_root} init=${init} ion_cma_512m=120m ion_cma_1g=176m ion_carveout_512m=96m ion_carveout_1g=150m coherent_pool=4m loglevel=${loglevel} partitions=${partitions} setargs_mmc=setenv bootargs console=${console} root=${mmc_root} init=${init} ion_cma_512m=120m ion_cma_1g=176m ion_carveout_512m=96m ion_carveout_1g=150m coherent_pool=4m loglevel=${loglevel} partitions=${partitions} #nand command syntax: sunxi_flash read address partition_name read_bytes #0x40007800 = 0x40008000(kernel entry) - 0x800(boot.img header 2k) boot_normal=sunxi_flash read 40007800 boot;boota 40007800 boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800 boot_fastboot=fastboot #recovery key recovery_key_value_max=0x13 recovery_key_value_min=0x10 #fastboot key fastboot_key_value_max=0x8 fastboot_key_value_min=0x2 ? ? 客户陈工突然说128是128Mb,也就是16MB。虽然我在刷机的时候看见反复的: fullimg_size 16777216 只是想到NAND是16M,NOR也是16MB,各站一半,就放过去了(没有深究)。 ? ? ? ? 步骤3:想不到其它招了,修改修改sys_config.fex文件吧! R:wybfeimi_tinav2.1targetallwinnerastar-parrotconfigssys_config.fex ;---------------------------------------------------------------------------------- ;[spi_board0] spi device configuration ;modalias ?????= spi device name ;max_speed_hz ?= max transfer speed ;bus_num ??????= bus ID ;chip_select ??= chip select,1 ;mode ?????????= SPI transfer mode ;---------------------------------------------------------------------------------- [spi_board0] ;modalias ?????= "mx25l12805d" modalias ?????= "gd25q128" max_speed_hz ?= 50000000 bus_num ??????= 0 chip_select ??= 0 mode ?????????= 0 ;sflash_size ??= 32 sflash_size ??= 16 ? ? 刷机LOG: work mode=0x10 run usb efex delay time 2500 usb init ok set address 0x1e SUNXI_EFEX_ERASE_TAG erase_flag = 0x1 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 flash size =16 M **** wyb sunxi_spinor.c-921-spinor_size get flash_size warning ret=0 size=16 flash sectors: 0x8000 algin 512 byte ?fullimg_size 16777216 ? ? 刷机之后重启到uboot挂掉: exit usb next work 2 SUNXI_UPDATE_NEXT_ACTION_REBOOT set next mode 14 [ ???206.063][mmc]: MMC Device 2 not found [ ???206.067][mmc]: ?mmc ???????GˉN not find,so not exit sunxi spinor has not inited dma 0x4ebb1aac int is not used yet dma 0x4ebb1aac int is free,you do not need to free it again dma 0x4ebb1ac8 int is not used yet dma 0x4ebb1ac8 int is free,you do not need to free it again ?HELLO! BOOT0 is starting! boot0 version : 4.2.0 boot0 commit : a38ad2cb703106ee3da4b579497882fdc599b5a9 ? fel_flag = 0x00000000 rtc[0] value = 0x00000000 rtc[1] value = 0x00000000 rtc[2] value = 0x00000000 rtc[3] value = 0x00000000 DRAM DRIVE INFO: V1.7 DRAM Type =3 (2:DDR2,tcwl = 4 DRAM TIMING PARA0 = 0b0e180b DRAM TIMING PARA1 = 0003040f DRAM TIMING PARA2 = 0406050a DRAM TIMING PARA3 = 0000400c DRAM TIMING PARA4 = 05020405 DRAM TIMING PARA5 = 05050403 DRAM TIMING PARA8 = 90003310 DRAM PHY INTERFACE PARA = 02040102 DRAM VTC is disable DRAM dynamic DQS/DQ ODT is on DRAM DQS gate is PD mode. DRAM one rank training is on,the value is 91003587 DRAM work mode register value = 004318d4 DRAM SIZE =256 M set one rank ODTMAP DRAM simple test OK. dram size =256 Reg pull reg_val=0x00005150,read=0x00005150 ? read CCM_AHB1_RST_REG0[0x00004040] ? read CCM_AHB1_RST_REG0[0x00004040] ? read enable CCM_AHB1_RST_REG0[0x00104040] read s CCM_AHB1_GATE0_CTRL[0x00104040] SPI clock source :0x23c34600 spi spic->sclk =0x03404c2e spic_set_clk:mclk=0x03404c2e Succeed in reading Boot1 file head. The size of uboot is 00044000. Ready to disable icache. Jump to secend Boot. [ ?????0.312] ? U-Boot 2011.09-rc1-00000-g2455f9d-dirty (Sep 04 2017 - 17:20:19) Allwinner Technology ? [ ?????0.321]version: 1.1.0 [ ?????0.324]uboot commit : 2455f9dae5dc72bea4879f553dafdc73b24c8d4b ? [ ?????0.331]pmbus: ??normal or secure os ready [ ?????0.335]PMU: AXP221 [ ?????0.337]PMU: AXP22x found bat_vol=2,ratio=0 [ ?????0.343]PMU: dcdc3 1200 [ ?????0.345]PMU: pll1 1008 Mhz,APB1=100 Mhz dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo2_vol = 2500 aldo3_vol = 3000 find power_sply to end vbus exist user_mode found run key detect no user_key found no key input dram_para_set start dram_para_set end [ ?????0.467]DRAM: ?256 MiB relocation Offset is: 0e288000 save config for small mem_size workmode = 0 flash size =16 M **** wyb sunxi_spinor.c-921-spinor_size get flash_size warning ret=0 size=16 sunxi spinor is initing... Reg pull reg_val=0x5150,read=0x5150 ? read CCM_AHB1_RST_REG0[0x4040] ? read CCM_AHB1_RST_REG0[0x4040] ? read enable CCM_AHB1_RST_REG0[0x104040] read s CCM_AHB1_GATE0_CTRL[0x104040] SPI clock source :0x23c34600 spi spic->sclk =0x28df2b6 spic_set_clk:mclk=0x28df2b6 sunxi spi init OK [ ?????0.554]sunxi flash init ok In: ???serial Out: ??serial Err: ??serial --------fastboot partitions-------- -total partitions:4- -name- ???????-start- ??????-size- ????? env ????????: 4000 ?????????20000 ?????? boot ???????: 24000 ????????600000 ????? system ?????: 624000 ???????400000 ????? UDISK ??????: a24000 ???????0 ?????????? ----------------------------------- base bootcmd=run setargs_nand boot_normal no misc partition is found bootcmd set setargs_nor to be run cmd=run setargs_nor boot_normal WORK_MODE_BOOT sunxi_bmp_logo_display addr = 4f000000 [ ?????0.637]Hit any key to stop autoboot: ?0 ## Error: "setargs_nor" not defined sunxi#?HELLO! BOOT0 is starting! boot0 version : 4.2.0 boot0 commit : a38ad2cb703106ee3da4b579497882fdc599b5a9 ? fel_flag = 0x00000000 rtc[0] value = 0x00000000 rtc[1] value = 0x00000000 rtc[2] value = 0x00000000 rtc[3] value = 0x00000000 DRAM DRIVE INFO: V1.7 DRAM Type =3 (2:DDR2,read=0x5150 ? read CCM_AHB1_RST_REG0[0x4040] ? read CCM_AHB1_RST_REG0[0x4040] ? read enable CCM_AHB1_RST_REG0[0x104040] read s CCM_AHB1_GATE0_CTRL[0x104040] SPI clock source :0x23c34600 spi spic->sclk =0x28df2b6 spic_set_clk:mclk=0x28df2b6 sunxi spi init OK [ ?????0.554]sunxi flash init ok In: ???serial Out: ??serial Err: ??serial --------fastboot partitions-------- -total partitions:4- -name- ???????-start- ??????-size- ????? env ????????: 4000 ?????????20000 ?????? boot ???????: 24000 ????????600000 ????? system ?????: 624000 ???????400000 ????? UDISK ??????: a24000 ???????0 ?????????? ----------------------------------- base bootcmd=run setargs_nand boot_normal no misc partition is found bootcmd set setargs_nor to be run cmd=run setargs_nor boot_normal WORK_MODE_BOOT sunxi_bmp_logo_display addr = 4f000000 [ ?????0.637]Hit any key to stop autoboot: ?0 ## Error: "setargs_nor" not defined sunxi#reset Unknown command 'reset' - try 'help' sunxi# sunxi#res Unknown command 'res' - try 'help' sunxi# sunxi#help ? ??????- alias for 'help' boot ???- boot default,i.e.,run 'bootcmd' bootd ??- boot default,255)">bootm ??- boot application image from memory delay_test- do a delay test efex ???- run to efex env ????- environment handling commands exit ???- exit script false ??- do nothing,unsuccessfully fatdown - download data to a dos filesystem fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls ??- list files in a directory (default /) help ???- print command description/usage key_test- Test the key value ? memcpy_test- do a memcpy test power_probe- probe the axp output printenv- print environment variables pst ????- read data from secure storageerase flag in secure storage run ????- run commands in an environment variable saveenv - save environment variables to persistent storage setenv ?- set environment variables showvar - print local hushshell variables sunxi_flash- sunxi_flash sub-system sys_config- show the sys config value test ???- minimal test like /bin/sh timer_test- do a timer and int test timer_test1- do a timer and int test true ???- do nothing,successfully uburn ??- do a burn from boot version - print monitor,compiler and linker version sunxi#exit exit not allowed from main input shell. sunxi#reboot Unknown command 'reboot' - try 'help' ? ? 突然想起来:当时比对环境变量的时候发现env.cfg之中没有配置NOR的部分。 直接还原,pack -d之后刷机进kernel后飞掉了: ? [ ???1.602258] tas5707 type err! [ ???1.606361] [audiocodec] mic1_used type err! [ ???1.611215] [audiocodec] mic2_used type err! [ ???1.616139] [audiocodec] linein_to_spk_used type err! [ ???1.621850] [audiocodec] linein_to_hp_used type err! [ ???1.627455] [audiocodec] linein_to_aif2_used type err! [ ???1.633342] [audiocodec] sysaudio_to_aif2_used type err! [ ???1.639337] [audiocodec] : aif3 not used! [ ???1.647213] asoc: sndcodec <-> sunxi-codec mapping ok [ ???1.654216] [I2S0]sunxi-i2s0 cannot find any using configuration for controllers,return directly! [ ???1.664565] [I2S]sndi2s0 cannot find any using configuration for controllers,return directly! [ ???1.674332] [I2S0] driver not init,just return. [ ???1.679460] [I2S1]sunxi-i2s1 cannot find any using configuration for controllers,return directly! [ ???1.689753] [I2S]sndi2s1 cannot find any using configuration for controllers,return directly! [ ???1.699513] I2S1 driver not init,just return. [ ???1.704608] u32 classifier [ ???1.707706] ????Actions configured [ ???1.711846] IPv4 over IPv4 tunneling driver [ ???1.717030] gre: GRE over IPv4 demultiplexor driver [ ???1.722561] ip_gre: GRE over IPv4 tunneling driver [ ???1.728449] TCP: cubic registered [ ???1.732243] Initializing XFRM netlink socket [ ???1.737095] NET: Registered protocol family 17 [ ???1.742252] NET: Registered protocol family 15 [ ???1.747392] Bluetooth: RFCOMM socket layer initialized [ ???1.753300] Bluetooth: RFCOMM ver 1.11 [ ???1.757555] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ ???1.763652] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ ???1.770723] ThumbEE CPU extension supported. [ ???1.775574] Registering SWP/SWPB emulation handler [ ???1.782461] otg_wakelock_init: No USB transceiver found [ ???1.788372] sunxi-rtc sunxi-rtc: hctosys: unable to read the hardware clock [ ???1.796329] ths_fetch_sysconfig_para: type err ?device_used = 1. [ ???1.803204] ths_fetch_sysconfig_para: type err ths_trip1_3 = 110. [ ???1.810265] ths_fetch_sysconfig_para: type err ths_trip1_4 = 110. [ ???1.817315] ths_fetch_sysconfig_para: type err ths_trip1_5 = 110. [ ???1.824278] ths_fetch_sysconfig_para: type err ths_trip1_6 = 110. [ ???1.831334] ths_fetch_sysconfig_para: type err ths_trip1_7 = 110. [ ???1.838296] ths_fetch_sysconfig_para: type err ths_trip1_3_min = 0. [ ???1.845546] ths_fetch_sysconfig_para: type err ths_trip1_3_max = 0. [ ???1.852705] ths_fetch_sysconfig_para: type err ths_trip1_4_min = 0. [ ???1.859947] ths_fetch_sysconfig_para: type err ths_trip1_4_max = 0. [ ???1.867109] ths_fetch_sysconfig_para: type err ths_trip1_5_min = 0. [ ???1.874360] ths_fetch_sysconfig_para: type err ths_trip1_5_max = 0. [ ???1.881607] ths_fetch_sysconfig_para: type err ths_trip1_6_min = 0. [ ???1.888755] ths_fetch_sysconfig_para: type err ths_trip1_6_max = 0. [ ???1.896002] ths_fetch_sysconfig_para: type err ths_trip2_count = 0. [ ???1.903158] ths_fetch_sysconfig_para: type err ths_trip2_0 = 0. [ ???1.910435] sunxi_cpu_budget_vftable_init: support only one vf_table [ ???1.917972] CPU Budget:Register notifier [ ???1.922532] CPU Budget:register Success [ ???1.926888] sunxi-budget-cooling sunxi-budget-cooling: Cooling device registered: thermal-budget-0 [ ???1.939474] =========GPS========= :failed to fetch gps configuration! [ ???1.946755] ALSA device list: [ ???1.950243] ??#0: audiocodec [ ???2.460038] List of all partitions: [ ???2.464031] 1f00 ????????????512 mtdblock0 ?(driver?) [ ???2.469934] 1f01 ????????????128 mtdblock1 ?(driver?) [ ???2.475757] 1f02 ???????????6144 mtdblock2 ?(driver?) [ ???2.481666] 1f03 ???????????4096 mtdblock3 ?(driver?) [ ???2.487474] 1f04 ???????????5504 mtdblock4 ?(driver?) [ ???2.493289] No filesystem could mount root,tried: ?ext3 ext2 ext4 squashfs vfat msdos [ ???2.503006] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4) [ ???2.512473] CPU0: stopping [ ???2.515573] Backtrace: [ ???2.518503] [<c00139b8>] (dump_backtrace+0x0/0x108) from [<c047346c>] (dump_stack+0x18/0x1c) [ ???2.522467] ?r7:c0626000 r6:c06424b8 r5:c0623df0 r4:00000000 [ ???2.522467] [<c0473454>] (dump_stack+0x0/0x1c) from [<c0014f84>] (handle_IPI+0xe4/0x1c4) [ ???2.522467] [<c0014ea0>] (handle_IPI+0x0/0x1c4) from [<c000a320>] (gic_handle_irq+0x5c/0x64) [ ???2.522467] [<c000a2c4>] (gic_handle_irq+0x0/0x64) from [<c000f680>] (__irq_svc+0x40/0x70) [ ???2.522467] Exception stack(0xc0627bd0 to 0xc0627c18) [ ???2.522467] 7bc0: ????????????????????????????????????46682400 00000077 00000000 00000000 [ ???2.522467] 7be0: 0007751e 00000000 cb809bc0 cb85f940 c047de14 00000001 cb809bd0 c0627c2c [ ???2.522467] 7c00: 00400000 c0627c18 c0059260 c01a203c 80000113 ffffffff [ ???2.522467] ?r7:c0627c04 r6:ffffffff r5:80000113 r4:c01a203c [ ???2.522467] [<c00591d0>] (scale_rt_power+0x0/0xa8) from [<c0059364>] (update_group_power+0xec/0x150) [ ???2.522467] ?r5:00000000 r4:00000400 [ ???2.522467] [<c0059278>] (update_group_power+0x0/0x150) from [<c0059608>] (find_busiest_group+0x240/0x904) [ ???2.522467] ?r9:00000001 r8:00000004 r7:00000001 r6:00000000 r5:cb85f940 [ ???2.522467] r4:cb809bc0 [ ???2.522467] [<c00593c8>] (find_busiest_group+0x0/0x904) from [<c0059d7c>] (load_balance+0xb0/0x5a8) [ ???2.522467] [<c0059ccc>] (load_balance+0x0/0x5a8) from [<c005a35c>] (rebalance_domains+0xe8/0x180) [ ???2.522467] [<c005a274>] (rebalance_domains+0x0/0x180) from [<c005a43c>] (run_rebalance_domains+0x48/0x144) [ ???2.522467] [<c005a3f4>] (run_rebalance_domains+0x0/0x144) from [<c00361f8>] (__do_softirq+0xa8/0x138) [ ???2.522467] [<c0036150>] (__do_softirq+0x0/0x138) from [<c00366ec>] (irq_exit+0x50/0xa4) [ ???2.522467] [<c003669c>] (irq_exit+0x0/0xa4) from [<c0054990>] (scheduler_ipi+0xd4/0xe0) [ ???2.522467] ?r5:c0626000 r4:c0624180 [ ???2.522467] [<c00548bc>] (scheduler_ipi+0x0/0xe0) from [<c0014f38>] (handle_IPI+0x98/0x1c4) [ ???2.522467] ?r9:c0627f20 r8:00000000 r7:c0626010 r6:c06424b8 r5:c0623df0 [ ???2.522467] r4:00000000 [ ???2.522467] Exception stack(0xc0627f20 to 0xc0627f68) [ ???2.522467] 7f20: c090c8d8 c0642248 0000000f 00000000 c0626038 c0626000 00000001 ffffffff [ ???2.522467] 7f40: c0909480 c061fb3c 00000000 c0627f74 c0627f78 c0627f68 c0010d08 c0010d0c [ ???2.522467] 7f60: 60000013 ffffffff [ ???2.522467] ?r7:c0627f54 r6:ffffffff r5:60000013 r4:c0010d0c [ ???2.522467] [<c0010ce0>] (default_idle+0x0/0x34) from [<c001108c>] (cpu_idle+0xa4/0xf0) [ ???2.522467] [<c0010fe8>] (cpu_idle+0x0/0xf0) from [<c0468b78>] (rest_init+0x94/0xb0) [ ???2.522467] ?r5:c068dc48 r4:c0627f94 [ ???2.522467] [<c0468ae4>] (rest_init+0x0/0xb0) from [<c05fb86c>] (start_kernel+0x2c0/0x318) [ ???2.522467] ?r6:c0641c40 r5:c0626000 r4:c06422c8 [ ???2.522467] [<c05fb5ac>] (start_kernel+0x0/0x318) from [<40008044>] (0x40008044) [ ???2.522467] ?r9:410fc075 r8:4000406a r7:c0645684 r6:c061fb38 r5:c0641c9c [ ???2.522467] r4:10c5387d [ ???2.522470] CPU2: stopping [ ???2.522470] Backtrace: [ ???2.522470] [<c00139b8>] (dump_backtrace+0x0/0x108) from [<c047346c>] (dump_stack+0x18/0x1c) [ ???2.522470] ?r7:cb86e018 r6:c06424b8 r5:c0623df0 r4:00000002 [ ???2.522470] [<c0473454>] (dump_stack+0x0/0x1c) from [<c0014f84>] (handle_IPI+0xe4/0x1c4) [ ???2.522470] [<c0014ea0>] (handle_IPI+0x0/0x1c4) from [<c000a320>] (gic_handle_irq+0x5c/0x64) [ ???2.522470] [<c000a2c4>] (gic_handle_irq+0x0/0x64) from [<c000f680>] (__irq_svc+0x40/0x70) [ ???2.522470] Exception stack(0xcb86ff68 to 0xcb86ffb0) [ ???2.522470] ff60: ??????????????????c091c8d8 c0642248 0000000f 00000000 cb86e000 cb86e000 [ ???2.522470] ff80: cb86e000 c067b864 4000406a 410fc075 00000000 cb86ffbc cb86ffc0 cb86ffb0 [ ???2.522470] ffa0: c0010d08 c0010d0c 60000013 ffffffff [ ???2.522470] ?r7:cb86ff9c r6:ffffffff r5:60000013 r4:c0010d0c [ ???2.522470] [<c0010ce0>] (default_idle+0x0/0x34) from [<c001108c>] (cpu_idle+0xa4/0xf0) [ ???2.522470] [<c0010fe8>] (cpu_idle+0x0/0xf0) from [<c0470c30>] (secondary_start_kernel+0x108/0x12c) [ ???2.522470] ?r5:00000002 r4:c0649f1c [ ???2.522470] [<c0470b28>] (secondary_start_kernel+0x0/0x12c) from [<40470434>] (0x40470434) [ ???2.522470] ?r7:c067b864 r6:10c0387d r5:00000015 r4:4b84806a [ ???2.522470] CPU1: stopping [ ???2.522470] ?r7:cb858018 r6:c06424b8 r5:c0623df0 r4:00000001 [ ???2.522470] Exception stack(0xcb859f68 to 0xcb859fb0) [ ???2.522470] 9f60: ??????????????????c09148d8 c0642248 0000000f 00000000 cb858000 cb858000 [ ???2.522470] 9f80: cb858000 c067b864 4000406a 410fc075 00000000 cb859fbc cb859fc0 cb859fb0 [ ???2.522470] 9fa0: c0010d08 c0010d0c 60000013 ffffffff [ ???2.522470] ?r7:cb859f9c r6:ffffffff r5:60000013 r4:c0010d0c [ ???2.522470] ?r5:00000001 r4:c0649f1c [ ???3.087429] [hotplug]: cpu(3) try to kill cpu(0) [ ???4.092772] [hotplug]: try to kill cpu:0 failed! [ ???4.097993] [hotplug]: cpu(3) try to kill cpu(1) [ ???5.103244] [hotplug]: try to kill cpu:1 failed! [ ???5.108555] [hotplug]: cpu(3) try to kill cpu(2) [ ???6.113808] [hotplug]: try to kill cpu:2 failed! [ ???6.119124] Rebooting in 5 seconds.. [ ??11.123415] Restarting Linux version 3.4.39 (rootroot@cm-System-Product-Name) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 70-1-1) ) #1 SMP PREEMPT Mon Sep 4 08:10:32 UTC 2017 ? ? 这次的内核崩溃,初步估计是因为替换:sys_config.fex文件出错的。继续还原:sys_config.fex和sys_partition_nor.fex。(要设置NOR FLASH的尺寸为16MB) ? R:wybfeimi_tinav2.1targetallwinnerastar-parrotconfigssys_config.fex ;---------------------------------------------------------------------------------- ;[spi_board0] spi device configuration ;modalias ?????= spi device name ;sflash_size ???= spi flash size,optional,if spi_board0 is nor flash,carefully ;max_speed_hz ?= max transfer speed ;bus_num ??????= bus ID ;chip_select ??= chip select,1 ;mode ?????????= SPI transfer mode ;---------------------------------------------------------------------------------- [spi_board0] modalias ?????= "at25df641" sflash_size ??= 32 max_speed_hz ?= 50000000 bus_num ??????= 0 chip_select ??= 0 mode ?????????= 0 sflash_size ??= 16 ? 按照对tinav0.1的配置,在[spi_board0]的最后面修改的。打包之后,在刷机的时候看LOG感觉怎么还是32MB呢?明明设置了16MBy呀。刚开始还以为是前面设置了中文输入法呢!仔细检查发现是前面已经预置容量为32MB了。系统以第一个赋值为准,sys_config.fex中的检查规则是只要找到第一个匹配的项之后就不会再往后找了:后面的赋值不能覆盖前面的赋值!然后因为容量错误,系统会反复烧录的! [spi_board0] modalias ?????= "at25df641" ;sflash_size ??= 32 sflash_size ??= 16 max_speed_hz ?= 50000000 bus_num ??????= 0 chip_select ??= 0 mode ?????????= 0 ? ? R:wybfeimi_tinav2.1targetallwinnerastar-parrotconfigssys_partition_nor.fex ? SUNXI_EFEX_ERASE_TAG erase_flag = 0x1 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 flash size =32 M **** wyb sunxi_spinor.c-921-spinor_size get flash_size warning ret=0 size=32 flash sectors: 0x10000 algin 512 byte ?fullimg_size 14876672 FEX_CMD_fes_verify_status FEX_CMD_fes_verify last err=0 eGON.BT0? dram para[0] = 228 ? 真没有想到全志R16平台的tianv2.1的系统已经有配置NOR FLASH的容量了。修正容量为16MB之后,启动的时候还会出现USB的配置的问题,内核跑完不能进系统!(adb连接失败!) [ ???1.990195] CPU Budget:Register notifier [ ???1.994740] CPU Budget:register Success [ ???1.999094] sunxi-budget-cooling sunxi-budget-cooling: Cooling device registered: thermal-budget-0 [ ???2.011736] =========GPS========= :gsp not used in configuration [ ???2.018510] ALSA device list: [ ???2.021923] ??#0: audiocodec [ ???2.242870] VFS: Mounted root (squashfs filesystem) readonly on device 31:4. [ ???2.251098] Freeing init memory: 164K [ ???2.453245] init: Console is alive [ ???3.457795] init: - preinit - [ ???4.463742] mount_root: loading kmods from internal overlay [ ???4.840572] jffs2: notice: (97) jffs2_build_xattr_subsystem: complete building xattr subsystem,0 of xdatum (0 unchecked,0 orphan) and 0 of xref (0 dead,0 orphan) found. [ ???4.858217] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab [ ???4.866148] block: unable to load configuration (fstab: Entry not found) [ ???4.873732] block: attempting to load /tmp/jffs_cfg/etc/config/fstab [ ???4.881055] block: unable to load configuration (fstab: Entry not found) [ ???4.888617] block: attempting to load /etc/config/fstab [ ???4.895220] block: extroot: unsupported filesystem jffs2,try ext4 [ ???5.015736] jffs2: notice: (94) jffs2_build_xattr_subsystem: complete building xattr subsystem,255)">[ ???5.190358] WRN:L431(drivers/usb/sunxi_usb/hcd/hcd0/sunxi_hcd0.c):get no_suspend status failed ? 根据硬件判断应该是全志的标准SDK(以SC3817R开发板为基准)和全志的参考原理图/PCB之间的GPIO差异,参照客户的sys_config.fex修改就搞定了! ;---------------------------------------------------------------------------------- ;usb configuration ;usb_used: ?????????usb controller enable,0-disable,1-enable ;usb_port_type: ????usb mode: 0-device,1-host,2-otg ;usb_detect_type: ??usb hotplug detect mode,0-none,1-vbus/id detect,2-id/dpdm detect ;usb_id_gpio: ??????usb id detect IO ;usb_det_vbus_gpio: usb vbus detect IO,"axp_ctrl" for axp ;usb_drv_vbus_gpio: usb dirve vbus IO ;usb_restrict_gpio: usb current restrict IO ;usb_restric_flag: ?usb current restrict flag ;---------------------------------------------------------------------------------- [usbc0] usb_used ???????????= 1 usb_port_type ??????= 0 usb_detect_type ????= 1 usb_id_gpio ????????= port:PG13<0><1><default><default> usb_det_vbus_gpio ??= "axp_ctrl" usb_drv_vbus_gpio ??= port:power4<1><0><default><0> usb_restrict_gpio ??= usb_host_init_state = 0 usb_restric_flag ???= 0 usb_restric_voltage = 3550000 usb_restric_capacity= 5 usb_regulator_io ???= "nocare" usb_regulator_vol ??= 0 usb_regulator_id_vbus = "axp22_dcdc1" usb_regulator_id_vbus_vol = 3000000 ? power_start ???????????????= 3 ? ? ? ? 总结: 当时没有采用CSDN上下载的最新的SDK是一种幸运。那里面没有:sys_partition_nor.fex (全志会不会在环境变量/uboot等等文件中一起优化掉了?因为用SPI NOR FLASH的项目实在太少了!) ? 还是采用了最熟悉/久经考验的SDK,毕竟是经过城茗的众多客户检验过的SDK!经验(强烈的直觉/连蒙带猜)+几分的运气,把全志的这个不大的坑给填平了! ? ? 1. R16 Tina SDK V2.1 下载(2017/9/5 10:07现在下载的SDK里面不支持SPI NOR FLASH了) R16Tina Linux SDK V2.1 目前同步在 csdn code 和 github 两个平台上。国内一般建议使用 csdn,国外建议使用 github。 1.1. 从 csdn 下载 Tina SDK 的方法: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |