Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
u-boot_configuration [2019/12/26 14:54] – [Files] rpjdayu-boot_configuration [2019/12/27 07:02] (current) – [Files] rpjday
Line 25: Line 25:
 </code> </code>
  
-zynq-related:+zynq[mp]-related:
  
 <code> <code>
Line 69: Line 69:
  
   * ''Makefile''   * ''Makefile''
 +  * ''Kconfig''
   * ''config.mk''   * ''config.mk''
   * ''configs/''   * ''configs/''
Line 99: Line 100:
   * ''board/''   * ''board/''
     * ''xilinx/''     * ''xilinx/''
-      * ''Makefile''+      * ''Kconfig''
       * ''common/''       * ''common/''
         * ''board.c''         * ''board.c''
Line 105: Line 106:
         * ''Makefile''         * ''Makefile''
         * ''Kconfig''         * ''Kconfig''
- 
- 
-===== Makefile ===== 
- 
-<code> 
-... 
-export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR 
-... 
-ifeq ($(autoconf_is_old),) 
-include config.mk 
-include arch/$(ARCH)/Makefile 
-endif 
-... 
- 
-</code> 
- 
-===== config.mk ===== 
- 
-<code> 
-ARCH := $(CONFIG_SYS_ARCH:"%"=%) 
-CPU := $(CONFIG_SYS_CPU:"%"=%) 
-ifdef CONFIG_SPL_BUILD 
-ifdef CONFIG_TEGRA 
-CPU := arm720t 
-endif 
-endif 
-BOARD := $(CONFIG_SYS_BOARD:"%"=%) 
-ifneq ($(CONFIG_SYS_VENDOR),) 
-VENDOR := $(CONFIG_SYS_VENDOR:"%"=%) 
-endif 
-ifneq ($(CONFIG_SYS_SOC),) 
-SOC := $(CONFIG_SYS_SOC:"%"=%) 
-endif 
- 
-# Some architecture config.mk files need to know what CPUDIR is set to, 
-# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. 
-# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains 
-# CPU-specific code. 
-CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),) 
- 
-sinclude $(srctree)/arch/$(ARCH)/config.mk      # include architecture dependend rules 
-sinclude $(srctree)/$(CPUDIR)/config.mk         # include  CPU  specific rules 
- 
-ifdef   SOC 
-sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk  # include  SoC  specific rules 
-endif 
-ifneq ($(BOARD),) 
-ifdef   VENDOR 
-BOARDDIR = $(VENDOR)/$(BOARD) 
-else 
-BOARDDIR = $(BOARD) 
-endif 
-endif 
-ifdef   BOARD 
-sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules 
-endif 
-</code> 
- 
- 
- 
-===== configs/ ===== 
- 
-==== zynq_zed_defconfig ==== 
- 
-<code> 
-CONFIG_ARM=y 
-CONFIG_ARCH_ZYNQ=y 
-... much more ... 
-</code> 
- 
-===== include/ ===== 
- 
-==== configs/ ==== 
- 
-=== zynq-common.h === 
- 
-Consulted from ''arch/arm/mach-zynq/Kconfig''. 
- 
-===== arch/arm/ ===== 
- 
-==== Kconfig ==== 
- 
-<code> 
-config SYS_ARCH 
-        default "arm" 
- 
-... snip ... 
- 
-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 
-         
-... snip ... 
-</code> 
- 
-==== Makefile ==== 
- 
-<code> 
-machine-$(CONFIG_ARCH_ZYNQ)             += zynq 
-machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) 
-head-y := arch/arm/cpu/$(CPU)/start.o 
-... 
-libs-y += arch/arm/cpu/$(CPU)/ 
-libs-y += arch/arm/cpu/ 
-libs-y += arch/arm/lib/ 
-</code> 
-==== mach-zynq/ ==== 
- 
-=== Kconfig === 
- 
-<code> 
-config SYS_BOARD 
-        string "Board name" 
-        default "zynq" 
- 
-config SYS_VENDOR 
-        string "Vendor name" 
-        default "xilinx" 
- 
-config SYS_SOC 
-        default "zynq" 
- 
-config SYS_CONFIG_NAME 
-        string "Board configuration name" 
-        default "zynq-common" 
-        help 
-          This option contains information about board configuration name. 
-          Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header 
-          will be used for board configuration. 
-</code> 
- 
-===== make cfg ===== 
- 
-In addition to generating the appropriate ''.config'' file, you can go one step further and produce  the subsequent ''u-boot.cfg'' file with: 
- 
-<code> 
-$ make cfg 
-</code> 
- 
-Relevant entries that define the remainder of the build: 
- 
-<code> 
-#define CONFIG_SYS_CPU "armv7" 
-#define CONFIG_SYS_CONFIG_NAME "zynq-common" 
-#define CONFIG_BOARDDIR board/xilinx/zynq 
-#define CONFIG_CPU_V7A 1 
-#define CONFIG_SYS_VENDOR "xilinx" 
-#define CONFIG_SYS_ARCH "arm" 
-#define CONFIG_SYS_BOARD "zynq" 
-#define CONFIG_SYS_ARM_ARCH 7 
-#define CONFIG_ARM 1 
-#define CONFIG_ARCH_ZYNQ 1 
-</code> 
  • u-boot_configuration.1577372043.txt.gz
  • Last modified: 2019/12/26 14:54
  • by rpjday