This section gives a brief overview of the structure of the U-Boot code.
The important configuration information for U-Boot is defined in the file:
include/configs/<board>.hFor example, the Espresso board default configuration file is:
include/configs/espresso.hThis file defines such things as the memory layout, default baud rate, the U-Boot features that are included in the build, and so forth. Refer to the README file for a description of the options defined in the configuration file.
The following table shows the default locations in Flash and RAM used by U-Boot:
| Board | FLASH1 | RAM2 | ||
|---|---|---|---|---|
| U-Boot code | U-Boot env | memory start | U-Boot base | |
| espresso |
0xA0000000-0xA003FFFF | 0xA0040000-0xA003FFFF | 0x84000000 |
0x85F00000 |
| sti5528eval | 0xA0000000-0xA003FFFF | 0xA0040000-0xA003FFFF | 0x84000000 | 0x85F00000 |
| stb7100mboard | 0xA0000000-0xA001FFFF | 0xA0020000-0xA002FFFF | 0x84000000 | 0x85F00000 |
| stb7100ref_* | 0xA0000000-0xA001FFFF | 0xA0020000-0xA002FFFF | 0x84000000 | 0x85F00000 |
| stb7109eref | 0xA0000000-0xA001FFFF | 0xA0020000-0xA002FFFF | 0x84000000 | 0x85F00000 |
| sti5301mb390 | 0x7FFE0000-0x7FFFFFFF | 0x7F800000-0x7F80FFFF | 0xC0000000 | 0xC1F00000 |
| sti5301mb424 | 0x7FFC0000-0x7FFFFFFF | 0x7F800000-0x7F80FFFF | 0xC0000000 | 0xC1F00000 |
| traviata | 0x00000000-0x0002FFFF | 0x007F0000-0x007F7FFF | 0x80000000 | 0x81F00000 |
1 Flash addresses are given as P2 (unchached) addresses for ST40.
2 RAM addresses are given as P1 (cached) addresses for ST40.
The target-specific code is held in the following directories:
| include/configs/<board-config>.h | Board configuration header file |
| board/<board> | Board files |
| cpu/<cpu> | CPU files |
| cpu/<cpu>/<soc> | SoC files |
| lib_<arch> | Architecture support files |
| include/asm-<arch> | Architecture headers |
The following example is for the Espresso board:
| include/configs/espresso.h | Board configuration header file | ||
| board/espresso/ | Board-specific files | ||
| config.mk | Defines base address for U-boot in memory | ||
| espresso.c | Board specific initialization | ||
| Makefile | |||
| sconsole.c | Used if no physical serial port exists | ||
| sconsole.h | |||
| u-boot.lds | Linker script | ||
| init-espresso.S | Memory/SoC configuration table | ||
| cpu/sh4_1xx | CPU files | ||
| config.mk | CPU make flags | ||
| cpu.c | CPU functions | ||
| interrupts.c | Interrupt routines (not needed for sh4) | ||
| Makefile | |||
| start.S | Main CPU entry point | ||
| init-st40common.S | Common configuration code | ||
| cpu/sh4_1xx/sti5528 | SoC files | ||
| Makefile | |||
| sti5528.c | SoC specific functions (for example, reset) | ||
| lib_sh4 | Architecture support files | ||
| board.c | Generic board initialization code | ||
| cacheops.S | |||
| io.c | |||
| io_generic.c | |||
| linkage.h | |||
| memchr.S | |||
| memcpy.S | |||
| memmove.S | |||
| memset.S | |||
| sh4_linux.c | Code for booting sh4 linux kernel | ||
| strlen.S | |||
| time.c | Generic code for reading TMU | ||
| include/asm-sh4 | Architecture headers | ||