u-boot analysis and transplantation - based on u-boot-2011.3 and FL2440

Publisher:安静宁静Latest update time:2024-08-29 Source: cnblogsKeywords:u-boot Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

For the basic method of transplantation, you can first read the u-boot README document


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.

Refer to the existing records and add new configuration items to the Makefile and MAKEALL scripts in the top-level directory. Note that here and in many other places,

The board and other names are in alphabetical order. Please keep this order. (Personal note: most of the configuration items have been moved to

A separate file - 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".

Create a new directory to store the development board related code. Add the necessary files to the development board directory, including at least

"Makefile"、".c"、 "flash.c" 和"u-boot.lds"。

3. Create a new configuration file "include/configs/.h" for your board

Create a new configuration file "include/configs/.h" for the target board


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.

If you are porting to a new CPU, you need to create a new directory to store the CPU-related code and add the required files.


4.  Run "make _config" with your new name.

Execute "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 and fix any problems that arise. [Of course, this last step is much harder than it sounds.]

The following paragraph is quite interesting:


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();

}


Keywords:u-boot Reference address:u-boot analysis and transplantation - based on u-boot-2011.3 and FL2440

Previous article:s3c2440 network card interface expansion DM9000
Next article:uboot porting on s3c2440 (3)

Recommended ReadingLatest update time:2024-11-16 09:48

TQ2440 Study Notes—— 29. Porting U-Boot [U-Boot compilation and linking process]
U-Boot compilation and linking process After configuration, execute "make all" to compile. From the Makefile, you can understand which files U-Boot uses, which file is executed first, and the memory occupied by the executable file. First determine which files are used. The following shows the ARM-related part of t
[Microcontroller]
TQ2440 Study Notes—— 29. Porting U-Boot [U-Boot compilation and linking process]
U-boot-2014.04 ported to MINI2440 (10) Porting nand flash to save environment variables and add partitions
1. Save environment variables to nand flash Step 1: Modify mini2440.h Since we execute the saveenv command and then save the environment variables, the u-boot commands are all implemented under common. Cut in and execute gerp "saveenv" –nr ./*.c, and find the following results: There are a lot of things here, op
[Microcontroller]
U-boot-2014.04 ported to MINI2440 (10) Porting nand flash to save environment variables and add partitions
OK6410 default u-boot startup parameters
Default startup parameters: bootargs=root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200 bootcmd=nand read 0xc0008000 0x200000 0x500000;bootm 0xc0008000 baudrate=115200 ethaddr=00:40:5c:26:0a:5b netmask=255.255.255.0 bootdelay=5 ipaddr=192.168.48.100 serverip=192.168.48.103 gatewayip=192.168.48.
[Microcontroller]
Analysis of u-boot top-level directory config.mk
1. Set obj and src ifneq ($(OBJTREE),$(SRCTREE)) ifeq ($(CURDIR),$(SRCTREE)) you := else dir := $(subst $(SRCTREE)/,,$(CURDIR)) endif obj := $(if $(dir),$(OBJTREE)/$(dir)/,$(OBJTREE)/) src := $(if $(dir),$(SRCTREE)/$(dir)/,$(SRCTREE)/) $(shell mkdir -p $
[Microcontroller]
u-boot-2011.03 porting on mini2440/micro2440 supports yaffs download
6.1 include/conskfigs/micro2440.h Add #define CONFIG_CMD_NAND_YAFFS 【illustrate】 When I was reading cmd_nand.c, I found that u-boot-2011.03 already supports yaffs writing. I only need to add the above definition, but the actual writing error occurred. After reading the source code again, I fou
[Microcontroller]
uboot-2011.12 ported to S3C2440 (Part 1) - Simple modification to enable u-boot to compile
The cross-compilation environment is a cross-compilation toolchain made by Fedora14 and Friendly Arm 1. Modify boards.cfg and add a red line         smdk2400 arm arm920t - samsung s3c24x0         smdk2410 arm arm920t - samsung s3c24x0         smdk2440 arm arm920t - samsung s3c24x0 2. Under $(SOURCEDIR)/u-boot-20
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号