查看F1C的源代码
←
F1C
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Boot == After power-up, the F1C100s starts to fetch instructions from address 0xFFFF_0000 which is where the BROM is located at. It's an internal integrated 32 KB ROM Chip (Boot ROM or BROM). The BROM split up into two parts: The first part (at 0xFFFF_0000) is the FEL mode and the second is the eGON.BRM (located at 0xFFFF_4000). The reset vector is located at the very begining of FEL mode: at address 0xFFFF_0000. On reset, it jumps to 0xFFFF_0028 where it loads 0xFFFF_4000 (eGON.BRM) into the program counter to be executed next. === eGON Boot === The eGON Boot ROM performs a few tasks: # do some [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L19 co-processor setup] ([http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344k/Bgbciiaf.html c15], (virtual) System Control Coprocessor). # [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L23 disables] the WatchDog Timer # [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L28 setups] CPU, AXI, AHB and APB0 clocks # [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L34 enables] AHB Gating # [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L38 enables] APB0 Gating # [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L40 sets] the Stack Pointer to 32K # then it [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L41 jumps] to [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L84 'boot'] which immediately [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L86 jumps to] [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L2551 check_uboot] # [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L2551 check_uboot] setups up some registers, then [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L2560 checks the status pin] (often called FEL pin, BSP pin or '''uboot''') ## if the pin is low (connected to GND) [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L90 executes] [[FEL]] mode at 0xFFFF_0020. ## If the pin is high it continues trying to boot from the following media and on failure continues to the next in order. ### [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L91 SD Card0] also known as [[A10/CCM#CCM_MMC0_CLK|MMC0]] ### [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L98 Internal NAND flash] also known as [[A10/CCM#CCM_NAND_CLK|NAND]] ### [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L104 SD Card2] also known as [[A10/CCM#CCM_MMC2_CLK|MMC2]] ### [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L111 SPI connected NOR flash] also known as [[A10/CCM#CCM_SPI0_CLK|SPI]] ### [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s##L117 If all fails], [[FEL/USBBoot|FEL/USB Boot]] mode is [https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L120 executed] from 0xFFFF_0020 As can be seen, the SoC has several ways to boot and a lot would need to go wrong or 'fail' before entering [[FEL/USBBoot|FEL mode]]. This is especially important if there is a valid header in the NAND flash. Obviously this can be abused, by corrupting the header and thus forcing failure. If no other boot options are available, then FEL mode should be the final result. As a bypass mechanism, the A10 has the so called ''Boot Select Pin (BSP)''. This pin is normally internally pulled up by a 50KΩ resistor. If the pin is pulled low to GND, the A10 will try to boot into [[FEL/USBBoot|FEL mode]]. Otherwise the above boot-order will be tried. <source lang=bash> boot-> check fel key pressed (yes)--> FEL mode (boot from USB OTG) \ (no) \ \-------> 1) try to boot from SMHC0 (SD card) 2) try to boot from SMHC2 (eMMC) 3) try to boot from SPI0 (SPI NOR Flash) 4) FEL mode (boot from USB OTG) </source> === FEL mode === * 短接 flash 的 1、4 两脚,重新上电,上电后松开短接,即可重新进入 fel 模式 * 在启动到内核前,回车进入 uboot,执行 sf probe 0;sf erase 0 0x100000;reset 即可重新进入 fel 模式 <br> === Reference === * http://linux-sunxi.org/FEL * http://linux-sunxi.org/FEL/USBBoot * http://linux-sunxi.org/BROM * http://linux-sunxi.org/Sunxi-tools * http://nano.lichee.pro/get_started/first_eat.html#id6 * [https://whycan.cn/t_717.html F1C100s入坑记录] * [https://whycan.cn/t_3138.html 尝试从零构建F1C100s开发环境] * https://whycan.com/t_2179.html spi-flash & wifi & usb-gad * [https://whycan.com/t_6402.html <br>
返回到
F1C
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面