u-boot分析与移植——基于u-boot-2011.3和FL2440

发布者:安静宁静最新更新时间:2024-08-29 来源: cnblogs关键字:u-boot  移植  FL2440 手机看文章 扫描二维码
随时随地手机看文章

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


If the system board that you have is not listed, then you will need

to port U-Boot to your hardware platform. To do this, follow these

steps:


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/.h' for your board

为目标板创建新的配置文件'include/configs/.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 _config' with your new name.

执行'make _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 */

    }


    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/ board/

        cp include/configs/.h include/configs/.h

    } else {

        Create your own board support subdirectory;

        Create your own board include/configs/.h file;

    }

    Edit new board/ files

    Edit new include/configs/.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();

}


关键字:u-boot  移植  FL2440 引用地址:u-boot分析与移植——基于u-boot-2011.3和FL2440

上一篇:s3c2440的网卡接口扩展DM9000
下一篇:uboot在s3c2440上的移植(3)

推荐阅读最新更新时间:2026-03-20 10:42

U-BootFL2440移植(四)----支持网卡DM9000和烧写yaffs文件系统
一 支持网卡芯片DM9000 在driver下,有网卡驱动DM9000x.c 和 DM9000x.h DM9000接在BANK4,位宽16 在include/configs/TX2440.h中设置网卡基地址: 在56行处,将CS8900的定义改成: #define CONFIG_DRIVER_DM9000 1 #define CONFIG_DM9000_BASE 0x20000300 #define DM9000_IO CONFIG_DM9000_BASE #define DM9000_DATA (CONFIG_DM9000_BASE + 4) #define CONFIG_DM9000_USE_16BIT
[单片机]
linux-3.0内核移植fl2440开发板(以MINI2440为模板)
我们的fl2440开发板使用的是s3c2440的芯片,与MINI2440十分相似,因此需要改动的地方不多,移植也比较容易。 1. $ sudo tar -xjf linux-3.0.tar.bz2 2. 进入 linux-3.0,修改顶层Makefile 配置CPU类型和交叉编译器(195,196行) ARCH ?= arm CROSS_COMPILE ?= /opt/buildroot-2011.11/arm920t/usr/bin/arm-linux- 添加zImage头制作(559行后面) cp arch/arm/boot/zImage . -f /home/weishusheng/kernel/linux-3
[单片机]
opencv在fl2440上的移植
linux2.6.28 arm-linux4.3.2 1.安装opencv2.0 下载地址http://sourceforge.net/projects/opencvlibrary/ 解压OpenCV-2.0.0.tar.bz2 tar xvf OpenCV-2.0.0.tar.bz2 配置 ./configure --host=arm-linux --without-carbon --without-quicktime--without-1394libs --without-ffmpeg --without-python --without-swig--without-gtk --enable-static --enable-
[单片机]
u-boot 移植 --->3、S5PV210启动序列
S5PV210_iROM_ApplicationNote_Preliminary_20091126.pdf,了解到S5PVS10这款芯片的复位过程启动序列。芯片在出厂时就在内部固化了一段程序internal ROM简称iROM,这段代码在芯片复位一后会自动运行,他主要负责初始化系统的时钟等具体如下: 1. Disable the Watch-Dog Timer \关闭看门狗 2. Initialize the instruction cache \关闭指定cache 3. Initialize the stack region (see “memory map” on chap 2.5) \设置不同模式的栈指针 4. Init
[单片机]
u-boot移植总结(二)LED点灯调试 和 u-boot加载地址
(一)LED点灯调试 FL2440电路总共有4个LED0,LED1,LED2,LED3,分别接到板子GPB5,GPB6,GPB8,GPB10引脚。通过设置三个寄存器GPBCON(0x56000010),GPBDAT(0x56000014),GPBUP(0x56000018),控制GPB 引脚可控LED的亮灭。 控制LED亮灭有三步: 1,设置GPB5,GPB6,GPB8,GPB10为输出工作方式,即GPBCON = 01 GPBCON = 01,GPBCON = 01,GPBCON = 01 2,GPBUP置0000 0101 0110 0000 即GPB5,GPB6,GPB8,GPB10皆禁止使能上拉 3,设置GPBD
[单片机]
<font color='red'>u-boot</font><font color='red'>移植</font>总结(二)LED点灯调试 和 <font color='red'>u-boot</font>加载地址
u-boot移植总结(四)u-boot-2010.09框架分析
(一)本次移植是基于FL2440,板子的基本硬件: CPU 型号为S3C2440,基于ARM920T,指令集ARMV4,时钟主频400MHz SDRAM H57V2562GTR-75C 2片*32MB=64MB,挂载于nGCS6 (0x3000 0000) NANDFLASH 型号:K9F2G08U0B 大小:256MB Network Adapter (网卡) DM9000AEP 10/100M自适应,挂载于nGCS4 (0x2000 0000) LED 5个LED(LED0~3)I/O口指示灯,LED5电源指示灯,LED9核心板3.3V指示灯 L
[单片机]
<font color='red'>u-boot</font><font color='red'>移植</font>总结(四)u-boot-2010.09框架分析
U-Boot移植(6)总结U-Boot工程的总体结构
1、源代码组织 对于ARM而言,主要的目录如下: board 平台依赖  存放电路板相关的目录文件,每一套板子对 应一个目录。如smdk2410(arm920t)   cpu 平台依赖  存放CPU相关的目录文件,每一款CPU对应一个目录,例如:arm920t、 xscale、i386等目录 lib_arm 平台依赖  存放对ARM体系结构通用的文件,主要用于实现ARM平台通用的函数,如软件浮点。 common 通用 通用的
[单片机]
U-Boot移植(7)总结U-Boot工程的总体结构
3、u-boot的通用目录是怎么做到与平台无关的? include/configs/100ask24x0.h 这个头文件中主要定义了两类变量。  一类是选项,前缀是CONFIG_,用来选择处理器、设备接口、命令、属性等,主要用来决定是否编译某些文件或者函数。 另一类是参数,前缀是CFG_,用来定义总线频率、串口波特率、Flash地址等参数。这些常数参量主要用来支持通用目录中的代码,定义板子资源参数。 这两类宏定义对u-boot的移植性非常关键,比如drivers/cs8900.c,对cs8900而言,很多操作都是通用的,但不是所有的板子上面都有这个芯片,即使有它在内存中映射的基地址也是平台相关的。所以对于smdk2410板,在s
[单片机]
小广播
最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

厂商技术中心

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

电子工程世界版权所有 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved