其他分享
首页 > 其他分享> > u-boot:项目管理之config.mk

u-boot:项目管理之config.mk

作者:互联网

#####   顶层Makefile 加载config.mk文件的过程    ##############

#解释: 条件1 如果.config文件存在
#     条件2 如果include/config/auto.conf 存在
#     条件3 如果存在 符合.config格式的文件 比include/config/auto.conf更加新
#     结果: 加载config.mk 和 arch/arm/Makefile
# We want to include arch/$(ARCH)/config.mk only when include/config/auto.conf
# is up-to-date. When we switch to a different board configuration, old CONFIG
# macros are still remaining in include/config/auto.conf. Without the following
# gimmick, wrong config.mk would be included leading nasty warnings/errors.
ifneq ($(wildcard $(KCONFIG_CONFIG)),)    
ifneq ($(wildcard include/config/auto.conf),)
autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \
						include/config/auto.conf)
ifeq ($(autoconf_is_old),)
autoconf1 := xxxx
include config.mk
include arch/$(ARCH)/Makefile
endif
endif
endif

 

/***************  config.mk  *****************/
解释: 结合.config
ARCH = arm
CPU = armv7
BOARD = zynq
VENDOR = xilinx
SOC = zynq
CPUDIR=arch/arm/cpu/armv7
sinclude$(srctree)/arch/arm/config.mk  # include architecture dependend rules
sinclude$(srctree)/arch/arm/cpu/armv7/config.mk     #include  CPU  specific rules
sinclude$(srctree)/arch/arm/cpu/armv7/zynq/config.mk  #include SoC specific rules
BOARDDIR = xilinx/zynq
sinclude$(srctree)/board/xilinx/zynq/config.mk # include board specific rules

标签:arch,boot,mk,conf,include,config,arm
来源: https://blog.csdn.net/lexiaoyao521314/article/details/121210537