阅读uboot
下面是一个执行make XXX_config后的打印信息:
pengdl@debian:~/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06$ make ARCH=arm CROSS_COMPILE=arm-hisiv100nptl-linux- hi3520d_config
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
# Target Architecture CPU Board [VENDOR] [SOC]
'$#' =
'$0' = /home/pengdl/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06/mkconfig
'$1' = hi3520d (Target)
'$2' = arm (Architecture)
'$3' = hi3520d (CPU)
'$4' = hi3520d (Board)
'$5' = NULL (VENDOR)
'$6' = hi3520d (SOC)
BOARD_NAME = hi3520d
/home/pengdl/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06
Configuring for hi3520d board...
SRCTREE = /home/pengdl/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06
OBJTREE = /home/pengdl/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06
ln -s ../arch/arm/include/asm asm
/home/pengdl/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06/include
ln -s arch-hi3520d asm/arch
ln -s proc-armv asm/proc
ARCH = arm > config.mk
CPU = hi3520d >> config.mk
BOARD = hi3520d >> config.mk
SOC = hi3520d >> config.mk
BOARDDIR = hi3520d
/home/pengdl/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u-boot-2010.06/include
下面是mkconfig的代码:
#!/bin/sh -e # Script to create header files and links to configure
# U-Boot for a specific board.
#
# Parameters: Target Architecture CPU Board [VENDOR] [SOC]
#
# (C) - DENX Software Engineering, Wolfgang Denk <wd@denx.de>
# APPEND=no # Default: Create new config file
BOARD_NAME="" # Name to print in make output
TARGETS="" while [ $# -gt ] ; do
case "$1" in
--) shift ; break ;;
-a) shift ; APPEND=yes ;;
-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
-t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;;
*) break ;;
esac
done echo "# Target Architecture CPU Board [VENDOR] [SOC]"
echo "'\$#' = $#"
echo "'\$0' = $0"
echo "'\$1' = $1 (Target)"
echo "'\$2' = $2 (Architecture)"
echo "'\$3' = $3 (CPU)"
echo "'\$4' = $4 (Board)"
echo "'\$5' = $5 (VENDOR)"
echo "'\$6' = $6 (SOC)" [ "${BOARD_NAME}" ] || BOARD_NAME="$1" [ $# -lt ] && exit
[ $# -gt ] && exit if [ "${ARCH}" -a "${ARCH}" != "$2" ]; then
echo "Failed: \$ARCH=${ARCH}, should be '$2' for ${BOARD_NAME}" >&
exit
fi
echo "BOARD_NAME = $BOARD_NAME"
echo "`pwd`"
echo "Configuring for ${BOARD_NAME} board..." #
# Create link to architecture specific headers
#
echo "SRCTREE = $SRCTREE"
echo "OBJTREE = $OBJTREE"
if [ "$SRCTREE" != "$OBJTREE" ] ; then
mkdir -p ${OBJTREE}/include
mkdir -p ${OBJTREE}/include2
cd ${OBJTREE}/include2
rm -f asm
ln -s ${SRCTREE}/arch/$/include/asm asm
LNPREFIX=${SRCTREE}/arch/$/include/asm/
cd ../include
rm -f asm
ln -s ${SRCTREE}/arch/$/include/asm asm
else
cd ./include
rm -f asm
echo "ln -s ../arch/$2/include/asm asm"
ln -s ../arch/$/include/asm asm
fi echo "`pwd`"
rm -f asm/arch if [ -z "$6" -o "$6" = "NULL" ] ; then
echo "ln -s ${LNPREFIX}arch-$3 asm/arch"
ln -s ${LNPREFIX}arch-$ asm/arch
else
echo "ln -s ${LNPREFIX}arch-$6 asm/arch"
ln -s ${LNPREFIX}arch-$ asm/arch
fi if [ "$2" = "arm" ] ; then
rm -f asm/proc
echo "ln -s ${LNPREFIX}proc-armv asm/proc"
ln -s ${LNPREFIX}proc-armv asm/proc
fi #
# Create include file for Make
#
echo "ARCH = $2 > config.mk"
echo "ARCH = $2" > config.mk echo "CPU = $3 >> config.mk"
echo "CPU = $3" >> config.mk echo "BOARD = $4 >> config.mk"
echo "BOARD = $4" >> config.mk [ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk && echo "VENDOR = $5 >> config.mk" [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk && echo "SOC = $6 >> config.mk" # Assign board directory to BOARDIR variable
if [ -z "$5" -o "$5" = "NULL" ] ; then
BOARDDIR=$
else
BOARDDIR=$/$
fi echo "BOARDDIR = $BOARDDIR" #
# Create board specific header file
#
echo "`pwd`"
if [ "$APPEND" = "yes" ] # Append to existing config file
then
echo >> config.h
else
> config.h # Create new config file
fi
echo "/* Automatically generated - do not edit */" >>config.h for i in ${TARGETS} ; do
echo "#define CONFIG_MK_${i} 1" >>config.h ;
done cat << EOF >> config.h
#define CONFIG_BOARDDIR board/$BOARDDIR
#include <config_defaults.h>
#include <configs/$.h>
#include <asm/config.h>
EOF exit
- 如何知道自己的板子用的是哪个串口驱动?
在include/configs/Target.h(Target 是传给mkconfig的第一个参数,即$1)中定义了大量的宏,在其中搜索serial,可以找到相关的宏,然后到driver/serial/Makefile中看调用的是哪个C文件,或者直接看driver/serial/下有哪个C文件参见了编译即可。
阅读uboot的更多相关文章
- Ubuntu 安装 samba 实现文件共享和source insight 阅读uboot
环境:win10 + 虚拟机Ubuntu 12.04 一. samba的安装: # sudo apt-get install samba # sudo apt-get install smbfs 二. ...
- uboot start.S分析
一.概述 1.本文综述及特色 阅读uboot,start.S是第一个源程序文件,主要完成初始化看门狗.定时器.重定位(拷贝代码段到内存中).初始化堆栈.跳转到第二阶段等工作. 网上关于这些内容的 ...
- 【嵌入式开发】 Bootloader 详解 ( 代码环境 | ARM 启动流程 | uboot 工作流程 | 架构设计)
作者 : 韩曙亮 博客地址 : http://blog.csdn.net/shulianghan/article/details/42462795 转载请著名出处 相关资源下载 : -- u-boo ...
- s5p6818开发板uboot网络开通
手上的开发板网络默认是不通的,但是通过阅读uboot源码,发现uboot源码中,是有对这个网络的初始化的实现的函数的,只不过是没有调用而已,所以,要手动调用这个函数,把板子的网络调通: 首先是遇到了这 ...
- 基于S3C2440的U-BOOT的start.S分析
基于S3C2440的U-BOOT的start.S分析 在了解了ARM相关的汇编指令后,同时结合网上各位大虾的提点开始阅读u-boot的启动代码,现将分析过程记录如下 可执行文件及内存映射 我们可以把可 ...
- U-Boot编译过程完全分析
2.1 U-Boot Makefile分析 2.1.1 U-Boot编译命令 对于mini2440开发板,编译U-Boot需要执行如下的命令: $ make m ...
- u-boot-2016.07 README文档结构
Author:AP0904225版权声明:本文为博主原创文章,转载请标明出处. 阅读u-boot的README文档,可以获取很多有用的信息,例如从哪里可以获得帮助,帮助:u-boot版本命名规则,目录 ...
- u-boot-2016.01移植(一)
1.了解uboot: 阅读uboot源码顶层目录下的README.TXT可以提取如下信息: made to support booting of Linux images. //引导内核程 ...
- u-boot-2014_04在TQ2440上的移植
本文详细介绍了新版本的u-boot-2014_04在tq2440平台上的移植过程,期间参考了网上的其他移植文档,还有韦东山的移植uboot视频,讲的很好.下面是共享链接,欢迎下载,一同学习.其中有移植 ...
随机推荐
- 写i2c_client驱动的两种方式
http://www.cnblogs.com/simonshi/archive/2011/02/24/1963426.html
- 设计模式系列 1——StaticFactory(静态工厂),AbstractFactory(抽象工厂)
本文出自 代码大湿 代码大湿 本系列持续更新,敬请关注. 1 静态工厂 静态工厂介绍: 静态工厂模式可以实现接口封装隔离的原则.在客户端只知接口而不知实现的时候可以使用静态工厂模式. 源码请点击我 角 ...
- BestCoder Round #68 (div.2) geometry(hdu 5605)
geometry Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Su ...
- Python多线程学习资料1
一.Python中的线程使用: Python中使用线程有两种方式:函数或者用类来包装线程对象. 1. 函数式:调用thread模块中的start_new_thread()函数来产生新线程.如下例: ...
- delphi 窗口最大化后控件的大小变化怎么设置
设置按钮的Anchors属性.可以通过此属性设置其边界是否随父类一起变化.默认akleft+aktop即左边界和上边界随窗口变化,也就是说如果窗口位置移动了,按钮将保持其left和top边界与窗口的距 ...
- 159. Longest Substring with At Most Two Distinct Characters
最后更新 二刷 08-Jan-17 回头看了下一刷的,用的map,应该是int[256]的意思,后面没仔细看cuz whatever I was doing at that time.. wasnt ...
- 学习php 韩顺平 数据类型 三元运算,字符串运算类型运算
数据类型 整型:int 4个字节长度 1个字节8个bit 所以最大的整型数值是2的31次方 第一位是的0,1 表示正负,0表示正数,1表示负数 小数(float)分 精度计算 从左边开始算第一个不为 ...
- POS机刷卡失败的郁闷事
6月13号在老家的金店为未来老婆买首饰,刷的工行POS机. 结果8000多RMB从卡里扣了,商家又没收到钱……POS机提示“交易超时”…… 当天和商家到就近的工行,工行经理说他负责协调这事,只要钱到商 ...
- js 限定上传文件大小 类型
方案1 :限定大小 <html> <head> <script type="text/javascript"> var isIE = /ms ...
- 教你看懂邮件头信息<转载>
MIME对于邮件系统的扩展是巨大的,因为在MIME出现以前,信件内容如果要包括声音和动画,就必须把它变为ASCII码或把二进制的信息变成可以传送的编码标准,而接收方必须经过解码才可以获得声音和图画信息 ...