u boot之新增一塊新板子的支援

2021-07-25 21:41:41 字數 2236 閱讀 3873

在編譯uboot**時, 我需要做的第一件事情就是配置uboot. 命令格式如下

make ***x_config
如果你直接敲上面這個命令, 會得到下面的錯誤:

make: *** no rule to make target `***x_config'.  stop.
why: 因為目前的**中沒有對***x這塊板子的支援. 下面就看看如何才能支援一塊新板子.

首先, 你得修改boards.cfg,新增你自己的板子. 

(下面的內容是分析2013.10的**得到的, 如果你已經是master了, 並且發現你的**跟下面的描述不符, 那麼直接讀讀boards.cfg和mkconfig的源**吧)

在boards.cfg中增加一行

active  arm         armv7          s5pc1xx     samsung         tiny210             tiny210
接下來, 當你敲入如下命令時:

make tiny210_config
就會得到這樣的結果:

configuring for tiny210 board...
是的, 這樣表示配置成功了!

following is the define in boards.cfg

status

arch

cpu:splcpu

socvendor

board name

target

options

maintainers

$1$2

$3$4

$5$6

$7$8

note:

$7 : board_name="$" <$7=samsung, then board_name=samsung; $7=samsung_config, then board_name=samsung>

$1 : active

$2 : arch="$2"

$3 : cpu=`echo $3 | awk 'begin ; '`

spl_cpu=`echo $3 | awk 'begin ; '`

$4 : [ "$4" != "-" ] && soc="$4"

$5 : [ "$5" != "-" ] && vendor="$5"

$6 : [ "$6" != "-" ], then board="$6"

else, board=$

$8 : [ "$8" != "-" ], then config_name="$"

else, config_name="$"

board_name: just name of the board, no affect to the code

echo "configuring for $ board..."

config_name: must create a file "include/configs/$.h", code will include this file

arch       : ln -s ../arch/$/include/asm include/asm

lnprefix=arch/$/include/asm/

soc        : 

if [ -z "$" ] ; ln -s $arch-$ include/asm/arch

else                 ln -s $arch-$ include/asm/arch

cpu        :

vendor     : must create a floder "boarddir", board related files will be put under it

if [ -z "$" ] ; boarddir=$

else                    boarddir=$/$

配置成功之後, 還是無法編譯的, 因為我們還得自己建立一些檔案.

第乙個要建立的就是板子的配置檔案$.h

直接touch建立它吧, 後面再來編輯

include/configs/tiny210.h

有了配置檔案之後, 我們還需要增加板子相關的彙編檔案和c檔案, 用來初始化板子等.

直接mkdir建立, 然後加入一些必要的檔案.

U BOOT 移植過程詳解 新增一塊新板子的支援

分類 u boot移植 2014 01 17 22 07 437人閱讀 收藏 舉報 u boot 目錄 申明新增一塊新板子的支援 boardscfg includeconfigsconfig nameh boarddir 在編譯uboot 時,我需要做的第一件事情就是配置uboot.命令格式如下 m...

U BOOT 移植過程詳解 新增一塊新板子的支援

2015 04 02 19 36 232人閱讀收藏 舉報 目錄 u boot 目錄 申明新增一塊新板子的支援 boardscfg includeconfigsconfig nameh boarddir 在編譯uboot 時,我需要做的第一件事情就是配置uboot.命令格式如下 make x conf...

U BOOT 移植過程詳解 新增一塊新板子的支援

在編譯uboot 時,我需要做的第一件事情就是配置uboot.命令格式如下 make x config 如果你直接敲上面這個命令,會得到下面的錯誤 make no rule to make target x config stop.why 因為目前的 中沒有對 x這塊板子的支援.下面就看看如何才能支...