boot0启动的时候一直按 2 或者按 d,就能进入FEL烧录模式的原因
-
void main(void) { int dram_size; int status; phys_addr_t uboot_base = 0, optee_base = 0, monitor_base = 0, \ rtos_base = 0, opensbi_base = 0; u16 pmu_type = 0, key_input = 0; /* TODO: set real value */ sunxi_serial_init(BT0_head.prvt_head.uart_port, (void *)BT0_head.prvt_head.uart_ctrl, 6); printf("HELLO! BOOT0 is starting!\n"); printf("BOOT0 commit : %s\n", BT0_head.hash); sunxi_set_printf_debug_mode(BT0_head.prvt_head.debug_mode); status = sunxi_board_init(); if(status) goto _BOOT_ERROR; if (rtc_probe_fel_flag()) { rtc_clear_fel_flag(); goto _BOOT_ERROR; #ifdef CFG_SUNXI_PHY_KEY } else if (check_update_key(&key_input)) { goto _BOOT_ERROR; #endif } else if (BT0_head.prvt_head.enable_jtag) { printf("enable_jtag\n"); boot_set_gpio((normal_gpio_cfg *)BT0_head.prvt_head.jtag_gpio, 5, 1); } #ifdef FPGA_PLATFORM dram_size = mctl_init((void *)BT0_head.prvt_head.dram_para); #else #ifdef CFG_DDR_SOFT_TRAIN if (BT0_head.prvt_head.dram_para[30] & (1 << 11)) neon_enable(); #endif dram_size = init_DRAM(0, (void *)BT0_head.prvt_head.dram_para); #endif if(!dram_size) goto _BOOT_ERROR; else { printf("dram size =%d\n", dram_size); } char uart_input_value = get_uart_input(); if (uart_input_value == '2') { sunxi_set_printf_debug_mode(3); printf("detected user input 2\n"); goto _BOOT_ERROR; } else if (uart_input_value == 'd') { sunxi_set_printf_debug_mode(8); printf("detected user input d\n"); } mmu_enable(dram_size); malloc_init(CONFIG_HEAP_BASE, CONFIG_HEAP_SIZE);
lichee/brandy-2.0/spl/nboot/main/boot0_main.c
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号