BootLoader Introduction and Uboot Transplantation (Transfer)

xiaoxiao2021-03-06  47

BootLoader Introduction and UboT Transplantation

1 Introduction

Applications of embedded systems are generally burned to the Flash or EEPROM or ROM. In the development process

Constantly explaining the program to run debug on the target board. If you have to burn the program to Flash every time, a flashh

The burning speed is slow (erase, programming), and the two are running in Flash, the debugger cannot break down, and it is not easy to adjust.

The purpose of trying. Three frequently burned to reduce the life of Flash.

A better way is to download the application to the RAM and can solve the above problem. There are two ways:

1) Download Image to RAM via JTAG. The premise of using this method is that the RAM on the target board has been correctly initially

Improve, otherwise you can't download it.

2) Run a program on the target board (the program in Flash), through this program, in a certain interaction method from H

OST downloads image to the RAM. Such as through serial port, USB interface, network interface, etc. This way is boot

Loader's way.

2. Bootloader introduction

People who have played Linux know LILO or GRUB, two very famous bootstraps to guide the operating system. This

The bootloader introduced is very similar. The work done is basically a simple initialization work, but

The control is then transferred to the image you want to run (operating system or application).

A better BootLoader provides a better interactive interface and provides some of the embedded development phase.

When a useful tool. For example, modify the content in the RAM, download image to RAM from Host in a variety of ways,

Save the configuration information to the Flash.

In order to provide these features, bootloader wants to implement the drive of the related device. If you support it from the network interface to download IM

AGE, it wants to implement network card drivers, IP protocols, ARP protocols, TFTP protocols, and more. Serial port, Flash read and write is also

in this way.

Common Free Bootloader has ARMBOOT, used to use ARM architecture CPU development board, PPC-boot is used to adopt

PowerPC architecture CPU development board. These two bootloaders have currently stopped development. And let them in one,

Become u-boot. The current version is 0.4.0, and you can download the source program on the SourceForge.net.

3. U-boot introduction

Currently Rease version of U-Boot has been ported to ARM720T, ARM920T, AT91RM9200, I386, MIPS, M

PC5XX, MPC824X, MPC8260, MPC8XX, PPC4XX, PXA, SA1100 platform, supported development board more

. What other Monitor commands are supported, which file systems are supported, and see Readme

4. U-boot transplantation

Talk about the main transplant steps:

1) Determine the graft environment, which is under Win (Cygwin), or under Linux, it is strongly recommended to perform in Linux.

Transplantation, compiling a lot under Win (Cygwin), very delayed, and understand this.

2) Download Tool Chain, install, Linux to transplant to the ARM platform, use ARM-Linux-xx (xx: GCC, Objcop

Y, AS, LD, etc.).

3) Download U-boot, decompress, see readme, quite important! ! ! Learn about the directory structure.

4) Looking at the most similar to the target board you want to transplant in the board directory and the CPU directory. 5) Then refer to the transplant in the Building The Software section in Readme,

6) After the compilation is completed, it is necessary to burn Uboot.bin to the board via the Flash burning tool. Run on Host

The super terminal, power on the plate, see if the super terminal has a UBOOT operation. Then repeat this process for adjustment

test.

7) Remember to first initialize the RAM, and the UART driver has changed the super terminal.

8) The following program calls you how to start, just seen from Readme

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-users 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;

Reta

http://www.denx.de/re/dplg.html

Read the Source, Luke;

}

IF (Available_Money> TOLOCALCURRENCY ($ 2500)) {

Buy A BDI2000;

} else {

Add A Lot of Aggravation and Time;

}

Create Your Own Board Support Subdirectory;

Create Your Own Board Config File;

While (! running) {

Do {

Add / Modify Source Code;

Until (Compiles);

Debug;

IF (Clueless)

Email ("Hi, I am Having Problems ...");

}

Send Patch File to Wolfgang;

Return 0;

}

Void no_more_time (int SiG)

{

HIRE_A_GURU ();

5. Conclusion, feelings

Before transplantation, you must first know how to get Help, I don't know if I have transplanted it.

Uboot's Maillist has been exploiting and in the process.

Transplantation, the debugging process is quite trivial, many details are not three words. Be moved

It is a successful planting, and it is very pleasant to do a similar job. Be sure to stick, especially facing a lot of you are not familiar with

When we feel frustrated, persist.

转载请注明原文地址:https://www.9cbs.com/read-57655.html

New Post(0)