uboot中make menuconfig以及添加命令

1. make menuconfig:与make config一样,只不过是图形界面而已,需要安装ncurses。

2. make menuconfig中的menuconfig与all,clean一样,是目标。自己的uboot(简称uboot2011)中的menuconfig目标下面有一行:$(SHELL) $(SCRIPTSDIR)/Menuconfig config.in。表示使用脚本文件夹下的Menuconfig来解释本目录的config.in。本目录的config.in下面最后有:

if [ "$CONFIG_RTL838X" = "y" ] || [ "$CONFIG_RTL838XS" = "y" ]; then
    source ./board/Realtek/rtl838x/menuconfig.in
elif [ "$CONFIG_RTL839X" = "y" ] || [ "$CONFIG_RTL839XS" = "y" ]; then
    source ./board/Realtek/rtl839x/menuconfig.in
fi

这样就找到了其实最后诊断那个目录是在。。。地方。然后依照示例加一行就ok。

3. 我加了bool 'My Test' CONFIG_MY_TEST,这样会在autoconfig.h中出现宏CONFIG_MY_TEST=1,然后再通过这个宏切uboot中自定义的命令就好。

4. 照着CONFIG_CMD_FLASH_TEST来添加:

Autoconf.h (include\configs):#define CONFIG_CMD_FLASH_TEST 1
Board_cmd.c (8x):#ifdef CONFIG_CMD_FLASH_TEST
Board_cmd.c (8x):#ifdef CONFIG_CMD_FLASH_TEST
Board_cmd.c (8x):#ifdef CONFIG_CMD_FLASH_TEST
Board_cmd.c 9x):#ifdef CONFIG_CMD_FLASH_TEST
Board_cmd.c 9x):#ifdef CONFIG_CMD_FLASH_TEST
Board_cmd.c 9x):#ifdef CONFIG_CMD_FLASH_TEST
8x.h (include\configs):#if defined(CONFIG_CMD_FLASH_TEST)    //CONFIG_SYS_POST_FLASH will use flash test
8x.h (include\configs):#define CONFIG_CMD_FLASH_TEST 1
8xS.h (include\configs):#if defined(CONFIG_CMD_FLASH_TEST)    //CONFIG_SYS_POST_FLASH will use flash test
8xS.h (include\configs):#define CONFIG_CMD_FLASH_TEST 1
9x.h (include\configs):#if defined(CONFIG_CMD_FLASH_TEST)    //CONFIG_SYS_POST_FLASH will use flash test
9x.h (include\configs):#define CONFIG_CMD_FLASH_TEST 1
9xS.h (include\configs):#if defined(CONFIG_CMD_FLASH_TEST)    //CONFIG_SYS_POST_FLASH will use flash test
9xS.h (include\configs):#define CONFIG_CMD_FLASH_TEST 1


阅读更多
上一篇ARM mem controller学习
下一篇SDK中添加命令
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭