U-Boot的README文件的中文翻译

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了U-Boot的README文件的中文翻译相关的知识,希望对你有一定的参考价值。

都说看源码前先看README,诚不我欺啊,在拿到新代码前的原本一头雾水都可以通过质量好的README,以达到神清目明。一个README几千行的英文说明,翻译起来费时又费力,故我翻译README前部分章节,先抛个砖。

====================================================
#
# (C) Copyright 2000 - 2013
# Wolfgang Denk, DENX Software Engineering, [email protected]
#
# SPDX-License-Identifier:GPL-2.0+
#
 
Summary:【摘要】
========
 
This directory contains the source code for U-Boot, a boot loader for
Embedded boards based on PowerPC, ARM, MIPS and several other
processors, which can be installed in a boot ROM and used to
initialize and test the hardware or to download and run application
code.
本目录由U-Boot的源码组成,U-Boot是基于PowerPC, ARM, MIPS和其他处理器的
嵌入式板的bootloader,可以被安装到一个引导盘上,用于初始化操作和测试硬
件或者下载运行程序代码。
 
The development of U-Boot is closely related to Linux: some parts of
the source code originate in the Linux source tree, we have some
header files in common, and special provision has been made to
support booting of Linux images.
U-Boot的开发和Linux密切相关:其源码的一部分来源于linux代码树,我们的
一些头文件是相同的,并且专门做了一些规定以支持Linux镜像的启动。
 
Some attention has been paid to make this software easily
configurable and extendable. For instance, all monitor commands are
implemented with the same call interface, so that it‘s very easy to
add new commands. Also, instead of permanently adding rarely used
code (for instance hardware test utilities) to the monitor, you can
load and run it dynamically.
花费了很多的精力以使软件的配置和执行的简单化。例如,所有的监控命令都使用
相同的调用接口实现,所以也很容易去添加新的命令。同样,也不是永久性的添加
很少使用的代码的监控命令,你可以动态的加载和运行。
 
 
Status:【状态】
=======
 
In general, all boards for which a configuration option exists in the
Makefile have been tested to some extent and can be considered
"working". In fact, many of them are used in production systems.
通常,在Makefile中存在配置选项的开发板进行了一定程度上的测试,并被认为是
开工作的。事实上,它们中的很多是在生产相同中被使用过的。
 
In case of problems see the CHANGELOG file to find out who contributed
the specific port. In addition, there are various MAINTAINERS files
scattered throughout the U-Boot source identifying the people or
companies responsible for various boards and subsystems.
在出问题的情况下,查看CHANGELOG文件以找到是维护特定端口的责任人。此外,
在U-Boot源码中分布了各种各样的状态文件,以识别负责各个开发板或子系统的
人或公司。
 
Note: As of August, 2010, there is no longer a CHANGELOG file in the
actual U-Boot source tree; however, it can be created dynamically
from the Git log using:
 
make CHANGELOG
注:截止2010年8月,在U-Boot源码树种不再有更新的CHANGELOG文件,然而,可以通
过使用命令[make CHANGELOG]从Git上动态的创建。
 
 
Where to get help:【帮助获取】
==================
 
In case you have questions about, problems with or contributions for
U-Boot, you should send a message to the U-Boot mailing list at
<[email protected]>. There is also an archive of previous traffic
on the mailing list - please search the archive before asking FAQ‘s.
Please see http://lists.denx.de/pipermail/u-boot and
http://dir.gmane.org/gmane.comp.boot-loaders.u-boot
假如你有U-Boot相关的问题,难题或者良好的建议,你可以往U-Boot的邮箱
<[email protected]>发邮件。通过邮件也整理了一部分常见问题存档,在
提交FAQ之前请先查找在线常见问题帮助,网址如下:
http://lists.denx.de/pipermail/u-boot
http://dir.gmane.org/gmane.comp.boot-loaders.u-boot
 
 
Where to get source code:【源码获取】
=========================
 
The U-Boot source code is maintained in the Git repository at
git://www.denx.de/git/u-boot.git ; you can browse it online at
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary
U-Boot源码存在上述的git仓库上。
 
The "snapshot" links on this page allow you to download tarballs of
any version you might be interested in. Official releases are also
available for FTP download from the ftp://ftp.denx.de/pub/u-boot/
directory.
通过本页上的链接,你可以下载你所需版本的压缩包。也可以通过ftp的目录
获取官方发布的源码包。
 
Pre-built (and tested) images are available from
ftp://ftp.denx.de/pub/u-boot/images/
预编译后的镜像通过ftp://ftp.denx.de/pub/u-boot/images/获得。
 
 
Where we come from:【U-Boot身世】
===================
 
- start from 8xxrom sources
- create PPCBoot project (http://sourceforge.net/projects/ppcboot)
- clean up code
- make it easier to add custom boards
- make it possible to add other [PowerPC] CPUs
- extend functions, especially:
  * Provide extended interface to Linux boot loader
  * S-Record download
  * network boot
  * PCMCIA / CompactFlash / ATA disk / SCSI ... boot
- create ARMBoot project (http://sourceforge.net/projects/armboot)
- add other CPU families (starting with ARM)
- create U-Boot project (http://sourceforge.net/projects/u-boot)
- current project page: see http://www.denx.de/wiki/U-Boot
 
 
Names and Spelling:【命名和书写】
===================
 
The "official" name of this project is "Das U-Boot". The spelling
"U-Boot" shall be used in all written text (documentation, comments
in source files etc.). Example:
该项目的官方命名是"Das U-Boot"。"U-Boot"拼写应适用于所有的书面文本。例如:
 
This is the README file for the U-Boot project.
这是U-Boot项目的README文件。
 
File names etc. shall be based on the string "u-boot". Examples:
文件名等以基于"u-boot"字串命名。例如:
 
include/asm-ppc/u-boot.h
 
#include <asm/u-boot.h>
 
Variable names, preprocessor constants etc. shall be either based on
the string "u_boot" or on "U_BOOT". Example:
变量名和常量名用基于字串"u_boot"或"U_BOOT"命名。例如:
 
U_BOOT_VERSIONu_boot_logo
IH_OS_U_BOOTu_boot_hush_start
 
 
Versioning:【版本】
===========
 
Starting with the release in October 2008, the names of the releases
were changed from numerical release numbers without deeper meaning
into a time stamp based numbering. Regular releases are identified by
names consisting of the calendar year and month of the release date.
Additional fields (if present) indicate release candidates or bug fix
releases in "stable" maintenance trees.
自2008年10月发布以来,发布版本的名字由不具任何意义的数字序列变更为基于
数字标号的时间戳。版本号发布规则由发布日期的年月日历组成。附加字段表示
稳定版本库中的发布条件或bug修复。
 
Examples:
U-Boot v2009.11    - Release November 2009
- 2009年11月稳定版
U-Boot v2009.11.1   - Release 1 in version November 2009 stable tree
- 2009年9月稳定版的修复1版
U-Boot v2010.09-rc1 - Release candiate 1 for September 2010 release
- 2010年9月发布版的候选1版
 
 
Directory Hierarchy:【目录】
====================
 
/archArchitecture specific files
架构的具体文件
  /arcFiles generic to ARC architecture
ARC架构通用文件
  /armFiles generic to ARM architecture
ARM架构通用文件
  /avr32Files generic to AVR32 architecture
 AVR32架构通用文件
  /blackfinFiles generic to Analog Devices Blackfin architecture
ADI公司的Blackfin架构通用文件
  /m68kFiles generic to m68k architecture
 m68k架构通用文件
  /microblazeFiles generic to microblaze architecture
  microblaze架构通用文件
  /mipsFiles generic to MIPS architecture
  MIPS架构通用文件
  /nds32Files generic to NDS32 architecture
   NDS32架构通用文件
  /nios2Files generic to Altera NIOS2 architecture
   NIOS2架构通用文件
  /openriscFiles generic to OpenRISC architecture
   OpenRISC架构通用文件
  /powerpcFiles generic to PowerPC architecture
   PowerPC架构通用文件
  /sandboxFiles generic to HW-independent "sandbox"
   独立硬件“沙箱”通用文件
  /shFiles generic to SH architecture
   SH架构通用文件
  /sparcFiles generic to SPARC architecture
   SPARC架构通用文件
  /x86Files generic to x86 architecture
   X86架构通用文件
/apiMachine/arch independent API for external apps
外置程序的机器/架构独立API
/boardBoard dependent files
主板依赖文件
/commonMisc architecture independent functions
通用架构独立功能
/configsBoard default configuration files
主板默认配置文件
/diskCode for disk drive partition handling
硬盘驱动代码
/docDocumentation (don‘t expect too much)
帮助文档(不要期望太高)
/driversCommonly used device drivers
硬件的通用驱动
/dtsContains Makefile for building internal U-Boot fdt.
包含构建内置uboot设备树的Makefile文件。
/examplesExample code for standalone applications, etc.
应用模块示例代码。
/fsFilesystem code (cramfs, ext2, jffs2, etc.)
文件系统代码
/includeHeader Files
头文件
/libLibrary routines generic to all architectures
所有架构的常规库文件。
/LicensesVarious license files
各种授权文件
/netNetworking code
网络文件
/postPower On Self Test
上电自检
/scriptsVarious build scripts and Makefiles
各种的编译脚本和Makefiles
/testVarious unit test files
各种单元测试文件
/toolsTools to build S-Record or U-Boot images, etc.
构建S-Record或U-Boot镜像等的工具。
 
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_".
 
* 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
  "CONFIG_SYS_".
 
Previously, all configuration was done by hand, which involved creating
symbolic links and editing configuration files manually. More recently,
U-Boot has added the Kbuild infrastructure used by the Linux kernel,
allowing you to use the "make menuconfig" command to configure your
build.
 
 
Selection of Processor Architecture and Board Type:【选择处理器架构和开发板类型】
---------------------------------------------------
 
For all supported boards there are ready-to-use default
configurations available; just type "make <board_name>_defconfig".
 
Example: For a TQM823L module type:
 
cd u-boot
make TQM823L_defconfig
 
Note: If you‘re looking for the default configuration file for a board
you‘re sure used to be there but is now missing, check the file
doc/README.scrapyard for a list of no longer supported boards.
 
Sandbox Environment:【沙箱环境】
--------------------
 
U-Boot can be built natively to run on a Linux host using the ‘sandbox‘
board. This allows feature development which is not board- or architecture-
specific to be undertaken on a native platform. The sandbox is also used to
run some of U-Boot‘s tests.
 
See board/sandbox/README.sandbox for more details.
 
 
Board Initialisation Flow:【主板初始化流程】
--------------------------
 
This is the intended start-up flow for boards. This should apply for both
SPL and U-Boot proper (i.e. they both follow the same rules).
这一节讲解开发板的启动流程。U-Boot和SPL同样适用(它们的流程是一样的)。
 
Note: "SPL" stands for "Secondary Program Loader," which is explained in
more detail later in this file.
注:SPL是Secondary Program Loader的简写,稍后进行详细说明。
 
At present, SPL mostly uses a separate code path, but the function names
and roles of each function are the same. Some boards or architectures
may not conform to this.  At least most ARM boards which use
CONFIG_SPL_FRAMEWORK conform to this.
当前,SPL大多使用隔离的代码路径,但是其每一个函数的名称和规则是一样的。一些
开发板或架构或许没有遵循这一规则。至少大多数ARM板使用CONFIG_SPL_FRAMEWORK宏
来遵循这一规则。
 
Execution typically starts with an architecture-specific (and possibly
CPU-specific) start.S file, such as:
执行一般是从架构的特定文件start.S开始执行(可能是cpu的特定文件),例如:
 
- arch/arm/cpu/armv7/start.S
- arch/powerpc/cpu/mpc83xx/start.S
- arch/mips/cpu/start.S
 
and so on. From there, three functions are called; the purpose and
limitations of each of these functions are described below.
诸如此类。从那里有3个函数被调用了;这3和函数的每一个的限制和目的见下述。
 
lowlevel_init():
- purpose: essential init to permit execution to reach board_init_f()
- 意图:执行基本的初始化后到达board_init_f()函数
- no global_data or BSS
- there is no stack (ARMv7 may have one but it will soon be removed)
- must not set up SDRAM or use console
- must only do the bare minimum to allow execution to continue to
board_init_f()
- this is almost never needed
- return normally from this function
 
board_init_f():
- purpose: set up the machine ready for running board_init_r():
i.e. SDRAM and serial UART
- global_data is available
- stack is in SRAM
- BSS is not available, so you cannot use global/static variables,
only stack variables and global_data
 
Non-SPL-specific notes:
- dram_init() is called to set up DRAM. If already done in SPL this
can do nothing
 
SPL-specific notes:
- you can override the entire board_init_f() function with your own
version as needed.
- preloader_console_init() can be called here in extremis
- should set up SDRAM, and anything needed to make the UART work
- these is no need to clear BSS, it will be done by crt0.S
- must return normally from this function (don‘t call board_init_r()
directly)
 
Here the BSS is cleared. For SPL, if CONFIG_SPL_STACK_R is defined, then at
this point the stack and global_data are relocated to below
CONFIG_SPL_STACK_R_ADDR. For non-SPL, U-Boot is relocated to run at the top of
memory.
 
board_init_r():
- purpose: main execution, common code
- global_data is available
- SDRAM is available
- BSS is available, all static/global variables can be used
- execution eventually continues to main_loop()
 
Non-SPL-specific notes:
- U-Boot is relocated to the top of memory and is now running from
there.
 
SPL-specific notes:
- stack is optionally in SDRAM, if CONFIG_SPL_STACK_R is defined and
CONFIG_SPL_STACK_R_ADDR points into SDRAM
- preloader_console_init() can be called here - typically this is
done by defining CONFIG_SPL_BOARD_INIT and then supplying a
spl_board_init() function containing this call
- loads U-Boot or (in falcon mode) Linux





以上是关于U-Boot的README文件的中文翻译的主要内容,如果未能解决你的问题,请参考以下文章

u-boot-2016.07 README文档结构

u-boot README--linux support

u-boot README--Memory Management&initialize

pdf文件里的英文如何翻译成中文

看这里,教你如何快速将pdf文件翻译成中文

Linux系统移植:U-Boot 工程创建