📄 readme
字号:
can just be read and written to, without any special provision.BE CAREFUL! The first access to the environment happens quite earlyin U-Boot initalization (when we try to get the setting of for theconsole baudrate). You *MUST* have mappend your NVRAM area then, orU-Boot will hang.Please note that even with NVRAM we still use a copy of theenvironment in RAM: we could work on NVRAM directly, but we want tokeep settings there always unmodified except somebody uses "saveenv"to save the current settings.- CFG_ENV_IS_IN_EEPROM: Use this if you have an EEPROM or similar serial access device and a driver for it. - CFG_ENV_OFFSET: - CFG_ENV_SIZE: These two #defines specify the offset and size of the environment area within the total memory of your EEPROM. - CFG_I2C_EEPROM_ADDR: If defined, specified the chip address of the EEPROM device. The default address is zero. - CFG_EEPROM_PAGE_WRITE_BITS: If defined, the number of bits used to address bytes in a single page in the EEPROM device. A 64 byte page, for example would require six bits. - CFG_EEPROM_PAGE_WRITE_DELAY_MS: If defined, the number of milliseconds to delay between page writes. The default is zero milliseconds. - CFG_I2C_EEPROM_ADDR_LEN: The length in bytes of the EEPROM memory array address. Note that this is NOT the chip address length! - CFG_EEPROM_SIZE: The size in bytes of the EEPROM device.- CFG_SPI_INIT_OFFSET Defines offset to the initial SPI buffer area in DPRAM. The area is used at an early stage (ROM part) if the environment is configured to reside in the SPI EEPROM: We need a 520 byte scratch DPRAM area. It is used between the two initialization calls (spi_init_f() and spi_init_r()). A value of 0xB00 seems to be a good choice since it makes it far enough from the start of the data area as well as from the stack pointer.Please note that the environment is read-only as long as the monitorhas been relocated to RAM and a RAM copy of the environment has beencreated; also, when using EEPROM you will have to use getenv_r()until then to read environment variables.The environment is protected by a CRC32 checksum. Before the monitoris relocated into RAM, as a result of a bad CRC you will be workingwith the compiled-in default environment - *silently*!!! [This isnecessary, because the first environment variable we need is the"baudrate" setting for the console - if we have a bad CRC, we don'thave any device yet where we could complain.]Note: once the monitor has been relocated, then it will complain ifthe default environment is used; a new CRC is computed as soon as youuse the "saveenv" command to store a valid environment.Low Level (hardware related) configuration options:---------------------------------------------------- CFG_CACHELINE_SIZE: Cache Line Size of the CPU.- CFG_DEFAULT_IMMR: Default address of the IMMR after system reset. Needed on some 8260 systems (MPC8260ADS and RPXsuper) to be able to adjust the position of the IMMR register after a reset.- Floppy Disk Support: CFG_FDC_DRIVE_NUMBER the default drive number (default value 0) CFG_ISA_IO_STRIDE defines the spacing between fdc chipset registers (default value 1) CFG_ISA_IO_OFFSET defines the offset of register from address. It depends on which part of the data bus is connected to the fdc chipset. (default value 0) If CFG_ISA_IO_STRIDE CFG_ISA_IO_OFFSET and CFG_FDC_DRIVE_NUMBER are undefined, they take their default value. if CFG_FDC_HW_INIT is defined, then the function fdc_hw_init() is called at the beginning of the FDC setup. fdc_hw_init() must be provided by the board source code. It is used to make hardware dependant initializations.- CFG_IMMR: Physical address of the Internal Memory Mapped Register; DO NOT CHANGE! (11-4) [MPC8xx systems only]- CFG_INIT_RAM_ADDR: Start address of memory area tha can be used for initial data and stack; please note that this must be writable memory that is working WITHOUT special initialization, i. e. you CANNOT use normal RAM which will become available only after programming the memory controller and running certain initialization sequences. U-Boot uses the following memory types: - MPC8xx and MPC8260: IMMR (internal memory of the CPU) - MPC824X: data cache - PPC4xx: data cache- CFG_GBL_DATA_OFFSET: Offset of the initial data structure in the memory area defined by CFG_INIT_RAM_ADDR. Usually CFG_GBL_DATA_OFFSET is chosen such that the initial data is located at the end of the available space (sometimes written as (CFG_INIT_RAM_END - CFG_INIT_DATA_SIZE), and the initial stack is just below that area (growing from (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET) downward. Note: On the MPC824X (or other systems that use the data cache for initial memory) the address chosen for CFG_INIT_RAM_ADDR is basically arbitrary - it must point to an otherwise UNUSED address space between the top of RAM and the start of the PCI space.- CFG_SIUMCR: SIU Module Configuration (11-6)- CFG_SYPCR: System Protection Control (11-9)- CFG_TBSCR: Time Base Status and Control (11-26)- CFG_PISCR: Periodic Interrupt Status and Control (11-31)- CFG_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30)- CFG_SCCR: System Clock and reset Control Register (15-27)- CFG_OR_TIMING_SDRAM: SDRAM timing- CFG_MAMR_PTA: periodic timer for refresh- CFG_DER: Debug Event Register (37-47)- FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CFG_REMAP_OR_AM, CFG_PRELIM_OR_AM, CFG_OR_TIMING_FLASH, CFG_OR0_REMAP, CFG_OR0_PRELIM, CFG_BR0_PRELIM, CFG_OR1_REMAP, CFG_OR1_PRELIM, CFG_BR1_PRELIM: Memory Controller Definitions: BR0/1 and OR0/1 (FLASH)- SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE, CFG_OR_TIMING_SDRAM, CFG_OR2_PRELIM, CFG_BR2_PRELIM, CFG_OR3_PRELIM, CFG_BR3_PRELIM: Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)- CFG_MAMR_PTA, CFG_MPTPR_2BK_4K, CFG_MPTPR_1BK_4K, CFG_MPTPR_2BK_8K, CFG_MPTPR_1BK_8K, CFG_MAMR_8COL, CFG_MAMR_9COL: Machine Mode Register and Memory Periodic Timer Prescaler definitions (SDRAM timing)- CFG_I2C_UCODE_PATCH, CFG_I2C_DPMEM_OFFSET [0x1FC0]: enable I2C microcode relocation patch (MPC8xx); define relocation offset in DPRAM [DSP2]- CFG_SPI_UCODE_PATCH, CFG_SPI_DPMEM_OFFSET [0x1FC0]: enable SPI microcode relocation patch (MPC8xx); define relocation offset in DPRAM [SCC4]- CFG_USE_OSCCLK: Use OSCM clock mode on MBX8xx board. Be careful, wrong setting might damage your board. Read doc/README.MBX before setting this variable!- CFG_CPM_POST_WORD_ADDR: (MPC8xx, MPC8260 only) Offset of the bootmode word in DPRAM used by post (Power On Self Tests). This definition overrides #define'd default value in commproc.h resp. cpm_8260.h.- CFG_PCI_SLV_MEM_LOCAL, CFG_PCI_SLV_MEM_BUS, CFG_PICMR0_MASK_ATTRIB, CFG_PCI_MSTR0_LOCAL, CFG_PCIMSK0_MASK, CFG_PCI_MSTR1_LOCAL, CFG_PCIMSK1_MASK, CFG_PCI_MSTR_MEM_LOCAL, CFG_PCI_MSTR_MEM_BUS, CFG_CPU_PCI_MEM_START, CFG_PCI_MSTR_MEM_SIZE, CFG_POCMR0_MASK_ATTRIB, CFG_PCI_MSTR_MEMIO_LOCAL, CFG_PCI_MSTR_MEMIO_BUS, CPU_PCI_MEMIO_START, CFG_PCI_MSTR_MEMIO_SIZE, CFG_POCMR1_MASK_ATTRIB, CFG_PCI_MSTR_IO_LOCAL, CFG_PCI_MSTR_IO_BUS, CFG_CPU_PCI_IO_START, CFG_PCI_MSTR_IO_SIZE, CFG_POCMR2_MASK_ATTRIB: (MPC826x only) Overrides the default PCI memory map in cpu/mpc8260/pci.c if set.Building the Software:======================Building U-Boot has been tested in native PPC environments (on aPowerBook G3 running LinuxPPC 2000) and in cross environments(running RedHat 6.x and 7.x Linux on x86, Solaris 2.6 on a SPARC, andNetBSD 1.5 on x86).If you are not using a native PPC environment, it is assumed that youhave the GNU cross compiling tools available in your path and namedwith a prefix of "powerpc-linux-". If this is not the case, (e.g. ifyou are using Monta Vista's Hard Hat Linux CDK 1.2) you must changethe definition of CROSS_COMPILE in Makefile. For HHL on a 4xx CPU,change it to: CROSS_COMPILE = ppc_4xx-U-Boot is intended to be simple to build. After installing thesources you must configure U-Boot for one specific board type. Thisis done by typing: make NAME_configwhere "NAME_config" is the name of one of the existingconfigurations; the following names are supported: ADCIOP_config GTH_config TQM850L_config ADS860_config IP860_config TQM855L_config AR405_config IVML24_config TQM860L_config CANBT_config IVMS8_config WALNUT405_config CPCI405_config LANTEC_config cogent_common_config CPCIISER4_config MBX_config cogent_mpc8260_config CU824_config MBX860T_config cogent_mpc8xx_config ESTEEM192E_config RPXlite_config hermes_config ETX094_config RPXsuper_config hymod_config FADS823_config SM850_config lwmon_config FADS850SAR_config SPD823TS_config pcu_e_config FADS860T_config SXNI855T_config rsdproto_config FPS850L_config Sandpoint8240_config sbc8260_config GENIETV_config TQM823L_config PIP405_config GEN860T_config EBONY_config FPS860L_config ELPT860_config cmi_mpc5xx_config NETVIA_config at91rm9200dk_configNote: for some board special configuration names may exist; check if additional information is available from the board vendor; for instance, the TQM8xxL systems run normally at 50 MHz and use a SCC for 10baseT ethernet; there are also systems with 80 MHz CPU clock, and an optional Fast Ethernet module is available for CPU's with FEC. You can select such additional "features" when chosing the configuration, i. e. make TQM860L_config - will configure for a plain TQM860L, i. e. 50MHz, no FEC make TQM860L_FEC_config - will configure for a TQM860L at 50MHz with FEC for ethernet make TQM860L_80MHz_config - will configure for a TQM860L at 80 MHz, with normal 10baseT interface make TQM860L_FEC_80MHz_config - will configure for a TQM860L at 80 MHz with FEC for ethernet make TQM823L_LCD_config - will configure for a TQM823L with U-Boot console on LCD make TQM823L_LCD_80MHz_config - will configure for a TQM823L at 80 MHz with U-Boot console on LCD etc.Finally, type "make all", and you should get some working U-Bootimages ready for downlod to / installation on your system:- "u-boot.bin" is a raw binary image- "u-boot" is an image in ELF binary format- "u-boot.srec" is in Motorola S-Record formatPlease be aware that the Makefiles assume you are using GNU make, sofor instance on NetBSD you might need to use "gmake" instead ofnative "make".If the system board that you have is not listed, then you will needto port U-Boot to your hardware platform. To do this, follow thesesteps:1. Add a new configuration option for your board to the toplevel "Makefile" and to the "MAKEALL" script, using the existing entries as examples. Note that here and at many other places boards and other names are listed alphabetically sorted. Please keep this order.2. Create a new directory to hold your board specific code. Add any files you need. In your board directory, you will need at least the "Makefile", a "<board>.c", "flash.c" and "u-boot.lds".3. Create a new configuration file "include/configs/<board>.h" for your board3. If you're porting U-Boot to a new CPU, then also create a new directory to hold your CPU specific code. Add any files you need.4. Run "make <board>_config" with your new name.5. Type "make", and you should get a working "u-boot.srec" file to be installed on your target system.6. Debug and solve any problems that might arise. [Of course, this last step is much harder than it sounds.]Testing of U-Boot Modifications, Ports to New Hardware, etc.:==============================================================If you have modified U-Boot sources (for instance added a new boardor support for new devices, a new CPU, etc.) you are expected toprovide feedback to the other developers. The feedback normally takesthe form of a "patch", i. e. a context diff against a certain (latestofficial or latest in CVS) version of U-Boot sources.But before you submit such a patch, please verify that your modifi-cation did not break existing code. At least make sure that *ALL* ofthe supported boards compile WITHOUT ANY compiler warnings. To do so,just run the "MAKEALL" script, which will configure and build U-Bootfor ALL supported system. Be warned, this will take a while. You canselect which (cross) compiler to use py passing a `CROSS_COMPILE'environment variable to the script, i. e. to use the cross tools fromMontaVista's Hard Hat Linux you can type CROSS_COMPILE=ppc_8xx- MAKEALLor to build on a native PowerPC system you can type CROSS_COMPILE=' ' MAKEALLSee also "U-Boot Porting Guide" below.Monitor Commands - Overview:============================go - start application at address 'addr'run - run commands in an environment variablebootm - boot application image from memorybootp - boot image via network using BootP/TFTP protocoltftpboot- boot image via network using TFTP protocol and env variables "ipaddr" and "serverip" (and eventually "gatewayip")rarpboot- boot image via network using RARP/TFTP protocoldiskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd'loads - load S-Record file over serial lineloadb - load binary file over serial line (kermit mode)md - memory displaymm - memory modify (auto-incrementing)nm - memory modify (constant address)mw - memory write (fill)cp - memory copycmp - memory comparecrc32 - checksum calculationimd - i2c memory displayimm - i2c memory modify (auto-incrementing)inm - i2c memory modify (constant address)imw - i2c memory write (fill)icrc32 - i2c checksum calculationiprobe - probe to discover valid I2C chip addressesiloop - infinite loop on address rangeisdram - print SDRAM configuration informationsspi - SPI utility commandsbase - print or set address offsetprintenv- print environment variablessetenv - set environment variablessaveenv - save environment va
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -