u-boot 2016.05 Ajoutez votre propre carte et config.h uboot transplant

  18 CONFIG_SYS_ARCH = "arm"
  19 CONFIG_SYS_CPU = "armv8"
  20 CONFIG_SYS_SOC = "zynqmp"
  21 CONFIG_SYS_VENDOR = "xilinx"
  22 CONFIG_SYS_BOARD = "zynqmp"
  23 CONFIG_SYS_CONFIG_mp_SOC = "zynqmp" 21 CONFIG_SYS_VENDOR = "xilinx" 22 CONFIG_SYS_BOARD = "zynqmp" 23 CONFIG_SYS_CONFIG_mp_xxq / xilinx     xx xx xx xx xx.
177 CONFIG_DEFAULT_DEVICE_TREE = "zynqmp-xxxx"         设备 树 在 arch / arm / dts / 下 (zynqmp-xxxx.dts)

149 CONFIG_IDENT_STRING = Bannière "Xilinx ZynqMP XGPU"                                                       lorsque uboot démarre

/include/version.h

 

 

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

Modifiez le CONFIG_SYS_CONFIG_NAME dans le fichier configs / $ (boardname) _defconfig ,

CONFIG_SYS_CONFIG_NAME = "xilinx_zynqmp_xxxx", incluez xilinx_zynqmp_xxxx.h (situé dans include / configs /) dans uboot

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

mkboot: $ (BOOT_CONF) $ (VERSION_FILE)
    echo "mkboot"
    $ (MAKE) -j8 -C $ (SRC_PATH) CROSS_COMPILE = $ (CROSS_COMPILE) O = $ (BUILD_DIR)

 

# Pour localiser les fichiers de sortie

# O =

# Utilisez "make O = dir / to / store / output / files /"

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

Quelles sont les similitudes et les différences entre "include / configs / $ (boardname) .h" et "configs / $ (boardname) _defconfig" dans le code source uboot

Réponse: La plus grande différence est que les options dans "configs / boardname_defconfig" peuvent toutes être configurées dans make menuconfig, et les options dans "include / configs / boardname.h" sont des fonctionnalités liées à la carte de développement, qui sont dans make menuconfig . Impossible de trouver ces options

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

Après avoir obtenu un uboot, je veux ajouter mon propre fichier de carte et inclure le fichier / configs / *. H.

Comment ajouter ces fichiers, enregistrons aujourd'hui.


Copiez un fichier de niveau carte auquel vous vous référez, par exemple, board / vscom / baltos / Copy as board / sbc7109 folder et modifiez le contenu dans board / sbc7109 / Kconfig

    if TARGET_AM335X_SBC7109   // 这个是等下make menuconfig 指定的一个宏

    config SYS_BOARD            //指定你的board 文件
    	default "sbc7109"
    
    config SYS_SOC              //指定你的 soc 文件
       	default "am33xx"

    config SYS_CONFIG_NAME        //指定你的 include/configs/am335x_sbc7109.h 为配置头文件
	default "am335x_sbc7109"

    config CONS_INDEX
	int "UART used for console"
	range 1 6
	default 1
	help
	  The AM335x SoC has a total of 6 UARTs (UART0 to UART5 as referenced
	  in documentation, etc) available to it.  Depending on your specific
	  board you may want something other than UART0.

    endif


Après avoir modifié ce fichier, ajoutez board / sbc7109 / Kconfig à arch / arm / Kconfig et ajoutez le contenu suivant:

    source "board/sbc7109/Kconfig"

Ajouter avant le dernier menu de fin.


Ajouter dans arc / bras / Kconfig:

    377 config TARGET_AM335X_SBC7109        //这个宏就是上面那个 if TARGET_AM335X_SBC7109 的前置条件                                          
    378     bool "Support am335x_sbc7109"                                               
    379     select CPU_V7                                                               
    380     select SUPPORT_SPL                                                          
    381     select DM                                                                   
    382     select DM_SERIAL                                                            
    383     select DM_GPIO                                                              


Copiez include / configs / baltos.h pour inclure / configs / am335x_sbc7109.h

    修改include/configs/am335x_sbc7109.h 里面的一个宏定义:
    #define CONFIG_SYS_LDSCRIPT     "board/sbc7109/u-boot.lds"


Modifier un contenu dans board / sbc7109 / u-boot.lds

     34     .text :                                                                     
     35     {                                                                           
     36         *(.__image_copy_start)                                                  
     37         *(.vectors)                                                             
     38         CPUDIR/start.o (.text*)                                                 
     39         board/sbc7109/built-in.o (.text*)                                       
     40         *(.text*)                                                               
     41     }                                                                           


Copiez configs / am335x_baltos_defconfig dans configs / am335x_sbc7109_defconfig

    修改configs/am335x_sbc7109_defconfig 里面的内容,如下:
    将 CONFIG_TARGET_AM335X_BALTOS=y  替换为:
    CONFIG_TARGET_AM335X_SBC7109=y

Modifiez le contenu dans le tableau correspondant / sbc7109 / MAINTAINERS

    BALTOS BOARD
    M:  Yegor Yefremov <[email protected]>
    S:  Maintained
    F:  board/sbc7109/
    F:  include/configs/am335x_sbc7109.h
    F:  configs/am335x_sbc7109_defconfig


ok, après avoir effectué les actions ci-dessus, effectuez make am335x_sbc7109_defconfig
cat .config dans le répertoire racine de u-boot 

     23 CONFIG_SYS_ARCH="arm"                                                           
     24 CONFIG_SYS_CPU="armv7"                                                          
     25 CONFIG_SYS_SOC="am33xx"                                                         
     26 CONFIG_SYS_BOARD="sbc7109"                                                      
     27 CONFIG_SYS_CONFIG_NAME="am335x_sbc7109"      


Compilez à nouveau

    make -j2    


effectuer

Lire le code source putain

Je suppose que tu aimes

Origine blog.csdn.net/u014426028/article/details/111029724
conseillé
Classement