韦东山uboot_内核_根文件系统学习笔记1.2.1--第001课_U-boot分析与使用-第002节_u-boot分析之readme文件学习

根据uboot的readme文件可知:首先配置,之后编译

1.Linux的概览图,对Uboot的结构先有具体的了解。

在这里插入图片描述

2.Readme文件学习

2.1 uboot目录层次

  • board Board dependent files
    开发板相关文件

  • common Misc architecture independent functions
    多体系结构独立函数

  • cpu CPU specific files
    CPU相关文件

  • disk Code for disk drive partition handling
    磁盘驱动,及分区操作的代码

  • doc Documentation (don’t expect too much)
    文档

  • drivers Commonly used device drivers
    通用设备驱动

  • dtt Digital Thermometer and Thermostat drivers
    数字温度器及调温装置驱动

  • examples Example code for standalone applications, etc.
    独立应用程序的例子

  • include Header Files
    头文件

  • lib_arm Files generic to ARMarchitecture
    ARM体系结构通用的文件

  • lib_avr32 Files generic to AVR32architecture

  • lib_generic Files generic to allarchitectures
    所有体系结构通用的文件

  • lib_i386 Files generic to i386architecture

  • lib_m68k Files generic to m68karchitecture

  • lib_mips Files generic to MIPSarchitecture

  • lib_nios Files generic to NIOSarchitecture

  • lib_ppc Files generic to PowerPC architecture

  • lib_sparc Files generic to SPARCarchitecture

  • libfdt Library files to support flattened device trees
    支持平板设备树的库文件

  • net Networking code
    网络代码

  • post Power On Self Test
    上电自检

  • rtc Real Time Clock drivers
    实时时钟驱动

  • tools Tools to build S-Record or U-Boot images, etc.
    编译S-Record和U-Boot镜像的工具

  • api
    1.3版本的UBOOT还增加了一个API的文件夹,
    这里放的是一些扩展应用的独立的API函数

2.2 Software Configuration: 软件配置:

Configuration is usually done using C preprocessor defines; the
rationale behind that is to avoid dead code whenever possible.
配置是通过C预处理程序完成。

There are two classes of configuration variables:
有两类配置变量:

  • Configuration OPTIONS:
    配置选项:
    These are selectable by the user and have names beginning with
    “CONFIG_”.
    是可由用户选择并以“CONFIG_”开头

  • Configuration SETTINGS:
    配置设置
    These depend on the hardware etc. and should not be meddled with if
    you don’t know what you’re doing; they have names beginning with
    “CFG_”.
    依赖于硬件,由“CFG_”开头

第一步:
Selection of Processor Architecture and Board Type:
选择处理器架构和板类型:


For all supported boards there are ready-to-use default
configurations available; just type “make <board_name>_config”.
对所有已至此的板都已经有可用的默认配置,只要执行:
make <boare_name>_config

下面是例子
Example: For a TQM823L module type:

cd u-boot
make TQM823L_config

For the Cogent platform, you need to specify the CPU type as well;
e.g. “make cogent_mpc8xx_config”. And also configure the cogent
directory according to the instructions in cogent/README.
对于加强型平台还要指定CPU类型,请阅读cogent/READM

第二步
Configuration Options:
配置选项:


Configuration depends on the combination of board and CPU type; all
such information is kept in a configuration file
配置依赖于板和CPU,所有配置设置信息保存在:

"include/configs/<board_name>.h".

Example: For a TQM823L module, all configuration settings are in
“include/configs/TQM823L.h”.

Many of the options are named exactly as the corresponding Linux
kernel configuration options. The intention is to make it easier to
build a config tool - later.

The following options need to be configured:
以下的选项需要被配置:
这里MPC的配置比较多,如果是SMDK2410的话配置会少很多

  • CPU Type: Define exactly one, e.g. CONFIG_MPC85XX.
    CPU类型:正确地定义一个种类,比如:CONFIG_MPC85XX

  • Board Type: Define exactly one, e.g. CONFIG_MPC8540ADS.
    板类型:比如:CONFIG_MPC8540ADS

  • CPU Daughterboard Type: (if CONFIG_ATSTK1000 is defined)
    Define exactly one, e.g. CONFIG_ATSTK1002
    CPU子类

  • CPU Module Type: (if CONFIG_COGENT is defined)
    Define exactly one of
    CONFIG_CMA286_60_OLD
    CPU模型
    — FIXME — not tested yet:
    CONFIG_CMA286_60, CONFIG_CMA286_21, CONFIG_CMA286_60P,
    CONFIG_CMA287_23, CONFIG_CMA287_50

  • Motherboard Type: (if CONFIG_COGENT is defined)
    Define exactly one of
    CONFIG_CMA101, CONFIG_CMA102
    主板

  • Motherboard I/O Modules: (if CONFIG_COGENT is defined)
    Define one or more of
    CONFIG_CMA302
    主板I/O模式

-Linux Kernel Interface:
-Linux内核接口

-Linux Kernel Interface:
-Linux内核接口
-Serial Ports:
-串口
-Console Interface:
-控制台接口
-Console Baudrate:
-控制台波特率
-Interrupt driven serial port input:
-中断驱动串口输入
-Console UART Number:
-控制台UART数
-Boot Delay:
-启动延时
-Autoboot Command:
-自动引导命令

  • Pre-Boot Commands:
    CONFIG_PREBOOT
    -Serial Download Echo Mode:
    -串口下载回显模式
    -Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined)
    -Kgdb串口波特率
    -Monitor Functions:
    -监视函数(很多选项可以选)
    -Watchdog:
    -看门狗
    -U-Boot Version:
    -UBOOT版本
    -Real-Time Clock:
    -实时时钟
    -Timestamp Support:
    -时间戳支持
    -Partition Support:
    -分区支持
    -IDE Reset method:
    -对IDE的支持
  • ATAPI Support:
    -LBA48 Support
  • SCSI Support:
    -NETWORK Support (PCI):
    -网络支持(PCI)
  • NETWORK Support (other):
    -USB Support:
    -USB支持
    -USB Device:
    -USB器件
    -MMC Support:
    -MMC支持
    -Journaling Flash filesystem support:
    -Flash日志文件系统支持
  • Keyboard Support:
    -Video support:
    -视频支持
  • Keyboard Support:
    -LCD Support:
    -支持LCD
    -Splash Screen Support:
    -溅射屏幕(程序启动画面)支持
    -Gzip compressed BMP image support:
    -Gzip压缩BMP图片支持
    -Compression support:
    -压缩支持
    -MII/PHY support:
    -媒体独立接口/物理接口收发器支持
    -Ethernet address:
    -以太网地址
    -IP address:
    -IP地址
    -Server IP address:
    -服务器IP地址
    -Multicast TFTP Mode:
    -多点传送TFTP模式
    -Splash Screen Support:
    -溅射屏幕(程序启动画面)支持
    -Gzip compressed BMP image support:
    -Gzip压缩BMP图片支持
    -Compression support:
    -压缩支持
    -MII/PHY support:
    -媒体独立接口/物理接口收发器支持
    -Ethernet address:
    -以太网地址
    -IP address:
    -IP地址
    -Server IP address:
    -服务器IP地址
    -Multicast TFTP Mode:
    -多点传送TFTP模式
  • BOOTP Recovery Mode:
    CONFIG_BOOTP_RANDOM_DELAY
    The following delays are inserted then:
    插入的延时时间表
    -DHCP Advanced Options:
    -DHCP高级选项
  • CDP Options:
    -Status LED:
    -状态LED

-CAN Support:
-CAN总线支持
-I2C Support:
-I2C支持
-SPI Support:
-SPI支持
-FPGA Support:
-FPGA支持
-Configuration Management:
-结构管理
-Splash Screen Support:
-溅射屏幕(程序启动画面)支持
-Gzip compressed BMP image support:
-Gzip压缩BMP图片支持
-Compression support:
-压缩支持
-MII/PHY support:
-媒体独立接口/物理接口收发器支持
-Ethernet address:
-以太网地址
-IP address:
-IP地址
-Server IP address:
-服务器IP地址
-Multicast TFTP Mode:
-多点传送TFTP模式

  • BOOTP Recovery Mode:
    CONFIG_BOOTP_RANDOM_DELAY
    The following delays are inserted then:
    插入的延时时间表
    -DHCP Advanced Options:
    -DHCP高级选项
  • CDP Options:
    -Status LED:
    -状态LED

-CAN Support:
-CAN总线支持
-I2C Support:
-I2C支持
-SPI Support:
-SPI支持
-FPGA Support:
-FPGA支持
-Configuration Management:
-结构管理

  • Vendor Parameter Protection:
    卖主参数保护
    -Protected RAM:
    -保护RAM
    -Error Recovery:
    -错误纠正
    -Command Interpreter:
    -命令解释
    -DataFlash Support:
    -数据Flash支持
  • SystemACE Support:
    -TFTP Fixed UDP Port:
    -TFTP固定UDP端口
    -Show boot progress:
    -显示BOOT过程
    Modem Support:
    调制解调器支持(很大的一部分)

Configuration Settings:
配置设置


底层配置选项(与硬件关联)


  • CFG_CACHELINE_SIZE:
    Cache Line Size of the CPU.
    CPU Cache大小

  • CFG_DEFAULT_IMMR:
    Default address of the IMMR after system reset.
    系统重设后的IMMR默认地址
    -Floppy Disk Support:
    -软盘支持
    -CFG_IMMR:
    Physical address of the Internal Memory.
    内存物理地址

  • CFG_INIT_RAM_ADDR:

Start address of memory area that can be used for
initial data and stack;
用来初始化数据和堆栈的内存起始地址

  • CFG_GBL_DATA_OFFSET:

Offset of the initial data structure in the memory
area defined by CFG_INIT_RAM_ADDR.
内存中初始化数据结构的偏移地址

  • CFG_SIUMCR: SIU Module Configuration (11-6)

  • CFG_SYPCR: System Protection Control (11-9)
    系统保护控制

  • CFG_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30)
    PLL,低功耗,重启控制寄存器

  • CFG_SCCR: System Clock and reset Control Register (15-27)
    系统时钟和重设寄存器

  • CFG_OR_TIMING_SDRAM:
    SDRAM timing
    SDRAM时钟

  • CFG_MAMR_PTA:
    periodic timer for refresh
    周期刷新时钟

第二步
Building the Software:
编译软件

======================
Monitor Commands - Overview:

监控命令概述

============================
Monitor Commands - Detailed Description:
监控命令—详细说明

========================================

Environment Variables:
环境变量

======================

Command Line Parsing:
命令行分析

=====================
Hush shell:
Hush shell


General rules:


Note for Redundant Ethernet Interfaces:
关于以太网接口

=======================================
Image Formats:
映像格式

==============
Linux Support:

==============

Linux HOWTO:
怎么移植Linux

============
Configuring the Linux kernel:
配置Linux内核


  • build a standard “vmlinux” kernel image (in ELF binary format):
    编译成标准"vmlinux"内核镜像
    convert the kernel into a raw binary image:
    转换为原始二进制映像
    compress the binary image:
    压缩映像
    package compressed binary image for U-Boot:
    打包
    "mkimage"有两种调用方法

Installing a Linux Image:


To downloading a U-Boot image over the serial (console) interface,
you must convert the image to S-Record format:
要从串口下载UBOOT映像,就要将其转换为S-Record格式

More About U-Boot Image Types:
更多UBOOT映像


Standalone HOWTO:
独立程序

=================
Minicom warning:
Minicom警告

================
NetBSD Notes:

=============

Implementation Internals:

=========================

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值