u-boot 2016.05 Agregue su propia placa y config.h uboot transplant

  18 CONFIG_SYS_ARCH = "brazo"
  19 CONFIG_SYS_CPU = "ARMv8"
  20 CONFIG_SYS_SOC = "zynqmp"
  21 CONFIG_SYS_VENDOR = "Xilinx"
  22 CONFIG_SYS_BOARD = "zynqmp"
  23 CONFIG_SYS_CONFIG_NAME = "xilinx_zynqmp_xxxx"    单板头文件xilinx_zynqmp_xxxx.h (位于incluir / configs /)
177 CONFIG_DEFAULT_DEVICE_TREE = "zynqmp-xxxx"         设备 树 在 arch / arm / dts / 下 (zynqmp-xxxx.dts)

149 CONFIG_IDENT_STRING = Banner "Xilinx ZynqMP XGPU"                                                       cuando se inicia uboot

/include/version.h

 

 

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

Modifique CONFIG_SYS_CONFIG_NAME en el archivo configs / $ (boardname) _defconfig ,

CONFIG_SYS_CONFIG_NAME = "xilinx_zynqmp_xxxx", incluya xilinx_zynqmp_xxxx.h (ubicado en include / configs /) en uboot

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

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

 

# Para localizar archivos de salida

# O =

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

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

¿Cuáles son las similitudes y diferencias entre "include / configs / $ (boardname) .h" y "configs / $ (boardname) _defconfig" en el código fuente de uboot?

Respuesta: La mayor diferencia es que las opciones en "configs / boardname_defconfig" se pueden configurar en make menuconfig, y las opciones en "include / configs / boardname.h" son algunas características relacionadas con la placa de desarrollo, que se encuentran en make menuconfig . No encuentro estas opciones

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

Después de obtener un uboot, quiero agregar mi propio archivo de placa e incluir el archivo / configs / *. H.

Cómo agregar estos archivos, registremos hoy.


Copie un archivo de nivel de placa al que se refiera, por ejemplo, placa / vscom / baltos / Copiar como carpeta placa / sbc7109 y modifique el contenido en placa / 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


Después de modificar este archivo, agregue board / sbc7109 / Kconfig a arch / arm / Kconfig y agregue el siguiente contenido:

    source "board/sbc7109/Kconfig"

Agregar antes del último menú final.


Agregue arco / brazo / 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                                                              


Copie include / configs / baltos.h para incluir / configs / am335x_sbc7109.h

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


Modificar un contenido en 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     }                                                                           


Copie configs / am335x_baltos_defconfig en configs / am335x_sbc7109_defconfig

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

Modificar el contenido en el tablero correspondiente / 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


bien, después de realizar las acciones anteriores, realice make am335x_sbc7109_defconfig
cat .config en el directorio raíz 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"      


Compila de nuevo

    make -j2    


llevar a cabo

Leer el puto código fuente

Supongo que te gusta

Origin blog.csdn.net/u014426028/article/details/111029724
Recomendado
Clasificación