Learn bootloader with Vivi

Source: Internet
Author: User

After learning the structure of Linux Through LFS, We can find several embedded components: bootloader, Linux kernel, and root file system.

It starts with Bootloader and from the moment the CPU is powered on.

After some searches, we found out that uboot and VIVI are two popular bootloaders on this platform. In view of the simplicity of Vivi, we started with Vivi and found the head. S is the entry of bootloader. It analyzes data row by row, from the simplest lighting, to the output UART, to copying NAND to ram, to the C program, in the meantime, with the help of "complete development tutorial of S3C2410", we can basically figure it out. If you don't understand it, you can search for this article.

I will talk about several issues that have plagued me for a long time during debugging:

1: one is to jump to ram, how to implement it, that is, through the ldr pc, = step2, = step2 is the running address set when LD, note the difference between using LDR as a pseudo command and loading command

_ Start:
B Step1 @ B operations are relative positions
Step 1: @ indicates the connection address. For example, the 0x30000000 dynamic library redirection address should also be the same. The loaded address is different.
Ldr pc, = step2 @ LDR operation is to fill in the absolute address, that is, the connection address, to achieve the jump
Step 2:
B Step 2

 

2: Set the gpio port. The light port of this development board is gpio_ B.

MoV R1, # gpio_ctl_base
Add R1, R1, # ogpio_ B
LDR R2, = 0x155555 @ set 11 pins for output, two describing one pin

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.