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/25 12:11] – [Files] rpjdayu-boot_configuration [2019/12/27 07:02] (current) – [Files] rpjday
Line 1: Line 1:
 ===== Overview ===== ===== Overview =====
  
-Show the result of doing a configuration, using Xilinx ZCU102 Rev 1.0 as an example. The output in the generated  ''.config'' file includes the following (among much more):+Show the result of doing a configuration, using Xilinx ZCU102 Rev 1.0 as an example. 
 + 
 +===== make xilinx_zynqmp_zcu102_rev1_0_defconfig ===== 
 + 
 +Preliminary:
  
 <code> <code>
Line 21: Line 25:
 </code> </code>
  
-So which files contribute to that, and how is it generated? +zynq[mp]-related:
- +
-===== Files ===== +
- +
-Files and directories that contribute to the final configuration of a Xilinx ZCU102 (not necessarily a complete list): +
- +
-  * Makefile +
-  * config.mk +
-  * configs/ +
-    * xilinx_zynqmp_zcu102_rev1_0_defconfig +
-  * include/ +
-    * configs/ +
-      * xilinx-zynqmp.h +
-  * arch/ +
-    * arm/ +
-      * Makefile +
-      * Kconfig +
-      * config.mk   +
-      * mach-zynqmp/ +
-        * Makefile +
-        * Kconfig +
-        * include/ +
-      * cpu/ +
-        * armv8/ +
-      * dts/ +
-        * zynqmp-zcu102-rev1.0.dts +
-  * board/ +
-    * xilinx/ +
-      * common/ +
-        * board.c +
-      * zynq/ +
-        * Makefile +
-        * Kconfig +
-        * board.c +
- +
- +
-===== Makefile =====+
  
 <code> <code>
-... +$ grep -i zynq .config 
-export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR +CONFIG_SYS_SOC="zynqmp" 
-... +CONFIG_SYS_BOARD="zynqmp" 
-ifeq ($(autoconf_is_old),) +CONFIG_SYS_CONFIG_NAME="xilinx_zynqmp" 
-include config.mk +# CONFIG_ARCH_ZYNQ is not set 
-include arch/$(ARCH)/Makefile +# CONFIG_ARCH_ZYNQMP_R5 is not set 
-endif +CONFIG_ARCH_ZYNQMP=y 
-... +CONFIG_ZYNQ_SDHCI_MAX_FREQ=200000000 
 +CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE="" 
 +CONFIG_ZYNQMP_USB=y 
 +# CONFIG_ZYNQMP_NO_DDR is not set 
 +# CONFIG_ZYNQMP_PSU_INIT_ENABLED is not set 
 +# CONFIG_SPL_ZYNQMP_ALT_BOOTMODE_ENABLED is not set 
 +# CONFIG_SPL_ZYNQMP_TWO_SDHCI is not set 
 +CONFIG_CMD_ZYNQMP=y 
 +CONFIG_SMBIOS_PRODUCT_NAME="zynqmp" 
 +CONFIG_SYS_PROMPT="ZynqMP>
 +CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zcu102-rev1.0" 
 +CONFIG_OF_LIST="zynqmp-zcu102-rev1.0" 
 +CONFIG_CLK_ZYNQMP=y 
 +CONFIG_ZYNQMP_FIRMWARE=y 
 +CONFIG_FPGA_ZYNQMPPL=y 
 +CONFIG_ZYNQ_GPIO=y 
 +CONFIG_ZYNQMP_IPI=y 
 +CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20 
 +CONFIG_MMC_SDHCI_ZYNQ=y 
 +CONFIG_ZYNQ_SDHCI_MIN_FREQ=0 
 +# CONFIG_ZYNQ_HISPD_BROKEN is not set 
 +CONFIG_ZYNQ_GEM=y 
 +CONFIG_DEBUG_UART_ZYNQ=y 
 +CONFIG_ZYNQ_SERIAL=y 
 +# CONFIG_ZYNQ_SPI is not set 
 +CONFIG_ZYNQMP_GQSPI=y 
 +$
 </code> </code>
  
-===== config.mk =====+===== Files =====
  
-<code> +Files and directories that contribute to the final configuration of a Xilinx ZCU102 (not necessarily a complete list):
-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, +  * ''Makefile'' 
-# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. +  * ''Kconfig'' 
-# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains +  * ''config.mk'' 
-# CPU-specific code. +  * ''configs/'' 
-CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),+    * ''xilinx_zynqmp_zcu102_rev1_0_defconfig'' 
- +  * ''include/'' 
-sinclude $(srctree)/arch/$(ARCH)/config.mk      # include architecture dependend rules +    * ''configs/'' 
-sinclude $(srctree)/$(CPUDIR)/config.mk         # include  CPU  specific rules +      * ''xilinx-zynqmp.h'' 
- +  ''arch/'' 
-ifdef   SOC +    * ''arm/'' 
-sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk  # include  SoC  specific rules +      * ''Makefile'' 
-endif +      * ''Kconfig'' 
-ifneq ($(BOARD),+      * ''config.mk'' 
-ifdef   VENDOR +      * ''mach-zynqmp/'' 
-BOARDDIR = $(VENDOR)/$(BOARD) +        * ''Makefile'' 
-else +        * ''Kconfig'' 
-BOARDDIR = $(BOARD) +        * ''include/'' 
-endif +          * ''mach/'' 
-endif +            * ''clk.h'' 
-ifdef   BOARD +            * ''gpio.h'' 
-sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules +            * ''hardware.h'' 
-endif +            * ''psu_init_gpl.h'' 
-</code> +            * ''sys_proto.h'' 
- +      * ''cpu/'' 
- +        * ''armv8/'' 
- +          * ''Kconfig'' 
-===== configs/ ===== +          * ''Makefile'' 
- +          * ''lowlevel_init.S'' 
-==== zynq_zed_defconfig ==== +      * ''dts/'' 
- +        ''zynqmp-zcu102-rev1.0.dts'' 
-<code> +  ''board/'' 
-CONFIG_ARM=y +    * ''xilinx/'' 
-CONFIG_ARCH_ZYNQ=y +      * ''Kconfig'' 
-... much more ... +      * ''common/'' 
-</code> +        * ''board.c'' 
- +      * ''zynqmp/'' 
-===== include/ ===== +        * ''Makefile'' 
- +        * ''Kconfig''
-==== 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.1577275882.txt.gz
  • Last modified: 2019/12/25 12:11
  • by rpjday