博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
u-boot分析与移植——基于u-boot-2011.3和FL2440
阅读量:4979 次
发布时间:2019-06-12

本文共 3146 字,大约阅读时间需要 10 分钟。

关于移植的基本方法可以先阅读u-boot的README文档

If the system board that you have is not listed, then you will needto port U-Boot to your hardware platform. To do this, follow thesesteps:1.  Add a new configuration option for your board to the toplevel    "Makefile" and to the "MAKEALL" script, using the existing    entries as examples. Note that here and at many other places    boards and other names are listed in alphabetical sort order. Please    keep this order.
参考已有记录,在顶层目录的Makefile和MAKEALL脚本添加新的配置项。注意这里和其它很多地方,
开发板和其它的名字都是按照字母表顺序排列。请保持此顺序。(个人注:新版本中大部分配置项已移至
一个单独的文件——boards.cfg)
 
2.  Create a new directory to hold your board specific code. Add any    files you need. In your board directory, you will need at least    the "Makefile", a "
.c", "flash.c" and "u-boot.lds".
创建新的目录,存放开发板相关代码。添加必要的文件在开发板目录,至少包括
"Makefile"、"
.c"、 "flash.c" 和"u-boot.lds"。
3. Create a new configuration file "include/configs/<board>.h" for your board
为目标板创建新的配置文件"include/configs/<board>.h"
3.  If you're porting U-Boot to a new CPU, then also create a new
    directory to hold your CPU specific code. Add any files you need.
如果是为一个新的CPU移植,需要创建一个新的目录存放CPU相关代码。添加需要的文件。
4.  Run "make <board>_config" with your new name.
执行"make <board>_config"。
5.  Type "make", and you should get a working "u-boot.srec" file
    to be installed on your target system.
6.  Debug and solve any problems that might arise.
    [Of course, this last step is much harder than it sounds.]
Debug并解决出现的问题。[当然,最后一步比听起来难得多。]
 
  下面一段挺有意思:
 
U
-
Boot Porting Guide:
----------------------
[Based on messages by Jerry Van Baren
in
the U
-
Boot
-
Users mailing
list, October
2002
]
int
main(
int
argc,
char
*
argv[])
{
sighandler_t no_more_time;
signal(SIGALRM, no_more_time);
alarm(PROJECT_DEADLINE
-
toSec (
3
*
WEEK));
if
(available_money
>
available_manpower) {
Pay consultant to port U
-
Boot;
return
0
;
}
Download latest U
-
Boot source;
Subscribe to u
-
boot mailing list;
if
(clueless)
email(
"
Hi, I am new to U-Boot, how do I get started?
"
);
while
(learning) {
Read the README file
in
the top level directory;
Read http:
//
www.denx.de/twiki/bin/view/DULG/Manual;
Read applicable doc
/*
.README;
Read the source, Luke;
/* find . -name "*.[chS]" | xargs grep -i <keyword>
*/
}
if
(available_money
>
toLocalCurrency ($
2500
))
Buy a BDI3000;
else
Add a lot of aggravation and time;
if
(a similar board exists) {
/*
hopefully...
*/
cp
-
a board
/<
similar
>
board
/<
myboard
>
cp include
/
configs
/<
similar
>
.h include
/
configs
/<
myboard
>
.h
}
else
{
Create your own board support subdirectory;
Create your own board include
/
configs
/<
myboard
>
.h file;
}
Edit
new
board
/<
myboard
>
files
Edit
new
include
/
configs
/<
myboard
>
.h
while
(
!
accepted) {
while
(
!
running) {
do
{
Add
/
modify source code;
} until (compiles);
Debug;
if
(clueless)
email(
"
Hi, I am having problems...
"
);
}
Send patch file to the U
-
Boot email list;
if
(reasonable critiques)
Incorporate improvements from email list code review;
else
Defend code
as
written;
}
return
0
;
}
void
no_more_time (
int
sig)
{
hire_a_guru();
}

转载于:https://www.cnblogs.com/sywtt/archive/2011/05/09/2029271.html

你可能感兴趣的文章
IOS 总结:NSArray,NSSet,NSDictionary
查看>>
【资料】栈的实现
查看>>
新手如何学习网站建设制作网站
查看>>
php调用外部exe文件system和exec
查看>>
Android notification详解
查看>>
Hive体系结构
查看>>
软工作业 6:软件设计—— 用户体验(案例分析)
查看>>
话说多线程
查看>>
python学习 第五天 selenium请求库
查看>>
MySQL -- 表联结
查看>>
Foreach用法
查看>>
python的学习记录
查看>>
5G时代,万物互联,物联网开发必备——《从芯片到云端:Python物联网全栈开发实践(刘凯著)》内附pdf地址...
查看>>
工作笔记1
查看>>
JavaScript-02
查看>>
数据库 约束 分离 备份 还原 附加
查看>>
Linux流量监控工具 - iftop (最全面的iftop教程)
查看>>
poj 2546 Circular Area
查看>>
第三周作业
查看>>
Java基础篇—JDK、JRE、JVM
查看>>