1./u-boot-2019.07/Kconfig 是顶层Kconfig

mainmenu "U-Boot $UBOOTVERSION Configuration"  #这是总menu

2.source "arch/Kconfig"  #然后就引用了arch目录下的Kconfig 这个Kconfig中可以选择不同的架构,有arm M68K MIPS等

choice
    prompt "Architecture select"
    default SANDBOX

config ARC
    bool "ARC architecture"
    select ARCH_EARLY_INIT_R
    select ARC_TIMER
    select CLK
    select HAVE_PRIVATE_LIBGCC
    select SUPPORT_OF_CONTROL
    select TIMER

config ARM
    bool "ARM architecture"
    select CREATE_ARCH_SYMLINK
    select HAVE_PRIVATE_LIBGCC if !ARM64
    select SUPPORT_OF_CONTROL

config M68K
    bool "M68000 architecture"
    select HAVE_PRIVATE_LIBGCC
    select SYS_BOOT_GET_CMDLINE
    select SYS_BOOT_GET_KBD
    select SUPPORT_OF_CONTROL

config MICROBLAZE
    bool "MicroBlaze architecture"
    select SUPPORT_OF_CONTROL
    imply CMD_IRQ

.

.

.

source "arch/arc/Kconfig"
source "arch/arm/Kconfig"
source "arch/m68k/Kconfig"
source "arch/microblaze/Kconfig"  #最后引入了各个架构目录下的Kconfig

3./u-boot-2019.07/arch/arm/Kconfig

menu "ARM architecture"
    depends on ARM

config SYS_ARCH
    default "arm" #这里定义了CONFIG_SYS_ARCH

config CPU_V7A
    bool
    select HAS_THUMB2
    select HAS_VBAR
    select SYS_CACHE_SHIFT_6
    imply SYS_ARM_MMU  #CPU_V7A还会选择一些宏定义开

config SYS_CPU
    default "arm720t" if CPU_ARM720T
    default "arm920t" if CPU_ARM920T
    default "arm926ejs" if CPU_ARM926EJS
    default "arm946es" if CPU_ARM946ES
    default "arm1136" if CPU_ARM1136
    default "arm1176" if CPU_ARM1176
    default "armv7" if CPU_V7A
    default "armv7" if CPU_V7R
    default "armv7m" if CPU_V7M
    default "pxa" if CPU_PXA
    default "sa1100" if CPU_SA1100
    default "armv8" if ARM64   #这里定义了CONFIG_SYS_CPU(需要预先定义CPU_V7A)

choice
    prompt "Target select"
    default TARGET_HIKEY

config ARCH_S5PC1XX
    bool "Samsung S5PC1XX"
    select CPU_V7A
    select DM
    select DM_GPIO
    select DM_I2C
    select DM_SERIAL
    imply CMD_DM

config ARCH_ZYNQ
    bool "Xilinx Zynq based platform"
    select BOARD_EARLY_INIT_F if WDT
    select CLK
    select CLK_ZYNQ
    select CPU_V7A
    select DM
    select DM_ETH if NET
    select DM_MMC if MMC
    select DM_SERIAL
    select DM_SPI
    select DM_SPI_FLASH
    select DM_USB if USB
    select OF_CONTROL
    select SPI
    select SPL_BOARD_INIT if SPL
    select SPL_CLK if SPL
    select SPL_DM if SPL
    select SPL_OF_CONTROL if SPL
    select SPL_SEPARATE_BSS if SPL
    select SUPPORT_SPL
    imply ARCH_EARLY_INIT_R
    imply BOARD_LATE_INIT
    imply CMD_CLK
    imply CMD_DM
    imply CMD_SPL
    imply FAT_WRITE  #在这里选择了CPU_V7A      ARCH_S5PC1XX ARCH_ZYNQ在menuconfig中选中即定义了。

source "arch/arm/mach-s5pc1xx/Kconfig"

source "arch/arm/mach-zynq/Kconfig" #如果有mach需要将Kconfig加入

好像并没有包含source "board/samsung/goni/Kconfig"

source "board/xilinx/zynq/Kconfig" #将board中的Kconfig加入

4.arch/arm/mach-s5pc1xx/Kconfig 答案在这里,s5pc1xx下有两个board需要选择,这其中包含了source "board/samsung/goni/Kconfig",所以每家公司的代码风格不大一样。

if ARCH_S5PC1XX

choice
    prompt "S5PC1XX board select"
    optional

config TARGET_S5P_GONI
    bool "S5P Goni board"
    select OF_CONTROL
    select BLK
    select DM_MMC #选中goni board

config TARGET_SMDKC100
    bool "Support smdkc100 board"
    select OF_CONTROL

endchoice

config SYS_SOC
    default "s5pc1xx"

source "board/samsung/goni/Kconfig"
source "board/samsung/smdkc100/Kconfig"

endif

5.arch/arm/mach-zynq/Kconfig #定义了SYS_BOARD等 而s5pc1xx不是在这里定义的。

if ARCH_ZYNQ

config SPL_LDSCRIPT
    default "arch/arm/mach-zynq/u-boot-spl.lds"

config SYS_BOARD
    string "Board name"
    default "zynq"

config SYS_VENDOR
    string "Vendor name"
    default "xilinx"

config SYS_SOC
    default "zynq"

endif

6.board/samsung/goni/Kconfig #定义了SYS_BOARD等 在arch/arm/mach-s5pc1xx/Kconfig下一层因为if TARGET_S5P_GONI是 arch/arm/mach-s5pc1xx/Kconfig中选定的

if TARGET_S5P_GONI

config SYS_BOARD
    default "goni"

config SYS_VENDOR
    default "samsung"

config SYS_SOC
    default "s5pc1xx"

config SYS_CONFIG_NAME
    default "s5p_goni"

endif

7.board/xilinx/zynq/Kconfig  和arch/arm/mach-zynq/Kconfig 感觉平行层级 都用的if ARCH_ZYNQ

# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2018, Xilinx, Inc.

if ARCH_ZYNQ

config CMD_ZYNQ
    bool "Enable Zynq specific commands"
    default y
    help
      Enables Zynq specific commands.

config CMD_ZYNQ_AES
    bool "Enable zynq aes command for decryption of encrypted images"
    depends on CMD_ZYNQ
    depends on FPGA_ZYNQPL
    help
      Decrypts the encrypted image present in source address
      and places the decrypted image at destination address.

config CMD_ZYNQ_RSA
    bool "Enable zynq rsa command for loading secure images"
    default y
    depends on CMD_ZYNQ
    depends on CMD_ZYNQ_AES
    help
      Enabling this will support zynq secure image verification.
      The secure image is a xilinx specific BOOT.BIN with
      either authentication or encryption or both encryption
      and authentication feature enabled while generating
      BOOT.BIN using Xilinx bootgen tool.

endif

在Kconfig体系结构中,可以明显看到这样一个顺序

1.选架构 ARCH  arm

2.选Target ARCH 平台 某一系列

3.选Board 即具体的板子

uboot中Kconfig架构的理解的更多相关文章

  1. SQL SERVER 2005/2008 中关于架构的理解(二)

    本文上接SQL SERVER 2005/2008 中关于架构的理解(一)      架构的作用与示例 用户与架构(schema)分开,让数据库内各对象不再绑在某个用户账号上,可以解决SQL SERVE ...

  2. SQL SERVER 2005/2008 中关于架构的理解(一)

    SQL SERVER 2005/2008 中关于架构的理解(一) 在一次的实际工作中碰到以下情况,在 SQL SERVER 2008中,新建了一个新用户去访问几张由其他用户创建的表,但是无法进行查询, ...

  3. 【转】SQL SERVER 2005/2008 中关于架构的理解

    在一次的实际工作中碰到以下情况,在 SQL SERVER 2008中,新建了一个新用户去访问几张由其他用户创建的表,但是无法进行查询,提示“对象名'CustomEntry' 无效.”.当带上了架构名称 ...

  4. 关于NAND flash的MTD分区与uboot中分区的理解

    关于NAND flash的MTD分区与uboot中分区的理解 转自:http://blog.csdn.net/yjp19871013/article/details/6933455?=40085044 ...

  5. SQL SERVER中架构的理解

    在sqlserver 2005中,可能大家在工作或学习的时候会经常发现这样一些问题,你使用一个账户在数据库中创建了一张表,却发现你自己创建的表却没有修改和查询的权限,这是一件很郁闷的事情,在sqlse ...

  6. Uboot中start.S源码的指令级的详尽解析【转】

    本文转载自:http://www.crifan.com/files/doc/docbook/uboot_starts_analysis/release/html/uboot_starts_analys ...

  7. 关于ASP.NET或VS2005 搭建三层架构的理解

    最近想学习ASP.NET建网站,关于ASP.NET或VS2005 搭建三层架构的理解,网上摘录了一些资料,对于第(2)点的讲解让我理解印象深刻,如下: (1)为何使用N层架构? 因为每一层都可以在仅仅 ...

  8. 【转】Linux 概念架构的理解

    转:http://mp.weixin.qq.com/s?__biz=MzA3NDcyMTQyNQ==&mid=400583492&idx=1&sn=3b18c463dcc451 ...

  9. 【转】【UML】使用Visual Studio 2010 Team System中的架构师工具(设计与建模)

    Lab 1: 应用程序建模 实验目标 这个实验的目的是展示如何在Visual Studio 2010旗舰版中进行应用程序建模.团队中的架构师会通过建模确定应用程序是否满足客户的需求. 你可以创建不同级 ...

随机推荐

  1. linux 搭建环境

    报错:cannot find valid baseurl for repo:base 解决办法: https://blog.csdn.net/banqgg/article/details/782560 ...

  2. 170907-关于JavaWeb的题

    1. 答案是B.D Servlet 通过调用 init () 方法进行初始化. Servlet 调用 service() 方法来处理客户端的请求. Servlet 通过调用 destroy() 方法终 ...

  3. 【后台管理系统】—— Ant Design Pro组件使用(一)

    一.搜索Search      搜索框 <Search placeholder="请输入关键字" defaultValue={kw && kw != 'nul ...

  4. Mac开机自动运行shell脚本

    1.首先写一个sh脚本,比如: cd ~/Documents mkdir haha 代码很简单,进入Documents文件夹,建立haha目录,保存为run.sh 2.修改run.sh权限 sudo ...

  5. VMware 虚拟机的虚拟磁盘编程知识点扫盲之二

    目录 目录 前文列表 VDDK 安装 VDDK VixDiskLib VADP 前文列表 VMware 虚拟机的虚拟磁盘编程知识点扫盲之一 VDDK 摘自官方文档:The Virtual Disk D ...

  6. 阶段1 语言基础+高级_1-3-Java语言高级_06-File类与IO流_02 递归_2_练习_使用递归计算1-n之间的和

    输出6 1到100之间的和 求和的原理

  7. 常用的adb命令收集

    测试app常会用到一些adb命令,当然使用adb命令,需要配好jdk.sdk环境,不然不能使用的 1.adb help ----帮助信息 2.adb device ----手机的id查看 3.adb ...

  8. 红米note2 刷机 注意问题:

    其他的百度都有,用刷线宝刷 红米note2 刷机   注意问题: 关机状态线下,链接电脑,按着音量下键不松手,按电源键开机后松开,即进入刷机模式. 其中,红米,红米1s移动,红米note移动3g/联通 ...

  9. oracle 11g 数据库恢复技术 ---04 rman

    四 RMAN RMAN体系结构的主要组成部分: --1 目标数据库(target) --2 RMAN命令行客户端 --3 通道(channel) --4 快速恢复区(fast recovery are ...

  10. 38 是否要使用memory引擎的表

    38 是否要使用memory引擎的表 内存表的数据组织结构 create table t1(id int primary key, c int) engine=Memory; create table ...