分析uboot中 make xxx_config过程

Linux大全评论676 views阅读模式

make xxx_config实质上就是调用了

 分析uboot中 make xxx_config过程

首先看MKCONFIG:

 分析uboot中 make xxx_config过程

【注意】SRCTREE=源文件下的目录

 

之后的语句:

@$(MKCONFIG) $(@:_config=) arm arm920t EmbedSky NULL s3c2440就相当于执行

#mkconfig xxx arm arm920t EmbedSky NULL s3c2440

#$0  $1  $2 $3  $4  $5  $6

 

于是乎就开始执行mkconfig;

 分析uboot中 make xxx_config过程

[ "${BOARD_NAME}" ] 就是指明xxxx,上面的实例为100ask24x0

这里就会执行echo “Configuring for 100ask24x0 board...”

 

 

(1)建立软链接

之后就会执行:

 分析uboot中 make xxx_config过程

ln -s asm-arm asm

【注意】

建立一个链接文件,为什么这么做呢?

在源文件中调用:

#include <asm/type.h>     //就相当于 include <asm-arm/type.h>

-------------------------------------------------------------------------

 

继续往下看:

 分析uboot中 make xxx_config过程

 同样生成asm-arm/proc文件。

 

(2)生成config.mk文件

生成config.mk文件:

 分析uboot中 make xxx_config过程

echo "ARCH = $2" > config.mk  //重定向

echo "CPU = $3"  >> config.mk  //追加到config.mk

echo "BOARD = $4" >> config.mk

之后由于$5等于NULL,$6 = s3c2440,所以:

 分析uboot中 make xxx_config过程

SOC = s3c24x0会定向到config.mk文件中;

 

config.mk内容:(在include文件夹中)

ARCH = arm

CPU = arm920t

BOARD = 100ask24x0

SOC = s3c24x0

 

(3)生成config.h

分析uboot中 make xxx_config过程

在uboot中APPEND = no

所以执行else分支的语句;

config.h也是在include文件夹中;

所以在config.h中的语句是:

企鹅博客
  • 本文由 发表于 2019年9月5日 18:09:55
  • 转载请务必保留本文链接:https://www.qieseo.com/135726.html

发表评论