uboot transplant

Publisher:huanliLatest update time:2024-09-30 Source: cnblogsKeywords:uboot Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Overall analysis: What is your purpose?

What are your plans?

What problems will you encounter?

How did you solve the problem?

Did you do what you were supposed to do today?

Can you finish what you need to do today?

What are the modification precautions?

Note: The path nand_spl/board/samsung/smdk6410 in the Makefile in Toodir has not been changed

If nand BUG occurs, check config.mk under nand_spl/board/samsung/oko6410

How much do you know about S3C6410?

Bookmark the data sheet for easy reference...it's too tiring to search one by one!!!

Debugging tips: Mark the modified parts by xcc to facilitate debugging.

Startup successful, flash initialization problem.

Add a task: port a Linux, the kernel version is tentatively set to 3.1.

Step 1: Create an open environment

Problem encountered: The cross-compilation environment on the AMD platform virtual machine has a problem that the hardware compilation environment does not support it. Arm-linux-gcc:souch file cannot be found

Solution: Build your own cross-compilation environment

Step 2: Analysis

Achieve goals:

The features of this transplant include:

  • Support Nand Flash read and write

  • Support booting from Nor/Nand Flash

  • Support CS8900 or DM9000 network card

  • Support Yaffs file system

  • Support USB download (not yet implemented)

1. Understand the main directory structure and boot process of u-boot, and read the code

2. Generate a basic uboot.bin, burn it to the development board, test it and it will not run correctly, and the hardware cannot be initialized correctly.

Step 3: Steps to transplant OK6410 development board

Analysis of stage1 entry point of OK6410 development board u-boot.

Generally, in embedded system software development, after all source code files are compiled, the linker needs to read a link allocation file, which defines the program entry point, code segment, data segment, etc. The link file of our my2440 development board u-boot is cpu/arm1176s/u-boot.lds. Open this file and read the following code:

Make a file system analysis example diagram

The stage1 code of u-boot is usually placed in the cpu/xxxx/start.S file, which is written in assembly language;

The stage2 code of u-boot is usually placed in the lib_xxxx/board.c file, which is written in C language.

The flowchart of each part is as follows:

Step 3: Start transplanting

1. Build your own development board project and test it

Currently, u-boot directly supports many CPUs. You can check some subdirectories of the board directory, such as the board/samsung/ directory, which supports some Samsung ARM processors, including smdk2400, smdk2410 and smdk6400, but not ok6410, so we will build our own development board project here.

Question: Based on what modifications should I make to port the uboot I need?

Answer: 1. uboot documentation, Makefile, config file

2. Data sheet, change entry address, download address, etc.

*************************************************** ****************************

**************************Use Uboot to light up the LED light to facilitate uboot debugging******************************

*************************************************** ****************************


Keywords:uboot Reference address:uboot transplant

Previous article:Chapter 7 The LED will blink for me: Controlling light-emitting diodes
Next article:Interrupt handling study notes

Latest Microcontroller Articles
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号