Kconfig和Makefile的编辑
来源:互联网 发布:韩端机器人编程软件 编辑:程序博客网 时间:2024/06/06 18:40
为便于描述,假设文件的目录结构如下:
+EntryLevel1
Kconfig
Makefile
+EntryLevel2
Kconfig
Makefile
+EntryLevel3
Kconfig.aaa
Makefile
1.首先在第一层EntryLevel1的Kconfig中增加如下内容
1.1在顶层的配置文件中,增加配置项
CONFIG_SUB_MODULE_AE=y
1.2在EntryLevel1的Kconfig中增加如下内容
mainmenu "Total SDK Configuration"
comment "Modules Configuration"
source EntryLevel2/Kconfig
2.在第一层EntryLevel1的Makefile中增加如下内容
ifeq ($(CONFIG_SUB_MODULE_AE),y)
AE_FLAGS := -DENABLE_OWNER_AE #这个宏是在.c,.h文件中使用的
else
AE_FLAGS :=
endif
KBUILD_CFLAGS += $(AE_FLAGS)
3.在第二层EntryLevel2的Kconfig中增加如下内容
menu "*** MW"
menuconfig BUILD_AAA_MODULE
bool "build aaa module"
default y
if BUILD_AAA_MODULE
source EntryLevel2/EntryLevel3/Kconfig.aaa
endif
endmenu
4.在第二层EntryLevel2的Makefile中增加如下内容
ifeq ($(CONFIG_BUILD_AAA_MODULE),y)
ccflags-y += -I$(srctree)/EntryLevel2/EntryLevel3/inc
endif
ifeq ($(CONFIG_BUILD_AAA_MODULE),y)
include $(srctree)/EntryLevel2/EntryLevel3/Makefile
endif
5.在第三层EntryLevel3的Kconfig.aaa中增加如下内容menu "AAA MODULE CONFIG"
config SUB_MODULE_AE
bool "enable ae sub module"
default n
endmenu
6.在第三层EntryLevel3的Makefile中增加如下内容
ccflags-y += -I$(src)/EntryLevel3/inc
ifeq ($(CONFIG_SUB_MODULE_AE),y)
lib_app_objs += EntryLevel3/FileOne.o \
EntryLevel3/FileTwo.o
endif
二、调试
1.通过在编译服务器上 make menuconfig可以查看到Kconfig里面增加的配置项
配置完成后的结果在rtos/output_part64/.config中
2.通过make -n 可以查看Makefile的最终结果
3.在Makefile或Kconfig中增加如下内容,可以中断make,并查看对应变量的值
$(error hello:$(variable))
- Kconfig和Makefile的编辑
- Kconfig和Makefile的修改
- Kconfig和Makefile的作用
- Kconfig和makefile的关系
- Linux kernel的Makefile和Kconfig
- linu编译系统的Kconfig和Makefile
- Linux kernel的Makefile和Kconfig
- Linux内核的Makefile和kconfig解读
- Kconfig和Makefile文件的学习总结
- Linux内核的Makefile和kconfig解读
- Linux内核的Makefile和kconfig解读
- Linux内核的Makefile和kconfig解读
- linu编译系统的Kconfig和Makefile
- linu编译系统的Kconfig和Makefile
- Linux kernel的Makefile和Kconfig
- Linux kernel的Makefile和Kconfig
- Linux内核的Makefile和kconfig解读
- Linux kernel的Makefile和Kconfig
- 使用Jack编译
- 转载至http://cn.vuejs.org【vue.js对比其他框架】
- class no found :torg.springframework.web.context.ContextLoaderListener
- AndroidStudio文件夹结构视图讲解
- TensorFlow 最小二乘法拟合
- Kconfig和Makefile的编辑
- Android JNI 分支C进程
- Windows server 2008 企业版 Sqlserver2008标准版在IBM X3650上实现双机热备1
- android studio错误,Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
- Dagger2使用(一)Dagger2 介绍
- 深度学习——训练过程
- 问个好
- Caffe Windows CPU 安装
- http协议详解