void main_menu_usage(char menu_type) { if (bBootFrmNORFlash()) printf("\r\n### Boot for Nor Flash Main Menu ###\r\n"); else printf("\r\n### Boot for Nand Flash Main Menu ###\r\n"); if( menu_type == USE_USB_DOWN) { printf("### EmbedSky USB download mode ###\...
定义一个uboot cmd: U_BOOT_CMD( menu,3,0,do_menu, "menu - display a menu, to select the items to do something\n", " - display a menu, to select the items to do something" ); cmd的名为menu执行的动作是do_menu函数 实现do_menu intdo_menu(cmd_tbl_t*cmdtp,intflag,intargc,char*...
run_command_list(s, -1, 0); if (lock) disable_ctrlc(prev); /* restore Ctrl-C checking */ } if (IS_ENABLED(CONFIG_USE_AUTOBOOT_MENUKEY) && menukey == AUTOBOOT_MENUKEY) { s = env_get("menucmd"); if (s) run_command_list(s, -1, 0); } } 我们看一下判断条件stored_bootdel...
一、修改SD卡的u-boot1.1.6 1. common/main.c中 void main_loop (void) { …… if(bootdelay>=0&&s&&!abortboot(bootdelay)){ } //如果在启动过程中有按键,打断了执行过程的话 run_command("menu",0); //如果menu返回的话,就进入u-boot的shell中 #ifdef...
if(bootdelay>=0&&s&&!abortboot(bootdelay)){ } //如果在启动过程中有按键,打断了执行过程的话 run_command("menu",0); //如果menu返回的话,就进入u-boot的shell中 #ifdef CFG_HUSH_PARSER parse_file_outer(); …… } 2. 执行menu的过程 ...
return 0; } U_BOOT_CMD( menu, 1, 1, do_mymenu, "here is uboot menu\n", "here is uboot menu, make in 2024-06-27\n" ); 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.
新建一个名为:cmd_menu.c的文件,放到common目录下,修改同目录下的Makefile文件,加入编译选项: COBJS-$(CONFIG_CMD_MENU) += cmd_menu.o 编写cmd_menu.c的内容: 定义一个uboot cmd: U_BOOT_CMD( menu,3,0,do_menu, "menu - display a menu, to select the items to do something\n", ...
//如果menu返回的话,就进入u-boot的shell中 #ifdef CFG_HUSH_PARSER parse_file_outer(); …… } 2. 执行menu的过程 run_command("menu", 0),最终会执行do_menu. do_menu 开始时先打印出命令菜单,然后根据不同的选择,执行不同的命令。 所以添加的文件 common/cmd_menu.c,如下: #include #include #in...
arch/arm/lib/crt0.S,然后我们分析下*arch/arm/lib/crt0.S*这个文件,以下带序号的是我增加的注释。 代码语言:javascript 复制 ENTRY(_main)/* * Set up initial C runtime environment and call board_init_f(0). */* **1.设置栈指针***#ifdefined(CONFIG_SPL_BUILD)&&defined(CONFIG_SPL_STACK)ldr...
run_command("menu", 0),最终会执行do_menu.do_menu 开始时先打印出命令菜单,然后根据不同的选择,执行不同的命令。 所以添加的文件 common/cmd_menu.c,如下:#include#include#include#includevoid print_menu_usage(void){printf("rn### SD boot Menu###rn");printf(...