README.440-DDR-performance
1AMCC suggested to set the PMU bit to 0 for best performace on the
2PPC440 DDR controller. The 440er common DDR setup files (sdram.c &
3spd_sdram.c) are changed accordingly. So all 440er boards using
4these setup routines will automatically receive this performance
5increase.
6
7Please see below some benchmarks done by AMCC to demonstrate this
8performance changes:
9
10
11----------------------------------------
12SDRAM0_CFG0[PMU] = 1 (U-Boot default for Bamboo, Yosemite and Yellowstone)
13----------------------------------------
14Stream benchmark results
15-------------------------------------------------------------
16This system uses 8 bytes per DOUBLE PRECISION word.
17-------------------------------------------------------------
18Array size = 2000000, Offset = 0
19Total memory required = 45.8 MB.
20Each test is run 10 times, but only
21the *best* time for each is used.
22-------------------------------------------------------------
23Your clock granularity/precision appears to be 1 microseconds.
24Each test below will take on the order of 112345 microseconds.
25 (= 112345 clock ticks)
26Increase the size of the arrays if this shows that you are not getting
27at least 20 clock ticks per test.
28-------------------------------------------------------------
29WARNING -- The above is only a rough guideline.
30For best results, please be sure you know the precision of your system
31timer.
32-------------------------------------------------------------
33Function Rate (MB/s) RMS time Min time Max time
34Copy: 256.7683 0.1248 0.1246 0.1250
35Scale: 246.0157 0.1302 0.1301 0.1302
36Add: 255.0316 0.1883 0.1882 0.1885
37Triad: 253.1245 0.1897 0.1896 0.1899
38
39
40TTCP Benchmark Results
41ttcp-t: socket
42ttcp-t: connect
43ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5000 tcp ->
44localhost
45ttcp-t: 16777216 bytes in 0.28 real seconds = 454.29 Mbit/sec +++
46ttcp-t: 2048 I/O calls, msec/call = 0.14, calls/sec = 7268.57
47ttcp-t: 0.0user 0.1sys 0:00real 60% 0i+0d 0maxrss 0+2pf 3+1506csw
48
49----------------------------------------
50SDRAM0_CFG0[PMU] = 0 (Suggested modification)
51Setting PMU = 0 provides a noticeable performance improvement *2% to
525% improvement in memory performance.
53*Improves the Mbit/sec for TTCP benchmark by almost 76%.
54----------------------------------------
55Stream benchmark results
56-------------------------------------------------------------
57This system uses 8 bytes per DOUBLE PRECISION word.
58-------------------------------------------------------------
59Array size = 2000000, Offset = 0
60Total memory required = 45.8 MB.
61Each test is run 10 times, but only
62the *best* time for each is used.
63-------------------------------------------------------------
64Your clock granularity/precision appears to be 1 microseconds.
65Each test below will take on the order of 120066 microseconds.
66 (= 120066 clock ticks)
67Increase the size of the arrays if this shows that you are not getting
68at least 20 clock ticks per test.
69-------------------------------------------------------------
70WARNING -- The above is only a rough guideline.
71For best results, please be sure you know the precision of your system
72timer.
73-------------------------------------------------------------
74Function Rate (MB/s) RMS time Min time Max time
75Copy: 262.5167 0.1221 0.1219 0.1223
76Scale: 258.4856 0.1238 0.1238 0.1240
77Add: 262.5404 0.1829 0.1828 0.1831
78Triad: 266.8594 0.1800 0.1799 0.1802
79
80TTCP Benchmark Results
81ttcp-t: socket
82ttcp-t: connect
83ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5000 tcp ->
84localhost
85ttcp-t: 16777216 bytes in 0.16 real seconds = 804.06 Mbit/sec +++
86ttcp-t: 2048 I/O calls, msec/call = 0.08, calls/sec = 12864.89
87ttcp-t: 0.0user 0.0sys 0:00real 46% 0i+0d 0maxrss 0+2pf 120+1csw
88
89
902006-07-28, Stefan Roese <sr@denx.de>
91
README.AMCC-eval-boards-cleanup
1---------------------------------------------------------------------
2Cleanup of AMCC eval boards (Walnut/Sycamore, Bubinga, Ebony, Ocotea)
3---------------------------------------------------------------------
4
5Changes to all AMCC eval boards:
6--------------------------------
7
8o Changed u-boot image size to 256 kBytes instead of 512 kBytes on most
9 boards.
10
11o Use 115200 baud as default console baudrate.
12
13o Added config option to use redundant environment in flash. This is also
14 the default setting. Option for environment in nvram is still available
15 for backward compatibility.
16
17o Merged board specific flash drivers to common flash driver:
18 board/amcc/common/flash.c
19
20
21Sycamore/Walnut (one port supporting both eval boards):
22-------------------------------------------------------
23
24o Cleanup to allow easier "cloning" for different (custom) boards:
25
26 o Moved EBC configuration from board specific asm-file "init.S"
27 using defines in board configuration file. No board specific
28 asm file needed anymore.
29
30
31August 01 2005, Stefan Roese <sr@denx.de>
32
README.ARC
1Synopsys' DesignWare(r) ARC(r) Processors are a family of 32-bit CPUs
2that SoC designers can optimize for a wide range of uses, from deeply embedded
3to high-performance host applications.
4
5More information on ARC cores avaialble here:
6http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/Pages/default.aspx
7
8Designers can differentiate their products by using patented configuration
9technology to tailor each ARC processor instance to meet specific performance,
10power and area requirements.
11
12The DesignWare ARC processors are also extendable, allowing designers to add
13their own custom instructions that dramatically increase performance.
14
15Synopsys' ARC processors have been used by over 170 customers worldwide who
16collectively ship more than 1 billion ARC-based chips annually.
17
18All DesignWare ARC processors utilize a 16-/32-bit ISA that provides excellent
19performance and code density for embedded and host SoC applications.
20
21The RISC microprocessors are synthesizable and can be implemented in any foundry
22or process, and are supported by a complete suite of development tools.
23
24The ARC GNU toolchain with support for all ARC Processors can be downloaded
25from here (available pre-built toolchains as well):
26
27https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
28
README.ARM-memory-map
1Subject: Re: [PATCH][CFT] bring ARM memory layout in line with the documented behaviour
2From: "Anders Larsen" <alarsen@rea.de>
3Date: Thu, 18 Sep 2003 14:15:21 +0200
4To: Wolfgang Denk <wd@denx.de>
5
6...
7>I still see references to _armboot_start, _armboot_end_data, and
8>_armboot_end - which role do these play now? Can we get rid of them?
9>
10>How are they (should they be) set in your memory map above?
11
12_armboot_start contains the value of CONFIG_SYS_TEXT_BASE (0xA07E0000); it seems
13CONFIG_SYS_TEXT_BASE and _armboot_start are both used for the same purpose in
14different parts of the (ARM) code.
15Furthermore, the startup code (cpu/<arm>/start.S) internally uses
16another variable (_TEXT_BASE) with the same content as _armboot_start.
17I agree that this mess should be cleaned up.
18
README.Heterogeneous-SoCs
1DSP side awareness for Freescale heterogeneous multicore chips based on
2StarCore and Power Architecture
3===============================================================
4powerpc/mpc85xx code ve APIs and function to get the number,
5configuration and frequencies of all PowerPC cores and devices
6connected to them, but it didnt have the similar code ofr HEterogeneous
7SC3900/DSP cores and such devices like CPRI, MAPLE, MAPLE-ULB etc.
8
9Code for DSP side awareness provides such functionality for Freescale
10Heterogeneous SoCs which are chasis-2 compliant like B4860 and B4420
11
12As part of this feature, following changes have been made:
13==========================================================
14
151. Changed files:
16=================
17- arch/powerpc/cpu/mpc85xx/cpu.c
18
19Code added in this file to print the DSP cores and other device's(CPRI,
20MAPLE etc) frequencies
21
22- arch/powerpc/cpu/mpc85xx/speed.c
23
24Added Defines and code to extract the frequncy information for all
25required cores and devices from RCW and System frequency
26
27- arch/powerpc/cpu/mpc8xxx/cpu.c
28
29Added API to get the number of SC cores in running system and Their BIT
30MASK, similar to the code written for PowerPC
31
32- arch/powerpc/include/asm/config_mpc85xx.h
33
34Added top level CONFIG to identify presence of HETEROGENUOUS clusters
35in the system and CONFIGS for SC3900/DSP components
36
37- arch/powerpc/include/asm/processor.h
38- include/common.h
39
40Added newly added Functions Declaration
41
42- include/e500.h
43
44Global structure updated for dsp cores and other components
45
462. CONFIGs ADDED
47================
48
49CONFIG_HETROGENOUS_CLUSTERS - Define for checking the presence of
50 DSP/SC3900 core clusters
51
52CONFIG_SYS_FSL_NUM_CC_PLLS - Define for number of PLLs
53
54Though there are only 4 PLLs in B4, but in sequence of PLLs from PLL1 -
55PLL5, PLL3 is Reserved(as mentioned in RM), so this define contains the
56value as 5 not 4, to iterate over all PLLs while coding
57
58CONFIG_SYS_MAPLE - Define for MAPLE Baseband Accelerator
59CONFIG_SYS_CPRI - Define for CPRI Interface
60CONFIG_PPC_CLUSTER_START - Start index of ppc clusters
61CONFIG_DSP_CLUSTER_START - Start index of dsp clusters
62
63Following are the defines for PLL's index that provide the Clocking to
64CPRI, ULB and ETVE components
65
66CONFIG_SYS_CPRI_CLK - Define PLL index for CPRI clock
67CONFIG_SYS_ULB_CLK - Define PLL index for ULB clock
68CONFIG_SYS_ETVPE_CLK - Define PLL index for ETVPE clock
69
703. Changes in MPC85xx_SYS_INFO Global structure
71===============================================
72
73DSP cores and other device's components have been added in this structure.
74
75freq_processor_dsp[CONFIG_MAX_DSP_CPUS] - Array to contain the DSP core's frequencies
76freq_cpri - To store CPRI frequency
77freq_maple - To store MAPLE frequency
78freq_maple_ulb - To store MAPLE-ULB frequency
79freq_maple_etvpe - To store MAPLE-eTVPE frequency
80
814. U-BOOT LOGS
82==============
834.1 B4860QDS board
84 Boot from NOR flash
85
86U-Boot 2014.07-00222-g70587a8-dirty (Aug 07 2014 - 13:15:47)
87
88CPU0: B4860E, Version: 2.0, (0x86880020)
89Core: e6500, Version: 2.0, (0x80400020) Clock Configuration:
90 CPU0:1600 MHz, CPU1:1600 MHz, CPU2:1600 MHz, CPU3:1600 MHz,
91 DSP CPU0:1200 MHz, DSP CPU1:1200 MHz, DSP CPU2:1200 MHz, DSP CPU3:1200 MHz,
92 DSP CPU4:1200 MHz, DSP CPU5:1200 MHz,
93 CCB:666.667 MHz,
94 DDR:933.333 MHz (1866.667 MT/s data rate) (Asynchronous), IFC:166.667 MHz
95 CPRI:600 MHz
96 MAPLE:600 MHz, MAPLE-ULB:800 MHz, MAPLE-eTVPE:1000 MHz
97 FMAN1: 666.667 MHz
98 QMAN: 333.333 MHz
99
100CPUn - PowerPC core
101DSP CPUn - SC3900 core
102
103Shaveta Leekha(shaveta@freescale.com)
104Created August 7, 2014
105===========================================
106
README.JFFS2
1JFFS2 options and usage.
2-----------------------
3
4JFFS2 in U-Boot is a read only implementation of the file system in
5Linux with the same name. To use JFFS2 define CONFIG_CMD_JFFS2.
6
7The module adds three new commands.
8fsload - load binary file from a file system image
9fsinfo - print information about file systems
10ls - list files in a directory
11chpart - change active partition
12
13If you do now need the commands, you can enable the filesystem separately
14with CONFIG_FS_JFFS2 and call the jffs2 functions yourself.
15
16If you boot from a partition which is mounted writable, and you
17update your boot environment by replacing single files on that
18partition, you should also define CONFIG_SYS_JFFS2_SORT_FRAGMENTS. Scanning
19the JFFS2 filesystem takes *much* longer with this feature, though.
20Sorting is done while inserting into the fragment list, which is
21more or less a bubble sort. That algorithm is known to be O(n^2),
22thus you should really consider if you can avoid it!
23
24
25There only one way for JFFS2 to find the disk. It uses the flash_info
26structure to find the start of a JFFS2 disk (called partition in the code)
27and you can change where the partition is with two defines.
28
29CONFIG_SYS_JFFS2_FIRST_BANK
30 defined the first flash bank to use
31
32CONFIG_SYS_JFFS2_FIRST_SECTOR
33 defines the first sector to use
34---
35
36TODO.
37
38 Remove the assumption that JFFS can dereference a pointer
39 into the disk. The current code do not work with memory holes
40 or hardware with a sliding window (PCMCIA).
41
README.JFFS2_NAND
1JFFS2 NAND support:
2
3To enable, use the following #define in the board configuration file:
4
5#define CONFIG_JFFS2_NAND
6
7Configuration of partitions is similar to how this is done in U-Boot
8for JFFS2 on top NOR flash.
9
README.LED
1Status LED
2========================================
3
4This README describes the status LED API.
5
6The API is defined by the include file include/status_led.h
7
8The first step is to enable CONFIG_LED_STATUS in menuconfig:
9> Device Drivers > LED Support.
10
11If the LED support is only for specific board, enable
12CONFIG_LED_STATUS_BOARD_SPECIFIC in the menuconfig.
13
14Status LEDS 0 to 5 are enabled by the following configurations at menuconfig:
15CONFIG_STATUS_LED0, CONFIG_STATUS_LED1, ... CONFIG_STATUS_LED5
16
17The following should be configured for each of the enabled LEDs:
18CONFIG_STATUS_LED_BIT<n>
19CONFIG_STATUS_LED_STATE<n>
20CONFIG_STATUS_LED_FREQ<n>
21Where <n> is an integer 1 through 5 (empty for 0).
22
23CONFIG_STATUS_LED_BIT is passed into the __led_* functions to identify which LED
24is being acted on. As such, the value choose must be unique with with respect to
25the other CONFIG_STATUS_LED_BIT's. Mapping the value to a physical LED is the
26reponsiblity of the __led_* function.
27
28CONFIG_STATUS_LED_STATE is the initial state of the LED. It should be set to one
29of these values: CONFIG_LED_STATUS_OFF or CONFIG_LED_STATUS_ON.
30
31CONFIG_STATUS_LED_FREQ determines the LED blink frequency.
32Values range from 2 to 10.
33
34Some other LED macros
35---------------------
36
37CONFIG_STATUS_LED_BOOT is the LED to light when the board is booting.
38This must be a valid LED number (0-5).
39
40CONFIG_STATUS_LED_RED is the red LED. It is used to signal errors. This must be
41a valid LED number (0-5). Other similar color LED's macros are
42CONFIG_STATUS_LED_GREEN, CONFIG_STATUS_LED_YELLOW and CONFIG_STATUS_LED_BLUE.
43
44General LED functions
45---------------------
46The following functions should be defined:
47
48__led_init is called once to initialize the LED to CONFIG_STATUS_LED_STATE.
49One time start up code should be placed here.
50
51__led_set is called to change the state of the LED.
52
53__led_toggle is called to toggle the current state of the LED.
54
55Colour LED
56========================================
57
58Colour LED's are at present only used by ARM.
59
60The functions names explain their purpose.
61
62coloured_LED_init
63red_LED_on
64red_LED_off
65green_LED_on
66green_LED_off
67yellow_LED_on
68yellow_LED_off
69blue_LED_on
70blue_LED_off
71
72These are weakly defined in arch/arm/lib/board.c to noops. Where applicable, define
73these functions in the board specific source.
74
75TBD : Describe older board dependent macros similar to what is done for
76
77TBD : Describe general support via asm/status_led.h
78
README.LED_display
1LED display internal API
2=======================================
3
4This README describes the LED display API.
5
6The API is defined by the include file include/led-display.h
7
8The first step in to define CONFIG_CMD_DISPLAY in the board config file.
9Then you need to provide the following functions to access LED display:
10
11void display_set(int cmd);
12
13This function should control the state of the LED display. Argument is
14an ORed combination of the following values:
15 DISPLAY_CLEAR -- clear the display
16 DISPLAY_HOME -- set the position to the beginning of display
17
18int display_putc(char c);
19
20This function should display it's parameter on the LED display in the
21current position. Returns the displayed character on success or -1 in
22case of failure.
23
24With this functions defined 'display' command will display it's
25arguments on the LED display (or clear the display if called without
26arguments).
27
README.N1213
1N1213 is a configurable hard/soft core of NDS32's N12 CPU family.
2
3Features
4========
5
6CPU Core
7 - 16-/32-bit mixable instruction format.
8 - 32 general-purpose 32-bit registers.
9 - 8-stage pipeline.
10 - Dynamic branch prediction.
11 - 32/64/128/256 BTB.
12 - Return address stack (RAS).
13 - Vector interrupts for internal/external.
14 interrupt controller with 6 hardware interrupt signals.
15 - 3 HW-level nested interruptions.
16 - User and super-user mode support.
17 - Memory-mapped I/O.
18 - Address space up to 4GB.
19
20Memory Management Unit
21 - TLB
22 - 4/8-entry fully associative iTLB/dTLB.
23 - 32/64/128-entry 4-way set-associati.ve main TLB.
24 - TLB locking support
25 - Optional hardware page table walker.
26 - Two groups of page size support.
27 - 4KB & 1MB.
28 - 8KB & 1MB.
29
30Memory Subsystem
31 - I & D cache.
32 - Virtually indexed and physically tagged.
33 - Cache size: 8KB/16KB/32KB/64KB.
34 - Cache line size: 16B/32B.
35 - Set associativity: 2-way, 4-way or direct-mapped.
36 - Cache locking support.
37 - I & D local memory (LM).
38 - Size: 4KB to 1MB.
39 - Bank numbers: 1 or 2.
40 - Optional 1D/2D DMA engine.
41 - Internal or external to CPU core.
42
43Bus Interface
44 - Synchronous/Asynchronous AHB bus: 0, 1 or 2 ports.
45 - Synchronous High speed memory port.
46 (HSMP): 0, 1 or 2 ports.
47
48Debug
49 - JTAG debug interface.
50 - Embedded debug module (EDM).
51 - Optional embedded program tracer interface.
52
53Miscellaneous
54 - Programmable data endian control.
55 - Performance monitoring mechanism.
56
README.NDS32
1NDS32 is a new high-performance 32-bit RISC microprocessor core.
2
3http://www.andestech.com/
4
5AndeStar ISA
6============
7AndeStar is a patent-pending 16-bit/32-bit mixed-length instruction set to
8achieve optimal system performance, code density, and power efficiency.
9
10It contains the following features:
11 - Intermixable 32-bit and 16-bit instruction sets without the need for
12 mode switch.
13 - 16-bit instructions as a frequently used subset of 32-bit instructions.
14 - RISC-style register-based instruction set.
15 - 32 32-bit General Purpose Registers (GPR).
16 - Upto 1024 User Special Registers (USR) for existing and extension
17 instructions.
18 - Rich load/store instructions for...
19 - Single memory access with base address update.
20 - Multiple aligned and unaligned memory accesses for memory copy and stack
21 operations.
22 - Data prefetch to improve data cache performance.
23 - Non-bus locking synchronization instructions.
24 - PC relative jump and PC read instructions for efficient position independent
25 code.
26 - Multiply-add and multiple-sub with 64-bit accumulator.
27 - Instruction for efficient power management.
28 - Bi-endian support.
29 - Three instruction extension space for application acceleration:
30 - Performance extension.
31 - Andes future extensions (for floating-point, multimedia, etc.)
32 - Customer extensions.
33
34AndesCore CPU
35=============
36Andes Technology has 4 families of CPU cores: N12, N10, N9, N8.
37
38For details about N12 CPU family, please check doc/README.N1213.
39
40The NDS32 ports of u-boot, the Linux kernel, the GNU toolchain and
41other associated software are actively supported by Andes Technology Corporation.
42
README.NetConsole
1
2In U-Boot, we implemented the networked console via the standard
3"devices" mechanism, which means that you can switch between the
4serial and network input/output devices by adjusting the 'stdin' and
5'stdout' environment variables. To switch to the networked console,
6set either of these variables to "nc". Input and output can be
7switched independently.
8
9CONFIG_NETCONSOLE_BUFFER_SIZE - Override the default buffer size
10
11We use an environment variable 'ncip' to set the IP address and the
12port of the destination. The format is <ip_addr>:<port>. If <port> is
13omitted, the value of 6666 is used. If the env var doesn't exist, the
14broadcast address and port 6666 are used. If it is set to an IP
15address of 0 (or 0.0.0.0) then no messages are sent to the network.
16The source / listening port can be configured separately by setting
17the 'ncinport' environment variable and the destination port can be
18configured by setting the 'ncoutport' environment variable.
19
20For example, if your server IP is 192.168.1.1, you could use:
21
22 => setenv nc 'setenv stdout nc;setenv stdin nc'
23 => setenv ncip 192.168.1.1
24 => saveenv
25 => run nc
26
27
28On the host side, please use this script to access the console:
29
30 tools/netconsole <ip> [port]
31
32The script uses netcat to talk to the board over UDP. It requires you to
33specify the target IP address (or host name, assuming DNS is working). The
34script can be interrupted by pressing ^T (CTRL-T).
35
36Be aware that in some distributives (Fedora Core 5 at least)
37usage of nc has been changed and -l and -p options are considered
38as mutually exclusive. If nc complains about options provided,
39you can just remove the -p option from the script.
40
41It turns out that 'netcat' cannot be used to listen to broadcast
42packets. We developed our own tool 'ncb' (see tools directory) that
43listens to broadcast packets on a given port and dumps them to the
44standard output. It will be built when compiling for a board which
45has CONFIG_NETCONSOLE defined. If the netconsole script can find it
46in PATH or in the same directory, it will be used instead.
47
48For Linux, the network-based console needs special configuration.
49Minimally, the host IP address needs to be specified. This can be
50done either via the kernel command line, or by passing parameters
51while loading the netconsole.o module (when used in a loadable module
52configuration). Please refer to Documentation/networking/logging.txt
53file for the original Ingo Molnar's documentation on how to pass
54parameters to the loadable module.
55
56The format of the kernel command line parameter (for the static
57configuration) is as follows:
58
59 netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
60
61where
62
63 src-port source for UDP packets
64 (defaults to 6665)
65 src-ip source IP to use
66 (defaults to the interface's address)
67 dev network interface
68 (defaults to eth0)
69 tgt-port port for logging agent
70 (defaults to 6666)
71 tgt-ip IP address for logging agent
72 (this is the required parameter)
73 tgt-macaddr ethernet MAC address for logging agent
74 (defaults to broadcast)
75
76Examples:
77
78 netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc
79
80or
81
82 netconsole=@/,@192.168.3.1/
83
84Please note that for the Linux networked console to work, the
85ethernet interface has to be up by the time the netconsole driver is
86initialized. This means that in case of static kernel configuration,
87the respective Ethernet interface has to be brought up using the "IP
88Autoconfiguration" kernel feature, which is usually done by defaults
89in the ELDK-NFS-based environment.
90
91To browse the Linux network console output, use the 'netcat' tool invoked
92as follows:
93
94 nc -u -l -p 6666
95
96Note that unlike the U-Boot implementation the Linux netconsole is
97unidirectional, i. e. you have console output only in Linux.
98
README.OFT
README.POST
1Power-On-Self-Test support in U-Boot
2------------------------------------
3
4This project is to support Power-On-Self-Test (POST) in U-Boot.
5
61. High-level requirements
7
8The key requirements for this project are as follows:
9
101) The project shall develop a flexible framework for implementing
11 and running Power-On-Self-Test in U-Boot. This framework shall
12 possess the following features:
13
14 o) Extensibility
15
16 The framework shall allow adding/removing/replacing POST tests.
17 Also, standalone POST tests shall be supported.
18
19 o) Configurability
20
21 The framework shall allow run-time configuration of the lists
22 of tests running on normal/power-fail booting.
23
24 o) Controllability
25
26 The framework shall support manual running of the POST tests.
27
282) The results of tests shall be saved so that it will be possible to
29 retrieve them from Linux.
30
313) The following POST tests shall be developed for MPC823E-based
32 boards:
33
34 o) CPU test
35 o) Cache test
36 o) Memory test
37 o) Ethernet test
38 o) Serial channels test
39 o) Watchdog timer test
40 o) RTC test
41 o) I2C test
42 o) SPI test
43 o) USB test
44
454) The LWMON board shall be used for reference.
46
472. Design
48
49This section details the key points of the design for the project.
50The whole project can be divided into two independent tasks:
51enhancing U-Boot/Linux to provide a common framework for running POST
52tests and developing such tests for particular hardware.
53
542.1. Hardware-independent POST layer
55
56A new optional module will be added to U-Boot, which will run POST
57tests and collect their results at boot time. Also, U-Boot will
58support running POST tests manually at any time by executing a
59special command from the system console.
60
61The list of available POST tests will be configured at U-Boot build
62time. The POST layer will allow the developer to add any custom POST
63tests. All POST tests will be divided into the following groups:
64
65 1) Tests running on power-on booting only
66
67 This group will contain those tests that run only once on
68 power-on reset (e.g. watchdog test)
69
70 2) Tests running on normal booting only
71
72 This group will contain those tests that do not take much
73 time and can be run on the regular basis (e.g. CPU test)
74
75 3) Tests running in special "slow test mode" only
76
77 This group will contain POST tests that consume much time
78 and cannot be run regularly (e.g. strong memory test, I2C test)
79
80 4) Manually executed tests
81
82 This group will contain those tests that can be run manually.
83
84If necessary, some tests may belong to several groups simultaneously.
85For example, SDRAM test may run in both normal and "slow test" mode.
86In normal mode, SDRAM test may perform a fast superficial memory test
87only, while running in slow test mode it may perform a full memory
88check-up.
89
90Also, all tests will be discriminated by the moment they run at.
91Specifically, the following groups will be singled out:
92
93 1) Tests running before relocating to RAM
94
95 These tests will run immediately after initializing RAM
96 as to enable modifying it without taking care of its
97 contents. Basically, this group will contain memory tests
98 only.
99
100 2) Tests running after relocating to RAM
101
102 These tests will run immediately before entering the main
103 loop as to guarantee full hardware initialization.
104
105The POST layer will also distinguish a special group of tests that
106may cause system rebooting (e.g. watchdog test). For such tests, the
107layer will automatically detect rebooting and will notify the test
108about it.
109
1102.1.1. POST layer interfaces
111
112This section details the interfaces between the POST layer and the
113rest of U-Boot.
114
115The following flags will be defined:
116
117#define POST_POWERON 0x01 /* test runs on power-on booting */
118#define POST_NORMAL 0x02 /* test runs on normal booting */
119#define POST_SLOWTEST 0x04 /* test is slow, enabled by key press */
120#define POST_POWERTEST 0x08 /* test runs after watchdog reset */
121#define POST_ROM 0x100 /* test runs in ROM */
122#define POST_RAM 0x200 /* test runs in RAM */
123#define POST_MANUAL 0x400 /* test can be executed manually */
124#define POST_REBOOT 0x800 /* test may cause rebooting */
125#define POST_PREREL 0x1000 /* test runs before relocation */
126
127The POST layer will export the following interface routines:
128
129 o) int post_run(bd_t *bd, char *name, int flags);
130
131 This routine will run the test (or the group of tests) specified
132 by the name and flag arguments. More specifically, if the name
133 argument is not NULL, the test with this name will be performed,
134 otherwise all tests running in ROM/RAM (depending on the flag
135 argument) will be executed. This routine will be called at least
136 twice with name set to NULL, once from board_init_f() and once
137 from board_init_r(). The flags argument will also specify the
138 mode the test is executed in (power-on, normal, power-fail,
139 manual).
140
141 o) void post_reloc(ulong offset);
142
143 This routine will be called from board_init_r() and will
144 relocate the POST test table.
145
146 o) int post_info(char *name);
147
148 This routine will print the list of all POST tests that can be
149 executed manually if name is NULL, and the description of a
150 particular test if name is not NULL.
151
152 o) int post_log(char *format, ...);
153
154 This routine will be called from POST tests to log their
155 results. Basically, this routine will print the results to
156 stderr. The format of the arguments and the return value
157 will be identical to the printf() routine.
158
159Also, the following board-specific routines will be called from the
160U-Boot common code:
161
162 o) int board_power_mode(void)
163
164 This routine will return the mode the system is running in
165 (POST_POWERON, POST_NORMAL or POST_SHUTDOWN).
166
167 o) void board_poweroff(void)
168
169 This routine will turn off the power supply of the board. It
170 will be called on power-fail booting after running all POST
171 tests.
172
173 o) int post_hotkeys_pressed(gd_t *gd)
174
175 This routine will scan the keyboard to detect if a magic key
176 combination has been pressed, or otherwise detect if the
177 power-on long-running tests shall be executed or not ("normal"
178 versus "slow" test mode).
179
180The list of available POST tests be kept in the post_tests array
181filled at U-Boot build time. The format of entry in this array will
182be as follows:
183
184struct post_test {
185 char *name;
186 char *cmd;
187 char *desc;
188 int flags;
189 int (*test)(bd_t *bd, int flags);
190};
191
192 o) name
193
194 This field will contain a short name of the test, which will be
195 used in logs and on listing POST tests (e.g. CPU test).
196
197 o) cmd
198
199 This field will keep a name for identifying the test on manual
200 testing (e.g. cpu). For more information, refer to section
201 "Command line interface".
202
203 o) desc
204
205 This field will contain a detailed description of the test,
206 which will be printed on user request. For more information, see
207 section "Command line interface".
208
209 o) flags
210
211 This field will contain a combination of the bit flags described
212 above, which will specify the mode the test is running in
213 (power-on, normal, power-fail or manual mode), the moment it
214 should be run at (before or after relocating to RAM), whether it
215 can cause system rebooting or not.
216
217 o) test
218
219 This field will contain a pointer to the routine that will
220 perform the test, which will take 2 arguments. The first
221 argument will be a pointer to the board info structure, while
222 the second will be a combination of bit flags specifying the
223 mode the test is running in (POST_POWERON, POST_NORMAL,
224 POST_SLOWTEST, POST_MANUAL) and whether the last execution of
225 the test caused system rebooting (POST_REBOOT). The routine will
226 return 0 on successful execution of the test, and 1 if the test
227 failed.
228
229The lists of the POST tests that should be run at power-on/normal/
230power-fail booting will be kept in the environment. Namely, the
231following environment variables will be used: post_poweron,
232powet_normal, post_slowtest.
233
2342.1.2. Test results
235
236The results of tests will be collected by the POST layer. The POST
237log will have the following format:
238
239...
240--------------------------------------------
241START <name>
242<test-specific output>
243[PASSED|FAILED]
244--------------------------------------------
245...
246
247Basically, the results of tests will be printed to stderr. This
248feature may be enhanced in future to spool the log to a serial line,
249save it in non-volatile RAM (NVRAM), transfer it to a dedicated
250storage server and etc.
251
2522.1.3. Integration issues
253
254All POST-related code will be #ifdef'ed with the CONFIG_POST macro.
255This macro will be defined in the config_<board>.h file for those
256boards that need POST. The CONFIG_POST macro will contain the list of
257POST tests for the board. The macro will have the format of array
258composed of post_test structures:
259
260#define CONFIG_POST \
261 {
262 "On-board peripherals test", "board", \
263 " This test performs full check-up of the " \
264 "on-board hardware.", \
265 POST_RAM | POST_SLOWTEST, \
266 &board_post_test \
267 }
268
269A new file, post.h, will be created in the include/ directory. This
270file will contain common POST declarations and will define a set of
271macros that will be reused for defining CONFIG_POST. As an example,
272the following macro may be defined:
273
274#define POST_CACHE \
275 {
276 "Cache test", "cache", \
277 " This test verifies the CPU cache operation.", \
278 POST_RAM | POST_NORMAL, \
279 &cache_post_test \
280 }
281
282A new subdirectory will be created in the U-Boot root directory. It
283will contain the source code of the POST layer and most of POST
284tests. Each POST test in this directory will be placed into a
285separate file (it will be needed for building standalone tests). Some
286POST tests (mainly those for testing peripheral devices) will be
287located in the source files of the drivers for those devices. This
288way will be used only if the test subtantially uses the driver.
289
2902.1.4. Standalone tests
291
292The POST framework will allow to develop and run standalone tests. A
293user-space library will be developed to provide the POST interface
294functions to standalone tests.
295
2962.1.5. Command line interface
297
298A new command, diag, will be added to U-Boot. This command will be
299used for listing all available hardware tests, getting detailed
300descriptions of them and running these tests.
301
302More specifically, being run without any arguments, this command will
303print the list of all available hardware tests:
304
305=> diag
306Available hardware tests:
307 cache - cache test
308 cpu - CPU test
309 enet - SCC/FCC ethernet test
310Use 'diag [<test1> [<test2>]] ... ' to get more info.
311Use 'diag run [<test1> [<test2>]] ... ' to run tests.
312=>
313
314If the first argument to the diag command is not 'run', detailed
315descriptions of the specified tests will be printed:
316
317=> diag cpu cache
318cpu - CPU test
319 This test verifies the arithmetic logic unit of CPU.
320cache - cache test
321 This test verifies the CPU cache operation.
322=>
323
324If the first argument to diag is 'run', the specified tests will be
325executed. If no tests are specified, all available tests will be
326executed.
327
328It will be prohibited to execute tests running in ROM manually. The
329'diag' command will not display such tests and/or run them.
330
3312.1.6. Power failure handling
332
333The Linux kernel will be modified to detect power failures and
334automatically reboot the system in such cases. It will be assumed
335that the power failure causes a system interrupt.
336
337To perform correct system shutdown, the kernel will register a
338handler of the power-fail IRQ on booting. Being called, the handler
339will run /sbin/reboot using the call_usermodehelper() routine.
340/sbin/reboot will automatically bring the system down in a secure
341way. This feature will be configured in/out from the kernel
342configuration file.
343
344The POST layer of U-Boot will check whether the system runs in
345power-fail mode. If it does, the system will be powered off after
346executing all hardware tests.
347
3482.1.7. Hazardous tests
349
350Some tests may cause system rebooting during their execution. For
351some tests, this will indicate a failure, while for the Watchdog
352test, this means successful operation of the timer.
353
354In order to support such tests, the following scheme will be
355implemented. All the tests that may cause system rebooting will have
356the POST_REBOOT bit flag set in the flag field of the correspondent
357post_test structure. Before starting tests marked with this bit flag,
358the POST layer will store an identification number of the test in a
359location in IMMR. On booting, the POST layer will check the value of
360this variable and if it is set will skip over the tests preceding the
361failed one. On second execution of the failed test, the POST_REBOOT
362bit flag will be set in the flag argument to the test routine. This
363will allow to detect system rebooting on the previous iteration. For
364example, the watchdog timer test may have the following
365declaration/body:
366
367...
368#define POST_WATCHDOG \
369 {
370 "Watchdog timer test", "watchdog", \
371 " This test checks the watchdog timer.", \
372 POST_RAM | POST_POWERON | POST_REBOOT, \
373 &watchdog_post_test \
374 }
375...
376
377...
378int watchdog_post_test(bd_t *bd, int flags)
379{
380 unsigned long start_time;
381
382 if (flags & POST_REBOOT) {
383 /* Test passed */
384 return 0;
385 } else {
386 /* disable interrupts */
387 disable_interrupts();
388 /* 10-second delay */
389 ...
390 /* if we've reached this, the watchdog timer does not work */
391 enable_interrupts();
392 return 1;
393 }
394}
395...
396
3972.2. Hardware-specific details
398
399This project will also develop a set of POST tests for MPC8xx- based
400systems. This section provides technical details of how it will be
401done.
402
4032.2.1. Generic PPC tests
404
405The following generic POST tests will be developed:
406
407 o) CPU test
408
409 This test will check the arithmetic logic unit (ALU) of CPU. The
410 test will take several milliseconds and will run on normal
411 booting.
412
413 o) Cache test
414
415 This test will verify the CPU cache (L1 cache). The test will
416 run on normal booting.
417
418 o) Memory test
419
420 This test will examine RAM and check it for errors. The test
421 will always run on booting. On normal booting, only a limited
422 amount of RAM will be checked. On power-fail booting a fool
423 memory check-up will be performed.
424
4252.2.1.1. CPU test
426
427This test will verify the following ALU instructions:
428
429 o) Condition register istructions
430
431 This group will contain: mtcrf, mfcr, mcrxr, crand, crandc,
432 cror, crorc, crxor, crnand, crnor, creqv, mcrf.
433
434 The mtcrf/mfcr instructions will be tested by loading different
435 values into the condition register (mtcrf), moving its value to
436 a general-purpose register (mfcr) and comparing this value with
437 the expected one. The mcrxr instruction will be tested by
438 loading a fixed value into the XER register (mtspr), moving XER
439 value to the condition register (mcrxr), moving it to a
440 general-purpose register (mfcr) and comparing the value of this
441 register with the expected one. The rest of instructions will be
442 tested by loading a fixed value into the condition register
443 (mtcrf), executing each instruction several times to modify all
444 4-bit condition fields, moving the value of the conditional
445 register to a general-purpose register (mfcr) and comparing it
446 with the expected one.
447
448 o) Integer compare instructions
449
450 This group will contain: cmp, cmpi, cmpl, cmpli.
451
452 To verify these instructions the test will run them with
453 different combinations of operands, read the condition register
454 value and compare it with the expected one. More specifically,
455 the test will contain a pre-built table containing the
456 description of each test case: the instruction, the values of
457 the operands, the condition field to save the result in and the
458 expected result.
459
460 o) Arithmetic instructions
461
462 This group will contain: add, addc, adde, addme, addze, subf,
463 subfc, subfe, subme, subze, mullw, mulhw, mulhwu, divw, divwu,
464 extsb, extsh.
465
466 The test will contain a pre-built table of instructions,
467 operands, expected results and expected states of the condition
468 register. For each table entry, the test will cyclically use
469 different sets of operand registers and result registers. For
470 example, for instructions that use 3 registers on the first
471 iteration r0/r1 will be used as operands and r2 for result. On
472 the second iteration, r1/r2 will be used as operands and r3 as
473 for result and so on. This will enable to verify all
474 general-purpose registers.
475
476 o) Logic instructions
477
478 This group will contain: and, andc, andi, andis, or, orc, ori,
479 oris, xor, xori, xoris, nand, nor, neg, eqv, cntlzw.
480
481 The test scheme will be identical to that from the previous
482 point.
483
484 o) Shift instructions
485
486 This group will contain: slw, srw, sraw, srawi, rlwinm, rlwnm,
487 rlwimi
488
489 The test scheme will be identical to that from the previous
490 point.
491
492 o) Branch instructions
493
494 This group will contain: b, bl, bc.
495
496 The first 2 instructions (b, bl) will be verified by jumping to
497 a fixed address and checking whether control was transferred to
498 that very point. For the bl instruction the value of the link
499 register will be checked as well (using mfspr). To verify the bc
500 instruction various combinations of the BI/BO fields, the CTR
501 and the condition register values will be checked. The list of
502 such combinations will be pre-built and linked in U-Boot at
503 build time.
504
505 o) Load/store instructions
506
507 This group will contain: lbz(x)(u), lhz(x)(u), lha(x)(u),
508 lwz(x)(u), stb(x)(u), sth(x)(u), stw(x)(u).
509
510 All operations will be performed on a 16-byte array. The array
511 will be 4-byte aligned. The base register will point to offset
512 8. The immediate offset (index register) will range in [-8 ...
513 +7]. The test cases will be composed so that they will not cause
514 alignment exceptions. The test will contain a pre-built table
515 describing all test cases. For store instructions, the table
516 entry will contain: the instruction opcode, the value of the
517 index register and the value of the source register. After
518 executing the instruction, the test will verify the contents of
519 the array and the value of the base register (it must change for
520 "store with update" instructions). For load instructions, the
521 table entry will contain: the instruction opcode, the array
522 contents, the value of the index register and the expected value
523 of the destination register. After executing the instruction,
524 the test will verify the value of the destination register and
525 the value of the base register (it must change for "load with
526 update" instructions).
527
528 o) Load/store multiple/string instructions
529
530
531The CPU test will run in RAM in order to allow run-time modification
532of the code to reduce the memory footprint.
533
5342.2.1.2 Special-Purpose Registers Tests
535
536TBD.
537
5382.2.1.3. Cache test
539
540To verify the data cache operation the following test scenarios will
541be used:
542
543 1) Basic test #1
544
545 - turn on the data cache
546 - switch the data cache to write-back or write-through mode
547 - invalidate the data cache
548 - write the negative pattern to a cached area
549 - read the area
550
551 The negative pattern must be read at the last step
552
553 2) Basic test #2
554
555 - turn on the data cache
556 - switch the data cache to write-back or write-through mode
557 - invalidate the data cache
558 - write the zero pattern to a cached area
559 - turn off the data cache
560 - write the negative pattern to the area
561 - turn on the data cache
562 - read the area
563
564 The negative pattern must be read at the last step
565
566 3) Write-through mode test
567
568 - turn on the data cache
569 - switch the data cache to write-through mode
570 - invalidate the data cache
571 - write the zero pattern to a cached area
572 - flush the data cache
573 - write the negative pattern to the area
574 - turn off the data cache
575 - read the area
576
577 The negative pattern must be read at the last step
578
579 4) Write-back mode test
580
581 - turn on the data cache
582 - switch the data cache to write-back mode
583 - invalidate the data cache
584 - write the negative pattern to a cached area
585 - flush the data cache
586 - write the zero pattern to the area
587 - invalidate the data cache
588 - read the area
589
590 The negative pattern must be read at the last step
591
592To verify the instruction cache operation the following test
593scenarios will be used:
594
595 1) Basic test #1
596
597 - turn on the instruction cache
598 - unlock the entire instruction cache
599 - invalidate the instruction cache
600 - lock a branch instruction in the instruction cache
601 - replace the branch instruction with "nop"
602 - jump to the branch instruction
603 - check that the branch instruction was executed
604
605 2) Basic test #2
606
607 - turn on the instruction cache
608 - unlock the entire instruction cache
609 - invalidate the instruction cache
610 - jump to a branch instruction
611 - check that the branch instruction was executed
612 - replace the branch instruction with "nop"
613 - invalidate the instruction cache
614 - jump to the branch instruction
615 - check that the "nop" instruction was executed
616
617The CPU test will run in RAM in order to allow run-time modification
618of the code.
619
6202.2.1.4. Memory test
621
622The memory test will verify RAM using sequential writes and reads
623to/from RAM. Specifically, there will be several test cases that will
624use different patterns to verify RAM. Each test case will first fill
625a region of RAM with one pattern and then read the region back and
626compare its contents with the pattern. The following patterns will be
627used:
628
629 1) zero pattern (0x00000000)
630 2) negative pattern (0xffffffff)
631 3) checkerboard pattern (0x55555555, 0xaaaaaaaa)
632 4) bit-flip pattern ((1 << (offset % 32)), ~(1 << (offset % 32)))
633 5) address pattern (offset, ~offset)
634
635Patterns #1, #2 will help to find unstable bits. Patterns #3, #4 will
636be used to detect adherent bits, i.e. bits whose state may randomly
637change if adjacent bits are modified. The last pattern will be used
638to detect far-located errors, i.e. situations when writing to one
639location modifies an area located far from it. Also, usage of the
640last pattern will help to detect memory controller misconfigurations
641when RAM represents a cyclically repeated portion of a smaller size.
642
643Being run in normal mode, the test will verify only small 4Kb regions
644of RAM around each 1Mb boundary. For example, for 64Mb RAM the
645following areas will be verified: 0x00000000-0x00000800,
6460x000ff800-0x00100800, 0x001ff800-0x00200800, ..., 0x03fff800-
6470x04000000. If the test is run in power-fail mode, it will verify the
648whole RAM.
649
650The memory test will run in ROM before relocating U-Boot to RAM in
651order to allow RAM modification without saving its contents.
652
6532.2.2. Common tests
654
655This section describes tests that are not based on any hardware
656peculiarities and use common U-Boot interfaces only. These tests do
657not need any modifications for porting them to another board/CPU.
658
6592.2.2.1. I2C test
660
661For verifying the I2C bus, a full I2C bus scanning will be performed
662using the i2c_probe() routine. If a board defines
663CONFIG_SYS_POST_I2C_ADDRS the I2C test will pass if all devices
664listed in CONFIG_SYS_POST_I2C_ADDRS are found, and no additional
665devices are detected. If CONFIG_SYS_POST_I2C_ADDRS is not defined
666the test will pass if any I2C device is found.
667
668The CONFIG_SYS_POST_I2C_IGNORES define can be used to list I2C
669devices which may or may not be present when using
670CONFIG_SYS_POST_I2C_ADDRS. The I2C POST test will pass regardless
671if the devices in CONFIG_SYS_POST_I2C_IGNORES are found or not.
672This is useful in cases when I2C devices are optional (eg on a
673daughtercard that may or may not be present) or not critical
674to board operation.
675
6762.2.2.2. Watchdog timer test
677
678To test the watchdog timer the scheme mentioned above (refer to
679section "Hazardous tests") will be used. Namely, this test will be
680marked with the POST_REBOOT bit flag. On the first iteration, the
681test routine will make a 10-second delay. If the system does not
682reboot during this delay, the watchdog timer is not operational and
683the test fails. If the system reboots, on the second iteration the
684POST_REBOOT bit will be set in the flag argument to the test routine.
685The test routine will check this bit and report a success if it is
686set.
687
6882.2.2.3. RTC test
689
690The RTC test will use the rtc_get()/rtc_set() routines. The following
691features will be verified:
692
693 o) Time uniformity
694
695 This will be verified by reading RTC in polling within a short
696 period of time (5-10 seconds).
697
698 o) Passing month boundaries
699
700 This will be checked by setting RTC to a second before a month
701 boundary and reading it after its passing the boundary. The test
702 will be performed for both leap- and nonleap-years.
703
7042.2.3. MPC8xx peripherals tests
705
706This project will develop a set of tests verifying the peripheral
707units of MPC8xx processors. Namely, the following controllers of the
708MPC8xx communication processor module (CPM) will be tested:
709
710 o) Serial Management Controllers (SMC)
711
712 o) Serial Communication Controllers (SCC)
713
7142.2.3.1. Ethernet tests (SCC)
715
716The internal (local) loopback mode will be used to test SCC. To do
717that the controllers will be configured accordingly and several
718packets will be transmitted. These tests may be enhanced in future to
719use external loopback for testing. That will need appropriate
720reconfiguration of the physical interface chip.
721
722The test routines for the SCC ethernet tests will be located in
723arch/powerpc/cpu/mpc8xx/scc.c.
724
7252.2.3.2. UART tests (SMC/SCC)
726
727To perform these tests the internal (local) loopback mode will be
728used. The SMC/SCC controllers will be configured to connect the
729transmitter output to the receiver input. After that, several bytes
730will be transmitted. These tests may be enhanced to make to perform
731"external" loopback test using a loopback cable. In this case, the
732test will be executed manually.
733
734The test routine for the SMC/SCC UART tests will be located in
735arch/powerpc/cpu/mpc8xx/serial.c.
736
7372.2.3.3. USB test
738
739TBD
740
7412.2.3.4. SPI test
742
743TBD
744
README.SNTP
1To use SNTP support, add define CONFIG_CMD_SNTP to the
2configuration file of the board.
3
4The "sntp" command gets network time from NTP time server and
5syncronize RTC of the board. This command needs the command line
6parameter of server's IP address or environment variable
7"ntpserverip". The network time is sent as UTC. So if you want to
8set local time to RTC, set the offset in second from UTC to the
9environment variable "time offset".
10
11If the DHCP server provides time server's IP or time offset, you
12don't need to set the above environment variables yourself.
13
14Current limitations of SNTP support:
151. The roundtrip time is ignored.
162. Only the 1st NTP server IP, in the option ntp-servers of DHCP, will
17 be used.
18
README.SPL
README.TPL
1Generic TPL framework
2=====================
3
4Overview
5--------
6
7TPL---Third Program Loader.
8
9Due to the SPL on some boards(powerpc mpc85xx) has a size limit and cannot
10be compatible with all the external device(e.g. DDR). So add a tertiary
11program loader (TPL) to enable a loader stub loaded by the code from the
12SPL. It loads the final uboot image into DDR, then jump to it to begin
13execution. Now, only the powerpc mpc85xx has this requirement and will
14implemente it.
15
16Keep consistent with SPL, with this framework almost all source files for a
17board can be reused. No code duplication or symlinking is necessary anymore.
18
19How it works
20------------
21
22There has been a directory $(srctree)/spl which contains only a Makefile. The
23Makefile is shared by SPL and TPL.
24
25The object files are built separately for SPL/TPL and placed in the
26directory spl/tpl. The final binaries which are generated are
27u-boot-{spl|tpl}, u-boot-{spl|tpl}.bin and u-boot-{spl|tpl}.map.
28
29During the TPL build a variable named CONFIG_TPL_BUILD is exported in the
30make environment and also appended to CPPFLAGS with -DCONFIG_TPL_BUILD.
31
32The SPL options are shared by SPL and TPL, the board config file should
33determine which SPL options to choose based on whether CONFIG_TPL_BUILD
34is set. Source files can be compiled for TPL with options choosed in the
35board config file.
36
37For example:
38
39spl/Makefile:
40LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/libcommon.o
41
42CONFIG_SPL_LIBCOMMON_SUPPORT is defined in board config file:
43#ifdef CONFIG_TPL_BUILD
44#define CONFIG_SPL_LIBCOMMON_SUPPORT
45#endif
46
README.VLAN
1U-Boot has networking support for VLANs (802.1q), and CDP (Cisco
2Discovery Protocol).
3
4You control the sending/receiving of VLAN tagged packets with the
5"vlan" environmental variable. When not present no tagging is
6performed.
7
8CDP is used mainly to discover your device VLAN(s) when connected to
9a Cisco switch.
10
11Note: In order to enable CDP support a small change is needed in the
12networking driver. You have to enable reception of the
1301:00:0c:cc:cc:cc MAC address which is a multicast address.
14
15Various defines control CDP; see the README section.
16
README.VSC3316-3308
1This file contains API information of the initialization code written for
2Vitesse cross-point devices, VSC3316 and VSC3308 for board B4860QDS
3
4Author: Shaveta Leekha <shaveta@freescale.com>
5
6About Device:
7=============
8VSC 3316/3308 is a low-power, low-cost asynchronous crosspoint switch capable of data rates upto 11.5Gbps.
9
10VSC3316 has 16 input and 16 output ports whereas VSC3308 has 8 input and 8 output ports. Programming of these devices are performed by two-wire or four-wire serial interface.
11
12Initialization:
13===============
14On reset, VSC devices are in low-power state with all inputs, outputs and connections in an off state.
15First thing required is to program it to interface with either two-wire or four-wire interface.
16In our case the interface is two-wire I2C serial interface. So the value in Interface mode register at address 79.h to be written is 0x02 for two-wire interface. Also for crosspoint connections to be activated, 01.h value need to be written in 75.h (core configuration register).
17
18API Overview:
19=============
20
21 vsc_if_enable(u8 vsc_addr):
22 --------------------------
23 This API programs VSC to interface with either two-wire or four-wire interface. In our case the interface is two-wire I2C serial interface. So the value in Interface mode register at address 79.h to be written is 0x02 for two-wire interface.
24 Parameters:
25 vsc_addr - Address of the VSC device on board.
26
27
28 vsc3316_config(u8 vsc_addr, int con_arr[][2], u8 num_con):
29 ---------------------------------------------------------
30 This API configures the VSC3316 device for required connections. Connection through the VSC device requires the inputs and outputs to be properly configured.
31 Connection registers are on page 00. It Configures the selected input and output correctly and join them to make a connection. It also program Input state register, Global input ISE, Global input LOS, Global core control, Output mode register and core control registers etc.
32 vsc3308_config(u8 vsc_addr, int con_arr[][2], u8 num_con) does the essential configurations for VSC3308.
33
34 Parameters:
35 vsc_addr - Address of the VSC device on board.
36 con_arr - connection array
37 num_con - number of connections to be configured
38
39 vsc_wp_config(u8 vsc_addr):
40 --------------------------
41 For crosspoint connections to be activated, 01.h value need to be written in 75.h (core configuration register), which is done by this API.
42 Parameters:
43 vsc_addr - Address of the VSC device on board.
44
README.ag101p
1Andes Technology SoC AG101P
2===========================
3
4AG101P is the mainline SoC produced by Andes Technology using N1213 CPU core
5with FPU and DDR contoller support.
6AG101P has integrated both AHB and APB bus and many periphals for application
7and product development.
8
9ADP-AG101P
10=========
11
12ADP-AG101P is the SoC with AG101 hardcore CPU.
13
14Configurations
15==============
16
17CONFIG_MEM_REMAP:
18 Doing memory remap is essential for preparing some non-OS or RTOS
19 applications.
20
21CONFIG_SKIP_LOWLEVEL_INIT:
22 If you want to boot this system from SPI ROM and bypass e-bios (the
23 other boot loader on ROM). You should undefine CONFIG_SKIP_LOWLEVEL_INIT
24 in "include/configs/adp-ag101p.h".
25
26Build and boot steps
27====================
28
29build:
301. Prepare the toolchains and make sure the $PATH to toolchains is correct.
312. Use `make adp-ag101p_defconfig` in u-boot root to build the image.
32
33Burn u-boot to SPI ROM:
34====================
35
36This section will be added later.
37
README.android-fastboot
1Android Fastboot
2~~~~~~~~~~~~~~~~
3
4Overview
5========
6The protocol that is used over USB is described in
7README.android-fastboot-protocol in same directory.
8
9The current implementation is a minimal support of the erase command,the
10"oem format" command and flash command;it only supports eMMC devices.
11
12Client installation
13===================
14The counterpart to this gadget is the fastboot client which can
15be found in Android's platform/system/core repository in the fastboot
16folder. It runs on Windows, Linux and even OSX. Linux user are lucky since
17they only need libusb.
18Windows users need to bring some time until they have Android SDK (currently
19http://dl.google.com/android/installer_r12-windows.exe) installed. You
20need to install ADB package which contains the required glue libraries for
21accessing USB. Also you need "Google USB driver package" and "SDK platform
22tools". Once installed the usb driver is placed in your SDK folder under
23extras\google\usb_driver. The android_winusb.inf needs a line like
24
25 %SingleBootLoaderInterface% = USB_Install, USB\VID_0451&PID_D022
26
27either in the [Google.NTx86] section for 32bit Windows or [Google.NTamd64]
28for 64bit Windows. VID and PID should match whatever the fastboot is
29advertising.
30
31Board specific
32==============
33The fastboot gadget relies on the USB download gadget, so the following
34options must be configured:
35
36CONFIG_USB_GADGET_DOWNLOAD
37CONFIG_USB_GADGET_VENDOR_NUM
38CONFIG_USB_GADGET_PRODUCT_NUM
39CONFIG_USB_GADGET_MANUFACTURER
40
41NOTE: The CONFIG_USB_GADGET_VENDOR_NUM must be one of the numbers supported by
42the fastboot client. The list of vendor IDs supported can be found in the
43fastboot client source code (fastboot.c) mentioned above.
44
45The fastboot function is enabled by defining CONFIG_USB_FUNCTION_FASTBOOT,
46CONFIG_CMD_FASTBOOT and CONFIG_ANDROID_BOOT_IMAGE.
47
48The fastboot protocol requires a large memory buffer for downloads. This
49buffer should be as large as possible for a platform. The location of the
50buffer and size are set with CONFIG_FASTBOOT_BUF_ADDR and
51CONFIG_FASTBOOT_BUF_SIZE.
52
53Fastboot partition aliases can also be defined for devices where GPT
54limitations prevent user-friendly partition names such as "boot", "system"
55and "cache". Or, where the actual partition name doesn't match a standard
56partition name used commonly with fastboot. Current implentation checks
57aliases when accessing partitions by name (flash_write and erase functions).
58To define a partition alias add an environment variable similar to:
59fastboot_partition_alias_<alias partition name>=<actual partition name>
60Example: fastboot_partition_alias_boot=LNX
61
62Partition Names
63===============
64The Fastboot implementation in U-boot allows to write images into disk
65partitions (currently on eMMC). Target partitions are referred on the host
66computer by their names.
67
68For GPT/EFI the respective partition name is used.
69
70For MBR the partitions are referred by generic names according to the
71following schema:
72
73 <device type> <device index letter> <partition index>
74
75Example: hda3, sdb1, usbda1
76
77The device type is as follows:
78
79 * IDE, ATAPI and SATA disks: hd
80 * SCSI disks: sd
81 * USB media: usbd
82 * MMC and SD cards: mmcsd
83 * Disk on chip: docd
84 * other: xx
85
86The device index starts from 'a' and refers to the interface (e.g. USB
87controller, SD/MMC controller) or disk index. The partition index starts
88from 1 and describes the partition number on the particular device.
89
90Writing Partition Table
91=======================
92Fastboot also allows to write the partition table to the media. This can be
93done by writing the respective partition table image to a special target
94"gpt" or "mbr". These names can be customized by defining the following
95configuration options:
96
97CONFIG_FASTBOOT_GPT_NAME
98CONFIG_FASTBOOT_MBR_NAME
99
100In Action
101=========
102Enter into fastboot by executing the fastboot command in u-boot and you
103should see:
104|GADGET DRIVER: usb_dnl_fastboot
105
106On the client side you can fetch the bootloader version for instance:
107|>fastboot getvar bootloader-version
108|bootloader-version: U-Boot 2014.04-00005-gd24cabc
109|finished. total time: 0.000s
110
111or initiate a reboot:
112|>fastboot reboot
113
114and once the client comes back, the board should reset.
115
116You can also specify a kernel image to boot. You have to either specify
117the an image in Android format _or_ pass a binary kernel and let the
118fastboot client wrap the Android suite around it. On OMAP for instance you
119take zImage kernel and pass it to the fastboot client:
120
121|>fastboot -b 0x80000000 -c "console=ttyO2 earlyprintk root=/dev/ram0
122| mem=128M" boot zImage
123|creating boot image...
124|creating boot image - 1847296 bytes
125|downloading 'boot.img'...
126|OKAY [ 2.766s]
127|booting...
128|OKAY [ -0.000s]
129|finished. total time: 2.766s
130
131and on the gadget side you should see:
132|Starting download of 1847296 bytes
133|........................................................
134|downloading of 1847296 bytes finished
135|Booting kernel..
136|## Booting Android Image at 0x81000000 ...
137|Kernel load addr 0x80008000 size 1801 KiB
138|Kernel command line: console=ttyO2 earlyprintk root=/dev/ram0 mem=128M
139| Loading Kernel Image ... OK
140|OK
141|
142|Starting kernel ...
143
README.android-fastboot-protocol
1FastBoot Version 0.4
2----------------------
3
4The fastboot protocol is a mechanism for communicating with bootloaders
5over USB. It is designed to be very straightforward to implement, to
6allow it to be used across a wide range of devices and from hosts running
7Linux, Windows, or OSX.
8
9
10Basic Requirements
11------------------
12
13* Two bulk endpoints (in, out) are required
14* Max packet size must be 64 bytes for full-speed and 512 bytes for
15 high-speed USB
16* The protocol is entirely host-driven and synchronous (unlike the
17 multi-channel, bi-directional, asynchronous ADB protocol)
18
19
20Transport and Framing
21---------------------
22
231. Host sends a command, which is an ascii string in a single
24 packet no greater than 64 bytes.
25
262. Client response with a single packet no greater than 64 bytes.
27 The first four bytes of the response are "OKAY", "FAIL", "DATA",
28 or "INFO". Additional bytes may contain an (ascii) informative
29 message.
30
31 a. INFO -> the remaining 60 bytes are an informative message
32 (providing progress or diagnostic messages). They should
33 be displayed and then step #2 repeats
34
35 b. FAIL -> the requested command failed. The remaining 60 bytes
36 of the response (if present) provide a textual failure message
37 to present to the user. Stop.
38
39 c. OKAY -> the requested command completed successfully. Go to #5
40
41 d. DATA -> the requested command is ready for the data phase.
42 A DATA response packet will be 12 bytes long, in the form of
43 DATA00000000 where the 8 digit hexidecimal number represents
44 the total data size to transfer.
45
463. Data phase. Depending on the command, the host or client will
47 send the indicated amount of data. Short packets are always
48 acceptable and zero-length packets are ignored. This phase continues
49 until the client has sent or received the number of bytes indicated
50 in the "DATA" response above.
51
524. Client responds with a single packet no greater than 64 bytes.
53 The first four bytes of the response are "OKAY", "FAIL", or "INFO".
54 Similar to #2:
55
56 a. INFO -> display the remaining 60 bytes and return to #4
57
58 b. FAIL -> display the remaining 60 bytes (if present) as a failure
59 reason and consider the command failed. Stop.
60
61 c. OKAY -> success. Go to #5
62
635. Success. Stop.
64
65
66Example Session
67---------------
68
69Host: "getvar:version" request version variable
70
71Client: "OKAY0.4" return version "0.4"
72
73Host: "getvar:nonexistant" request some undefined variable
74
75Client: "OKAY" return value ""
76
77Host: "download:00001234" request to send 0x1234 bytes of data
78
79Client: "DATA00001234" ready to accept data
80
81Host: < 0x1234 bytes > send data
82
83Client: "OKAY" success
84
85Host: "flash:bootloader" request to flash the data to the bootloader
86
87Client: "INFOerasing flash" indicate status / progress
88 "INFOwriting flash"
89 "OKAY" indicate success
90
91Host: "powerdown" send a command
92
93Client: "FAILunknown command" indicate failure
94
95
96Command Reference
97-----------------
98
99* Command parameters are indicated by printf-style escape sequences.
100
101* Commands are ascii strings and sent without the quotes (which are
102 for illustration only here) and without a trailing 0 byte.
103
104* Commands that begin with a lowercase letter are reserved for this
105 specification. OEM-specific commands should not begin with a
106 lowercase letter, to prevent incompatibilities with future specs.
107
108 "getvar:%s" Read a config/version variable from the bootloader.
109 The variable contents will be returned after the
110 OKAY response.
111
112 "download:%08x" Write data to memory which will be later used
113 by "boot", "ramdisk", "flash", etc. The client
114 will reply with "DATA%08x" if it has enough
115 space in RAM or "FAIL" if not. The size of
116 the download is remembered.
117
118 "verify:%08x" Send a digital signature to verify the downloaded
119 data. Required if the bootloader is "secure"
120 otherwise "flash" and "boot" will be ignored.
121
122 "flash:%s" Write the previously downloaded image to the
123 named partition (if possible).
124
125 "erase:%s" Erase the indicated partition (clear to 0xFFs)
126
127 "boot" The previously downloaded data is a boot.img
128 and should be booted according to the normal
129 procedure for a boot.img
130
131 "continue" Continue booting as normal (if possible)
132
133 "reboot" Reboot the device.
134
135 "reboot-bootloader" Reboot back into the bootloader.
136 Useful for upgrade processes that require upgrading
137 the bootloader and then upgrading other partitions
138 using the new bootloader.
139
140 "powerdown" Power off the device.
141
142
143
144Client Variables
145----------------
146
147The "getvar:%s" command is used to read client variables which
148represent various information about the device and the software
149on it.
150
151The various currently defined names are:
152
153 version Version of FastBoot protocol supported.
154 It should be "0.3" for this document.
155
156 version-bootloader Version string for the Bootloader.
157
158 version-baseband Version string of the Baseband Software
159
160 product Name of the product
161
162 serialno Product serial number
163
164 secure If the value is "yes", this is a secure
165 bootloader requiring a signature before
166 it will install or boot images.
167
168Names starting with a lowercase character are reserved by this
169specification. OEM-specific names should not start with lowercase
170characters.
171
README.arm-caches
1Disabling I-cache:
2- Set CONFIG_SYS_ICACHE_OFF
3
4Disabling D-cache:
5- Set CONFIG_SYS_DCACHE_OFF
6
7Enabling I-cache:
8- Make sure CONFIG_SYS_ICACHE_OFF is not set and call icache_enable().
9
10Enabling D-cache:
11- Make sure CONFIG_SYS_DCACHE_OFF is not set and call dcache_enable().
12
13Enabling Caches at System Startup:
14- Implement enable_caches() for your platform and enable the I-cache and
15 D-cache from this function. This function is called immediately
16 after relocation.
17
18Guidelines for Working with D-cache:
19
20Memory to Peripheral DMA:
21- Flush the buffer after the MPU writes the data and before the DMA is
22 initiated.
23
24Peripheral to Memory DMA:
25- Invalidate the buffer before starting the DMA. In case there are any dirty
26 lines from the DMA buffer in the cache, subsequent cache-line replacements
27 may corrupt the buffer in memory while the DMA is still going on. Cache-line
28 replacement can happen if the CPU tries to bring some other memory locations
29 into the cache while the DMA is going on.
30- Invalidate the buffer after the DMA is complete and before the MPU reads
31 it. This may be needed in addition to the invalidation before the DMA
32 mentioned above, because in some processors memory contents can spontaneously
33 come to the cache due to speculative memory access by the CPU. If this
34 happens with the DMA buffer while DMA is going on we have a coherency problem.
35
36Buffer Requirements:
37- Any buffer that is invalidated(that is, typically the peripheral to
38 memory DMA buffer) should be aligned to cache-line boundary both at
39 at the beginning and at the end of the buffer.
40- If the buffer is not cache-line aligned invalidation will be restricted
41 to the aligned part. That is, one cache-line at the respective boundary
42 may be left out while doing invalidation.
43- A suitable buffer can be alloced on the stack using the
44 ALLOC_CACHE_ALIGN_BUFFER macro.
45
46Cleanup Before Linux:
47- cleanup_before_linux() should flush the D-cache, invalidate I-cache, and
48 disable MMU and caches.
49- The following sequence is advisable while disabling d-cache:
50 1. dcache_disable() - flushes and disables d-cache
51 2. invalidate_dcache_all() - invalid any entry that came to the cache
52 in the short period after the cache was flushed but before the
53 cache got disabled.
54
README.arm-relocation
1To make relocation on arm working, the following changes are done:
2
3At arch level: add linker flag -pie
4
5 This causes the linker to generate fixup tables .rel.dyn and .dynsym,
6 which must be applied to the relocated image before transferring
7 control to it.
8
9 These fixups are described in the ARM ELF documentation as type 23
10 (program-base-relative) and 2 (symbol-relative)
11
12At cpu level: modify linker file and add a relocation and fixup loop
13
14 the linker file must be modified to include the .rel.dyn and .dynsym
15 tables in the binary image, and to provide symbols for the relocation
16 code to access these tables
17
18 The relocation and fixup loop must be executed after executing
19 board_init_f at initial location and before executing board_init_r
20 at final location.
21
22At board level:
23
24 dram_init(): bd pointer is now at this point not accessible, so only
25 detect the real dramsize, and store it in gd->ram_size. Bst detected
26 with get_ram_size().
27
28TODO: move also dram initialization there on boards where it is possible.
29
30 Setup of the the bd_t dram bank info is done in the new function
31 dram_init_banksize() called after bd is accessible.
32
33At lib level:
34
35 Board.c code is adapted from ppc code
36
37* WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING *
38
39Boards which are not fixed to support relocation will be REMOVED!
40
41-----------------------------------------------------------------------------
42
43For boards which boot from spl, it is possible to save one copy
44if CONFIG_SYS_TEXT_BASE == relocation address! This prevents that uboot code
45is copied again in relocate_code().
46
47example for the tx25 board booting from NAND Flash:
48
49a) cpu starts
50b) it copies the first page in nand to internal ram
51 (spl code)
52c) end executes this code
53d) this initialize CPU, RAM, ... and copy itself to RAM
54 (this bin must fit in one page, so board_init_f()
55 don;t fit in it ... )
56e) there it copy u-boot to CONFIG_SYS_NAND_U_BOOT_DST and
57 starts this image @ CONFIG_SYS_NAND_U_BOOT_START
58f) u-boot code steps through board_init_f() and calculates
59 the relocation address and copy itself to it
60
61If CONFIG_SYS_TEXT_BASE == relocation address, the copying of u-boot
62in f) could be saved.
63
64-----------------------------------------------------------------------------
65
66TODO
67
68- fill in bd_t infos (check)
69- adapt all boards
70
71- maybe adapt CONFIG_SYS_TEXT_BASE (this must be checked from board maintainers)
72 This *must* be done for boards, which boot from NOR flash
73
74 on other boards if CONFIG_SYS_TEXT_BASE = relocation baseaddr, this saves
75 one copying from u-boot code.
76
77- new function dram_init_banksize() is actual board specific. Maybe
78 we make a weak default function in arch/arm/lib/board.c ?
79
80-----------------------------------------------------------------------------
81
82Relocation with SPL (example for the tx25 booting from NAND Flash):
83
84- cpu copies the first page from NAND to 0xbb000000 (IMX_NFC_BASE)
85 and start with code execution on this address.
86
87- The First page contains u-boot code from drivers/mtd/nand/raw/mxc_nand_spl.c
88 which inits the dram, cpu registers, reloacte itself to CONFIG_SPL_TEXT_BASE and loads
89 the "real" u-boot to CONFIG_SYS_NAND_U_BOOT_DST and starts execution
90 @CONFIG_SYS_NAND_U_BOOT_START
91
92- This u-boot does no RAM init, nor CPU register setup. Just look
93 where it has to copy and relocate itself to this address. If
94 relocate address = CONFIG_SYS_TEXT_BASE (not the same, as the
95 CONFIG_SPL_TEXT_BASE from the spl code), then there is no need
96 to copy, just go on with bss clear and jump to board_init_r.
97
98-----------------------------------------------------------------------------
99
100How ELF relocations 23 and 2 work.
101
102TBC
103
104-------------------------------------------------------------------------------------
105
106Debugging u-boot in RAM:
107(example on the qong board)
108
109-----------------
110
111a) start debugger
112
113arm-linux-gdb u-boot
114
115[hs@pollux u-boot]$ arm-linux-gdb u-boot
116GNU gdb Red Hat Linux (6.7-2rh)
117Copyright (C) 2007 Free Software Foundation, Inc.
118License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
119This is free software: you are free to change and redistribute it.
120There is NO WARRANTY, to the extent permitted by law. Type "show copying"
121and "show warranty" for details.
122This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux".
123The target architecture is set automatically (currently arm)
124..
125(gdb)
126
127-----------------
128
129b) connect to target
130
131target remote bdi10:2001
132
133(gdb) target remote bdi10:2001
134Remote debugging using bdi10:2001
1350x8ff17f10 in ?? ()
136(gdb)
137
138-----------------
139
140c) discard symbol-file
141
142(gdb) symbol-file
143Discard symbol table from `/home/hs/celf/u-boot/u-boot'? (y or n) y
144No symbol file now.
145(gdb)
146
147-----------------
148
149d) load new symbol table:
150
151(gdb) add-symbol-file u-boot 0x8ff08000
152add symbol table from file "u-boot" at
153 .text_addr = 0x8ff08000
154(y or n) y
155Reading symbols from /home/hs/celf/u-boot/u-boot...done.
156(gdb) c
157Continuing.
158^C
159Program received signal SIGSTOP, Stopped (signal).
1600x8ff17f18 in serial_getc () at serial_mxc.c:192
161192 while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY);
162(gdb)
163
164add-symbol-file u-boot 0x8ff08000
165 ^^^^^^^^^^
166 get this address from u-boot bdinfo command
167 or get it from gd->relocaddr in gdb
168
169 => bdinfo
170rch_number = XXXXXXXXXX
171boot_params = XXXXXXXXXX
172DRAM bank = XXXXXXXXXX
173-> start = XXXXXXXXXX
174-> size = XXXXXXXXXX
175ethaddr = XXXXXXXXXX
176ip_addr = XXXXXXXXXX
177baudrate = XXXXXXXXXX
178TLB addr = XXXXXXXXXX
179relocaddr = 0x8ff08000
180 ^^^^^^^^^^
181reloc off = XXXXXXXXXX
182irq_sp = XXXXXXXXXX
183sp start = XXXXXXXXXX
184FB base = XXXXXXXXXX
185
186or interrupt execution by any means and re-load the symbols at the location
187specified by gd->relocaddr -- this is only valid after board_init_f.
188
189(gdb) set $s = gd->relocaddr
190(gdb) symbol-file
191(gdb) add-symbol-file u-boot $s
192
193Now you can use gdb as usual :-)
194
README.arm64
1U-Boot for arm64
2
3Summary
4=======
5The initial arm64 U-Boot port was developed before hardware was available,
6so the first supported platforms were the Foundation and Fast Model for ARMv8.
7These days U-Boot runs on a variety of 64-bit capable ARM hardware, from
8embedded development boards to servers.
9
10Notes
11=====
12
131. U-Boot can run at any exception level it is entered in, it is
14 recommened to enter it in EL3 if U-Boot takes some responsibilities of a
15 classical firmware (like initial hardware setup, CPU errata workarounds
16 or SMP bringup). U-Boot can be entered in EL2 when its main purpose is
17 that of a boot loader. It can drop to lower exception levels before
18 entering the OS.
19
202. U-Boot for arm64 is compiled with AArch64-gcc. AArch64-gcc
21 use rela relocation format, a tool(tools/relocate-rela) by Scott Wood
22 is used to encode the initial addend of rela to u-boot.bin. After running,
23 the U-Boot will be relocated to destination again.
24
253. Earlier Linux kernel versions required the FDT to be placed at a
26 2 MB boundary and within the same 512 MB section as the kernel image,
27 resulting in fdt_high to be defined specially.
28 Since kernel version 4.2 Linux is more relaxed about the DT location, so it
29 can be placed anywhere in memory.
30 Please reference linux/Documentation/arm64/booting.txt for detail.
31
324. Spin-table is used to wake up secondary processors. One location
33 (or per processor location) is defined to hold the kernel entry point
34 for secondary processors. It must be ensured that the location is
35 accessible and zero immediately after secondary processor
36 enter slave_cpu branch execution in start.S. The location address
37 is encoded in cpu node of DTS. Linux kernel store the entry point
38 of secondary processors to it and send event to wakeup secondary
39 processors.
40 Please reference linux/Documentation/arm64/booting.txt for detail.
41
425. Generic board is supported.
43
446. CONFIG_ARM64 instead of CONFIG_ARMV8 is used to distinguish aarch64 and
45 aarch32 specific codes.
46
47
48Contributors
49============
50 Tom Rini <trini@ti.com>
51 Scott Wood <scottwood@freescale.com>
52 York Sun <yorksun@freescale.com>
53 Simon Glass <sjg@chromium.org>
54 Sharma Bhupesh <bhupesh.sharma@freescale.com>
55 Rob Herring <robherring2@gmail.com>
56 Sergey Temerkhanov <s.temerkhanov@gmail.com>
57
README.armada-secureboot
1The trusted boot framework on Marvell Armada 38x
2================================================
3
4Contents:
5
61. Overview of the trusted boot
72. Terminology
83. Boot image layout
94. The secured header
105. The secured boot flow
116. Usage example
127. Work to be done
138. Bibliography
14
151. Overview of the trusted boot
16-------------------------------
17
18The Armada's trusted boot framework enables the SoC to cryptographically verify
19a specially prepared boot image. This can be used to establish a chain of trust
20from the boot firmware all the way to the OS.
21
22To achieve this, the Armada SoC requires a specially prepared boot image, which
23contains the relevant cryptographic data, as well as other information
24pertaining to the boot process. Furthermore, a eFuse structure (a
25one-time-writeable memory) need to be configured in the correct way.
26
27Roughly, the secure boot process works as follows:
28
29* Load the header block of the boot image, extract a special "root" public RSA
30 key from it, and verify its SHA-256 hash against a SHA-256 stored in a eFuse
31 field.
32* Load an array of code signing public RSA keys from the header block, and
33 verify its RSA signature (contained in the header block as well) using the
34 "root" RSA key.
35* Choose a code signing key, and use it to verify the header block (excluding
36 the key array).
37* Verify the binary image's signature (contained in the header block) using the
38 code signing key.
39* If all checks pass successfully, boot the image.
40
41The chain of trust is thus as follows:
42
43* The SHA-256 value in the eFuse field verifies the "root" public key.
44* The "root" public key verifies the code signing key array.
45* The selected code signing key verifies the header block and the binary image.
46
47In the special case of building a boot image containing U-Boot as the binary
48image, which employs this trusted boot framework, the following tasks need to
49be addressed:
50
511. Creation of the needed cryptographic key material.
522. Creation of a conforming boot image containing the U-Boot image as binary
53 image.
543. Burning the necessary eFuse values.
55
56(1) will be addressed later, (2) will be taken care of by U-Boot's build
57system (some user configuration is required, though), and for (3) the necessary
58data (essentially a series of U-Boot commands to be entered at the U-Boot
59command prompt) will be created by the build system as well.
60
61The documentation of the trusted boot mode is contained in part 1, chapter
627.2.5 in the functional specification [1], and in application note [2].
63
642. Terminology
65--------------
66
67 CSK - Code Signing Key(s): An array of RSA key pairs, which
68 are used to sign and verify the secured header and the
69 boot loader image.
70 KAK - Key Authentication Key: A RSA key pair, which is used
71 to sign and verify the array of CSKs.
72 Header block - The first part of the boot image, which contains the
73 image's headers (also known as "headers block", "boot
74 header", and "image header")
75 eFuse - A one-time-writeable memory.
76 BootROM - The Armada's built-in boot firmware, which is
77 responsible for verifying and starting secure images.
78 Boot image - The complete image the SoC's boot firmware loads
79 (contains the header block and the binary image)
80 Main header - The header in the header block containing information
81 and data pertaining to the boot process (used for both
82 the regular and secured boot processes)
83 Binary image - The binary code payload of the boot image; in this
84 case the U-Boot's code (also known as "source image",
85 or just "image")
86 Secured header - The specialized header in the header block that
87 contains information and data pertaining to the
88 trusted boot (also known as "security header")
89 Secured boot mode - A special boot mode of the Armada SoC in which secured
90 images are verified (non-secure images won't boot);
91 the mode is activated by setting a eFuse field.
92 Trusted debug mode - A special mode for the trusted boot that allows
93 debugging of devices employing the trusted boot
94 framework in a secure manner (untested in the current
95 implementation).
96Trusted boot framework - The ARMADA SoC's implementation of a secure verified
97 boot process.
98
993. Boot image layout
100--------------------
101
102+-- Boot image --------------------------------------------+
103| |
104| +-- Header block --------------------------------------+ |
105| | Main header | |
106| +------------------------------------------------------+ |
107| | Secured header | |
108| +------------------------------------------------------+ |
109| | BIN header(s) | |
110| +------------------------------------------------------+ |
111| | REG header(s) | |
112| +------------------------------------------------------+ |
113| | Padding | |
114| +------------------------------------------------------+ |
115| |
116| +------------------------------------------------------+ |
117| | Binary image + checksum | |
118| +------------------------------------------------------+ |
119+----------------------------------------------------------+
120
1214. The secured header
122---------------------
123
124For the trusted boot framework, a additional header is added to the boot image.
125The following data are relevant for the secure boot:
126
127 KAK: The KAK is contained in the secured header in the form
128 of a RSA-2048 public key in DER format with a length of
129 524 bytes.
130Header block signature: The RSA signature of the header block (excluding the
131 CSK array), created using the selected CSK.
132Binary image signature: The RSA signature of the binary image, created using
133 the selected CSK.
134 CSK array: The array of the 16 CSKs as RSA-2048 public keys in DER
135 format with a length of 8384 = 16 * 524 bytes.
136 CSK block signature: The RSA signature of the CSK array, created using the
137 KAK.
138
139NOTE: The JTAG delay, Box ID, and Flash ID header fields do play a role in the
140trusted boot process to enable and configure secure debugging, but they were
141not tested in the current implementation of the trusted boot in U-Boot.
142
1435. The secured boot flow
144------------------------
145
146The steps in the boot flow that are relevant for the trusted boot framework
147proceed as follows:
148
1491) Check if trusted boot is enabled, and perform regular boot if it is not.
1502) Load the secured header, and verify its checksum.
1513) Select the lowest valid CSK from CSK0 to CSK15.
1524) Verify the SHA-256 hash of the KAK embedded in the secured header.
1535) Verify the RSA signature of the CSK block from the secured header with the
154 KAK.
1556) Verify the header block signature (which excludes the CSK block) from the
156 secured header with the selected CSK.
1577) Load the binary image to the main memory and verify its checksum.
1588) Verify the binary image's RSA signature from the secured header with the
159 selected CSK.
1609) Continue the boot process as in the case of the regular boot.
161
162NOTE: All RSA signatures are verified according to the PKCS #1 v2.1 standard
163described in [3].
164
165NOTE: The Box ID and Flash ID are checked after step 6, and the trusted debug
166mode may be entered there, but since this mode is untested in the current
167implementation, it is not described further.
168
1696. Usage example
170----------------
171
172### Create key material
173
174To employ the trusted boot framework, cryptographic key material needs to be
175created. In the current implementation, two keys are needed to build a valid
176secured boot image: The KAK private key and a CSK private key (both have to be
1772048 bit RSA keys in PEM format). Note that the usage of more than one CSK is
178currently not supported.
179
180NOTE: Since the public key can be generated from the private key, it is
181sufficient to store the private key for each key pair.
182
183OpenSSL can be used to generate the needed files kwb_kak.key and kwb_csk.key
184(the names of these files have to be configured, see the next section on
185kwbimage.cfg settings):
186
187openssl genrsa -out kwb_kak.key 2048
188openssl genrsa -out kwb_csk.key 2048
189
190The generated files have to be placed in the U-Boot root directory.
191
192Alternatively, instead of copying the files, symlinks to the private keys can
193be placed in the U-Boot root directory.
194
195WARNING: Knowledge of the KAK or CSK private key would enable an attacker to
196generate secured boot images containing arbitrary code. Hence, the private keys
197should be carefully guarded.
198
199### Create/Modifiy kwbimage.cfg
200
201The Kirkwook architecture in U-Boot employs a special board-specific
202configuration file (kwbimage.cfg), which controls various boot image settings
203that are interpreted by the BootROM, such as the boot medium. The support the
204trusted boot framework, several new options were added to faciliate
205configuration of the secured boot.
206
207The configuration file's layout has been retained, only the following new
208options were added:
209
210 KAK - The name of the KAK RSA private key file in the U-Boot
211 root directory, without the trailing extension of ".key".
212 CSK - The name of the (active) CSK RSA private key file in the
213 U-Boot root directory, without the trailing extension of
214 ".key".
215 BOX_ID - The BoxID to be used for trusted debugging (a integer
216 value).
217 FLASH_ID - The FlashID to be used for trusted debugging (a integer
218 value).
219 JTAG_DELAY - The JTAG delay to be used for trusted debugging (a
220 integer value).
221 CSK_INDEX - The index of the active CSK (a integer value).
222SEC_SPECIALIZED_IMG - Flag to indicate whether to include the BoxID and FlashID
223 in the image (that is, whether to use the trusted debug
224 mode or not); no parameters.
225 SEC_BOOT_DEV - The boot device from which the trusted boot is allowed to
226 proceed, identified via a numeric ID. The tested values
227 are 0x34 = NOR flash, 0x31 = SDIO/MMC card; for
228 additional ID values, consult the documentation in [1].
229 SEC_FUSE_DUMP - Dump the "fuse prog" commands necessary for writing the
230 correct eFuse values to a text file in the U-Boot root
231 directory. The parameter is the architecture for which to
232 dump the commands (currently only "a38x" is supported).
233
234The parameter values may be hardcoded into the file, but it is also possible to
235employ a dynamic approach of creating a Autoconf-like kwbimage.cfg.in, then
236reading configuration values from Kconfig options or from the board config
237file, and generating the actual kwbimage.cfg from this template using Makefile
238mechanisms (see board/gdsys/a38x/Makefile as an example for this approach).
239
240### Set config options
241
242To enable the generation of trusted boot images, the corresponding support
243needs to be activated, and a index for the active CSK needs to be selected as
244well.
245
246Furthermore, eFuse writing support has to be activated in order to burn the
247eFuse structure's values (this option is just needed for programming the eFuse
248structure; production boot images may disable it).
249
250ARM architecture
251 -> [*] Build image for trusted boot
252 (0) Index of active CSK
253 -> [*] Enable eFuse support
254 [ ] Fake eFuse access (dry run)
255
256### Build and test boot image
257
258The creation of the boot image is done via the usual invocation of make (with a
259suitably set CROSS_COMPILE environment variable, of course). The resulting boot
260image u-boot-spl.kwb can then be tested, if so desired. The hdrparser from [5]
261can be used for this purpose. To build the tool, invoke make in the
262'tools/marvell/doimage_mv' directory of [5], which builds a stand-alone
263hdrparser executable. A test can be conducted by calling hdrparser with the
264produced boot image and the following (mandatory) parameters:
265
266./hdrparser -k 0 -t u-boot-spl.kwb
267
268Here we assume that the CSK index is 0 and the boot image file resides in the
269same directory (adapt accordingly if needed). The tool should report that all
270checksums are valid ("GOOD"), that all signature verifications succeed
271("PASSED"), and, finally, that the overall test was successful
272("T E S T S U C C E E D E D" in the last line of output).
273
274### Burn eFuse structure
275
276+----------------------------------------------------------+
277| WARNING: Burning the eFuse structure is a irreversible |
278| operation! Should wrong or corrupted values be used, the |
279| board won't boot anymore, and recovery is likely |
280| impossible! |
281+----------------------------------------------------------+
282
283After the build process has finished, and the SEC_FUSE_DUMP option was set in
284the kwbimage.cfg was set, a text file kwb_fuses_a38x.txt should be present in
285the U-Boot top-level directory. It contains all the necessary commands to set
286the eFuse structure to the values needed for the used KAK digest, as well as
287the CSK index, Flash ID and Box ID that were selected in kwbimage.cfg.
288
289Sequentially executing the commands in this file at the U-Boot command prompt
290will write these values to the eFuse structure.
291
292If the SEC_FUSE_DUMP option was not set, the commands needed to burn the fuses
293have to be crafted by hand. The needed fuse lines can be looked up in [1]; a
294rough overview of the process is:
295
296* Burn the KAK public key hash. The hash itself can be found in the file
297 pub_kak_hash.txt in the U-Boot top-level directory; be careful to account for
298 the endianness!
299* Burn the CSK selection, BoxID, and FlashID
300* Enable trusted boot by burning the corresponding fuse (WARNING: this must be
301 the last fuse line written!)
302* Lock the unused fuse lines
303
304The command to employ is the "fuse prog" command previously enabled by setting
305the corresponding configuration option.
306
307For the trusted boot, the fuse prog command has a special syntax, since the
308ARMADA SoC demands that whole fuse lines (64 bit values) have to be written as
309a whole. The fuse prog command itself allows lists of 32 bit words to be
310written at a time, but this is translated to a series of single 32 bit write
311operations to the fuse line, where the individual 32 bit words are identified
312by a "word" counter that is increased for each write.
313
314To work around this restriction, we interpret each line to have three "words"
315(0-2): The first and second words are the values to be written to the fuse
316line, and the third is a lock flag, which is supposed to lock the fuse line
317when set to 1. Writes to the first and second words are memoized between
318function calls, and the fuse line is only really written and locked (on writing
319the third word) if both words were previously set, so that "incomplete" writes
320are prevented. An exception to this is a single write to the third word (index
3212) without previously writing neither the first nor the second word, which
322locks the fuse line without setting any value; this is needed to lock the
323unused fuse lines.
324
325As an example, to write the value 0011223344556677 to fuse line 10, we would
326use the following command:
327
328fuse prog -y 10 0 00112233 44556677 1
329
330Here 10 is the fuse line number, 0 is the index of the first word to be
331written, 00112233 and 44556677 are the values to be written to the fuse line
332(first and second word) and the trailing 1 is the value for the third word
333responsible for locking the line.
334
335A "lock-only" command would look like this:
336
337fuse prog -y 11 2 1
338
339Here 11 is the fuse number, 2 is the index of the first word to be written
340(notice that we only write to word 2 here; the third word for fuse line
341locking), and the 1 is the value for the word we are writing to.
342
343WARNING: According to application note [4], the VHV pin of the SoC must be
344connected to a 1.8V source during eFuse programming, but *must* be disconnected
345for normal operation. The AN [4] describes a software-controlled circuit (based
346on a N-channel or P-channel FET and a free GPIO pin of the SoC) to achieve
347this, but a jumper-based circuit should suffice as well. Regardless of the
348chosen circuit, the issue needs to be addressed accordingly!
349
3507. Work to be done
351------------------
352
353* Add the ability to populate more than one CSK
354* Test secure debug
355* Test on Armada XP
356
3578. Bibliography
358---------------
359
360[1] ARMADA(R) 38x Family High-Performance Single/Dual CPU System on Chip
361 Functional Specification; MV-S109094-00, Rev. C; August 2, 2015,
362 Preliminary
363[2] AN-383: ARMADA(R) 38x Families Secure Boot Mode Support; MV-S302501-00
364 Rev. A; March 11, 2015, Preliminary
365[3] Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography
366 Specifications Version 2.1; February 2003;
367 https://www.ietf.org/rfc/rfc3447.txt
368[4] AN-389: ARMADA(R) VHV Power; MV-S302545-00 Rev. B; January 28, 2016,
369 Released
370[5] Marvell Armada 38x U-Boot support; November 25, 2015;
371 https://github.com/MarvellEmbeddedProcessors/u-boot-marvell
372
3732017-01-05, Mario Six <mario.six@gdsys.cc>
374
README.at91
1Atmel AT91 Evaluation kits
2
3Index
4 - I. Board mapping & boot media
5 - II. NAND partition table
6 - III. watchdog support
7
8I. Board mapping & boot media
9------------------------------------------------------------------------------
10AT91SAM9260EK, AT91SAM9G20EK & AT91SAM9XEEK
11------------------------------------------------------------------------------
12
13Memory map
14 0x20000000 - 23FFFFFF SDRAM (64 MB)
15 0xC0000000 - Cxxxxxxx Atmel Dataflash card (J13)
16 0xD0000000 - D07FFFFF Soldered Atmel Dataflash (AT45DB642)
17
18Environment variables
19
20 U-Boot environment variables can be stored at different places:
21 - Dataflash on SPI chip select 1 (default)
22 - Dataflash on SPI chip select 0 (dataflash card)
23 - Nand flash.
24
25 You can choose your storage location at config step (here for at91sam9260ek) :
26 make at91sam9260ek_nandflash_config - use nand flash
27 make at91sam9260ek_dataflash_cs0_config - use data flash (spi cs0)
28 make at91sam9260ek_dataflash_cs1_config - use data flash (spi cs1)
29
30
31------------------------------------------------------------------------------
32AT91SAM9261EK, AT91SAM9G10EK
33------------------------------------------------------------------------------
34
35Memory map
36 0x20000000 - 23FFFFFF SDRAM (64 MB)
37 0xC0000000 - C07FFFFF Soldered Atmel Dataflash (AT45DB642)
38 0xD0000000 - Dxxxxxxx Atmel Dataflash card (J22)
39
40Environment variables
41
42 U-Boot environment variables can be stored at different places:
43 - Dataflash on SPI chip select 0 (default)
44 - Dataflash on SPI chip select 3 (dataflash card)
45 - Nand flash.
46
47 You can choose your storage location at config step (here for at91sam9260ek) :
48 make at91sam9261ek_nandflash_config - use nand flash
49 make at91sam9261ek_dataflash_cs0_config - use data flash (spi cs0)
50 make at91sam9261ek_dataflash_cs3_config - use data flash (spi cs3)
51
52
53------------------------------------------------------------------------------
54AT91SAM9263EK
55------------------------------------------------------------------------------
56
57Memory map
58 0x20000000 - 23FFFFFF SDRAM (64 MB)
59 0xC0000000 - Cxxxxxxx Atmel Dataflash card (J9)
60
61Environment variables
62
63 U-Boot environment variables can be stored at different places:
64 - Dataflash on SPI chip select 0 (dataflash card)
65 - Nand flash.
66 - Nor flash (not populate by default)
67
68 You can choose your storage location at config step (here for at91sam9260ek) :
69 make at91sam9263ek_nandflash_config - use nand flash
70 make at91sam9263ek_dataflash_cs0_config - use data flash (spi cs0)
71 make at91sam9263ek_norflash_config - use nor flash
72
73 You can choose to boot directly from U-Boot at config step
74 make at91sam9263ek_norflash_boot_config - boot from nor flash
75
76
77------------------------------------------------------------------------------
78AT91SAM9M10G45EK
79------------------------------------------------------------------------------
80
81Memory map
82 0x70000000 - 77FFFFFF SDRAM (128 MB)
83
84Environment variables
85
86 U-Boot environment variables can be stored at different places:
87 - Nand flash.
88
89 You can choose your storage location at config step (here for at91sam9m10g45ek) :
90 make at91sam9m10g45ek_nandflash_config - use nand flash
91
92
93------------------------------------------------------------------------------
94AT91SAM9RLEK
95------------------------------------------------------------------------------
96
97Memory map
98 0x20000000 - 23FFFFFF SDRAM (64 MB)
99 0xC0000000 - C07FFFFF Soldered Atmel Dataflash (AT45DB642)
100
101Environment variables
102
103 U-Boot environment variables can be stored at different places:
104 - Dataflash on SPI chip select 0
105 - Nand flash.
106
107 You can choose your storage location at config step (here for at91sam9rlek) :
108 make at91sam9rlek_nandflash_config - use nand flash
109
110
111------------------------------------------------------------------------------
112AT91SAM9N12EK, AT91SAM9X5EK
113------------------------------------------------------------------------------
114
115Memory map
116 0x20000000 - 27FFFFFF SDRAM (128 MB)
117
118Environment variables
119
120 U-Boot environment variables can be stored at different places:
121 - Nand flash.
122 - SD/MMC card
123 - Serialflash/Dataflash on SPI chip select 0
124
125 You can choose your storage location at config step (here for at91sam9x5ek) :
126 make at91sam9x5ek_dataflash_config - use data flash
127 make at91sam9x5ek_mmc_config - use sd/mmc card
128 make at91sam9x5ek_nandflash_config - use nand flash
129 make at91sam9x5ek_spiflash_config - use serial flash
130
131
132------------------------------------------------------------------------------
133SAMA5D3XEK
134------------------------------------------------------------------------------
135
136Memory map
137 0x20000000 - 3FFFFFFF SDRAM (512 MB)
138
139Environment variables
140
141 U-Boot environment variables can be stored at different places:
142 - Nand flash.
143 - SD/MMC card
144 - Serialflash on SPI chip select 0
145
146 You can choose your storage location at config step (here for sama5d3xek) :
147 make sama5d3xek_mmc_config - use SD/MMC card
148 make sama5d3xek_nandflash_config - use nand flash
149 make sama5d3xek_serialflash_config - use serial flash
150
151
152II. NAND partition table
153
154 All the board support boot from NAND flash will use the following NAND
155 partition table
156
157 0x00000000 - 0x0003FFFF bootstrap (256 KiB)
158 0x00040000 - 0x000BFFFF u-boot (512 KiB)
159 0x000C0000 - 0x000FFFFF env (256 KiB)
160 0x00100000 - 0x0013FFFF env_redundant (256 KiB)
161 0x00140000 - 0x0017FFFF spare (256 KiB)
162 0x00180000 - 0x001FFFFF dtb (512 KiB)
163 0x00200000 - 0x007FFFFF kernel (6 MiB)
164 0x00800000 - 0xxxxxxxxx rootfs (All left)
165
166III. Watchdog support
167
168 For security reasons, the at91 watchdog is running at boot time and,
169 if deactivated, cannot be used anymore.
170 If you want to use the watchdog, you will need to keep it running in
171 your code (make sure not to disable it in AT91Bootstrap for instance).
172
173 In the U-Boot configuration, the AT91 watchdog support is enabled using
174 the CONFIG_AT91SAM9_WATCHDOG and CONFIG_HW_WATCHDOG options.
175
README.atmel_mci
1How to use SD/MMC cards with Atmel SoCs having MCI hardware
2-----------------------------------------------------------
32010-08-16 Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
4
5This is a new approach to use Atmel MCI hardware with the
6general MMC framework. Therefore it benefits from that
7framework's abilities to handle SDHC Cards and the ability
8to write blocks.
9
10- AT91SAM9XE512 (tested, will definitely work with XE128 and XE256)
11- AT91SAM9260 (not tested, but MCI is to AT91SAM9XE)
12- AT91SAM9G20 (not tested, should work)
13
14It should work with all other ATMEL devices that have MCI.
15
16The generic driver does NOT assign port pins to the MCI block
17nor does it start the MCI clock. This has to be handled in a
18board/SoC specific manner before the driver is initialized:
19
20example: this is added to at91sam9260_devices.c:
21
22#if defined(CONFIG_GENERIC_ATMEL_MCI)
23void at91_mci_hw_init(void)
24{
25 at91_set_a_periph(AT91_PIO_PORTA, 8, PUP); /* MCCK */
26#if defined(CONFIG_ATMEL_MCI_PORTB)
27 at91_set_b_periph(AT91_PIO_PORTA, 1, PUP); /* MCCDB */
28 at91_set_b_periph(AT91_PIO_PORTA, 0, PUP); /* MCDB0 */
29 at91_set_b_periph(AT91_PIO_PORTA, 5, PUP); /* MCDB1 */
30 at91_set_b_periph(AT91_PIO_PORTA, 4, PUP); /* MCDB2 */
31 at91_set_b_periph(AT91_PIO_PORTA, 3, PUP); /* MCDB3 */
32#else
33 at91_set_a_periph(AT91_PIO_PORTA, 7, PUP); /* MCCDA */
34 at91_set_a_periph(AT91_PIO_PORTA, 6, PUP); /* MCDA0 */
35 at91_set_a_periph(AT91_PIO_PORTA, 9, PUP); /* MCDA1 */
36 at91_set_a_periph(AT91_PIO_PORTA, 10, PUP); /* MCDA2 */
37 at91_set_a_periph(AT91_PIO_PORTA, 11, PUP); /* MCDA3 */
38#endif
39}
40#endif
41
42the board specific file need added:
43...
44#ifdef CONFIG_GENERIC_ATMEL_MCI
45# include <mmc.h>
46#endif
47...
48#ifdef CONFIG_GENERIC_ATMEL_MCI
49/* this is a weak define that we are overriding */
50int board_mmc_init(bd_t *bd)
51{
52 /* Enable clock */
53 at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
54 at91_mci_hw_init();
55
56 /* This calls the atmel_mci_init in gen_atmel_mci.c */
57 return atmel_mci_init((void *)AT91_BASE_MCI);
58}
59
60/* this is a weak define that we are overriding */
61int board_mmc_getcd(struct mmc *mmc)
62{
63 return !at91_get_gpio_value(CONFIG_SYS_MMC_CD_PIN);
64}
65
66#endif
67
68and the board definition files needs:
69
70/* SD/MMC card */
71#define CONFIG_GENERIC_ATMEL_MCI 1
72#define CONFIG_ATMEL_MCI_PORTB 1 /* Atmel XE-EK uses port B */
73#define CONFIG_SYS_MMC_CD_PIN AT91_PIN_PC9
74#define CONFIG_CMD_MMC 1
75
README.atmel_pmecc
1How to enable PMECC(Programmable Multibit ECC) for nand on Atmel SoCs
2-----------------------------------------------------------
32012-08-22 Josh Wu <josh.wu@atmel.com>
4
5The Programmable Multibit ECC (PMECC) controller is a programmable binary
6BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. This controller
7can be used to support both SLC and MLC NAND Flash devices. It supports to
8generate ECC to correct 2, 4, 8, 12 or 24 bits of error per sector (512 or
91024 bytes) of data.
10
11Following Atmel AT91 products support PMECC.
12- AT91SAM9X25, X35, G25, G15, G35 (tested)
13- AT91SAM9N12 (not tested, Should work)
14
15As soon as your nand flash software ECC works, you can enable PMECC.
16
17To use PMECC in this driver, the user needs to set:
18 1. the PMECC correction error bits capability: CONFIG_PMECC_CAP.
19 It can be 2, 4, 8, 12 or 24.
20 2. The PMECC sector size: CONFIG_PMECC_SECTOR_SIZE.
21 It only can be 512 or 1024.
22
23Take 'configs/at91sam9x5ek_nandflash_defconfig' as an example, the board
24configuration file has the following entries:
25
26 CONFIG_PMECC_CAP=2
27 CONFIG_PMECC_SECTOR_SIZE=512
28 CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
29
30How to enable PMECC header for direct programmable boot.bin
31-----------------------------------------------------------
322014-05-19 Andreas Bießmann <andreas@biessmann.org>
33
34The usual way to program SPL into NAND flash is to use the SAM-BA Atmel tool.
35This however is often not usable when doing field updates. To be able to
36program a SPL binary into NAND flash we need to add the PMECC header to the
37binary before. Chapter '12.4.4.1 NAND Flash Boot: NAND Flash Detection' in
38sama5d3 SoC spec (as of 03. April 2014) defines how this PMECC header has to
39look like. In order to do so we have a new image type added to mkimage to
40generate this PMECC header and integrated this into the build process of SPL.
41
42To enable the generation of atmel PMECC header for SPL one needs to define
43CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER. The required parameters are taken from
44board configuration and compiled into the host tools atmel_pmecc_params. This
45tool will be called in build process to parametrize mkimage for atmelimage
46type. The mkimage tool has intentionally _not_ compiled in those parameters.
47
48The mkimage image type atmelimage also set the 6'th interrupt vector to the
49correct value. This feature can also be used to setup a boot.bin for MMC boot.
50
README.autoboot
1/*
2 * (C) Copyright 2001
3 * Dave Ellis, SIXNET, dge@sixnetio.com
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8Using autoboot configuration options
9====================================
10
11The basic autoboot configuration options are documented in the main
12U-Boot README. See it for details. They are:
13
14 bootdelay
15 bootcmd
16 CONFIG_BOOTDELAY
17 CONFIG_BOOTCOMMAND
18
19Some additional options that make autoboot safer in a production
20product are documented here.
21
22Why use them?
23-------------
24
25The basic autoboot feature allows a system to automatically boot to
26the real application (such as Linux) without a user having to enter
27any commands. If any key is pressed before the boot delay time
28expires, U-Boot stops the autoboot process, gives a U-Boot prompt
29and waits forever for a command. That's a good thing if you pressed a
30key because you wanted to get the prompt.
31
32It's not so good if the key press was a stray character on the
33console serial port, say because a user who knows nothing about
34U-Boot pressed a key before the system had time to boot. It's even
35worse on an embedded product that doesn't have a console during
36normal use. The modem plugged into that console port sends a
37character at the wrong time and the system hangs, with no clue as to
38why it isn't working.
39
40You might want the system to autoboot to recover after an external
41configuration program stops autoboot. If the configuration program
42dies or loses its connection (modems can disconnect at the worst
43time) U-Boot will patiently wait forever for it to finish.
44
45These additional configuration options can help provide a system that
46boots when it should, but still allows access to U-Boot.
47
48What they do
49------------
50
51 CONFIG_BOOT_RETRY_TIME
52 CONFIG_BOOT_RETRY_MIN
53
54 "bootretry" environment variable
55
56 These options determine what happens after autoboot is
57 stopped and U-Boot is waiting for commands.
58
59 CONFIG_BOOT_RETRY_TIME must be defined to enable the boot
60 retry feature. If the environment variable "bootretry" is
61 found then its value is used, otherwise the retry timeout is
62 CONFIG_BOOT_RETRY_TIME. CONFIG_BOOT_RETRY_MIN is optional and
63 defaults to CONFIG_BOOT_RETRY_TIME. All times are in seconds.
64
65 If the retry timeout is negative, the U-Boot command prompt
66 never times out. Otherwise it is forced to be at least
67 CONFIG_BOOT_RETRY_MIN seconds. If no valid U-Boot command is
68 entered before the specified time the boot delay sequence is
69 restarted. Each command that U-Boot executes restarts the
70 timeout.
71
72 If CONFIG_BOOT_RETRY_TIME < 0 the feature is there, but
73 doesn't do anything unless the environment variable
74 "bootretry" is >= 0.
75
76 CONFIG_AUTOBOOT_KEYED
77 CONFIG_AUTOBOOT_KEYED_CTRLC
78 CONFIG_AUTOBOOT_PROMPT
79 CONFIG_AUTOBOOT_DELAY_STR
80 CONFIG_AUTOBOOT_STOP_STR
81
82 "bootdelaykey" environment variable
83 "bootstopkey" environment variable
84
85 These options give more control over stopping autoboot. When
86 they are used a specific character or string is required to
87 stop or delay autoboot.
88
89 Define CONFIG_AUTOBOOT_KEYED (no value required) to enable
90 this group of options. CONFIG_AUTOBOOT_DELAY_STR,
91 CONFIG_AUTOBOOT_STOP_STR or both should be specified (or
92 specified by the corresponding environment variable),
93 otherwise there is no way to stop autoboot.
94
95 CONFIG_AUTOBOOT_PROMPT is displayed before the boot delay
96 selected by CONFIG_BOOTDELAY starts. If it is not defined
97 there is no output indicating that autoboot is in progress.
98
99 Note that CONFIG_AUTOBOOT_PROMPT is used as the (only)
100 argument to a printf() call, so it may contain '%' format
101 specifications, provided that it also includes, sepearated by
102 commas exactly like in a printf statement, the required
103 arguments. It is the responsibility of the user to select only
104 such arguments that are valid in the given context. A
105 reasonable prompt could be defined as
106
107 #define CONFIG_AUTOBOOT_PROMPT \
108 "autoboot in %d seconds\n",bootdelay
109
110 If CONFIG_AUTOBOOT_DELAY_STR or "bootdelaykey" is specified
111 and this string is received from console input before
112 autoboot starts booting, U-Boot gives a command prompt. The
113 U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is
114 used, otherwise it never times out.
115
116 If CONFIG_AUTOBOOT_STOP_STR or "bootstopkey" is specified and
117 this string is received from console input before autoboot
118 starts booting, U-Boot gives a command prompt. The U-Boot
119 prompt never times out, even if CONFIG_BOOT_RETRY_TIME is
120 used.
121
122 The string recognition is not very sophisticated. If a
123 partial match is detected, the first non-matching character
124 is checked to see if starts a new match. There is no check
125 for a shorter partial match, so it's best if the first
126 character of a key string does not appear in the rest of the
127 string.
128
129 The CONFIG_AUTOBOOT_KEYED_CTRLC #define allows for the boot
130 sequence to be interrupted by ctrl-c, in addition to the
131 "bootdelaykey" and "bootstopkey". Setting this variable
132 provides an escape sequence from the limited "password"
133 strings.
134
135 CONFIG_RESET_TO_RETRY
136
137 (Only effective when CONFIG_BOOT_RETRY_TIME is also set)
138 After the countdown timed out, the board will be reset to restart
139 again.
140
README.b4860qds
1Overview
2--------
3The B4860QDS is a Freescale reference board that hosts the B4860 SoC (and variants).
4
5B4860 Overview
6-------------
7The B4860 QorIQ Qonverge device is a Freescale high-end, multicore SoC based on
8StarCore and Power Architecture® cores. It targets the broadband wireless
9infrastructure and builds upon the proven success of the existing multicore
10DSPs and Power CPUs. It is designed to bolster the rapidly changing and
11expanding wireless markets, such as 3GLTE (FDD and TDD), LTE-Advanced, and UMTS.
12
13The B4860 is a highly-integrated StarCore and Power Architecture processor that
14contains:
15. Six fully-programmable StarCore SC3900 FVP subsystems, divided into three
16clusters-each core runs up to 1.2 GHz, with an architecture highly optimized for
17wireless base station applications
18. Four dual-thread e6500 Power Architecture processors organized in one cluster-each
19core runs up to 1.8 GHz
20. Two DDR3/3L controllers for high-speed, industry-standard memory interface each
21runs at up to 1866.67 MHz
22. MAPLE-B3 hardware acceleration-for forward error correction schemes including
23Turbo or Viterbi decoding, Turbo encoding and rate matching, MIMO MMSE
24equalization scheme, matrix operations, CRC insertion and check, DFT/iDFT and
25FFT/iFFT calculations, PUSCH/PDSCH acceleration, and UMTS chip rate
26acceleration
27. CoreNet fabric that fully supports coherency using MESI protocol between the
28 e6500 cores, SC3900 FVP cores, memories and external interfaces.
29 CoreNet fabric interconnect runs at 667 MHz and supports coherent and
30 non-coherent out of order transactions with prioritization and bandwidth
31 allocation amongst CoreNet endpoints.
32. Data Path Acceleration Architecture, which includes the following:
33. Frame Manager (FMan), which supports in-line packet parsing and general
34 classification to enable policing and QoS-based packet distribution
35. Queue Manager (QMan) and Buffer Manager (BMan), which allow offloading
36 of queue management, task management, load distribution, flow ordering, buffer
37 management, and allocation tasks from the cores
38. Security engine (SEC 5.3)-crypto-acceleration for protocols such as IPsec,
39 SSL, and 802.16
40. RapidIO manager (RMAN) - Support SRIO types 8, 9, 10, and 11 (inbound and
41 outbound). Supports types 5, 6 (outbound only)
42. Large internal cache memory with snooping and stashing capabilities for
43 bandwidth saving and high utilization of processor elements. The 9856-Kbyte
44 internal memory space includes the following:
45. 32 Kbyte L1 ICache per e6500/SC3900 core
46. 32 Kbyte L1 DCache per e6500/SC3900 core
47. 2048 Kbyte unified L2 cache for each SC3900 FVP cluster
48. 2048 Kbyte unified L2 cache for the e6500 cluster
49. Two 512 Kbyte shared L3 CoreNet platform caches (CPC)
50. Sixteen 10-GHz SerDes lanes serving:
51. Two Serial RapidIO interfaces.
52 - Each supports up to 4 lanes and a total of up to 8 lanes
53. Up to 8-lanes Common Public Radio Interface (CPRI) controller for glue-less
54 antenna connection
55. Two 10-Gbit Ethernet controllers (10GEC)
56. Six 1G/2.5-Gbit Ethernet controllers for network communications
57. PCI Express controller
58. Debug (Aurora)
59. Two OCeaN DMAs
60. Various system peripherals
61. 182 32-bit timers
62
63B4860QDS Overview
64------------------
65- DDRC1: Ten separate DDR3 parts of 16-bit to support 72-bit (ECC) at 1866MT/s, ECC, 4 GB
66 of memory in two ranks of 2 GB.
67- DDRC2: Five separate DDR3 parts of 16-bit to support 72-bit (ECC) at 1866MT/s, ECC, 2 GB
68 of memory. Single rank.
69- SerDes 1 multiplexing: Two Vitesse (transmit and receive path) cross-point 16x16 switch
70 VSC3316
71- SerDes 2 multiplexing: Two Vitesse (transmit and receive path) cross-point 8x8 switch VSC3308
72- USB 2.0 ULPI PHY USB3315 by SMSC supports USB port in host mode.
73 B4860 UART port is available over USB-to-UART translator USB2SER or over RS232 flat cable.
74- A Vitesse dual SGMII phy VSC8662 links the B4860 SGMII lines to 2xRJ-45 copper connectors
75 for Stand-alone mode and to the 1000Base-X over AMC MicroTCA connector ports 0 and 2 for
76 AMC mode.
77- The B4860 configuration may be loaded from nine bits coded reset configuration reset source. The
78 RCW source is set by appropriate DIP-switches:
79- 16-bit NOR Flash / PROMJet
80- QIXIS 8-bit NOR Flash Emulator
81- 8-bit NAND Flash
82- 24-bit SPI Flash
83- Long address I2C EEPROM
84- Available debug interfaces are:
85 - On-board eCWTAP controller with ETH and USB I/F
86 - JTAG/COP 16-pin header for any external TAP controller
87 - External JTAG source over AMC to support B2B configuration
88 - 70-pin Aurora debug connector
89- QIXIS (FPGA) logic:
90 - 2 KB internal memory space including
91- IDT840NT4 clock synthesizer provides B4860 essential clocks : SYSCLK, DDRCLK1,2 and
92 RTCCLK.
93- Two 8T49N222A SerDes ref clock devices support two SerDes port clock frequency - total four
94 refclk, including CPRI clock scheme.
95
96B4420 Personality
97--------------------
98
99B4420 Personality
100--------------------
101B4420 is a reduced personality of B4860 with less core/clusters(both SC3900 and e6500), less DDR
102controllers, less serdes lanes, less SGMII interfaces and reduced target frequencies.
103
104Key differences between B4860 and B4420
105----------------------------------------
106
107B4420 has:
1081. Less e6500 cores: 1 cluster with 2 e6500 cores
1092. Less SC3900 cores/clusters: 1 cluster with 2 SC3900 cores per cluster.
1103. Single DDRC
1114. 2X 4 lane serdes
1125. 3 SGMII interfaces
1136. no sRIO
1147. no 10G
115
116B4860QDS Default Settings
117-------------------------
118
119Switch Settings
120----------------
121
122SW1 OFF [0] OFF [0] OFF [0] OFF [0] OFF [0] OFF [0] OFF [0] OFF [0]
123SW2 ON ON ON ON ON ON OFF OFF
124SW3 OFF OFF OFF ON OFF OFF ON OFF
125SW5 OFF OFF OFF OFF OFF OFF ON ON
126
127Note: PCIe slots modes: All the PCIe devices work as Root Complex.
128Note: Boot location: NOR flash.
129
130SysClk/Core(e6500)/CCB/DDR/FMan/DDRCLK/StarCore/CPRI-Maple/eTVPE-Maple/ULB-Maple
13166MHz/1.6GHz/667MHz/1.6GHz data rate/667MHz/133MHz/1200MHz/500MHz/800MHz/667MHz
132
133a) NAND boot
134 SW1 [1.1] = 0
135 SW2 [1.1] = 1
136 SW3 [1:4] = 0001
137b) NOR boot
138 SW1 [1.1] = 1
139 SW2 [1.1] = 0
140 SW3 [1:4] = 1000.
141
142B4420QDS Default Settings
143-------------------------
144
145Switch Settings
146----------------
147SW1 OFF[0] OFF [0] OFF [0] OFF [0] OFF [0] OFF [0] OFF [0] OFF [0]
148SW2 ON OFF ON OFF ON ON OFF OFF
149SW3 OFF OFF OFF ON OFF OFF ON OFF
150SW5 OFF OFF OFF OFF OFF OFF ON ON
151
152Note: PCIe slots modes: All the PCIe devices work as Root Complex.
153Note: Boot location: NOR flash.
154
155SysClk/Core(e6500)/CCB/DDR/FMan/DDRCLK/StarCore/CPRI-Maple/eTVPE-Maple/ULB-Maple
15666MHz/1.6GHz/667MHz/1.6GHz data rate/667MHz/133MHz/1200MHz/500MHz/800MHz/667MHz
157
158a) NAND boot
159 SW1 [1.1] = 0
160 SW2 [1.1] = 1
161 SW3 [1:4] = 0001
162b) NOR boot
163 SW1 [1.1] = 1
164 SW2 [1.1] = 0
165 SW3 [1:4] = 1000.
166
167Memory map on B4860QDS
168----------------------
169The addresses in brackets are physical addresses.
170
171Start Address End Address Description Size
1720xF_FFDF_1000 0xF_FFFF_FFFF Free 2 MB
1730xF_FFDF_0000 0xF_FFDF_0FFF IFC - FPGA 4 KB
1740xF_FF81_0000 0xF_FFDE_FFFF Free 5 MB
1750xF_FF80_0000 0xF_FF80_FFFF IFC NAND Flash 64 KB
1760xF_FF00_0000 0xF_FF7F_FFFF Free 8 MB
1770xF_FE00_0000 0xF_FEFF_FFFF CCSRBAR 16 MB
1780xF_F801_0000 0xF_FDFF_FFFF Free 95 MB
1790xF_F800_0000 0xF_F800_FFFF PCIe I/O Space 64 KB
1800xF_F600_0000 0xF_F7FF_FFFF QMAN s/w portal 32 MB
1810xF_F400_0000 0xF_F5FF_FFFF BMAN s/w portal 32 MB
1820xF_F000_0000 0xF_F3FF_FFFF Free 64 MB
1830xF_E800_0000 0xF_EFFF_FFFF IFC NOR Flash 128 MB
1840xF_E000_0000 0xF_E7FF_FFFF Promjet 128 MB
1850xF_A0C0_0000 0xF_DFFF_FFFF Free 1012 MB
1860xF_A000_0000 0xF_A0BF_FFFF MAPLE0/1/2 12 MB
1870xF_0040_0000 0xF_9FFF_FFFF Free 12 GB
1880xF_0000_0000 0xF_01FF_FFFF DCSR 32 MB
1890xC_4000_0000 0xE_FFFF_FFFF Free 11 GB
1900xC_3000_0000 0xC_3FFF_FFFF sRIO-2 I/O 256 MB
1910xC_2000_0000 0xC_2FFF_FFFF sRIO-1 I/O 256 MB
1920xC_0000_0000 0xC_1FFF_FFFF PCIe Mem Space 512 MB
1930x1_0000_0000 0xB_FFFF_FFFF Free 44 GB
1940x0_8000_0000 0x0_FFFF_FFFF DDRC1 2 GB
1950x0_0000_0000 0x0_7FFF_FFFF DDRC2 2 GB
196
197Memory map on B4420QDS
198----------------------
199The addresses in brackets are physical addresses.
200
201Start Address End Address Description Size
2020xF_FFDF_1000 0xF_FFFF_FFFF Free 2 MB
2030xF_FFDF_0000 0xF_FFDF_0FFF IFC - FPGA 4 KB
2040xF_FF81_0000 0xF_FFDE_FFFF Free 5 MB
2050xF_FF80_0000 0xF_FF80_FFFF IFC NAND Flash 64 KB
2060xF_FF00_0000 0xF_FF7F_FFFF Free 8 MB
2070xF_FE00_0000 0xF_FEFF_FFFF CCSRBAR 16 MB
2080xF_F801_0000 0xF_FDFF_FFFF Free 95 MB
2090xF_F800_0000 0xF_F800_FFFF PCIe I/O Space 64 KB
2100xF_F600_0000 0xF_F7FF_FFFF QMAN s/w portal 32 MB
2110xF_F400_0000 0xF_F5FF_FFFF BMAN s/w portal 32 MB
2120xF_F000_0000 0xF_F3FF_FFFF Free 64 MB
2130xF_E800_0000 0xF_EFFF_FFFF IFC NOR Flash 128 MB
2140xF_E000_0000 0xF_E7FF_FFFF Promjet 128 MB
2150xF_A0C0_0000 0xF_DFFF_FFFF Free 1012 MB
2160xF_A000_0000 0xF_A0BF_FFFF MAPLE0/1/2 12 MB
2170xF_0040_0000 0xF_9FFF_FFFF Free 12 GB
2180xF_0000_0000 0xF_01FF_FFFF DCSR 32 MB
2190xC_4000_0000 0xE_FFFF_FFFF Free 11 GB
2200xC_3000_0000 0xC_3FFF_FFFF sRIO-2 I/O 256 MB
2210xC_2000_0000 0xC_2FFF_FFFF sRIO-1 I/O 256 MB
2220xC_0000_0000 0xC_1FFF_FFFF PCIe Mem Space 512 MB
2230x1_0000_0000 0xB_FFFF_FFFF Free 44 GB
2240x0_0000_0000 0x0_FFFF_FFFF DDRC1 4 GB
225
226
227NOR Flash memory Map on B4860 and B4420QDS
228------------------------------------------
229 Start End Definition Size
2300xEFF40000 0xEFFFFFFF U-Boot (current bank) 768KB
2310xEFF20000 0xEFF3FFFF U-Boot env (current bank) 128KB
2320xEFF00000 0xEFF1FFFF FMAN Ucode (current bank) 128KB
2330xEF300000 0xEFEFFFFF rootfs (alternate bank) 12MB
2340xEE800000 0xEE8FFFFF device tree (alternate bank) 1MB
2350xEE020000 0xEE6FFFFF Linux.uImage (alternate bank) 6MB+896KB
2360xEE000000 0xEE01FFFF RCW (alternate bank) 128KB
2370xEDF40000 0xEDFFFFFF U-Boot (alternate bank) 768KB
2380xEDF20000 0xEDF3FFFF U-Boot env (alternate bank) 128KB
2390xEDF00000 0xEDF1FFFF FMAN ucode (alternate bank) 128KB
2400xED300000 0xEDEFFFFF rootfs (current bank) 12MB
2410xEC800000 0xEC8FFFFF device tree (current bank) 1MB
2420xEC020000 0xEC6FFFFF Linux.uImage (current bank) 6MB+896KB
2430xEC000000 0xEC01FFFF RCW (current bank) 128KB
244
245Various Software configurations/environment variables/commands
246--------------------------------------------------------------
247The below commands apply to both B4860QDS and B4420QDS.
248
2491. U-Boot environment variable hwconfig
250 The default hwconfig is:
251 hwconfig=fsl_ddr:ctlr_intlv=null,bank_intlv=cs0_cs1;usb1:
252 dr_mode=host,phy_type=ulpi
253 Note: For USB gadget set "dr_mode=peripheral"
254
2552. FMAN Ucode versions
256 fsl_fman_ucode_B4860_106_3_6.bin
257
2583. Switching to alternate bank
259 Commands for switching to alternate bank.
260
261 1. To change from vbank0 to vbank2
262 => qixis_reset altbank (it will boot using vbank2)
263
264 2.To change from vbank2 to vbank0
265 => qixis reset (it will boot using vbank0)
266
2674. To change personality of board
268 For changing personality from B4860 to B4420
269 1)Boot from vbank0
270 2)Flash vbank2 with b4420 rcw and U-Boot
271 3)Give following commands to uboot prompt
272 => mw.b ffdf0040 0x30;
273 => mw.b ffdf0010 0x00;
274 => mw.b ffdf0062 0x02;
275 => mw.b ffdf0050 0x02;
276 => mw.b ffdf0010 0x30;
277 => reset
278
279 Note: Power off cycle will lead to default switch settings.
280 Note: 0xffdf0000 is the address of the QIXIS FPGA.
281
2825. Switching between NOR and NAND boot(RCW src changed from NOR <-> NAND)
283
284 To change from NOR to NAND boot give following command on uboot prompt
285 => mw.b ffdf0040 0x30
286 => mw.b ffdf0010 0x00
287 => mw.b 0xffdf0050 0x08
288 => mw.b 0xffdf0060 0x82
289 => mw.b ffdf0061 0x00
290 => mw.b ffdf0010 0x30
291 => reset
292
293 To change from NAND to NOR boot give following command on uboot prompt:
294 => mw.b ffdf0040 0x30
295 => mw.b ffdf0010 0x00
296 => mw.b 0xffdf0050 0x00(for vbank0) or (mw.b 0xffdf0050 0x02 for vbank2)
297 => mw.b 0xffdf0060 0x12
298 => mw.b ffdf0061 0x01
299 => mw.b ffdf0010 0x30
300 => reset
301
302 Note: Power off cycle will lead to default switch settings.
303 Note: 0xffdf0000 is the address of the QIXIS FPGA.
304
3056. Ethernet interfaces for B4860QDS
306 Serdes protocosl tested:
307 0x2a, 0x8d (serdes1, serdes2) [DEFAULT]
308 0x2a, 0xb2 (serdes1, serdes2)
309
310 When using [DEFAULT] RCW, which including 2 * 1G SGMII on board and 2 * 1G
311 SGMII on SGMII riser card.
312 Under U-Boot these network interfaces are recognized as:
313 FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5 and FM1@DTSEC6.
314
315 On Linux the interfaces are renamed as:
316 . eth2 -> fm1-gb2
317 . eth3 -> fm1-gb3
318 . eth4 -> fm1-gb4
319 . eth5 -> fm1-gb5
320
3217. RCW and Ethernet interfaces for B4420QDS
322 Serdes protocosl tested:
323 0x18, 0x9e (serdes1, serdes2)
324
325 Under U-Boot these network interfaces are recognized as:
326 FM1@DTSEC3, FM1@DTSEC4 and e1000#0.
327
328 On Linux the interfaces are renamed as:
329 . eth2 -> fm1-gb2
330 . eth3 -> fm1-gb3
331
332NAND boot with 2 Stage boot loader
333----------------------------------
334PBL initialise the internal SRAM and copy SPL(160KB) in SRAM.
335SPL further initialise DDR using SPD and environment variables and copy
336U-Boot(768 KB) from flash to DDR.
337Finally SPL transer control to U-Boot for futher booting.
338
339SPL has following features:
340 - Executes within 256K
341 - No relocation required
342
343 Run time view of SPL framework during boot :-
344 -----------------------------------------------
345 Area | Address |
346-----------------------------------------------
347 Secure boot | 0xFFFC0000 (32KB) |
348 headers | |
349 -----------------------------------------------
350 GD, BD | 0xFFFC8000 (4KB) |
351 -----------------------------------------------
352 ENV | 0xFFFC9000 (8KB) |
353 -----------------------------------------------
354 HEAP | 0xFFFCB000 (30KB) |
355 -----------------------------------------------
356 STACK | 0xFFFD8000 (22KB) |
357 -----------------------------------------------
358 U-Boot SPL | 0xFFFD8000 (160KB) |
359 -----------------------------------------------
360
361NAND Flash memory Map on B4860 and B4420QDS
362------------------------------------------
363 Start End Definition Size
3640x000000 0x0FFFFF U-Boot 1MB
3650x140000 0x15FFFF U-Boot env 128KB
3660x1A0000 0x1BFFFF FMAN Ucode 128KB
367
README.bcm7xxx
1Summary
2=======
3
4This document describes how to use U-Boot on the Broadcom 7445 SoC, as
5a third stage bootloader loaded by Broadcom's BOLT bootloader.
6
7BOLT loads U-Boot as a generic ELF binary. Some U-Boot features such
8as networking are not yet available but other important features are,
9including:
10
11 - ext4 file system traversal
12
13 - support for loading FIT images
14
15 - advanced scripting
16
17 - support for FIT-provided DTBs instead of relying on the
18 BOLT-provided DTB
19
20A customized version of this port has been used in production. The
21same approach may work on other BCM7xxx boards, with some
22configuration adjustments and memory layout experimentation.
23
24Build
25=====
26
27make bcm7445_defconfig
28make
29${CROSS_COMPILE}strip u-boot
30
31Run
32===
33
34Flash the u-boot binary into board storage, then invoke it from BOLT.
35For example:
36
37BOLT> boot -bsu -elf flash0.u-boot1
38
39This port assumes that I-cache and D-cache are already enabled when
40U-Boot is entered.
41
42Flattened Image Tree Support
43============================
44
45What follows is an example FIT image source file. Build it with:
46
47mkimage -f image.its image.itb
48
49Booting the resulting image.itb was tested on BOLT v1.20, with the
50following kernels:
51
52https://github.com/Broadcom/stblinux-3.14
53https://github.com/Broadcom/stblinux-4.1
54https://github.com/Broadcom/stblinux-4.9
55
56and with a generic ARMv7 root file system.
57
58image.its:
59/dts-v1/;
60/ {
61 description = "BCM7445 FIT";
62 images {
63 kernel@1 {
64 description = "Linux kernel";
65 /*
66 * This kernel image output format can be
67 * generated with:
68 *
69 * make vmlinux
70 * ${CROSS_COMPILE}objcopy -O binary -S vmlinux vmlinux.bin
71 * gzip -9 vmlinux.bin
72 *
73 * For stblinux-3.14, the specific Broadcom
74 * board type should be configured in the
75 * kernel, for example CONFIG_BCM7445D0=y.
76 */
77 data = /incbin/("<vmlinux.bin.gz>");
78 type = "kernel";
79 arch = "arm";
80 os = "linux";
81 compression = "gzip";
82 load = <0x8000>;
83 entry = <0x8000>;
84 hash@1 {
85 algo = "sha256";
86 };
87 };
88 ramdisk@1 {
89 description = "Initramfs root file system";
90 data = /incbin/("<initramfs.cpio.gz>");
91 type = "ramdisk";
92 arch = "arm";
93 os = "linux";
94 compression = "gzip";
95 /*
96 * Set the environment variable initrd_high to
97 * 0xffffffff, and set "load" and "entry" here
98 * to 0x0 to keep initramfs in-place and to
99 * accommodate stblinux bmem/CMA reservations.
100 */
101 load = <0x0>;
102 entry = <0x0>;
103 hash@1 {
104 algo = "sha256";
105 };
106 };
107 fdt@1 {
108 description = "Device tree dumped from BOLT";
109 /*
110 * This DTB should be similar to the
111 * BOLT-generated device tree, after BOLT has
112 * done its runtime modifications to it. For
113 * example, it can be dumped from within
114 * U-Boot (at ${fdtcontroladdr}), after BOLT
115 * has loaded U-Boot. The result can be added
116 * to the Linux source tree as a .dts file.
117 *
118 * To support modifications to the device tree
119 * in-place in U-Boot, add to Linux's
120 * arch/arm/boot/dts/Makefile:
121 *
122 * DTC_FLAGS ?= -p 4096
123 *
124 * This will leave some padding in the DTB and
125 * thus reserve room for node additions.
126 *
127 * Also, set the environment variable fdt_high
128 * to 0xffffffff to keep the DTB in-place and
129 * to accommodate stblinux bmem/CMA
130 * reservations.
131 */
132 data = /incbin/("<bolt-<version>.dtb");
133 type = "flat_dt";
134 arch = "arm";
135 compression = "none";
136 hash@1 {
137 algo = "sha256";
138 };
139 };
140 };
141 configurations {
142 default = "conf@bcm7445";
143 conf@bcm7445 {
144 description = "BCM7445 configuration";
145 kernel = "kernel@1";
146 ramdisk = "ramdisk@1";
147 fdt = "fdt@1";
148 };
149 };
150};
151
README.bedbug
README.bitbangMII
1This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to
2support an arbitrary number of mii buses. This feature is useful when your
3board uses different mii buses for different phys and all (or a part) of these
4buses are implemented via bit-banging mode.
5
6The driver requires that the following macros should be defined into the board
7configuration file:
8
9CONFIG_BITBANGMII - Enable the miiphybb driver
10CONFIG_BITBANGMII_MULTI - Enable the multi bus support
11
12If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs
13to define at least the following macros:
14
15MII_INIT - Generic code to enable the MII bus (optional)
16MDIO_DECLARE - Declaration needed to access to the MDIO pin (optional)
17MDIO_ACTIVE - Activate the MDIO pin as out pin
18MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin
19MDIO_READ - Read the MDIO pin
20MDIO(v) - Write v on the MDIO pin
21MDC_DECLARE - Declaration needed to access to the MDC pin (optional)
22MDC(v) - Write v on the MDC pin
23
24The previous macros make the driver compatible with the previous version
25(that didn't support the multi-bus).
26
27When the CONFIG_BITBANGMII_MULTI is also defined, the board code needs to fill
28the bb_miiphy_buses[] array with a record for each required bus and declare
29the bb_miiphy_buses_num variable with the number of mii buses.
30The record (struct bb_miiphy_bus) has the following fields/callbacks (see
31miiphy.h for details):
32
33char name[] - The symbolic name that must be equal to the MII bus
34 registered name
35int (*init)() - Initialization function called at startup time (just
36 before the Ethernet initialization)
37int (*mdio_active)() - Activate the MDIO pin as output
38int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
39int (*set_mdio)() - Write the MDIO pin
40int (*get_mdio)() - Read the MDIO pin
41int (*set_mdc)() - Write the MDC pin
42int (*delay)() - Delay function
43void *priv - Private data used by board specific code
44
45The board code will look like:
46
47struct bb_miiphy_bus bb_miiphy_buses[] = {
48 { .name = "miibus#1", .init = b1_init, .mdio_active = b1_mdio_active, ... },
49 { .name = "miibus#2", .init = b2_init, .mdio_active = b2_mdio_active, ... },
50 ...
51};
52int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
53 sizeof(bb_miiphy_buses[0]);
54
552009 Industrie Dial Face S.p.A.
56 Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
57
README.blackfin
1Notes for the Blackfin architecture port of Das U-Boot
2
3 =========
4 ! ABOUT !
5 =========
6
7<marketing blurb>
8Blackfin Processors embody a new breed of 16/32-bit embedded processor, ideally
9suited for products where a convergence of capabilities are necessary -
10multi-format audio, video, voice and image processing; multi-mode baseband and
11packet processing; control processing; and real-time security. The Blackfin's
12unique combination of software flexibility and scalability has gained it
13widespread adoption in convergent applications.
14</marketing blurb>
15
16The Blackfin processor is wholly developed by Analog Devices Inc.
17
18 ===========
19 ! SUPPORT !
20 ===========
21
22All open source code for the Blackfin processors are being handled via our
23collaborative website:
24http://blackfin.uclinux.org/
25
26In particular, bug reports, feature requests, help etc... for Das U-Boot are
27handled in the Das U-Boot sub project:
28http://blackfin.uclinux.org/gf/project/u-boot
29
30This website is backed both by an open source community as well as a dedicated
31team from Analog Devices Inc.
32
33 =============
34 ! TOOLCHAIN !
35 =============
36
37To compile the Blackfin aspects, you'll need the GNU toolchain configured for
38the Blackfin processor. You can obtain such a cross-compiler here:
39http://blackfin.uclinux.org/gf/project/toolchain
40
41 =================
42 ! DOCUMENTATION !
43 =================
44
45For Blackfin specific documentation, you can visit our dedicated doc wiki:
46http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot
47
README.bootmenu
1/*
2 * (C) Copyright 2011-2012 Pali Rohár <pali.rohar@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7ANSI terminal bootmenu command
8
9The "bootmenu" command uses U-Boot menu interfaces and provides
10a simple mechanism for creating menus with different boot items.
11The cursor keys "Up" and "Down" are used for navigation through
12the items. Current active menu item is highlighted and can be
13selected using the "Enter" key. The selection of the highlighted
14menu entry invokes an U-Boot command (or a list of commands)
15associated with this menu entry.
16
17The "bootmenu" command interprets ANSI escape sequencies, so
18an ANSI terminal is required for proper menu rendering and item
19selection.
20
21The assembling of the menu is done via a set of environment variables
22"bootmenu_<num>" and "bootmenu_delay", i.e.:
23
24 bootmenu_delay=<delay>
25 bootmenu_<num>="<title>=<commands>"
26
27 <delay> is the autoboot delay in seconds, after which the first
28 menu entry will be selected automatically
29
30 <num> is the boot menu entry number, starting from zero
31
32 <title> is the text of the menu entry shown on the console
33 or on the boot screen
34
35 <commands> are commands which will be executed when a menu
36 entry is selected
37
38 (title and commands are separated by first appearance of '='
39 character in the environment variable)
40
41First (optional) argument of the "bootmenu" command is a delay specifier
42and it overrides the delay value defined by "bootmenu_delay" environment
43variable. If the environment variable "bootmenu_delay" is not set or if
44the argument of the "bootmenu" command is not specified, the default delay
45will be CONFIG_BOOTDELAY. If delay is 0, no menu entries will be shown on
46the console (or on the screen) and the command of the first menu entry will
47be called immediately. If delay is less then 0, bootmenu will be shown and
48autoboot will be disabled.
49
50Bootmenu always adds menu entry "U-Boot console" at the end of all menu
51entries specified by environment variables. When selecting this entry
52the bootmenu terminates and the usual U-Boot command prompt is presented
53to the user.
54
55Example environment:
56
57 setenv bootmenu_0 Boot 1. kernel=bootm 0x82000000 # Set first menu entry
58 setenv bootmenu_1 Boot 2. kernel=bootm 0x83000000 # Set second menu entry
59 setenv bootmenu_2 Reset board=reset # Set third menu entry
60 setenv bootmenu_3 U-Boot boot order=boot # Set fourth menu entry
61 bootmenu 20 # Run bootmenu with autoboot delay 20s
62
63
64The above example will be rendered as below
65(without decorating rectangle):
66
67┌──────────────────────────────────────────┐
68│ │
69│ *** U-Boot Boot Menu *** │
70│ │
71│ Boot 1. kernel │
72│ Boot 2. kernel │
73│ Reset board │
74│ U-Boot boot order │
75│ U-Boot console │
76│ │
77│ Hit any key to stop autoboot: 20 │
78│ Press UP/DOWN to move, ENTER to select │
79│ │
80└──────────────────────────────────────────┘
81
82Selected menu entry will be highlighted - it will have inverted
83background and text colors.
84
85To enable the "bootmenu" command add following definitions to the
86board config file:
87
88 #define CONFIG_CMD_BOOTMENU
89 #define CONFIG_MENU
90
91To run the bootmenu at startup add these additional definitions:
92
93 #define CONFIG_AUTOBOOT_KEYED
94 #define CONFIG_BOOTDELAY 30
95 #define CONFIG_MENU_SHOW
96
97When you intend to use the bootmenu on color frame buffer console,
98make sure to additionally define CONFIG_CFB_CONSOLE_ANSI in the
99board config file.
100
README.boston
1MIPS Boston Development Board
2
3---------
4 About
5---------
6
7The MIPS Boston development board is built around an FPGA & 3 PCIe controllers,
8one of which is connected to an Intel EG20T Platform Controller Hub which
9provides most connectivity to the board. It is used during the development &
10testing of both new CPUs and the software support for them. It is essentially
11the successor of the older MIPS Malta board.
12
13--------
14 QEMU
15--------
16
17U-Boot can be run on a currently out-of-tree branch of QEMU with support for
18the Boston board added. This QEMU code can currently be found in the "boston"
19branch of git://git.linux-mips.org/pub/scm/paul/qemu.git and used like so:
20
21 $ git clone git://git.linux-mips.org/pub/scm/paul/qemu.git -b boston
22 $ cd qemu
23 $ ./configure --target-list=mips64el-softmmu
24 $ make
25 $ ./mips64el-softmmu/qemu-system-mips64el -M boston -m 2G \
26 -bios u-boot.bin -serial stdio
27
28Please note that QEMU will default to emulating the I6400 CPU which implements
29the MIPS64r6 ISA, and at the time of writing doesn't implement any earlier CPUs
30with support for the CPS features the Boston board relies upon. You will
31therefore need to configure U-Boot to build for MIPSr6 in order to obtain a
32binary that will work in QEMU.
33
34-------------
35 Toolchain
36-------------
37
38If building for MIPSr6 then you will need a toolchain including GCC 5.x or
39newer, or the Codescape toolchain available for download from Imagination
40Technologies:
41
42 http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
43
44The "IMG GNU Linux Toolchain" is capable of building for all current MIPS ISAs,
45architecture revisions & both endiannesses.
46
47--------
48 TODO
49--------
50
51 - AHCI support
52 - CPU driver
53 - Exception handling (+UHI?)
54 - Flash support
55 - IOCU support
56 - L2 cache support
57 - More general LCD display driver
58 - Multi-arch-variant multi-endian fat binary
59
README.bus_vcxk
1/*
2 * (C) Copyright 2008-2009
3 * BuS Elektronik GmbH & Co. KG <www.bus-elektronik.de>
4 * Jens Scharsig <esw@bus-elektronik.de>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9U-Boot vcxk video controller driver
10======================================
11
12By defining CONFIG_VIDEO_VCXK this driver can be used with VC2K, VC4K and
13VC8K devices on following boards:
14
15board | ARCH | Vendor
16-----------------------------------------------------------------------
17EB+CPU5282-T1 | MCF5282 | BuS Elektronik GmbH & Co. KG
18EB+MCF-EVB123 | MCF5282 | BuS Elektronik GmbH & Co. KG
19EB+CPUx9K2 | AT91RM9200 | BuS Elektronik GmbH & Co. KG
20ZLSA | AT91RM9200 | Ruf Telematik AG
21
22Driver configuration
23--------------------
24
25The driver needs some defines to describe the target hardware:
26
27CONFIG_SYS_VCXK_BASE
28
29 base address of VCxK hardware memory
30
31CONFIG_SYS_VCXK_DEFAULT_LINEALIGN
32
33 defines the physical alignment of a pixel row
34
35CONFIG_SYS_VCXK_DOUBLEBUFFERED
36
37 some boards that use vcxk prevent read from framebuffer memory.
38 define this option to enable double buffering (needs 16KiB RAM)
39
40CONFIG_SYS_VCXK_<xxxx>_PIN
41
42 defines the number of the I/O line PIN in the port
43 valid values for <xxxx> are:
44
45 ACKNOWLEDGE
46 describes the acknowledge line from vcxk hardware
47
48 ENABLE
49 describes the enable line to vcxk hardware
50
51 INVERT
52 describes the invert line to vcxk hardware
53
54 RESET
55 describes the reset line to vcxk hardware
56
57 REQUEST
58 describes the request line to vcxk hardware
59
60CONFIG_SYS_VCXK_<xxxx>_PORT
61
62 defines the I/O port which is connected with the line
63 for valid values for <xxxx> see CONFIG_SYS_VCXK_<xxxx>_PIN
64
65CONFIG_SYS_VCXK_<xxxx>_DDR
66
67 defines the register which configures the direction
68 for valid values for <xxxx> see CONFIG_SYS_VCXK_<xxxx>_PIN
69
README.cfi
1The common CFI driver provides this weak default implementation for
2flash_cmd_reset():
3
4static void __flash_cmd_reset(flash_info_t *info)
5{
6 /*
7 * We do not yet know what kind of commandset to use, so we issue
8 * the reset command in both Intel and AMD variants, in the hope
9 * that AMD flash roms ignore the Intel command.
10 */
11 flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
12 udelay(1);
13 flash_write_cmd(info, 0, 0, FLASH_CMD_RESET);
14}
15void flash_cmd_reset(flash_info_t *info)
16 __attribute__((weak,alias("__flash_cmd_reset")));
17
18Some flash chips seem to have trouble with this reset sequence.
19In this case, board-specific code can override this weak default
20version with a board-specific function.
21
22At the time of writing, there are two boards that define their own
23routine for this.
24
25First, the digsy_mtc board equipped with the M29W128GH from Numonyx
26needs this version to function properly:
27
28void flash_cmd_reset(flash_info_t *info)
29{
30 flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
31}
32
33In addition, the t3corp board defines the routine thusly:
34
35void flash_cmd_reset(flash_info_t *info)
36{
37 /*
38 * FLASH at address CONFIG_SYS_FLASH_BASE is a Spansion chip and
39 * needs the Spansion type reset commands. The other flash chip
40 * is located behind a FPGA (Xilinx DS617) and needs the Intel type
41 * reset command.
42 */
43 if (info->start[0] == CONFIG_SYS_FLASH_BASE)
44 flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
45 else
46 flash_write_cmd(info, 0, 0, FLASH_CMD_RESET);
47}
48
49see also:
50http://www.mail-archive.com/u-boot@lists.denx.de/msg24368.html
51
52
53Config Option
54
55 CONFIG_SYS_MAX_FLASH_SECT: Number of sectors available on Flash device
56
57 CONFIG_SYS_FLASH_CFI_WIDTH: Data-width of the flash device
58
59 CONFIG_CMD_FLASH: Enables Flash command library
60
61 CONFIG_FLASH_CFI_DRIVER: Enables CFI Flash driver
62
63 CONFIG_FLASH_CFI_MTD: Enables MTD frame work for NOR Flash devices
64
README.chromium
1Running U-Boot from coreboot on Chromebooks
2===========================================
3
4U-Boot can be used as a secondary boot loader in a few situations such as from
5UEFI and coreboot (see README.x86). Recent Chromebooks use coreboot even on
6ARM platforms to start up the machine.
7
8This document aims to provide a guide to booting U-Boot on a Chromebook. It
9is only a starting point, and there are many guides on the interwebs. But
10placing this information in the U-Boot tree should make it easier to find for
11those who use U-Boot habitually.
12
13Most of these platforms are supported by U-Boot natively, but it is risky to
14replace the ROM unless you have a servo board and cable to restore it with.
15
16
17For all of these the standard U-Boot build instructions apply. For example on
18ARM:
19
20 sudo apt install gcc-arm-linux-gnueabi
21 mkdir b
22 make O=b/nyan_big CROSS_COMPILE=arm-linux-gnueabi- nyan-big_defconfig all
23
24You can obtain the vbutil_kernel utility here:
25
26 https://drive.google.com/open?id=0B7WYZbZ9zd-3dHlVVXo4VXE2T0U
27
28
29Snow (Samsung ARM Chromebook)
30-----------------------------
31
32See here:
33
34https://www.chromium.org/chromium-os/firmware-porting-guide/using-nv-u-boot-on-the-samsung-arm-chromebook
35
36
37Nyan-big
38--------
39
40Compiled based on information here:
41https://lists.denx.de/pipermail/u-boot/2015-March/209530.html
42https://git.collabora.com/cgit/user/tomeu/u-boot.git/commit/?h=nyan-big
43https://lists.denx.de/pipermail/u-boot/2017-May/289491.html
44https://github.com/chromeos-nvidia-androidtv/gnu-linux-on-acer-chromebook-13#copy-data-to-the-sd-card
45
461. Patch U-Boot
47
48Open include/configs/tegra124-common.h
49
50Change:
51
52#define CONFIG_SYS_TEXT_BASE 0x80110000
53
54to:
55
56#define CONFIG_SYS_TEXT_BASE 0x81000100
57
58
592. Build U-Boot
60
61 mkdir b
62 make -j8 O=b/nyan-big CROSS_COMPILE=arm-linux-gnueabi- nyan-big_defconfig all
63
64
653. Select a .its file
66
67Select something from doc/chromium which matches your board, or create your
68own.
69
70Note that the device tree node is required, even though it is not actually
71used by U-Boot. This is because the Chromebook expects to pass it to the
72kernel, and crashes if it is not present.
73
74
754. Build and sign an image
76
77 ./b/nyan-big/tools/mkimage -f doc/chromium/nyan-big.its u-boot-chromium.fit
78 echo test >dummy.txt
79 vbutil_kernel --arch arm --keyblock doc/chromium/devkeys/kernel.keyblock \
80 --signprivate doc/chromium/devkeys/kernel_data_key.vbprivk \
81 --version 1 --config dummy.txt --vmlinuz u-boot-chromium.fit \
82 --bootloader dummy.txt --pack u-boot.kpart
83
84
855. Prepare an SD card
86
87 DISK=/dev/sdc # Replace with your actual SD card device
88 sudo cgpt create $DISK
89 sudo cgpt add -b 34 -s 32768 -P 1 -S 1 -t kernel $DISK
90 sudo cgpt add -b 32802 -s 2000000 -t rootfs $DISK
91 sudo gdisk $DISK # Enter command 'w' to write a protective MBR to the disk
92
93
946. Write U-Boot to the SD card
95
96 sudo dd if=u-boot.kpart of=/dev/sdc1; sync
97
98
997. Start it up
100
101Reboot the device in dev mode. Make sure that you have USB booting enabled. To
102do this, login as root (via Ctrl-Alt-forward_arrow) and type
103'enable_dev_usb_boot'. You only need to do this once.
104
105Reboot the device with the SD card inserted. Press Clrl-U at the developer
106mode screen. It should show something like the following on the display:
107
108 U-Boot 2017.07-00637-g242eb42-dirty (May 22 2017 - 06:14:21 -0600)
109
110 Model: Acer Chromebook 13 CB5-311
111 Board: Google/NVIDIA Nyan-big, ID: 1
112
113 Net: No ethernet found.
114 Hit any key to stop autoboot: 0
115 Tegra124 (Nyan-big) #
116
117
1188. Known problems
119
120On the serial console the word MMC is chopped at the start of the line:
121
122C: sdhci@700b0000: 2, sdhci@700b0400: 1, sdhci@700b0600: 0
123
124This is likely due to some problem with change-over of the serial driver
125during relocation (or perhaps updating the clock setup in board_init()).
126
127
1289. Notes
129
130To check that you copied the u-boot.its file correctly, use these commands.
131You should see that the data at 0x100 in u-boot-chromium.fit is the first few
132bytes of U-Boot:
133
134 hd u-boot-chromium.fit |head -20
135 ...
136 00000100 b8 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |................|
137
138 hd b/nyan-big/u-boot.bin |head
139 00000000 b8 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |................|
140
141
142The 'data' property of the FIT is set up to start at offset 0x100 bytes into
143the file. The change to CONFIG_SYS_TEXT_BASE is also an offset of 0x100 bytes
144from the load address. If this changes, you either need to modify U-Boot to be
145fully relocatable, or expect it to hang.
146
147
148chromebook_jerry
149----------------
150
151The instruction are similar to those for Nyan with changes as noted below:
152
1531. Patch U-Boot
154
155Open include/configs/rk3288_common.h
156
157Change:
158
159#define CONFIG_SYS_TEXT_BASE 0x00100000
160
161to:
162
163#define CONFIG_SYS_TEXT_BASE 0x02000100
164
165
166
1672. Build U-Boot
168
169 mkdir b
170 make -j8 O=b/chromebook_jerry CROSS_COMPILE=arm-linux-gnueabi- \
171 chromebook_jerry_defconfig all
172
173
1743. See above
175
1764. Build and sign an image
177
178 ./b/chromebook_jerry/tools/mkimage -f doc/chromium/chromebook_jerry.its \
179 u-boot-chromium.fit
180 echo test >dummy.txt
181 vbutil_kernel --arch arm --keyblock doc/chromium/devkeys/kernel.keyblock \
182 --signprivate doc/chromium/devkeys/kernel_data_key.vbprivk \
183 --version 1 --config dummy.txt --vmlinuz u-boot-chromium.fit \
184 --bootloader dummy.txt --pack u-boot.kpart
185
186
1875. See above
188
1896. See above
190
1917. Start it up
192
193Reboot the device in dev mode. Make sure that you have USB booting enabled. To
194do this, login as root (via Ctrl-Alt-forward_arrow) and type
195'enable_dev_usb_boot'. You only need to do this once.
196
197Reboot the device with the SD card inserted. Press Clrl-U at the developer
198mode screen. It should show something like the following on the display:
199
200 U-Boot 2017.05-00649-g72acdbf-dirty (May 29 2017 - 14:57:05 -0600)
201
202 Model: Google Jerry
203 Net: Net Initialization Skipped
204 No ethernet found.
205 Hit any key to stop autoboot: 0
206
207
2088. Known problems
209
210None as yet.
211
212
2139. Notes
214
215None as yet.
216
217
218Other notes
219===========
220
221flashrom
222--------
223
224 Used to make a backup of your firmware, or to replace it.
225
226 See: https://www.chromium.org/chromium-os/packages/cros-flashrom
227
228
229coreboot
230--------
231
232Coreboot itself is not designed to actually boot an OS. Instead, a program
233called Depthcharge is used. This originally came out of U-Boot and was then
234heavily hacked and modified such that is is almost unrecognisable. It does
235include a very small part of the U-Boot command-line interface but is not
236usable as a general-purpose boot loader.
237
238In addition, it has a very unusual design in that it does not do device init
239itself, but instead relies on coreboot. This is similar to (in U-Boot) having
240a SPI driver with an empty probe() method, relying on whatever was set up
241beforehand. It can be quite hard to figure out between these two code bases
242what settings are actually used. When chain-loading into U-Boot we must be
243careful to reinit anything that U-Boot expects. If not, some peripherals (or
244the whole machine) may not work. This makes the process of chainloading more
245complicated than it could be on some platforms.
246
247Finally, it supports only a subset of the U-Boot's FIT format. In particular
248it uses a fixed address to load the FIT and does not support load/exec
249addresses. This means that U-Boot must be able to boot from whatever
250address Depthcharge happens to use (it is the CONFIG_KERNEL_START setting
251in Depthcharge). In practice this means that the data in the kernel@1 FIT node
252(see above) must start at the same address as U-Boot's CONFIG_SYS_TEXT_BASE.
253
README.clang
1The biggest problem when trying to compile U-Boot with clang is that
2almost all archs rely on storing gd in a global register and clang user
3manual states: "clang does not support global register variables; this
4is unlikely to be implemented soon because it requires additional LLVM
5backend support."
6
7Since version 3.4 the ARM backend can be instructed to leave r9 alone.
8Global registers themselves are not supported so some inline assembly is
9used to get its value. This does lead to larger code then strictly
10necessary, but at least works.
11
12NOTE: target compilation only work for _some_ ARM boards at the moment.
13Also Aarch64 is not supported: Most notably boards which aren't using
14the generic board will fail to compile, but since those are expected
15to be converted this will solve itself. Boards which reassign gd in c
16will also fail to compile, but there is in no strict reason to do so
17in the ARM world, since crt0.S takes care of this. These assignments
18can be avoided by changing the init calls but this is not in mainline yet.
19
20NOTE: without the -mllvm -arm-use-movt=0 flags U-Boot will compile
21fine, but llvm might hardcode addresses in movw / movt pairs, which
22cannot be relocated and U-Boot will fail at runtime.
23
24Debian (based)
25--------------
26Binary packages can be installed as usual, e.g.:
27sudo apt-get install clang
28
29Note that we still use binutils for some tools so we must continue to set
30CROSS_COMPILE. To compile U-Boot with clang on linux without IAS use e.g.:
31make HOSTCC=clang rpi_2_defconfig
32make HOSTCC=clang CROSS_COMPILE=arm-linux-gnueabi- CC=clang -j8
33
34It can also be used to compile sandbox:
35make HOSTCC=clang sandbox_defconfig
36make HOSTCC=clang CC=clang -j8
37
38FreeBSD 11 (Current):
39--------------------
40Since llvm 3.4 is currently in the base system, the integrated as is
41incapable of building U-Boot. Therefore gas from devel/arm-gnueabi-binutils
42is used instead. It needs a symlinks to be picked up correctly though:
43
44ln -s /usr/local/bin/arm-gnueabi-freebsd-as /usr/bin/arm-freebsd-eabi-as
45
46# The following commands compile U-Boot using the clang xdev toolchain.
47# NOTE: CROSS_COMPILE and target differ on purpose!
48export CROSS_COMPILE=arm-gnueabi-freebsd-
49gmake rpi_2_defconfig
50gmake CC="clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd" -j8
51
52Given that U-Boot will default to gcc, above commands can be
53simplified with a simple wrapper script, listed below.
54
55/usr/local/bin/arm-gnueabi-freebsd-gcc
56---
57#!/bin/sh
58
59exec clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd "$@"
60
README.commands
1
2Commands are added to U-Boot by creating a new command structure.
3This is done by first including command.h, then using the U_BOOT_CMD() macro
4to fill in a cmd_tbl_t struct.
5
6U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help")
7
8name: is the name of the commad. THIS IS NOT a string.
9maxargs: the maximum number of arguments this function takes
10repeatable: either 0 or 1 to indicate if autorepeat is allowed
11command: Function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
12usage: Short description. This is a string
13help: Long description. This is a string
14
15
16**** Behind the scene ******
17
18The structure created is named with a special prefix and placed by
19the linker in a special section using the linker lists mechanism
20(see include/linker_lists.h)
21
22This makes it possible for the final link to extract all commands
23compiled into any object code and construct a static array so the
24command array can be iterated over using the linker lists macros.
25
26The linker lists feature ensures that the linker does not discard
27these symbols when linking full U-Boot even though they are not
28referenced in the source code as such.
29
30If a new board is defined do not forget to define the command section
31by writing in u-boot.lds ($(srctree)/board/boardname/u-boot.lds) these
323 lines:
33
34 .u_boot_list : {
35 KEEP(*(SORT(.u_boot_list*)));
36 }
37
README.commands.itest
1A slow day today so here is a revised itest command with provisional
2support for comparing strings as well :-))
3
4Now table driven to allow the operators
5-eq, -ne, -lt, -gt, -le, -ge, ==, !=, <>, <, >, <=, >=
6
7Uses the expected command modifier for integer compares of width 1, 2 or
84 bytes of .b, .w, .l and the new modifer of .s for a string compare.
9String comparison is over the length of the shorter, this hopefully
10avoids missing terminators when using an indirect pointer.
11
12eg.
13if itest.l *40000 == 12345678 then; ....
14if itest.w *40000 != 1234 then; ....
15if itest.b *40000 >= 12 then; ....
16if itest.s *40000 -eq hello then; ....
17
README.commands.spl
1The spl command is used to export a boot parameter image to RAM. Later
2it may implement more functions connected to the SPL.
3
4SUBCOMMAND EXPORT
5To execute the command everything has to be in place as if bootm should be
6used. (kernel image, initrd-image, fdt-image etc.)
7
8export has two subcommands:
9 atags: exports the ATAGS
10 fdt: exports the FDT
11
12Call is:
13spl export <fdt|atags> [kernel_addr] [initrd_addr] [fdt_addr if fdt]
14
15
16TYPICAL CALL
17
18on OMAP3:
19nandecc hw
20nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/
21spl export atags /* export ATAGS */
22nand erase 0x680000 0x20000 /* erase - one page */
23nand write 0x80000100 0x680000 0x20000 /* write the image - one page */
24
25call with FDT:
26nandecc hw
27nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/
28tftpboot 0x80000100 devkit8000.dtb /* Read fdt */
29spl export fdt 0x82000000 - 0x80000100 /* export FDT */
30nand erase 0x680000 0x20000 /* erase - one page */
31nand write <adress shown by spl export> 0x680000 0x20000
32
README.console
1/*
2 * (C) Copyright 2000
3 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8U-Boot console handling
9========================
10
11HOW THE CONSOLE WORKS?
12----------------------
13
14At system startup U-Boot initializes a serial console. When U-Boot
15relocates itself to RAM, all console drivers are initialized (they
16will register all detected console devices to the system for further
17use).
18
19If not defined in the environment, the first input device is assigned
20to the 'stdin' file, the first output one to 'stdout' and 'stderr'.
21
22You can use the command "coninfo" to see all registered console
23devices and their flags. You can assign a standard file (stdin,
24stdout or stderr) to any device you see in that list simply by
25assigning its name to the corresponding environment variable. For
26example:
27
28 setenv stdin serial <- To use the serial input
29 setenv stdout video <- To use the video console
30
31Do a simple "saveenv" to save the console settings in the environment
32and get them working on the next startup, too.
33
34HOW CAN I USE STANDARD FILE INTO THE SOURCES?
35---------------------------------------------
36
37You can use the following functions to access the console:
38
39* STDOUT:
40 putc (to put a char to stdout)
41 puts (to put a string to stdout)
42 printf (to format and put a string to stdout)
43
44* STDIN:
45 tstc (to test for the presence of a char in stdin)
46 getc (to get a char from stdin)
47
48* STDERR:
49 eputc (to put a char to stderr)
50 eputs (to put a string to stderr)
51 eprintf (to format and put a string to stderr)
52
53* FILE (can be 'stdin', 'stdout', 'stderr'):
54 fputc (like putc but redirected to a file)
55 fputs (like puts but redirected to a file)
56 fprintf (like printf but redirected to a file)
57 ftstc (like tstc but redirected to a file)
58 fgetc (like getc but redirected to a file)
59
60Remember that all FILE-related functions CANNOT be used before
61U-Boot relocation (done in 'board_init_r' in arch/*/lib/board.c).
62
63HOW CAN I USE STANDARD FILE INTO APPLICATIONS?
64----------------------------------------------
65
66Use the 'bd_mon_fnc' field of the bd_t structure passed to the
67application to do everything you want with the console.
68
69But REMEMBER that that will work only if you have not overwritten any
70U-Boot code while loading (or uncompressing) the image of your
71application.
72
73For example, you won't get the console stuff running in the Linux
74kernel because the kernel overwrites U-Boot before running. Only
75some parameters like the framebuffer descriptors are passed to the
76kernel in the high memory area to let the applications (the kernel)
77use the framebuffers initialized by U-Boot.
78
79SUPPORTED DRIVERS
80-----------------
81
82Working drivers:
83
84 serial (architecture dependent serial stuff)
85 video (mpc8xx video controller)
86
87Work in progress:
88
89 wl_kbd (Wireless 4PPM keyboard)
90
91Waiting for volounteers:
92
93 lcd (mpc8xx lcd controller; to )
94
95TESTED CONFIGURATIONS
96---------------------
97
98The driver has been tested with the following configurations (see
99CREDITS for other contact informations):
100
101- MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it
102
README.davinci
1Summary
2=======
3
4This README is about U-Boot support for TI's ARM 926EJS based family of SoCs.
5These SOCs are used for cameras, video security and surveillance, DVR's, etc.
6DaVinci SOC's comprise of DM644x, DM646x, DM35x and DM36x series of SOC's
7Additionally there are some SOCs meant for the audio market which though have
8an OMAP part number are very similar to the DaVinci series of SOC's
9Additionally, some family members contain a TI DSP and/or graphics
10co processors along with a host of other peripherals.
11
12Currently the following boards are supported:
13
14* TI DaVinci DM644x EVM
15
16* TI DaVinci DM646x EVM
17
18* TI DaVinci DM355 EVM
19
20* TI DaVinci DM365 EVM
21
22* TI DA830 EVM
23
24* TI DA850 EVM
25
26* DM355 based Leopard board
27
28* DM644x based schmoogie board
29
30* DM644x based sffsdr board
31
32* DM644x based sonata board
33
34Build
35=====
36
37* TI DaVinci DM644x EVM:
38
39make davinci_dvevm_config
40make
41
42* TI DaVinci DM646x EVM:
43
44make davinci_dm6467evm_config
45make
46
47* TI DaVinci DM355 EVM:
48
49make davinci_dm355evm_config
50make
51
52* TI DaVinci DM365 EVM:
53
54make davinci_dm365evm_config
55make
56
57* TI DA830 EVM:
58
59make da830evm_config
60make
61
62* TI DA850 EVM:
63
64make da850evm_config
65make
66
67* DM355 based Leopard board:
68
69make davinci_dm355leopard_config
70make
71
72* DM644x based schmoogie board:
73
74make davinci_schmoogie_config
75make
76
77* DM644x based sffsdr board:
78
79make davinci_sffsdr_config
80make
81
82* DM644x based sonata board:
83
84make davinci_sonata_config
85make
86
87Bootloaders
88===============
89
90The DaVinci SOC's use 2 bootloaders. The low level initialization
91is done by a UBL(user boot loader). The UBL is written to a NAND/NOR/SPI flash
92by a programmer. During initial bootup, the ROM Bootloader reads the UBL
93from a storage device and loads it into the IRAM. The UBL then loads the U-Boot
94into the RAM.
95The programmers and UBL are always released as part of any standard TI
96software release associated with an SOC.
97
98Alternative boot method (DA850 EVM only):
99For the DA850 EVM an SPL (secondary program loader, see doc/README.SPL)
100is provided to load U-Boot directly from SPI flash. In this case, the
101SPL does the low level initialization that is otherwise done by the SPL.
102To build U-Boot with this SPL, do
103make da850evm_config
104make u-boot.ais
105and program the resulting u-boot.ais file to the SPI flash of the DA850 EVM.
106
107Environment Variables
108=====================
109
110The DA850 EVM allows the user to specify the maximum cpu clock allowed by the
111silicon, in Hz, via an environment variable "maxcpuclk".
112
113The maximum clock rate allowed depends on the silicon populated on the EVM.
114Please make sure you understand the restrictions placed on this clock in the
115device specific datasheet before setting up this variable. This information is
116passed to the Linux kernel using the ATAG_REVISION atag.
117
118If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK
119is used to obtain this information.
120
121Links
122=====
123
1241) TI DaVinci DM355 EVM:
125http://focus.ti.com/docs/prod/folders/print/tms320dm355.html
126http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=203&osCsid=c499af6087317f11b3da19b4e8f1af32
127
1282) TI DaVinci DM365 EVM:
129http://focus.ti.com/docs/prod/folders/print/tms320dm365.html?247SEM=
130http://support.spectrumdigital.com/boards/evmdm365/revc/
131
1323) DaVinci DM355 based leopard board
133http://designsomething.org/leopardboard/default.aspx
134http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=192&osCsid=67c20335668ffc57cb35727106eb24b1
135
1364) TI DaVinci DM6467 EVM:
137http://focus.ti.com/docs/prod/folders/print/tms320dm6467.html
138http://support.spectrumdigital.com/boards/evmdm6467/revf/
139
1405) TI DaVinci DM6446 EVM:
141http://focus.ti.com/docs/prod/folders/print/tms320dm6446.html
142http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=222
143
1446) TI DA830 EVM
145http://focus.ti.com/apps/docs/gencontent.tsp?appId=1&contentId=52385
146http://www.spectrumdigital.com/product_info.php?cPath=37&products_id=214
147
1487) TI DA850 EVM
149http://focus.ti.com/docs/prod/folders/print/omap-l138.html
150http://www.logicpd.com/products/development-kits/zoom-omap-l138-evm-development-kit
151
152Davinci special defines
153=======================
154
155CONFIG_SYS_DV_NOR_BOOT_CFG: AM18xx based boards, booting in NOR Boot mode
156 need a "NOR Boot Configuration Word" stored
157 in the NOR Flash. This define adds this.
158 More Info about this, see:
159 spraba5a.pdf chapter 3.1
160
README.davinci.nand_spl
1With this approach, we don't need the UBL any more on DaVinci boards.
2A "make boardname" will compile a u-boot.ubl, with UBL Header, which is
3needed for the RBL to find the "UBL", which actually is a UBL-compatible
4header, nand spl code and u-boot code.
5
6
7As the RBL uses another read function as the "standard" u-boot,
8we need a command, which switches between this two read/write
9functions, so we can write the UBL header and the spl
10code in a format, which the RBL can read. This is realize
11(at the moment in board specific code) in the u-boot command
12nandrbl
13
14nandrbl without arguments returns actual mode (rbl or uboot).
15with nandrbl mode (mode = "rbl" or "uboot") you can switch
16between the two NAND read/write modes.
17
18
19To set up mkimage you need a config file for mkimage, example:
20board/ait/cam_enc_4xx/ublimage.cfg
21
22For information about the configuration please see:
23doc/README.ublimage
24
25Example for the cam_enc_4xx board:
26On the cam_enc_4xx board we have a NAND flash with blocksize = 0x20000 and
27pagesize = 0x800, so the u-boot.ubl image (which you get with:
28"make cam_enc_4xx") looks like this:
29
3000000000 00 ed ac a1 20 00 00 00 06 00 00 00 05 00 00 00 |.... ...........|
3100000010 00 00 00 00 20 00 00 00 ff ff ff ff ff ff ff ff |.... ...........|
3200000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
33*
3400000800 14 00 00 ea 14 f0 9f e5 10 f0 9f e5 0c f0 9f e5 |................|
3500000810 08 f0 9f e5 04 f0 9f e5 00 f0 9f e5 04 f0 1f e5 |................|
3600000820 00 01 00 00 78 56 34 12 78 56 34 12 78 56 34 12 |....xV4.xV4.xV4.|
37[...]
38*
3900001fe0 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff |................|
4000001ff0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
41*
4200003800 14 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |................|
4300003810 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |................|
4400003820 80 01 08 81 e0 01 08 81 40 02 08 81 a0 02 08 81 |........@.......|
45
46In the first "page" of the image, we have the UBL Header, needed for
47the RBL to find the spl code.
48
49The spl code starts in the second "page" of the image, with a size
50defined by:
51
52#define CONFIG_SYS_NROF_PAGES_NAND_SPL 6
53
54After the spl code, there comes the "real" u-boot code
55@ (6 + 1) * pagesize = 0x3800
56
57------------------------------------------------------------------------
58Setting up spl code:
59
60/*
61 * RBL searches from Block n (n = 1..24)
62 * so we can define, how many UBL Headers
63 * we write before the real spl code
64 */
65#define CONFIG_SYS_NROF_UBL_HEADER 5
66#define CONFIG_SYS_NROF_PAGES_NAND_SPL 6
67
68#define CONFIG_SYS_NAND_U_BOOT_OFFS ((CONFIG_SYS_NROF_UBL_HEADER * \
69 CONFIG_SYS_NAND_BLOCK_SIZE) + \
70 (CONFIG_SYS_NROF_PAGES_NAND_SPL) * \
71 CONFIG_SYS_NAND_PAGE_SIZE)
72------------------------------------------------------------------------
73
74Burning into NAND:
75
76step 1:
77The RBL searches from Block n ( n = 1..24) on page 0 for valid UBL
78Headers, so you have to burn the UBL header page from the u-boot.ubl
79image to the blocks, you want to have the UBL header.
80!! Don;t forget to switch to rbl nand read/write functions with
81 "nandrbl rbl"
82
83step 2:
84You need to setup in the ublimage.cfg, where the RBL can find the spl
85code, and how big it is.
86
87!! RBL always starts reading from page 0 !!
88
89For the AIT board, we have:
90PAGES 6
91START_BLOCK 5
92
93So we need to copy the spl code to block 5 page 0
94!! Don;t forget to switch to rbl nand read/write functions with
95 "nandrbl rbl"
96
97step 3:
98You need to copy the u-boot image to the block/page
99where the spl code reads it (CONFIG_SYS_NAND_U_BOOT_OFFS)
100!! Don;t forget to switch to rbl nand read/write functions with
101 "nandrbl uboot", which is default.
102
103On the cam_enc_4xx board it is:
104#define CONFIG_SYS_NAND_U_BOOT_OFFS (0xc0000)
105
106-> this results in following NAND usage on the cam_enc_4xx board:
107
108addr
109
11020000 possible UBL Header
11140000 possible UBL Header
11260000 possible UBL Header
11380000 possilbe UBL Header
114a0000 spl code
115c0000 u-boot code
116
117The above steps are executeed through the following environment vars:
118(using 80000 as address for the UBL header)
119
120pagesz=800
121uboot=/tftpboot/cam_enc_4xx/u-boot.ubl
122load=tftp 80000000 ${uboot}
123writeheader nandrbl rbl;nand erase 80000 ${pagesz};nand write 80000000 80000 ${pagesz};nandrbl uboot
124writenand_spl nandrbl rbl;nand erase a0000 3000;nand write 80000800 a0000 3000;nandrbl uboot
125writeuboot nandrbl uboot;nand erase c0000 5d000;nand write 80003800 c0000 5d000
126update=run load writeheader writenand_spl writeuboot
127
128If you do a "run load update" u-boot, spl + ubl header
129are magically updated ;-)
130
131Note:
132- There seem to be a bug in the RBL code (at least on my HW),
133 In the UBL block, I can set the page to values != 0, so it
134 is possible to burn step 1 and step 2 in one step into the
135 flash, but the RBL ignores the page settings, so I have to
136 burn the UBL Header to a page 0 and the spl code to
137 a page 0 ... :-(
138- If we make the nand read/write functions in the RBL equal to
139 the functions in u-boot (as I have no RBL code, it is only
140 possible in u-boot), we could burn the complete image in
141 one step ... that would be nice ...
142
README.dfutftp
1#
2# Copyright (C) 2015
3#
4# Lukasz Majewski <l.majewski@majess.pl>
5#
6#
7# SPDX-License-Identifier: GPL-2.0+
8
9Device Firmware Upgrade (DFU) - extension to use TFTP
10=====================================================
11
12Why?
13----
14
15* Update TFTP (CONFIG_UPDATE_TFTP) only supports writing
16code to NAND memory via TFTP.
17* DFU supports writing data to the variety of mediums (NAND,
18eMMC, SD, partitions, RAM, etc) via USB.
19
20Combination of both solves their shortcomings!
21
22
23Overview
24--------
25
26This document briefly describes how to use DFU for
27upgrading firmware (e.g. kernel, u-boot, rootfs, etc.)
28via TFTP protocol.
29
30By using Ethernet (TFTP protocol to be precise) it is
31possible to overcome the major problem of USB based DFU -
32the relatively low transfer speed for large files.
33This was caused by DFU standard, which imposed utilization
34of only EP0 for transfer. By using Ethernet we can circumvent
35this shortcoming.
36
37Beagle Bone Black rev. C (BBB) powered by TI's am335x CPU has
38been used as a demo board.
39
40To utilize this feature, one needs to first enable support
41for USB based DFU (CONFIG_DFU_*) and DFU TFTP update
42(CONFIG_DFU_TFTP) described in ./doc/README.update.
43
44The "dfu" command has been extended to support transfer via TFTP - one
45needs to type for example "dfu tftp 0 mmc 0"
46
47This feature does not depend on "fitupd" command enabled.
48
49As of this writing (SHA1:8d77576371381ade83de475bb639949b44941e8c v2015.10-rc2)
50the update.c code is not enabled (CONFIG_UPDATE_TFTP) by any board in the
51contemporary u-boot tree.
52
53
54Environment variables
55---------------------
56
57The "dfu tftp" command can be used in the "preboot" environment variable
58(when it is enabled by defining CONFIG_PREBOOT).
59This is the preferable way of using this command in the early boot stage
60as opposed to legacy update_tftp() function invocation.
61
62
63Beagle Bone Black (BBB) setup
64-----------------------------
65
661. Setup tftp env variables:
67 * select desired eth device - 'ethact' variable ["ethact=cpsw"]
68 (use "bdinfo" to check current setting)
69 * setup "serverip" and "ipaddr" variables
70 * set "loadaddr" as a fixed buffer where incoming data is placed
71 ["loadaddr=0x81000000"]
72
73#########
74# BONUS #
75#########
76It is possible to use USB interface to emulate ETH connection by setting
77"ethact=usb_ether". In this way one can have very fast DFU transfer via USB.
78
79For 33MiB test image the transfer rate was 1MiB/s for ETH over USB and 200KiB/s
80for pure DFU USB transfer.
81
822. Setup update_tftp variables:
83 * set "updatefile" - the file name to be downloaded via TFTP (stored on
84 the HOST at e.g. /srv/tftp)
85
863. If required, to update firmware on boot, put the "dfu tftp 0 mmc 0" in the
87 "preboot" env variable. Otherwise use this command from u-boot prompt.
88
894. Inspect "dfu" specific variables:
90 * "dfu_alt_info" - information about available DFU entities
91 * "dfu_bufsiz" - variable to set buffer size [in bytes] - when it is not
92 possible to set large enough default buffer (8 MiB @ BBB)
93
94
95
96FIT image format for download
97-----------------------------
98
99To create FIT image for download one should follow the update tftp README file
100(./doc/README.update) with one notable difference:
101
102The original snippet of ./doc/uImage.FIT/update_uboot.its
103
104 images {
105 update@1 {
106 description = "U-Boot binary";
107
108should look like
109
110 images {
111 u-boot.bin@1 {
112 description = "U-Boot binary";
113
114where "u-boot.bin" is the DFU entity name to be stored.
115
116
117
118To do
119-----
120
121* Extend dfu-util command to support TFTP based transfers
122* Upload support (via TFTP)
123
README.displaying-bmps
1If you are experiencing hangups/data-aborts when trying to display a BMP image,
2the following might be relevant to your situation...
3
4Some architectures cannot handle unaligned memory accesses, and an attempt to
5perform one will lead to a data abort. On such architectures it is necessary to
6make sure all data is properly aligned, and in many situations simply choosing
7a 32 bit aligned address is enough to ensure proper alignment. This is not
8always the case when dealing with data that has an internal layout such as a
9BMP image:
10
11BMP images have a header that starts with 2 byte-size fields followed by mostly
1232 bit fields. The packed struct that represents this header can be seen below:
13
14typedef struct bmp_header {
15 /* Header */
16 char signature[2];
17 __u32 file_size;
18 __u32 reserved;
19 __u32 data_offset;
20 ... etc
21} __attribute__ ((packed)) bmp_header_t;
22
23When placed in an aligned address such as 0x80a00000, char signature offsets
24the __u32 fields into unaligned addresses (in our example 0x80a00002,
250x80a00006, and so on...). When these fields are accessed by U-Boot, a 32 bit
26access is generated at a non-32-bit-aligned address, causing a data abort.
27The proper alignment for BMP images is therefore: 32-bit-aligned-address + 2.
28
README.distro
1/*
2 * (C) Copyright 2014 Red Hat Inc.
3 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
4 * Copyright (C) 2015 K. Merker <merker@debian.org>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9Generic Distro Configuration Concept
10====================================
11
12Linux distributions are faced with supporting a variety of boot mechanisms,
13environments or bootloaders (PC BIOS, EFI, U-Boot, Barebox, ...). This makes
14life complicated. Worse, bootloaders such as U-Boot have a configurable set
15of features, and each board chooses to enable a different set of features.
16Hence, distros typically need to have board-specific knowledge in order to
17set up a bootable system.
18
19This document defines a common set of U-Boot features that are required for
20a distro to support the board in a generic fashion. Any board wishing to
21allow distros to install and boot in an out-of-the-box fashion should enable
22all these features. Linux distros can then create a single set of boot
23support/install logic that targets these features. This will allow distros
24to install on many boards without the need for board-specific logic.
25
26In fact, some of these features can be implemented by any bootloader, thus
27decoupling distro install/boot logic from any knowledge of the bootloader.
28
29This model assumes that boards will load boot configuration files from a
30regular storage mechanism (eMMC, SD card, USB Disk, SATA disk, etc.) with
31a standard partitioning scheme (MBR, GPT). Boards that cannot support this
32storage model are outside the scope of this document, and may still need
33board-specific installer/boot-configuration support in a distro.
34
35To some extent, this model assumes that a board has a separate boot flash
36that contains U-Boot, and that the user has somehow installed U-Boot to this
37flash before running the distro installer. Even on boards that do not conform
38to this aspect of the model, the extent of the board-specific support in the
39distro installer logic would be to install a board-specific U-Boot package to
40the boot partition during installation. This distro-supplied U-Boot can still
41implement the same features as on any other board, and hence the distro's boot
42configuration file generation logic can still be board-agnostic.
43
44Locating Bootable Disks
45-----------------------
46
47Typical desktop/server PCs search all (or a user-defined subset of) attached
48storage devices for a bootable partition, then load the bootloader or boot
49configuration files from there. A U-Boot board port that enables the features
50mentioned in this document will search for boot configuration files in the
51same way.
52
53Thus, distros do not need to manipulate any kind of bootloader-specific
54configuration data to indicate which storage device the system should boot
55from.
56
57Distros simply need to install the boot configuration files (see next
58section) in an ext2/3/4 or FAT partition, mark the partition bootable (via
59the MBR bootable flag, or GPT legacy_bios_bootable attribute), and U-Boot (or
60any other bootloader) will find those boot files and execute them. This is
61conceptually identical to creating a grub2 configuration file on a desktop
62PC.
63
64Note that in the absence of any partition that is explicitly marked bootable,
65U-Boot falls back to searching the first valid partition of a disk for boot
66configuration files. Other bootloaders are recommended to do the same, since
67I believe that partition table bootable flags aren't so commonly used outside
68the realm of x86 PCs.
69
70U-Boot can also search for boot configuration files from a TFTP server.
71
72Boot Configuration Files
73------------------------
74
75The standard format for boot configuration files is that of extlinux.conf, as
76handled by U-Boot's "syslinux" (disk) or "pxe boot" (network). This is roughly
77as specified at:
78
79http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/
80
81... with the exceptions that the BootLoaderSpec document:
82
83* Prescribes a separate configuration per boot menu option, whereas U-Boot
84 lumps all options into a single extlinux.conf file. Hence, U-Boot searches
85 for /extlinux/extlinux.conf then /boot/extlinux/extlinux.conf on disk, or
86 pxelinux.cfg/default over the network.
87
88* Does not document the fdtdir option, which automatically selects the DTB to
89 pass to the kernel.
90
91One example extlinux.conf generated by the Fedora installer is:
92
93------------------------------------------------------------
94# extlinux.conf generated by anaconda
95
96ui menu.c32
97
98menu autoboot Welcome to Fedora. Automatic boot in # second{,s}. Press a key for options.
99menu title Fedora Boot Options.
100menu hidden
101
102timeout 50
103#totaltimeout 9000
104
105default Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae) 22 (Rawhide)
106
107label Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl) 22 (Rawhide)
108 kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl
109 append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf
110 fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl
111 initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl.img
112
113label Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae) 22 (Rawhide)
114 kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae
115 append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf
116 fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae
117 initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl+lpae.img
118
119label Fedora-0-rescue-8f6ba7b039524e0eb957d2c9203f04bc (0-rescue-8f6ba7b039524e0eb957d2c9203f04bc)
120 kernel /boot/vmlinuz-0-rescue-8f6ba7b039524e0eb957d2c9203f04bc
121 initrd /boot/initramfs-0-rescue-8f6ba7b039524e0eb957d2c9203f04bc.img
122 append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8
123 fdtdir /boot/dtb-3.16.0-0.rc6.git1.1.fc22.armv7hl+lpae
124------------------------------------------------------------
125
126Another hand-crafted network boot configuration file is:
127
128------------------------------------------------------------
129TIMEOUT 100
130
131MENU TITLE TFTP boot options
132
133LABEL jetson-tk1-emmc
134 MENU LABEL ../zImage root on Jetson TK1 eMMC
135 LINUX ../zImage
136 FDTDIR ../
137 APPEND console=ttyS0,115200n8 console=tty1 loglevel=8 rootwait rw earlyprintk root=PARTUUID=80a5a8e9-c744-491a-93c1-4f4194fd690b
138
139LABEL venice2-emmc
140 MENU LABEL ../zImage root on Venice2 eMMC
141 LINUX ../zImage
142 FDTDIR ../
143 APPEND console=ttyS0,115200n8 console=tty1 loglevel=8 rootwait rw earlyprintk root=PARTUUID=5f71e06f-be08-48ed-b1ef-ee4800cc860f
144
145LABEL sdcard
146 MENU LABEL ../zImage, root on 2GB sdcard
147 LINUX ../zImage
148 FDTDIR ../
149 APPEND console=ttyS0,115200n8 console=tty1 loglevel=8 rootwait rw earlyprintk root=PARTUUID=b2f82cda-2535-4779-b467-094a210fbae7
150
151LABEL fedora-installer-fk
152 MENU LABEL Fedora installer w/ Fedora kernel
153 LINUX fedora-installer/vmlinuz
154 INITRD fedora-installer/initrd.img.orig
155 FDTDIR fedora-installer/dtb
156 APPEND loglevel=8 ip=dhcp inst.repo=http://10.0.0.2/mirrors/fedora/linux/development/rawhide/armhfp/os/ rd.shell cma=64M
157------------------------------------------------------------
158
159U-Boot Implementation
160=====================
161
162Enabling the distro options
163---------------------------
164
165In your board's defconfig, enable the DISTRO_DEFAULTS option by adding
166a line with "CONFIG_DISTRO_DEFAULTS=y". If you want to enable this
167from Kconfig itself, for e.g. all boards using a specific SoC then
168add a "default y if ARCH_FOO" to the DISTRO_DEFAULTS section of
169the Kconfig file in the root of the u-boot sources.
170
171In your board configuration file, include the following:
172
173------------------------------------------------------------
174#ifndef CONFIG_SPL_BUILD
175#include <config_distro_defaults.h>
176#include <config_distro_bootcmd.h>
177#endif
178------------------------------------------------------------
179
180The first of those headers primarily enables a core set of U-Boot features,
181such as support for MBR and GPT partitions, ext* and FAT filesystems, booting
182raw zImage and initrd (rather than FIT- or uImage-wrapped files), etc. Network
183boot support is also enabled here, which is useful in order to boot distro
184installers given that distros do not commonly distribute bootable install
185media for non-PC targets at present.
186
187Finally, a few options that are mostly relevant only when using U-Boot-
188specific boot.scr scripts are enabled. This enables distros to generate a
189U-Boot-specific boot.scr script rather than extlinux.conf as the boot
190configuration file. While doing so is fully supported, and
191<config_distro_defaults.h> exposes enough parameterization to boot.scr to
192allow for board-agnostic boot.scr content, this document recommends that
193distros generate extlinux.conf rather than boot.scr. extlinux.conf is intended
194to work across multiple bootloaders, whereas boot.scr will only work with
195U-Boot. TODO: document the contract between U-Boot and boot.scr re: which
196environment variables a generic boot.scr may rely upon.
197
198The second of those headers sets up the default environment so that $bootcmd
199is defined in a way that searches attached disks for boot configuration files,
200and executes them if found.
201
202Required Environment Variables
203------------------------------
204
205The U-Boot "syslinux" and "pxe boot" commands require a number of environment
206variables be set. Default values for these variables are often hard-coded into
207CONFIG_EXTRA_ENV_SETTINGS in the board's U-Boot configuration file, so that
208the user doesn't have to configure them.
209
210fdt_addr:
211
212 Mandatory for any system that provides the DTB in HW (e.g. ROM) and wishes
213 to pass that DTB to Linux, rather than loading a DTB from the boot
214 filesystem. Prohibited for any other system.
215
216 If specified a DTB to boot the system must be available at the given
217 address.
218
219fdt_addr_r:
220
221 Mandatory. The location in RAM where the DTB will be loaded or copied to when
222 processing the fdtdir/devicetreedir or fdt/devicetree options in
223 extlinux.conf.
224
225 This is mandatory even when fdt_addr is provided, since extlinux.conf must
226 always be able to provide a DTB which overrides any copy provided by the HW.
227
228 A size of 1MB for the FDT/DTB seems reasonable.
229
230ramdisk_addr_r:
231
232 Mandatory. The location in RAM where the initial ramdisk will be loaded to
233 when processing the initrd option in extlinux.conf.
234
235 It is recommended that this location be highest in RAM out of fdt_addr_,
236 kernel_addr_r, and ramdisk_addr_r, so that the RAM disk can vary in size
237 and use any available RAM.
238
239kernel_addr_r:
240
241 Mandatory. The location in RAM where the kernel will be loaded to when
242 processing the kernel option in the extlinux.conf.
243
244 The kernel should be located within the first 128M of RAM in order for the
245 kernel CONFIG_AUTO_ZRELADDR option to work, which is likely enabled on any
246 distro kernel. Since the kernel will decompress itself to 0x8000 after the
247 start of RAM, kernel_addr_r should not overlap that area, or the kernel will
248 have to copy itself somewhere else first before decompression.
249
250 A size of 16MB for the kernel is likely adequate.
251
252pxefile_addr_r:
253
254 Mandatory. The location in RAM where extlinux.conf will be loaded to prior
255 to processing.
256
257 A size of 1MB for extlinux.conf is more than adequate.
258
259scriptaddr:
260
261 Mandatory, if the boot script is boot.scr rather than extlinux.conf. The
262 location in RAM where boot.scr will be loaded to prior to execution.
263
264 A size of 1MB for extlinux.conf is more than adequate.
265
266For suggestions on memory locations for ARM systems, you must follow the
267guidelines specified in Documentation/arm/Booting in the Linux kernel tree.
268
269For a commented example of setting these values, please see the definition of
270MEM_LAYOUT_ENV_SETTINGS in include/configs/tegra124-common.h.
271
272Boot Target Configuration
273-------------------------
274
275<config_distro_bootcmd.h> defines $bootcmd and many helper command variables
276that automatically search attached disks for boot configuration files and
277execute them. Boards must provide configure <config_distro_bootcmd.h> so that
278it supports the correct set of possible boot device types. To provide this
279configuration, simply define macro BOOT_TARGET_DEVICES prior to including
280<config_distro_bootcmd.h>. For example:
281
282------------------------------------------------------------
283#ifndef CONFIG_SPL_BUILD
284#define BOOT_TARGET_DEVICES(func) \
285 func(MMC, mmc, 1) \
286 func(MMC, mmc, 0) \
287 func(USB, usb, 0) \
288 func(PXE, pxe, na) \
289 func(DHCP, dhcp, na)
290#include <config_distro_bootcmd.h>
291#endif
292------------------------------------------------------------
293
294Each entry in the macro defines a single boot device (e.g. a specific eMMC
295device or SD card) or type of boot device (e.g. USB disk). The parameters to
296the func macro (passed in by the internal implementation of the header) are:
297
298- Upper-case disk type (MMC, SATA, SCSI, IDE, USB, DHCP, PXE).
299- Lower-case disk type (same options as above).
300- ID of the specific disk (MMC only) or ignored for other types.
301
302User Configuration
303==================
304
305Once the user has installed U-Boot, it is expected that the environment will
306be reset to the default values in order to enable $bootcmd and friends, as set
307up by <config_distro_bootcmd.h>. After this, various environment variables may
308be altered to influence the boot process:
309
310boot_targets:
311
312 The list of boot locations searched.
313
314 Example: mmc0, mmc1, usb, pxe
315
316 Entries may be removed or re-ordered in this list to affect the boot order.
317
318boot_prefixes:
319
320 For disk-based booting, the list of directories within a partition that are
321 searched for boot configuration files (extlinux.conf, boot.scr).
322
323 Example: / /boot/
324
325 Entries may be removed or re-ordered in this list to affect the set of
326 directories which are searched.
327
328boot_scripts:
329
330 The name of U-Boot style boot.scr files that $bootcmd searches for.
331
332 Example: boot.scr.uimg boot.scr
333
334 (Typically we expect extlinux.conf to be used, but execution of boot.scr is
335 maintained for backwards-compatibility.)
336
337 Entries may be removed or re-ordered in this list to affect the set of
338 filenames which are supported.
339
340scan_dev_for_extlinux:
341
342 If you want to disable extlinux.conf on all disks, set the value to something
343 innocuous, e.g. setenv scan_dev_for_extlinux true.
344
345scan_dev_for_scripts:
346
347 If you want to disable boot.scr on all disks, set the value to something
348 innocuous, e.g. setenv scan_dev_for_scripts true.
349
350boot_net_usb_start:
351
352 If you want to prevent USB enumeration by distro boot commands which execute
353 network operations, set the value to something innocuous, e.g. setenv
354 boot_net_usb_start true. This would be useful if you know your Ethernet
355 device is not attached to USB, and you wish to increase boot speed by
356 avoiding unnecessary actions.
357
358boot_net_pci_enum:
359
360 If you want to prevent PCI enumeration by distro boot commands which execute
361 network operations, set the value to something innocuous, e.g. setenv
362 boot_net_pci_enum true. This would be useful if you know your Ethernet
363 device is not attached to PCI, and you wish to increase boot speed by
364 avoiding unnecessary actions.
365
366Interactively booting from a specific device at the u-boot prompt
367=================================================================
368
369For interactively booting from a user-selected device at the u-boot command
370prompt, the environment provides predefined bootcmd_<target> variables for
371every target defined in boot_targets, which can be run be the user.
372
373If the target is a storage device, the format of the target is always
374<device type><device number>, e.g. mmc0. Specifying the device number is
375mandatory for storage devices, even if only support for a single instance
376of the storage device is actually implemented.
377
378For network targets (dhcp, pxe), only the device type gets specified;
379they do not have a device number.
380
381Examples:
382
383 - run bootcmd_usb0
384 boots from the first USB mass storage device
385
386 - run bootcmd_mmc1
387 boots from the second MMC device
388
389 - run bootcmd_pxe
390 boots by tftp using a pxelinux.cfg
391
392The list of possible targets consists of:
393
394- network targets
395 * dhcp
396 * pxe
397
398- storage targets (to which a device number must be appended)
399 * mmc
400 * sata
401 * scsi
402 * ide
403 * usb
404
405Other *boot* variables than the ones defined above are only for internal use
406of the boot environment and are not guaranteed to exist or work in the same
407way in future u-boot versions. In particular the <device type>_boot
408variables (e.g. mmc_boot, usb_boot) are a strictly internal implementation
409detail and must not be used as a public interface.
410
README.dns
1Domain Name System
2-------------------------------------------
3
4The Domain Name System (DNS) is a hierarchical naming system for computers,
5services, or any resource participating in the Internet. It associates various
6information with domain names assigned to each of the participants. Most
7importantly, it translates domain names meaningful to humans into the numerical
8(binary) identifiers associated with networking equipment for the purpose of
9locating and addressing these devices world-wide. An often used analogy to
10explain the Domain Name System is that it serves as the "phone book" for the
11Internet by translating human-friendly computer hostnames into IP addresses.
12For example, www.example.com translates to 208.77.188.166.
13
14For more information on DNS - http://en.wikipedia.org/wiki/Domain_Name_System
15
16U-Boot and DNS
17------------------------------------------
18
19CONFIG_CMD_DNS - controls if the 'dns' command is compiled in. If it is, it
20 will send name lookups to the dns server (env var 'dnsip')
21 Turning this option on will about abou 1k to U-Boot's size.
22
23 Example:
24
25bfin> print dnsip
26dnsip=192.168.0.1
27
28bfin> dns www.google.com
2966.102.1.104
30
31 By default, dns does nothing except print the IP number on
32 the default console - which by itself, would be pretty
33 useless. Adding a third argument to the dns command will
34 use that as the environment variable to be set.
35
36 Example:
37
38bfin> print googleip
39## Error: "googleip" not defined
40bfin> dns www.google.com googleip
4164.233.161.104
42bfin> print googleip
43googleip=64.233.161.104
44bfin> ping ${googleip}
45Using Blackfin EMAC device
46host 64.233.161.104 is alive
47
48 In this way, you can lookup, and set many more meaningful
49 things.
50
51bfin> sntp
52ntpserverip not set
53bfin> dns pool.ntp.org ntpserverip
5472.18.205.156
55bfin> sntp
56Date: 2009-07-18 Time: 4:06:57
57
58 For some helpful things that can be related to DNS in U-Boot,
59 look at the top level README for these config options:
60 CONFIG_CMD_DHCP
61 CONFIG_BOOTP_DNS
62 CONFIG_BOOTP_DNS2
63
README.drivers.eth
1!!! WARNING !!!
2
3This guide describes to the old way of doing things. No new Ethernet drivers
4should be implemented this way. All new drivers should be written against the
5U-Boot core driver model. See doc/driver-model/README.txt
6
7-----------------------
8 Ethernet Driver Guide
9-----------------------
10
11The networking stack in Das U-Boot is designed for multiple network devices
12to be easily added and controlled at runtime. This guide is meant for people
13who wish to review the net driver stack with an eye towards implementing your
14own ethernet device driver. Here we will describe a new pseudo 'APE' driver.
15
16------------------
17 Driver Functions
18------------------
19
20All functions you will be implementing in this document have the return value
21meaning of 0 for success and non-zero for failure.
22
23 ----------
24 Register
25 ----------
26
27When U-Boot initializes, it will call the common function eth_initialize().
28This will in turn call the board-specific board_eth_init() (or if that fails,
29the cpu-specific cpu_eth_init()). These board-specific functions can do random
30system handling, but ultimately they will call the driver-specific register
31function which in turn takes care of initializing that particular instance.
32
33Keep in mind that you should code the driver to avoid storing state in global
34data as someone might want to hook up two of the same devices to one board.
35Any such information that is specific to an interface should be stored in a
36private, driver-defined data structure and pointed to by eth->priv (see below).
37
38So the call graph at this stage would look something like:
39board_init()
40 eth_initialize()
41 board_eth_init() / cpu_eth_init()
42 driver_register()
43 initialize eth_device
44 eth_register()
45
46At this point in time, the only thing you need to worry about is the driver's
47register function. The pseudo code would look something like:
48int ape_register(bd_t *bis, int iobase)
49{
50 struct ape_priv *priv;
51 struct eth_device *dev;
52 struct mii_dev *bus;
53
54 priv = malloc(sizeof(*priv));
55 if (priv == NULL)
56 return -ENOMEM;
57
58 dev = malloc(sizeof(*dev));
59 if (dev == NULL) {
60 free(priv);
61 return -ENOMEM;
62 }
63
64 /* setup whatever private state you need */
65
66 memset(dev, 0, sizeof(*dev));
67 sprintf(dev->name, "APE");
68
69 /*
70 * if your device has dedicated hardware storage for the
71 * MAC, read it and initialize dev->enetaddr with it
72 */
73 ape_mac_read(dev->enetaddr);
74
75 dev->iobase = iobase;
76 dev->priv = priv;
77 dev->init = ape_init;
78 dev->halt = ape_halt;
79 dev->send = ape_send;
80 dev->recv = ape_recv;
81 dev->write_hwaddr = ape_write_hwaddr;
82
83 eth_register(dev);
84
85#ifdef CONFIG_PHYLIB
86 bus = mdio_alloc();
87 if (!bus) {
88 free(priv);
89 free(dev);
90 return -ENOMEM;
91 }
92
93 bus->read = ape_mii_read;
94 bus->write = ape_mii_write;
95 mdio_register(bus);
96#endif
97
98 return 1;
99}
100
101The exact arguments needed to initialize your device are up to you. If you
102need to pass more/less arguments, that's fine. You should also add the
103prototype for your new register function to include/netdev.h.
104
105The return value for this function should be as follows:
106< 0 - failure (hardware failure, not probe failure)
107>=0 - number of interfaces detected
108
109You might notice that many drivers seem to use xxx_initialize() rather than
110xxx_register(). This is the old naming convention and should be avoided as it
111causes confusion with the driver-specific init function.
112
113Other than locating the MAC address in dedicated hardware storage, you should
114not touch the hardware in anyway. That step is handled in the driver-specific
115init function. Remember that we are only registering the device here, we are
116not checking its state or doing random probing.
117
118 -----------
119 Callbacks
120 -----------
121
122Now that we've registered with the ethernet layer, we can start getting some
123real work done. You will need five functions:
124 int ape_init(struct eth_device *dev, bd_t *bis);
125 int ape_send(struct eth_device *dev, volatile void *packet, int length);
126 int ape_recv(struct eth_device *dev);
127 int ape_halt(struct eth_device *dev);
128 int ape_write_hwaddr(struct eth_device *dev);
129
130The init function checks the hardware (probing/identifying) and gets it ready
131for send/recv operations. You often do things here such as resetting the MAC
132and/or PHY, and waiting for the link to autonegotiate. You should also take
133the opportunity to program the device's MAC address with the dev->enetaddr
134member. This allows the rest of U-Boot to dynamically change the MAC address
135and have the new settings be respected.
136
137The send function does what you think -- transmit the specified packet whose
138size is specified by length (in bytes). You should not return until the
139transmission is complete, and you should leave the state such that the send
140function can be called multiple times in a row.
141
142The recv function should process packets as long as the hardware has them
143readily available before returning. i.e. you should drain the hardware fifo.
144For each packet you receive, you should call the net_process_received_packet() function on it
145along with the packet length. The common code sets up packet buffers for you
146already in the .bss (net_rx_packets), so there should be no need to allocate your
147own. This doesn't mean you must use the net_rx_packets array however; you're
148free to call the net_process_received_packet() function with any buffer you wish. So the pseudo
149code here would look something like:
150int ape_recv(struct eth_device *dev)
151{
152 int length, i = 0;
153 ...
154 while (packets_are_available()) {
155 ...
156 length = ape_get_packet(&net_rx_packets[i]);
157 ...
158 net_process_received_packet(&net_rx_packets[i], length);
159 ...
160 if (++i >= PKTBUFSRX)
161 i = 0;
162 ...
163 }
164 ...
165 return 0;
166}
167
168The halt function should turn off / disable the hardware and place it back in
169its reset state. It can be called at any time (before any call to the related
170init function), so make sure it can handle this sort of thing.
171
172The write_hwaddr function should program the MAC address stored in dev->enetaddr
173into the Ethernet controller.
174
175So the call graph at this stage would look something like:
176some net operation (ping / tftp / whatever...)
177 eth_init()
178 dev->init()
179 eth_send()
180 dev->send()
181 eth_rx()
182 dev->recv()
183 eth_halt()
184 dev->halt()
185
186--------------------------------
187 CONFIG_PHYLIB / CONFIG_CMD_MII
188--------------------------------
189
190If your device supports banging arbitrary values on the MII bus (pretty much
191every device does), you should add support for the mii command. Doing so is
192fairly trivial and makes debugging mii issues a lot easier at runtime.
193
194After you have called eth_register() in your driver's register function, add
195a call to mdio_alloc() and mdio_register() like so:
196 bus = mdio_alloc();
197 if (!bus) {
198 free(priv);
199 free(dev);
200 return -ENOMEM;
201 }
202
203 bus->read = ape_mii_read;
204 bus->write = ape_mii_write;
205 mdio_register(bus);
206
207And then define the mii_read and mii_write functions if you haven't already.
208Their syntax is straightforward:
209 int mii_read(struct mii_dev *bus, int addr, int devad, int reg);
210 int mii_write(struct mii_dev *bus, int addr, int devad, int reg,
211 u16 val);
212
213The read function should read the register 'reg' from the phy at address 'addr'
214and return the result to its caller. The implementation for the write function
215should logically follow.
216
README.efi
1#
2# Copyright (C) 2015 Google, Inc
3#
4# SPDX-License-Identifier: GPL-2.0+
5#
6
7=========== Table of Contents ===========
8
9 1 U-Boot on EFI
10 1.1 In God's Name, Why?
11 1.2 Status
12 1.3 Build Instructions
13 1.4 Trying it out
14 1.5 Inner workings
15 1.6 EFI Application
16 1.7 EFI Payload
17 1.8 Tables
18 1.9 Interrupts
19 1.10 32/64-bit
20 1.11 Future work
21 1.12 Where is the code?
22
23 2 EFI on U-Boot
24 2.1 In God's Name, Why?
25 2.2 How do I get it?
26 2.3 Status
27 2.4 Future work
28
29U-Boot on EFI
30=============
31This document provides information about U-Boot running on top of EFI, either
32as an application or just as a means of getting U-Boot onto a new platform.
33
34
35In God's Name, Why?
36-------------------
37This is useful in several situations:
38
39- You have EFI running on a board but U-Boot does not natively support it
40fully yet. You can boot into U-Boot from EFI and use that until U-Boot is
41fully ported
42
43- You need to use an EFI implementation (e.g. UEFI) because your vendor
44requires it in order to provide support
45
46- You plan to use coreboot to boot into U-Boot but coreboot support does
47not currently exist for your platform. In the meantime you can use U-Boot
48on EFI and then move to U-Boot on coreboot when ready
49
50- You use EFI but want to experiment with a simpler alternative like U-Boot
51
52
53Status
54------
55Only x86 is supported at present. If you are using EFI on another architecture
56you may want to reconsider. However, much of the code is generic so could be
57ported.
58
59U-Boot supports running as an EFI application for 32-bit EFI only. This is
60not very useful since only a serial port is provided. You can look around at
61memory and type 'help' but that is about it.
62
63More usefully, U-Boot supports building itself as a payload for either 32-bit
64or 64-bit EFI. U-Boot is packaged up and loaded in its entirety by EFI. Once
65started, U-Boot changes to 32-bit mode (currently) and takes over the
66machine. You can use devices, boot a kernel, etc.
67
68
69Build Instructions
70------------------
71First choose a board that has EFI support and obtain an EFI implementation
72for that board. It will be either 32-bit or 64-bit. Alternatively, you can
73opt for using QEMU [1] and the OVMF [2], as detailed below.
74
75To build U-Boot as an EFI application (32-bit EFI required), enable CONFIG_EFI
76and CONFIG_EFI_APP. The efi-x86 config (efi-x86_defconfig) is set up for this.
77Just build U-Boot as normal, e.g.
78
79 make efi-x86_defconfig
80 make
81
82To build U-Boot as an EFI payload (32-bit or 64-bit EFI can be used), adjust an
83existing config (like qemu-x86_defconfig) to enable CONFIG_EFI, CONFIG_EFI_STUB
84and either CONFIG_EFI_STUB_32BIT or CONFIG_EFI_STUB_64BIT. All of these are
85boolean Kconfig options. Then build U-Boot as normal, e.g.
86
87 make qemu-x86_defconfig
88 make
89
90You will end up with one of these files depending on what you build for:
91
92 u-boot-app.efi - U-Boot EFI application
93 u-boot-payload.efi - U-Boot EFI payload application
94
95
96Trying it out
97-------------
98QEMU is an emulator and it can emulate an x86 machine. Please make sure your
99QEMU version is 2.3.0 or above to test this. You can run the payload with
100something like this:
101
102 mkdir /tmp/efi
103 cp /path/to/u-boot*.efi /tmp/efi
104 qemu-system-x86_64 -bios bios.bin -hda fat:/tmp/efi/
105
106Add -nographic if you want to use the terminal for output. Once it starts
107type 'fs0:u-boot-payload.efi' to run the payload or 'fs0:u-boot-app.efi' to
108run the application. 'bios.bin' is the EFI 'BIOS'. Check [2] to obtain a
109prebuilt EFI BIOS for QEMU or you can build one from source as well.
110
111To try it on real hardware, put u-boot-app.efi on a suitable boot medium,
112such as a USB stick. Then you can type something like this to start it:
113
114 fs0:u-boot-payload.efi
115
116(or fs0:u-boot-app.efi for the application)
117
118This will start the payload, copy U-Boot into RAM and start U-Boot. Note
119that EFI does not support booting a 64-bit application from a 32-bit
120EFI (or vice versa). Also it will often fail to print an error message if
121you get this wrong.
122
123
124Inner workings
125==============
126Here follow a few implementation notes for those who want to fiddle with
127this and perhaps contribute patches.
128
129The application and payload approaches sound similar but are in fact
130implemented completely differently.
131
132EFI Application
133---------------
134For the application the whole of U-Boot is built as a shared library. The
135efi_main() function is in lib/efi/efi_app.c. It sets up some basic EFI
136functions with efi_init(), sets up U-Boot global_data, allocates memory for
137U-Boot's malloc(), etc. and enters the normal init sequence (board_init_f()
138and board_init_r()).
139
140Since U-Boot limits its memory access to the allocated regions very little
141special code is needed. The CONFIG_EFI_APP option controls a few things
142that need to change so 'git grep CONFIG_EFI_APP' may be instructive.
143The CONFIG_EFI option controls more general EFI adjustments.
144
145The only available driver is the serial driver. This calls back into EFI
146'boot services' to send and receive characters. Although it is implemented
147as a serial driver the console device is not necessarilly serial. If you
148boot EFI with video output then the 'serial' device will operate on your
149target devices's display instead and the device's USB keyboard will also
150work if connected. If you have both serial and video output, then both
151consoles will be active. Even though U-Boot does the same thing normally,
152These are features of EFI, not U-Boot.
153
154Very little code is involved in implementing the EFI application feature.
155U-Boot is highly portable. Most of the difficulty is in modifying the
156Makefile settings to pass the right build flags. In particular there is very
157little x86-specific code involved - you can find most of it in
158arch/x86/cpu. Porting to ARM (which can also use EFI if you are brave
159enough) should be straightforward.
160
161Use the 'reset' command to get back to EFI.
162
163EFI Payload
164-----------
165The payload approach is a different kettle of fish. It works by building
166U-Boot exactly as normal for your target board, then adding the entire
167image (including device tree) into a small EFI stub application responsible
168for booting it. The stub application is built as a normal EFI application
169except that it has a lot of data attached to it.
170
171The stub application is implemented in lib/efi/efi_stub.c. The efi_main()
172function is called by EFI. It is responsible for copying U-Boot from its
173original location into memory, disabling EFI boot services and starting
174U-Boot. U-Boot then starts as normal, relocates, starts all drivers, etc.
175
176The stub application is architecture-dependent. At present it has some
177x86-specific code and a comment at the top of efi_stub.c describes this.
178
179While the stub application does allocate some memory from EFI this is not
180used by U-Boot (the payload). In fact when U-Boot starts it has all of the
181memory available to it and can operate as it pleases (but see the next
182section).
183
184Tables
185------
186The payload can pass information to U-Boot in the form of EFI tables. At
187present this feature is used to pass the EFI memory map, an inordinately
188large list of memory regions. You can use the 'efi mem all' command to
189display this list. U-Boot uses the list to work out where to relocate
190itself.
191
192Although U-Boot can use any memory it likes, EFI marks some memory as used
193by 'run-time services', code that hangs around while U-Boot is running and
194is even present when Linux is running. This is common on x86 and provides
195a way for Linux to call back into the firmware to control things like CPU
196fan speed. U-Boot uses only 'conventional' memory, in EFI terminology. It
197will relocate itself to the top of the largest block of memory it can find
198below 4GB.
199
200Interrupts
201----------
202U-Boot drivers typically don't use interrupts. Since EFI enables interrupts
203it is possible that an interrupt will fire that U-Boot cannot handle. This
204seems to cause problems. For this reason the U-Boot payload runs with
205interrupts disabled at present.
206
20732/64-bit
208---------
209While the EFI application can in principle be built as either 32- or 64-bit,
210only 32-bit is currently supported. This means that the application can only
211be used with 32-bit EFI.
212
213The payload stub can be build as either 32- or 64-bits. Only a small amount
214of code is built this way (see the extra- line in lib/efi/Makefile).
215Everything else is built as a normal U-Boot, so is always 32-bit on x86 at
216present.
217
218Future work
219-----------
220This work could be extended in a number of ways:
221
222- Add a generic x86 EFI payload configuration. At present you need to modify
223an existing one, but mostly the low-level x86 code is disabled when booting
224on EFI anyway, so a generic 'EFI' board could be created with a suitable set
225of drivers enabled.
226
227- Add ARM support
228
229- Add 64-bit application support
230
231- Figure out how to solve the interrupt problem
232
233- Add more drivers to the application side (e.g. video, block devices, USB,
234environment access). This would mostly be an academic exercise as a strong
235use case is not readily apparent, but it might be fun.
236
237- Avoid turning off boot services in the stub. Instead allow U-Boot to make
238use of boot services in case it wants to. It is unclear what it might want
239though.
240
241Where is the code?
242------------------
243lib/efi
244 payload stub, application, support code. Mostly arch-neutral
245
246arch/x86/lib/efi
247 helper functions for the fake DRAM init, etc. These can be used by
248 any board that runs as a payload.
249
250arch/x86/cpu/efi
251 x86 support code for running as an EFI application
252
253board/efi/efi-x86/efi.c
254 x86 board code for running as an EFI application
255
256common/cmd_efi.c
257 the 'efi' command
258
259--
260Ben Stoltz, Simon Glass
261Google, Inc
262July 2015
263
264[1] http://www.qemu.org
265[2] http://www.tianocore.org/ovmf/
266
267-------------------------------------------------------------------------------
268
269EFI on U-Boot
270=============
271
272In addition to support for running U-Boot as a UEFI application, U-Boot itself
273can also expose the UEFI interfaces and thus allow UEFI payloads to run under
274it.
275
276In God's Name, Why?
277-------------------
278
279With this support in place, you can run any UEFI payload (such as the Linux
280kernel, grub2 or gummiboot) on U-Boot. This dramatically simplifies boot loader
281configuration, as U-Boot based systems now look and feel (almost) the same way
282as TianoCore based systems.
283
284How do I get it?
285----------------
286
287EFI support for 32bit ARM and AArch64 is already included in U-Boot. All you
288need to do is enable
289
290 CONFIG_CMD_BOOTEFI=y
291 CONFIG_EFI_LOADER=y
292
293in your .config file and you will automatically get a bootefi command to run
294an efi application as well as snippet in the default distro boot script that
295scans for removable media efi binaries as fallback.
296
297Status
298------
299
300I am successfully able to run grub2 and Linux EFI binaries with this code on
301ARMv7 as well as AArch64 systems.
302
303When enabled, the resulting U-Boot binary only grows by ~10KB, so it's very
304light weight.
305
306All storage devices are directly accessible from the uEFI payload
307
308Removable media booting (search for /efi/boot/boota{a64,arm}.efi) is supported.
309
310Simple use cases like "Plug this SD card into my ARM device and it just
311boots into grub which boots into Linux", work very well.
312
313
314Running HelloWord.efi
315---------------------
316
317You can run a simple 'hello world' EFI program in U-Boot.
318Enable the option CONFIG_CMD_BOOTEFI_HELLO.
319
320Then you can boot into U-Boot and type:
321
322 > bootefi hello
323
324The 'hello world EFI' program will then run, print a message and exit.
325
326
327Future work
328-----------
329
330Of course, there are still a few things one could do on top:
331
332 - Improve disk media detection (don't scan, use what information we
333have)
334 - Add EFI variable support using NVRAM
335 - Add GFX support
336 - Make EFI Shell work
337 - Network device support
338 - Support for payload exit
339 - Payload Watchdog support
340
README.enetaddr
1---------------------------------
2 Ethernet Address (MAC) Handling
3---------------------------------
4
5There are a variety of places in U-Boot where the MAC address is used, parsed,
6and stored. This document covers proper usage of each location and the moving
7of data between them.
8
9-----------
10 Locations
11-----------
12
13Here are the places where MAC addresses might be stored:
14
15 - board-specific location (eeprom, dedicated flash, ...)
16 Note: only used when mandatory due to hardware design etc...
17
18 - environment ("ethaddr", "eth1addr", ...)
19 Note: this is the preferred way to permanently store MAC addresses
20
21 - ethernet data (struct eth_device -> enetaddr)
22 Note: these are temporary copies of the MAC address which exist only
23 after the respective init steps have run and only to make usage
24 in other places easier (to avoid constant env lookup/parsing)
25
26 - struct bd_info and/or device tree
27 Note: these are temporary copies of the MAC address only for the
28 purpose of passing this information to an OS kernel we are about
29 to boot
30
31Correct flow of setting up the MAC address (summarized):
32
331. Read from hardware in initialize() function
342. Read from environment in net/eth.c after initialize()
353. The environment variable will be compared to the driver initialized
36 struct eth_device->enetaddr. If they differ, a warning is printed, and the
37 environment variable will be used unchanged.
38 If the environment variable is not set, it will be initialized from
39 eth_device->enetaddr, and a warning will be printed.
40 If both are invalid and CONFIG_NET_RANDOM_ETHADDR is defined, a random,
41 locally-assigned MAC is written to eth_device->enetaddr.
424. Program the address into hardware if the following conditions are met:
43 a) The relevant driver has a 'write_addr' function
44 b) The user hasn't set an 'ethmacskip' environment variable
45 c) The address is valid (unicast, not all-zeros)
46
47Previous behavior had the MAC address always being programmed into hardware
48in the device's init() function.
49
50-------
51 Usage
52-------
53
54If the hardware design mandates that the MAC address is stored in some special
55place (like EEPROM etc...), then the board specific init code (such as the
56board-specific misc_init_r() function) is responsible for locating the MAC
57address(es) and initializing the respective environment variable(s) from it.
58Note that this shall be done if, and only if, the environment does not already
59contain these environment variables, i.e. existing variable definitions must
60not be overwritten.
61
62During runtime, the ethernet layer will use the environment variables to sync
63the MAC addresses to the ethernet structures. All ethernet driver code should
64then only use the enetaddr member of the eth_device structure. This is done
65on every network command, so the ethernet copies will stay in sync.
66
67Any other code that wishes to access the MAC address should query the
68environment directly. The helper functions documented below should make
69working with this storage much smoother.
70
71---------
72 Helpers
73---------
74
75To assist in the management of these layers, a few helper functions exist. You
76should use these rather than attempt to do any kind of parsing/manipulation
77yourself as many common errors have arisen in the past.
78
79 * void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
80
81Convert a string representation of a MAC address to the binary version.
82char *addr = "00:11:22:33:44:55";
83uchar enetaddr[6];
84eth_parse_enetaddr(addr, enetaddr);
85/* enetaddr now equals { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 } */
86
87 * int eth_env_get_enetaddr(char *name, uchar *enetaddr);
88
89Look up an environment variable and convert the stored address. If the address
90is valid, then the function returns 1. Otherwise, the function returns 0. In
91all cases, the enetaddr memory is initialized. If the env var is not found,
92then it is set to all zeros. The common function is_valid_ethaddr() is used
93to determine address validity.
94uchar enetaddr[6];
95if (!eth_env_get_enetaddr("ethaddr", enetaddr)) {
96 /* "ethaddr" is not set in the environment */
97 ... try and setup "ethaddr" in the env ...
98}
99/* enetaddr is now set to the value stored in the ethaddr env var */
100
101 * int eth_env_set_enetaddr(char *name, const uchar *enetaddr);
102
103Store the MAC address into the named environment variable. The return value is
104the same as the env_set() function.
105uchar enetaddr[6] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
106eth_env_set_enetaddr("ethaddr", enetaddr);
107/* the "ethaddr" env var should now be set to "00:11:22:33:44:55" */
108
109 * the %pM format modifier
110
111The %pM format modifier can be used with any standard printf function to format
112the binary 6 byte array representation of a MAC address.
113uchar enetaddr[6] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
114printf("The MAC is %pM\n", enetaddr);
115
116char buf[20];
117sprintf(buf, "%pM", enetaddr);
118/* the buf variable is now set to "00:11:22:33:44:55" */
119
README.esbc_validate
1/*
2 * (C) Copyright 2015
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7esbc_validate command
8========================================
9
101. esbc_validate command is meant for validating header and
11 signature of images (Boot Script and ESBC uboot client).
12 SHA-256 and RSA operations are performed using SEC block in HW.
13 This command works on both PBL based and Non PBL based Freescale
14 platforms.
15 Command usage:
16 esbc_validate img_hdr_addr [pub_key_hash]
17 esbc_validate hdr_addr <hash_val>
18 Validates signature using RSA verification.
19 $hdr_addr Address of header of the image to be validated.
20 $hash_val -Optional. It provides Hash of public/srk key to be
21 used to verify signature.
22
232. ESBC uboot client can be linux. Additionally, rootfs and device
24 tree blob can also be signed.
253. In the event of header or signature failure in validation,
26 ITS and ITF bits determine further course of action.
274. In case of soft failure, appropriate error is dumped on console.
285. In case of hard failure, SoC is issued RESET REQUEST after
29 dumping error on the console.
306. KEY REVOCATION Feature:
31 QorIQ platforms like B4/T4 have support of srk key table and key
32 revocation in ISBC code in Silicon.
33 The srk key table allows the user to have a key table with multiple
34 keys and revoke any key in case of particular key gets compromised.
35 In case the ISBC code uses the key revocation and srk key table to
36 verify the u-boot code, the subsequent chain of trust should also
37 use the same.
386. ISBC KEY EXTENSION Feature:
39 This feature allows large number of keys to be used for esbc validation
40 of images. A set of public keys is being signed and validated by ISBC
41 which can be further used for esbc validation of images.
42
README.ext4
1U-Boot supports access of both ext2 and ext4 filesystems, either in read-only
2mode or in read-write mode.
3
4First, to enable support for both ext4 (and, automatically, ext2 as well),
5but without selecting the corresponding commands, use one of:
6
7 #define CONFIG_FS_EXT4 (for read-only)
8 #define CONFIG_EXT4_WRITE (for read-write)
9
10Next, to select the ext2-related commands:
11
12 * ext2ls
13 * ext2load
14
15or ext4-related commands:
16
17 * ext4size
18 * ext4ls
19 * ext4load
20
21use one or both of:
22
23 #define CONFIG_CMD_EXT2
24 #define CONFIG_CMD_EXT4
25
26Selecting either of the above automatically defines CONFIG_FS_EXT4 if it
27wasn't defined already.
28
29In addition, to get the write access command "ext4write", use:
30
31 #define CONFIG_CMD_EXT4_WRITE
32
33which automatically defines CONFIG_EXT4_WRITE if it wasn't defined
34already.
35
36Also relevant are the generic filesystem commands, selected by:
37
38 #define CONFIG_CMD_FS_GENERIC
39
40This does not automatically enable EXT4 support for you, you still need
41to do that yourself.
42
43Some sample commands to test ext4 support:
44
451. Check that the commands can be seen in the output of U-Boot help:
46
47 UBOOT #help
48 ...
49 ext4load- load binary file from a Ext4 file system
50 ext4ls - list files in a directory (default /)
51 ext4size - determine a file's size
52 ext4write- create a file in ext4 formatted partition
53 ...
54
552. To list the files in an ext4-formatted partition, run:
56
57 ext4ls <interface> <dev[:part]> [directory]
58
59 For example:
60 UBOOT #ext4ls mmc 0:5 /usr/lib
61
623. To read and load a file from an ext4-formatted partition to RAM, run:
63
64 ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
65
66 For example:
67 UBOOT #ext4load mmc 2:2 0x30007fc0 uImage
68
694. To write a file to an ext4-formatted partition.
70
71 a) First load a file to RAM at a particular address for example 0x30007fc0.
72 Now execute ext4write command:
73 ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
74
75 For example:
76 UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120
77 (here 6183120 is the size of the file to be written)
78 Note: Absolute path is required for the file to be written
79
80References :
81 -- ext4 implementation in Linux Kernel
82 -- Uboot existing ext2 load and ls implementation
83 -- Journaling block device JBD2 implementation in linux Kernel
84
README.falcon
1U-Boot Falcon Mode
2====================
3
4Introduction
5------------
6
7This document provides an overview of how to add support for Falcon Mode
8to a board.
9
10Falcon Mode is introduced to speed up the booting process, allowing
11to boot a Linux kernel (or whatever image) without a full blown U-Boot.
12
13Falcon Mode relies on the SPL framework. In fact, to make booting faster,
14U-Boot is split into two parts: the SPL (Secondary Program Loader) and U-Boot
15image. In most implementations, SPL is used to start U-Boot when booting from
16a mass storage, such as NAND or SD-Card. SPL has now support for other media,
17and can generally be seen as a way to start an image performing the minimum
18required initialization. SPL mainly initializes the RAM controller, and then
19copies U-Boot image into the memory.
20
21The Falcon Mode extends this way allowing to start the Linux kernel directly
22from SPL. A new command is added to U-Boot to prepare the parameters that SPL
23must pass to the kernel, using ATAGS or Device Tree.
24
25In normal mode, these parameters are generated each time before
26loading the kernel, passing to Linux the address in memory where
27the parameters can be read.
28With Falcon Mode, this snapshot can be saved into persistent storage and SPL is
29informed to load it before running the kernel.
30
31To boot the kernel, these steps under a Falcon-aware U-Boot are required:
32
331. Boot the board into U-Boot.
34After loading the desired legacy-format kernel image into memory (and DT as
35well, if used), use the "spl export" command to generate the kernel parameters
36area or the DT. U-Boot runs as when it boots the kernel, but stops before
37passing the control to the kernel.
38
392. Save the prepared snapshot into persistent media.
40The address where to save it must be configured into board configuration
41file (CONFIG_CMD_SPL_NAND_OFS for NAND).
42
433. Boot the board into Falcon Mode. SPL will load the kernel and copy
44the parameters which are saved in the persistent area to the required address.
45If a valid uImage is not found at the defined location, U-Boot will be
46booted instead.
47
48It is required to implement a custom mechanism to select if SPL loads U-Boot
49or another image.
50
51The value of a GPIO is a simple way to operate the selection, as well as
52reading a character from the SPL console if CONFIG_SPL_CONSOLE is set.
53
54Falcon Mode is generally activated by setting CONFIG_SPL_OS_BOOT. This tells
55SPL that U-Boot is not the only available image that SPL is able to start.
56
57Configuration
58----------------------------
59CONFIG_CMD_SPL Enable the "spl export" command.
60 The command "spl export" is then available in U-Boot
61 mode
62CONFIG_SYS_SPL_ARGS_ADDR Address in RAM where the parameters must be
63 copied by SPL.
64 In most cases, it is <start_of_ram> + 0x100
65
66CONFIG_SYS_NAND_SPL_KERNEL_OFFS Offset in NAND where the kernel is stored
67
68CONFIG_CMD_SPL_NAND_OFS Offset in NAND where the parameters area was saved.
69
70CONFIG_CMD_SPL_WRITE_SIZE Size of the parameters area to be copied
71
72CONFIG_SPL_OS_BOOT Activate Falcon Mode.
73
74Function that a board must implement
75------------------------------------
76
77void spl_board_prepare_for_linux(void) : optional
78 Called from SPL before starting the kernel
79
80spl_start_uboot() : required
81 Returns "0" if SPL should start the kernel, "1" if U-Boot
82 must be started.
83
84Environment variables
85---------------------
86
87A board may chose to look at the environment for decisions about falcon
88mode. In this case the following variables may be supported:
89
90boot_os : Set to yes/Yes/true/True/1 to enable booting to OS,
91 any other value to fall back to U-Boot (including
92 unset)
93falcon_args_file : Filename to load as the 'args' portion of falcon mode
94 rather than the hard-coded value.
95falcon_image_file : Filename to load as the OS image portion of falcon
96 mode rather than the hard-coded value.
97
98Using spl command
99-----------------
100
101spl - SPL configuration
102
103Usage:
104
105spl export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr ]
106
107img : "atags" or "fdt"
108kernel_addr : kernel is loaded as part of the boot process, but it is not started.
109 This is the address where a kernel image is stored.
110initrd_addr : Address of initial ramdisk
111 can be set to "-" if fdt_addr without initrd_addr is used
112fdt_addr : in case of fdt, the address of the device tree.
113
114The spl export command does not write to a storage media. The user is
115responsible to transfer the gathered information (assembled ATAGS list
116or prepared FDT) from temporary storage in RAM into persistant storage
117after each run of 'spl export'. Unfortunately the position of temporary
118storage can not be predicted nor provided at commandline, it depends
119highly on your system setup and your provided data (ATAGS or FDT).
120However at the end of an succesful 'spl export' run it will print the
121RAM address of temporary storage. The RAM address of FDT will also be
122set in the environment variable 'fdtargsaddr', the new length of the
123prepared FDT will be set in the environment variable 'fdtargslen'.
124These environment variables can be used in scripts for writing updated
125FDT to persistent storage.
126
127Now the user have to save the generated BLOB from that printed address
128to the pre-defined address in persistent storage
129(CONFIG_CMD_SPL_NAND_OFS in case of NAND).
130The following example shows how to prepare the data for Falcon Mode on
131twister board with ATAGS BLOB.
132
133The "spl export" command is prepared to work with ATAGS and FDT. However,
134using FDT is at the moment untested. The ppc port (see a3m071 example
135later) prepares the fdt blob with the fdt command instead.
136
137
138Usage on the twister board:
139--------------------------------
140
141Using mtd names with the following (default) configuration
142for mtdparts:
143
144device nand0 <omap2-nand.0>, # parts = 9
145 #: name size offset mask_flags
146 0: MLO 0x00080000 0x00000000 0
147 1: u-boot 0x00100000 0x00080000 0
148 2: env1 0x00040000 0x00180000 0
149 3: env2 0x00040000 0x001c0000 0
150 4: kernel 0x00600000 0x00200000 0
151 5: bootparms 0x00040000 0x00800000 0
152 6: splashimg 0x00200000 0x00840000 0
153 7: mini 0x02800000 0x00a40000 0
154 8: rootfs 0x1cdc0000 0x03240000 0
155
156
157twister => nand read 82000000 kernel
158
159NAND read: device 0 offset 0x200000, size 0x600000
160 6291456 bytes read: OK
161
162Now the kernel is in RAM at address 0x82000000
163
164twister => spl export atags 0x82000000
165## Booting kernel from Legacy Image at 82000000 ...
166 Image Name: Linux-3.5.0-rc4-14089-gda0b7f4
167 Image Type: ARM Linux Kernel Image (uncompressed)
168 Data Size: 3654808 Bytes = 3.5 MiB
169 Load Address: 80008000
170 Entry Point: 80008000
171 Verifying Checksum ... OK
172 Loading Kernel Image ... OK
173OK
174cmdline subcommand not supported
175bdt subcommand not supported
176Argument image is now in RAM at: 0x80000100
177
178The result can be checked at address 0x80000100:
179
180twister => md 0x80000100
18180000100: 00000005 54410001 00000000 00000000 ......AT........
18280000110: 00000000 00000067 54410009 746f6f72 ....g.....ATroot
18380000120: 65642f3d 666e2f76 77722073 73666e20 =/dev/nfs rw nfs
184
185The parameters generated with this step can be saved into NAND at the offset
1860x800000 (value for twister for CONFIG_CMD_SPL_NAND_OFS)
187
188nand erase.part bootparms
189nand write 0x80000100 bootparms 0x4000
190
191Now the parameters are stored into the NAND flash at the address
192CONFIG_CMD_SPL_NAND_OFS (=0x800000).
193
194Next time, the board can be started into Falcon Mode moving the
195setting the gpio (on twister gpio 55 is used) to kernel mode.
196
197The kernel is loaded directly by the SPL without passing through U-Boot.
198
199Example with FDT: a3m071 board
200-------------------------------
201
202To boot the Linux kernel from the SPL, the DT blob (fdt) needs to get
203prepard/patched first. U-Boot usually inserts some dynamic values into
204the DT binary (blob), e.g. autodetected memory size, MAC addresses,
205clocks speeds etc. To generate this patched DT blob, you can use
206the following command:
207
2081. Load fdt blob to SDRAM:
209=> tftp 1800000 a3m071/a3m071.dtb
210
2112. Set bootargs as desired for Linux booting (e.g. flash_mtd):
212=> run mtdargs addip2 addtty
213
2143. Use "fdt" commands to patch the DT blob:
215=> fdt addr 1800000
216=> fdt boardsetup
217=> fdt chosen
218
2194. Display patched DT blob (optional):
220=> fdt print
221
2225. Save fdt to NOR flash:
223=> erase fc060000 fc07ffff
224=> cp.b 1800000 fc060000 10000
225...
226
227
228Falcon Mode was presented at the RMLL 2012. Slides are available at:
229
230http://schedule2012.rmll.info/IMG/pdf/LSM2012_UbootFalconMode_Babic.pdf
231
README.fdt-control
1#
2# Copyright (c) 2011 The Chromium OS Authors.
3#
4# SPDX-License-Identifier: GPL-2.0+
5#
6
7Device Tree Control in U-Boot
8=============================
9
10This feature provides for run-time configuration of U-Boot via a flat
11device tree (fdt). U-Boot configuration has traditionally been done
12using CONFIG options in the board config file. This feature aims to
13make it possible for a single U-Boot binary to support multiple boards,
14with the exact configuration of each board controlled by a flat device
15tree (fdt). This is the approach recently taken by the ARM Linux kernel
16and has been used by PowerPC for some time.
17
18The fdt is a convenient vehicle for implementing run-time configuration
19for three reasons. Firstly it is easy to use, being a simple text file.
20It is extensible since it consists of nodes and properties in a nice
21hierarchical format.
22
23Finally, there is already excellent infrastructure for the fdt: a
24compiler checks the text file and converts it to a compact binary
25format, and a library is already available in U-Boot (libfdt) for
26handling this format.
27
28The dts directory contains a Makefile for building the device tree blob
29and embedding it in your U-Boot image. This is useful since it allows
30U-Boot to configure itself according to what it finds there. If you have
31a number of similar boards with different peripherals, you can describe
32the features of each board in the device tree file, and have a single
33generic source base.
34
35To enable this feature, add CONFIG_OF_CONTROL to your board config file.
36
37
38What is a Flat Device Tree?
39---------------------------
40
41An fdt can be specified in source format as a text file. To read about
42the fdt syntax, take a look at the specification here:
43
44https://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf
45
46You also might find this section of the Linux kernel documentation
47useful: (access this in the Linux kernel source code)
48
49 Documentation/devicetree/booting-without-of.txt
50
51There is also a mailing list:
52
53 http://lists.ozlabs.org/listinfo/devicetree-discuss
54
55In case you are wondering, OF stands for Open Firmware.
56
57
58Tools
59-----
60
61To use this feature you will need to get the device tree compiler here:
62
63 git://git.kernel.org/pub/scm/utils/dtc/dtc.git
64
65For example:
66
67 $ git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git
68 $ cd dtc
69 $ make
70 $ sudo make install
71
72Then run the compiler (your version will vary):
73
74 $ dtc -v
75 Version: DTC 1.2.0-g2cb4b51f
76 $ make tests
77 $ cd tests
78 $ ./run_tests.sh
79 ********** TEST SUMMARY
80 * Total testcases: 1371
81 * PASS: 1371
82 * FAIL: 0
83 * Bad configuration: 0
84 * Strange test result: 0
85
86You will also find a useful fdtdump utility for decoding a binary file, as
87well as fdtget/fdtput for reading and writing properties in a binary file.
88
89
90Where do I get an fdt file for my board?
91----------------------------------------
92
93You may find that the Linux kernel has a suitable file. Look in the
94kernel source in arch/<arch>/boot/dts.
95
96If not you might find other boards with suitable files that you can
97modify to your needs. Look in the board directories for files with a
98.dts extension.
99
100Failing that, you could write one from scratch yourself!
101
102
103Configuration
104-------------
105
106Use:
107
108#define CONFIG_DEFAULT_DEVICE_TREE "<name>"
109
110to set the filename of the device tree source. Then put your device tree
111file into
112
113 board/<vendor>/dts/<name>.dts
114
115This should include your CPU or SOC's device tree file, placed in
116arch/<arch>/dts, and then make any adjustments required.
117
118If CONFIG_OF_EMBED is defined, then it will be picked up and built into
119the U-Boot image (including u-boot.bin). This is suitable for debugging
120and development only and is not recommended for production devices.
121
122If CONFIG_OF_SEPARATE is defined, then it will be built and placed in
123a u-boot.dtb file alongside u-boot.bin. A common approach is then to
124join the two:
125
126 cat u-boot.bin u-boot.dtb >image.bin
127
128and then flash image.bin onto your board. Note that U-Boot creates
129u-boot-dtb.bin which does the above step for you also. If you are using
130CONFIG_SPL_FRAMEWORK, then u-boot.img will be built to include the device
131tree binary.
132
133If CONFIG_OF_BOARD is defined, a board-specific routine will provide the
134device tree at runtime, for example if an earlier bootloader stage creates
135it and passes it to U-Boot.
136
137If CONFIG_OF_HOSTFILE is defined, then it will be read from a file on
138startup. This is only useful for sandbox. Use the -d flag to U-Boot to
139specify the file to read.
140
141You cannot use more than one of these options at the same time.
142
143To use a device tree file that you have compiled yourself, pass
144EXT_DTB=<filename> to 'make', as in:
145
146 make EXT_DTB=boot/am335x-boneblack-pubkey.dtb
147
148Then U-Boot will copy that file to u-boot.dtb, put it in the .img file
149if used, and u-boot-dtb.bin.
150
151If you wish to put the fdt at a different address in memory, you can
152define the "fdtcontroladdr" environment variable. This is the hex
153address of the fdt binary blob, and will override either of the options.
154Be aware that this environment variable is checked prior to relocation,
155when only the compiled-in environment is available. Therefore it is not
156possible to define this variable in the saved SPI/NAND flash
157environment, for example (it will be ignored). After relocation, this
158variable will be set to the address of the newly relocated fdt blob.
159It is read-only and cannot be changed. It can optionally be used to
160control the boot process of Linux with bootm/bootz commands.
161
162To use this, put something like this in your board header file:
163
164#define CONFIG_EXTRA_ENV_SETTINGS "fdtcontroladdr=10000\0"
165
166Build:
167
168After board configuration is done, fdt supported u-boot can be build in two ways:
1691) build the default dts which is defined from CONFIG_DEFAULT_DEVICE_TREE
170 $ make
1712) build the user specified dts file
172 $ make DEVICE_TREE=<dts-file-name>
173
174
175Limitations
176-----------
177
178U-Boot is designed to build with a single architecture type and CPU
179type. So for example it is not possible to build a single ARM binary
180which runs on your AT91 and OMAP boards, relying on an fdt to configure
181the various features. This is because you must select one of
182the CPU families within arch/arm/cpu/arm926ejs (omap or at91) at build
183time. Similarly you cannot build for multiple cpu types or
184architectures.
185
186That said the complexity reduction by using fdt to support variants of
187boards which use the same SOC / CPU can be substantial.
188
189It is important to understand that the fdt only selects options
190available in the platform / drivers. It cannot add new drivers (yet). So
191you must still have the CONFIG option to enable the driver. For example,
192you need to define CONFIG_SYS_NS16550 to bring in the NS16550 driver,
193but can use the fdt to specific the UART clock, peripheral address, etc.
194In very broad terms, the CONFIG options in general control *what* driver
195files are pulled in, and the fdt controls *how* those files work.
196
197--
198Simon Glass <sjg@chromium.org>
1991-Sep-11
200
README.fdt-overlays
1U-Boot FDT Overlay usage
2=============================================
3
4Overlays Syntax
5---------------
6
7Overlays require slightly different syntax compared to traditional overlays.
8Please refer to dt-object-internal.txt in the dtc sources for information
9regarding the internal format of overlays:
10https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/Documentation/dt-object-internal.txt
11
12Building Overlays
13-----------------
14
15In a nutshell overlays provides a means to manipulate a symbol a previous dtb
16or overlay has defined. It requires both the base and all the overlays
17to be compiled with the -@ command line switch so that symbol information is
18included.
19
20Note support for -@ option can only be found in dtc version 1.4.4 or newer.
21Only version 4.14 or higher of the Linux kernel includes a built in version
22of dtc that meets this requirement.
23
24Building an overlay follows the same process as building a traditional dtb.
25
26For example:
27
28base.dts
29--------
30
31 /dts-v1/;
32 / {
33 foo: foonode {
34 foo-property;
35 };
36 };
37
38 $ dtc -@ -I dts -O dtb -o base.dtb base.dts
39
40bar.dts
41-------
42
43 /dts-v1/;
44 /plugin/;
45 / {
46 fragment@1 {
47 target = <&foo>;
48 __overlay__ {
49 overlay-1-property;
50 bar: barnode {
51 bar-property;
52 };
53 };
54 };
55 };
56
57 $ dtc -@ -I dts -O dtb -o bar.dtb bar.dts
58
59Ways to Utilize Overlays in U-boot
60----------------------------------
61
62There are two ways to apply overlays in U-boot.
631. Include and define overlays within a FIT image and have overlays
64 automatically applied.
65
662. Manually load and apply overlays
67
68The remainder of this document will discuss using overlays via the manual
69approach. For information on using overlays as part of a FIT image please see:
70doc/uImage.FIT/overlay-fdt-boot.txt
71
72Manually Loading and Applying Overlays
73--------------------------------------
74
751. Figure out where to place both the base device tree blob and the
76overlay. Make sure you have enough space to grow the base tree without
77overlapping anything.
78
79=> setenv fdtaddr 0x87f00000
80=> setenv fdtovaddr 0x87fc0000
81
822. Load the base blob and overlay blobs
83
84=> load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/base.dtb
85=> load ${devtype} ${bootpart} ${fdtovaddr} ${bootdir}/overlay.dtb
86
873. Set it as the working fdt tree.
88
89=> fdtaddr $fdtaddr
90
914. Grow it enough so it can 'fit' all the applied overlays
92
93=> fdt resize 8192
94
955. You are now ready to apply the overlay.
96
97=> fdt apply $fdtovaddr
98
996. Boot system like you would do with a traditional dtb.
100
101For bootm:
102
103=> bootm ${kerneladdr} - ${fdtaddr}
104
105For bootz:
106
107=> bootz ${kerneladdr} - ${fdtaddr}
108
109Please note that in case of an error, both the base and overlays are going
110to be invalidated, so keep copies to avoid reloading.
111
112Pantelis Antoniou
113pantelis.antoniou@konsulko.com
11411/7/2017
115
README.fec_mxc
1U-Boot config options used in fec_mxc.c
2
3CONFIG_FEC_MXC
4 Selects fec_mxc.c to be compiled into u-boot. Can read out the
5 ethaddr from the SoC eFuses (see below).
6
7CONFIG_MII
8 Must be defined if CONFIG_FEC_MXC is defined.
9
10CONFIG_FEC_XCV_TYPE
11 Defaults to MII100 for 100 Base-tx.
12 RGMII selects 1000 Base-tx reduced pin count interface.
13 RMII selects 100 Base-tx reduced pin count interface.
14
15CONFIG_FEC_MXC_SWAP_PACKET
16 Forced on iff MX28.
17 Swaps the bytes order of all words(4 byte units) in the packet.
18 This should not be specified by a board file. It is cpu specific.
19
20CONFIG_PHYLIB
21 fec_mxc supports PHYLIB and should be used for new boards.
22
23CONFIG_FEC_MXC_NO_ANEG
24 Relevant only if PHYLIB not used. Skips auto-negotiation restart.
25
26CONFIG_FEC_MXC_PHYADDR
27 Optional, selects the exact phy address that should be connected
28 and function fecmxc_initialize will try to initialize it.
29
30CONFIG_FEC_FIXED_SPEED
31 Optional, selects a fixed speed on the MAC interface without asking some
32 phy. This is usefull if there is a direct MAC <-> MAC connection, for
33 example if the CPU is connected directly via the RGMII interface to a
34 ethernet-switch.
35
36Reading the ethaddr from the SoC eFuses:
37if CONFIG_FEC_MXC is defined and the U-Boot environment does not contain the
38ethaddr variable, then its value gets read from the corresponding eFuses in
39the SoC. See the README files of the specific SoC for details.
40
README.fsl-clk
1Freescale system clock options
2
3 - CONFIG_SYS_FSL_CLK
4 Enable to call get_clocks() in board_init_f() for
5 non-PPC platforms.
6
README.fsl-ddr
1Table of interleaving 2-4 controllers
2=====================================
3 +--------------+-----------------------------------------------------------+
4 |Configuration | Memory Controller |
5 | | 1 2 3 4 |
6 |--------------+--------------+--------------+-----------------------------+
7 | Two memory | Not Intlv'ed | Not Intlv'ed | |
8 | complexes +--------------+--------------+ |
9 | | 2-way Intlv'ed | |
10 |--------------+--------------+--------------+--------------+ |
11 | | Not Intlv'ed | Not Intlv'ed | Not Intlv'ed | |
12 | Three memory +--------------+--------------+--------------+ |
13 | complexes | 2-way Intlv'ed | Not Intlv'ed | |
14 | +-----------------------------+--------------+ |
15 | | 3-way Intlv'ed | |
16 +--------------+--------------+--------------+--------------+--------------+
17 | | Not Intlv'ed | Not Intlv'ed | Not Intlv'ed | Not Intlv'ed |
18 | Four memory +--------------+--------------+--------------+--------------+
19 | complexes | 2-way Intlv'ed | 2-way Intlv'ed |
20 | +-----------------------------+-----------------------------+
21 | | 4-way Intlv'ed |
22 +--------------+-----------------------------------------------------------+
23
24
25Table of 2-way interleaving modes supported in cpu/8xxx/ddr/
26======================================================
27 +-------------+---------------------------------------------------------+
28 | | Rank Interleaving |
29 | +--------+-----------+-----------+------------+-----------+
30 |Memory | | | | 2x2 | 4x1 |
31 |Controller | None | 2x1 lower | 2x1 upper | {CS0+CS1}, | {CS0+CS1+ |
32 |Interleaving | | {CS0+CS1} | {CS2+CS3} | {CS2+CS3} | CS2+CS3} |
33 +-------------+--------+-----------+-----------+------------+-----------+
34 |None | Yes | Yes | Yes | Yes | Yes |
35 +-------------+--------+-----------+-----------+------------+-----------+
36 |Cacheline | Yes | Yes | No | No, Only(*)| Yes |
37 | |CS0 Only| | | {CS0+CS1} | |
38 +-------------+--------+-----------+-----------+------------+-----------+
39 |Page | Yes | Yes | No | No, Only(*)| Yes |
40 | |CS0 Only| | | {CS0+CS1} | |
41 +-------------+--------+-----------+-----------+------------+-----------+
42 |Bank | Yes | Yes | No | No, Only(*)| Yes |
43 | |CS0 Only| | | {CS0+CS1} | |
44 +-------------+--------+-----------+-----------+------------+-----------+
45 |Superbank | No | Yes | No | No, Only(*)| Yes |
46 | | | | | {CS0+CS1} | |
47 +-------------+--------+-----------+-----------+------------+-----------+
48 (*) Although the hardware can be configured with memory controller
49 interleaving using "2x2" rank interleaving, it only interleaves {CS0+CS1}
50 from each controller. {CS2+CS3} on each controller are only rank
51 interleaved on that controller.
52
53 For memory controller interleaving, identical DIMMs are suggested. Software
54 doesn't check the size or organization of interleaved DIMMs.
55
56The ways to configure the ddr interleaving mode
57==============================================
581. In board header file(e.g.MPC8572DS.h), add default interleaving setting
59 under "CONFIG_EXTRA_ENV_SETTINGS", like:
60 #define CONFIG_EXTRA_ENV_SETTINGS \
61 "hwconfig=fsl_ddr:ctlr_intlv=bank" \
62 ......
63
642. Run U-Boot "setenv" command to configure the memory interleaving mode.
65 Either numerical or string value is accepted.
66
67 # disable memory controller interleaving
68 setenv hwconfig "fsl_ddr:ctlr_intlv=null"
69
70 # cacheline interleaving
71 setenv hwconfig "fsl_ddr:ctlr_intlv=cacheline"
72
73 # page interleaving
74 setenv hwconfig "fsl_ddr:ctlr_intlv=page"
75
76 # bank interleaving
77 setenv hwconfig "fsl_ddr:ctlr_intlv=bank"
78
79 # superbank
80 setenv hwconfig "fsl_ddr:ctlr_intlv=superbank"
81
82 # 1KB 3-way interleaving
83 setenv hwconfig "fsl_ddr:ctlr_intlv=3way_1KB"
84
85 # 4KB 3-way interleaving
86 setenv hwconfig "fsl_ddr:ctlr_intlv=3way_4KB"
87
88 # 8KB 3-way interleaving
89 setenv hwconfig "fsl_ddr:ctlr_intlv=3way_8KB"
90
91 # disable bank (chip-select) interleaving
92 setenv hwconfig "fsl_ddr:bank_intlv=null"
93
94 # bank(chip-select) interleaving cs0+cs1
95 setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1"
96
97 # bank(chip-select) interleaving cs2+cs3
98 setenv hwconfig "fsl_ddr:bank_intlv=cs2_cs3"
99
100 # bank(chip-select) interleaving (cs0+cs1) and (cs2+cs3) (2x2)
101 setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_and_cs2_cs3"
102
103 # bank(chip-select) interleaving (cs0+cs1+cs2+cs3) (4x1)
104 setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_cs2_cs3"
105
106 # bank(chip-select) interleaving (auto)
107 setenv hwconfig "fsl_ddr:bank_intlv=auto"
108 This auto mode only select from cs0_cs1_cs2_cs3, cs0_cs1, null dependings
109 on DIMMs.
110
111Memory controller address hashing
112==================================
113If the DDR controller supports address hashing, it can be enabled by hwconfig.
114
115Syntax is:
116hwconfig=fsl_ddr:addr_hash=true
117
118Memory controller ECC on/off
119============================
120If ECC is enabled in board configuratoin file, i.e. #define CONFIG_DDR_ECC,
121ECC can be turned on/off by hwconfig.
122
123Syntax is
124hwconfig=fsl_ddr:ecc=off
125
126
127Memory address parity on/off
128============================
129address parity can be turned on/off by hwconfig.
130Syntax is:
131hwconfig=fsl_ddr:parity=on
132
133
134Memory testing options for mpc85xx
135==================================
1361. Memory test can be done once U-Boot prompt comes up using mtest, or
1372. Memory test can be done with Power-On-Self-Test function, activated at
138 compile time.
139
140 In order to enable the POST memory test, CONFIG_POST needs to be
141 defined in board configuraiton header file. By default, POST memory test
142 performs a fast test. A slow test can be enabled by changing the flag at
143 compiling time. To test memory bigger than 2GB, 36BIT support is needed.
144 Memory is tested within a 2GB window. TLBs are used to map the virtual 2GB
145 window to physical address so that all physical memory can be tested.
146
147Combination of hwconfig
148=======================
149Hwconfig can be combined with multiple parameters, for example, on a supported
150platform
151
152hwconfig=fsl_ddr:addr_hash=true,ctlr_intlv=cacheline,bank_intlv=cs0_cs1_cs2_cs3,ecc=on
153
154
155Table for dynamic ODT for DDR3
156==============================
157For single-slot system with quad-rank DIMM and dual-slot system, dynamic ODT may
158be needed, depending on the configuration. The numbers in the following tables are
159in Ohms.
160
161* denotes dynamic ODT
162
163Two slots system
164+-----------------------+----------+---------------+-----------------------------+-----------------------------+
165| Configuration | |DRAM controller| Slot 1 | Slot 2 |
166+-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+
167| | | | | | Rank 1 | Rank 2 | Rank 1 | Rank 2 |
168+ Slot 1 | Slot 2 |Write/Read| Write | Read |-------+------+-------+------+-------+------+-------+------+
169| | | | | | Write | Read | Write | Read | Write | Read | Write | Read |
170+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
171| | | Slot 1 | off | 75 | 120 | off | off | off | off | off | 30 | 30 |
172| Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
173| | | Slot 2 | off | 75 | off | off | 30 | 30 | 120 | off | off | off |
174+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
175| | | Slot 1 | off | 75 | 120 | off | off | off | 20 | 20 | | |
176| Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
177| | | Slot 2 | off | 75 | off | off | 20 | 20 | 120 *| off | | |
178+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
179| | | Slot 1 | off | 75 | 120 *| off | | | off | off | 20 | 20 |
180|Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
181| | | Slot 2 | off | 75 | 20 | 20 | | | 120 | off | off | off |
182+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
183| | | Slot 1 | off | 75 | 120 *| off | | | 30 | 30 | | |
184|Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
185| | | Slot 2 | off | 75 | 30 | 30 | | | 120 *| off | | |
186+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
187| Dual Rank | Empty | Slot 1 | off | 75 | 40 | off | off | off | | | | |
188+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
189| Empty | Dual Rank | Slot 2 | off | 75 | | | | | 40 | off | off | off |
190+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
191|Single Rank| Empty | Slot 1 | off | 75 | 40 | off | | | | | | |
192+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
193| Empty |Single Rank| Slot 2 | off | 75 | | | | | 40 | off | | |
194+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
195
196Single slot system
197+-------------+------------+---------------+-----------------------------+-----------------------------+
198| | |DRAM controller| Rank 1 | Rank 2 | Rank 3 | Rank 4 |
199|Configuration| Write/Read |-------+-------+-------+------+-------+------+-------+------+-------+------+
200| | | Write | Read | Write | Read | Write | Read | Write | Read | Write | Read |
201+-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
202| | R1 | off | 75 | 120 *| off | off | off | 20 | 20 | off | off |
203| |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
204| | R2 | off | 75 | off | 20 | 120 | off | 20 | 20 | off | off |
205| Quad Rank |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
206| | R3 | off | 75 | 20 | 20 | off | off | 120 *| off | off | off |
207| |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
208| | R4 | off | 75 | 20 | 20 | off | off | off | 20 | 120 | off |
209+-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
210| | R1 | off | 75 | 40 | off | off | off |
211| Dual Rank |------------+-------+-------+-------+------+-------+------+
212| | R2 | off | 75 | 40 | off | off | off |
213+-------------+------------+-------+-------+-------+------+-------+------+
214| Single Rank | R1 | off | 75 | 40 | off |
215+-------------+------------+-------+-------+-------+------+
216
217Reference http://www.xrosstalkmag.com/mag_issues/xrosstalk_oct08_final.pdf
218 http://download.micron.com/pdf/technotes/ddr3/tn4108_ddr3_design_guide.pdf
219
220
221Table for ODT for DDR2
222======================
223Two slots system
224+-----------------------+----------+---------------+-----------------------------+-----------------------------+
225| Configuration | |DRAM controller| Slot 1 | Slot 2 |
226+-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+
227| | | | | | Rank 1 | Rank 2 | Rank 1 | Rank 2 |
228+ Slot 1 | Slot 2 |Write/Read| Write | Read |-------+------+-------+------+-------+------+-------+------+
229| | | | | | Write | Read | Write | Read | Write | Read | Write | Read |
230+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
231| | | Slot 1 | off | 150 | off | off | off | off | 75 | 75 | off | off |
232| Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
233| | | Slot 2 | off | 150 | 75 | 75 | off | off | off | off | off | off |
234+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
235| | | Slot 1 | off | 150 | off | off | off | off | 75 | 75 | | |
236| Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
237| | | Slot 2 | off | 150 | 75 | 75 | off | off | off | off | | |
238+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
239| | | Slot 1 | off | 150 | off | off | | | 75 | 75 | off | off |
240|Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
241| | | Slot 2 | off | 150 | 75 | 75 | | | off | off | off | off |
242+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
243| | | Slot 1 | off | 150 | off | off | | | 75 | 75 | | |
244|Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
245| | | Slot 2 | off | 150 | 75 | 75 | | | off | off | | |
246+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
247| Dual Rank | Empty | Slot 1 | off | 75 | 150 | off | off | off | | | | |
248+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
249| Empty | Dual Rank | Slot 2 | off | 75 | | | | | 150 | off | off | off |
250+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
251|Single Rank| Empty | Slot 1 | off | 75 | 150 | off | | | | | | |
252+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
253| Empty |Single Rank| Slot 2 | off | 75 | | | | | 150 | off | | |
254+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
255
256Single slot system
257+-------------+------------+---------------+-----------------------------+
258| | |DRAM controller| Rank 1 | Rank 2 |
259|Configuration| Write/Read |-------+-------+-------+------+-------+------+
260| | | Write | Read | Write | Read | Write | Read |
261+-------------+------------+-------+-------+-------+------+-------+------+
262| | R1 | off | 75 | 150 | off | off | off |
263| Dual Rank |------------+-------+-------+-------+------+-------+------+
264| | R2 | off | 75 | 150 | off | off | off |
265+-------------+------------+-------+-------+-------+------+-------+------+
266| Single Rank | R1 | off | 75 | 150 | off |
267+-------------+------------+-------+-------+-------+------+
268
269Reference http://www.samsung.com/global/business/semiconductor/products/dram/downloads/applicationnote/ddr2_odt_control_200603.pdf
270
271
272Interactive DDR debugging
273===========================
274
275For DDR parameter tuning up and debugging, the interactive DDR debugger can
276be activated by setting the environment variable "ddr_interactive" to any
277value. (The value of ddr_interactive may have a meaning in the future, but,
278for now, the presence of the variable will cause the debugger to run.) Once
279activated, U-Boot will show the prompt "FSL DDR>" before enabling the DDR
280controller. The available commands are printed by typing "help".
281
282Another way to enter the interactive DDR debugger without setting the
283environment variable is to send the 'd' character early during the boot
284process. To save booting time, no additional delay is added, so the window
285to send the key press is very short -- basically, it is the time before the
286memory controller code starts to run. For example, when rebooting from
287within U-Boot, the user must press 'd' IMMEDIATELY after hitting enter to
288initiate a 'reset' command. In case of power on/reset, the user can hold
289down the 'd' key while applying power or hitting the board's reset button.
290
291The example flow of using interactive debugging is
292type command "compute" to calculate the parameters from the default
293type command "print" with arguments to show SPD, options, registers
294type command "edit" with arguments to change any if desired
295type command "copy" with arguments to copy controller/dimm settings
296type command "go" to continue calculation and enable DDR controller
297
298Additional commands to restart the debugging are:
299type command "reset" to reset the board
300type command "recompute" to reload SPD and start over
301
302Note, check "next_step" to show the flow. For example, after edit opts, the
303next_step is STEP_ASSIGN_ADDRESSES. After editing registers, the next_step is
304STEP_PROGRAM_REGS. Upon issuing command "go", the debugger will program the
305DDR controller with the current setting without further calculation and then
306exit to resume the booting of the machine.
307
308The detail syntax for each commands are
309
310print [c<n>] [d<n>] [spd] [dimmparms] [commonparms] [opts] [addresses] [regs]
311 c<n> - the controller number, eg. c0, c1
312 d<n> - the DIMM number, eg. d0, d1
313 spd - print SPD data
314 dimmparms - DIMM parameters, calculated from SPD
315 commonparms - lowest common parameters for all DIMMs
316 opts - options
317 addresses - address assignment (not implemented yet)
318 regs - controller registers
319
320edit <c#> <d#> <spd|dimmparms|commonparms|opts|addresses|regs> <element> <value>
321 c<n> - the controller number, eg. c0, c1
322 d<n> - the DIMM number, eg. d0, d1
323 spd - print SPD data
324 dimmparms - DIMM parameters, calculated from SPD
325 commonparms - lowest common parameters for all DIMMs
326 opts - options
327 addresses - address assignment (not implemented yet)
328 regs - controller registers
329 <element> - name of the modified element
330 byte number if the object is SPD
331 <value> - decimal or heximal (prefixed with 0x) numbers
332
333copy <src c#> <src d#> <spd|dimmparms|commonparms|opts|addresses|regs> <dst c#> <dst d#>
334 same as for "edit" command
335 DIMM numbers ignored for commonparms, opts, and regs
336
337reset
338 no arguement - reset the board
339
340recompute
341 no argument - reload SPD and start over
342
343compute
344 no argument - recompute from current next_step
345
346next_step
347 no argument - show current next_step
348
349help
350 no argument - print a list of all commands
351
352go
353 no argument - program memory controller(s) and continue with U-Boot
354
355Examples of debugging flow
356
357 FSL DDR>compute
358 Detected UDIMM UG51U6400N8SU-ACF
359 FSL DDR>print
360 print [c<n>] [d<n>] [spd] [dimmparms] [commonparms] [opts] [addresses] [regs]
361 FSL DDR>print dimmparms
362 DIMM parameters: Controller=0 DIMM=0
363 DIMM organization parameters:
364 module part name = UG51U6400N8SU-ACF
365 rank_density = 2147483648 bytes (2048 megabytes)
366 capacity = 4294967296 bytes (4096 megabytes)
367 burst_lengths_bitmask = 0C
368 base_addresss = 0 (00000000 00000000)
369 n_ranks = 2
370 data_width = 64
371 primary_sdram_width = 64
372 ec_sdram_width = 0
373 registered_dimm = 0
374 n_row_addr = 15
375 n_col_addr = 10
376 edc_config = 0
377 n_banks_per_sdram_device = 8
378 tCKmin_X_ps = 1500
379 tCKmin_X_minus_1_ps = 0
380 tCKmin_X_minus_2_ps = 0
381 tCKmax_ps = 0
382 caslat_X = 960
383 tAA_ps = 13125
384 caslat_X_minus_1 = 0
385 caslat_X_minus_2 = 0
386 caslat_lowest_derated = 0
387 tRCD_ps = 13125
388 tRP_ps = 13125
389 tRAS_ps = 36000
390 tWR_ps = 15000
391 tWTR_ps = 7500
392 tRFC_ps = 160000
393 tRRD_ps = 6000
394 tRC_ps = 49125
395 refresh_rate_ps = 7800000
396 tIS_ps = 0
397 tIH_ps = 0
398 tDS_ps = 0
399 tDH_ps = 0
400 tRTP_ps = 7500
401 tDQSQ_max_ps = 0
402 tQHS_ps = 0
403 FSL DDR>edit c0 opts ECC_mode 0
404 FSL DDR>edit c0 regs cs0_bnds 0x000000FF
405 FSL DDR>go
406 2 GiB left unmapped
407 4 GiB (DDR3, 64-bit, CL=9, ECC off)
408 DDR Chip-Select Interleaving Mode: CS0+CS1
409 Testing 0x00000000 - 0x7fffffff
410 Testing 0x80000000 - 0xffffffff
411 Remap DDR 2 GiB left unmapped
412
413 POST memory PASSED
414 Flash: 128 MiB
415 L2: 128 KB enabled
416 Corenet Platform Cache: 1024 KB enabled
417 SERDES: timeout resetting bank 3
418 SRIO1: disabled
419 SRIO2: disabled
420 MMC: FSL_ESDHC: 0
421 EEPROM: Invalid ID (ff ff ff ff)
422 PCIe1: disabled
423 PCIe2: Root Complex, x1, regs @ 0xfe201000
424 01:00.0 - 8086:10d3 - Network controller
425 PCIe2: Bus 00 - 01
426 PCIe3: disabled
427 In: serial
428 Out: serial
429 Err: serial
430 Net: Initializing Fman
431 Fman1: Uploading microcode version 101.8.0
432 e1000: 00:1b:21:81:d2:e0
433 FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5, e1000#0 [PRIME]
434 Warning: e1000#0 MAC addresses don't match:
435 Address in SROM is 00:1b:21:81:d2:e0
436 Address in environment is 00:e0:0c:00:ea:05
437
438 Hit any key to stop autoboot: 0
439 =>
440
README.fsl-dpaa
1This file documents Freescale DPAA-specific options.
2
3FMan (Frame Manager)
4 - CONFIG_FSL_FM_10GEC_REGULAR_NOTATION
5 on SoCs T4240, T2080, LS1043A, etc, the notation between 10GEC and MAC as below:
6 10GEC1->MAC9, 10GEC2->MAC10, 10GEC3->MAC1, 10GEC4->MAC2
7 on SoCs T1024, etc, the notation between 10GEC and MAC as below:
8 10GEC1->MAC1, 10GEC2->MAC2
9 so we introduce CONFIG_FSL_FM_10GEC_REGULAR_NOTATION to identify the new SoCs on
10 which 10GEC enumeration is consistent with MAC enumeration.
11
README.fsl-esdhc
1Freescale esdhc-specific options
2
3 - CONFIG_FSL_ESDHC_ADAPTER_IDENT
4 Support Freescale adapter card type identification. This is implemented by
5 operating Qixis FPGA relevant registers. The STAT_PRES1 register has SDHC
6 Card ID[0:2] bits showing the type of card installed in the SDHC Adapter Slot.
7
8 SDHC Card ID[0:2] Adapter Card Type
9 0b000 reserved
10 0b001 eMMC Card Rev4.5
11 0b010 SD/MMC Legacy Card
12 0b011 eMMC Card Rev4.4
13 0b100 reserved
14 0b101 MMC Card
15 0b110 SD Card Rev2.0/3.0
16 0b111 No card is present
17 - CONFIG_SYS_FSL_ESDHC_LE
18 ESDHC IP is in little-endian mode. Accessing ESDHC registers can be
19 determined by ESDHC IP's endian mode or processor's endian mode.
20 - CONFIG_SYS_FSL_ESDHC_BE
21 ESDHC IP is in big-endian mode. Accessing ESDHC registers can be determined
22 by ESDHC IP's endian mode or processor's endian mode.
23
README.fsl-hwconfig
1Freescale-specific 'hwconfig' options.
2
3This file documents Freescale-specific key:value pairs for the 'hwconfig'
4option. See README.hwconfig for general information about 'hwconfig'.
5
6audclk
7 Specific to the P1022DS reference board.
8
9 This option specifies which of the two oscillator frequencies should be
10 routed to the Wolfson WM8776 codec. The ngPIXIS can be programmed to
11 route either a 11.2896MHz or a 12.288MHz clock. The default is
12 12.288MHz. This option has two effects. First, the MUX on the board
13 will be programmed accordingly. Second, the clock-frequency property
14 in the codec node in the device tree will be updated to the correct
15 value.
16
17 'audclk:11'
18 Select the 11.2896MHz clock
19
20 'audclk:12'
21 Select the 12.288MHz clock
22
23usb
24 Specific to boards have USB controller
25
26 This option specifies the following for a USB controller:
27
28 - which controller mode to use
29 - which USB PHY to use
30
31 This is used by generic USB device-tree fixup function to update
32 modified values of phy type and controller mode.
33
34 Also used for configuring multiple USB controllers such that
35 'usbN' (where N is 1, 2, etc. refers to controller no.)
36
37 'phy_type'
38 Select USB phy type: 'utmi' OR 'ulpi'
39
40 'dr_mode'
41 Select USB controller mode: 'host', 'peripheral' OR 'otg'
42
43 Examples:
44 usb1:dr_mode=host;usb2:dr_mode=peripheral'
45
46 usb1:dr_mode=host,phy_type=utmi;usb2:dr_mode=host'
47
README.fsl-trustzone-components
1Freescale ARM64 SoCs like LS2080A have ARM TrustZone components like
2TZPC-BP147 (TrustZone Protection Controller) and TZASC-400 (TrustZone
3Address Space Controller).
4
5While most of the configuration related programming of these peripherals
6is left to a root-of-trust security software layer (running in EL3
7privilege mode), but still some configurations of these peripherals
8might be required while the bootloader is executing in EL3 privilege
9mode. The following sections define how to turn on these features for
10LS2080A like SoCs.
11
12TZPC-BP147 (TrustZone Protection Controller)
13============================================
14- Depends on CONFIG_FSL_TZPC_BP147 configuration flag.
15- Separates Secure World and Normal World on-chip RAM (OCRAM) spaces.
16- Provides a programming model to set access control policy via the TZPC
17 TZDECPROT Registers.
18
19TZASC-400 (TrustZone Address Space Controller)
20==============================================
21- Depends on CONFIG_FSL_TZASC_400 configuration flag.
22- Separates Secure World and Normal World external memory spaces for bus masters
23 such as processors and DMA-equipped peripherals.
24- Supports 8 fully programmable address regions, initially inactive at reset,
25 and one base region, always active, that covers the remaining address space.
26
README.fsl_iim
1Driver implementing the fuse API for Freescale's IC Identification Module (IIM)
2
3This IP can be found on the following SoCs:
4 - MPC512x,
5 - i.MX25,
6 - i.MX27,
7 - i.MX31,
8 - i.MX35,
9 - i.MX51,
10 - i.MX53.
11
12The section numbers in this file refer to the i.MX25 Reference Manual.
13
14A fuse word contains 8 fuse bit slots, as explained in 30.4.2.2.1.
15
16A bank contains 256 fuse word slots, as shown by the memory map in 30.3.1.
17
18Some fuse bit or word slots may not have the corresponding fuses actually
19implemented in the fusebox.
20
21See the README files of the SoCs using this driver in order to know the
22conventions used by U-Boot to store some specific data in the fuses, e.g. MAC
23addresses.
24
25Fuse operations:
26
27 Read
28 Read operations are implemented as read accesses to the shadow registers,
29 using "Word y of Bank x" from the register summary in 30.3.2. This is
30 explained in detail in 30.4.5.1.
31
32 Sense
33 Sense operations are implemented as explained in 30.4.5.2.
34
35 Program
36 Program operations are implemented as explained in 30.4.5.3. Following
37 this operation, the shadow registers are reloaded by the hardware (not
38 immediately, but this does not make any difference for a user reading
39 these registers).
40
41 Override
42 Override operations are implemented as write accesses to the shadow
43 registers, as explained in 30.4.5.4.
44
45Configuration:
46
47 CONFIG_FSL_IIM
48 Define this to enable the fsl_iim driver.
49
README.fuse
1Fuse API functions and commands
2
3The fuse API allows to control a fusebox and how it is used by the upper
4hardware layers.
5
6A fuse corresponds to a single non-volatile memory bit that can be programmed
7(i.e. blown, set to 1) only once. The programming operation is irreversible. A
8fuse that has not been programmed reads 0.
9
10Fuses can be used by SoCs to store various permanent configuration and data,
11e.g. boot configuration, security configuration, MAC addresses, etc.
12
13A fuse word is the smallest group of fuses that can be read at once from the
14fusebox control IP registers. This is limited to 32 bits with the current API.
15
16A fuse bank is the smallest group of fuse words having a common ID, as defined
17by each SoC.
18
19Upon startup, the fusebox control IP reads the fuse values and stores them to a
20volatile shadow cache.
21
22See the README files of the drivers implementing this API in order to know the
23SoC- and implementation-specific details.
24
25Functions / commands:
26
27 int fuse_read(u32 bank, u32 word, u32 *val);
28 fuse read <bank> <word> [<cnt>]
29 Read fuse words from the shadow cache.
30
31 int fuse_sense(u32 bank, u32 word, u32 *val);
32 fuse sense <bank> <word> [<cnt>]
33 Sense - i.e. read directly from the fusebox, skipping the shadow cache -
34 fuse words. This operation does not update the shadow cache.
35
36 This is useful to know the true value of fuses if an override has been
37 performed (see below).
38
39 int fuse_prog(u32 bank, u32 word, u32 val);
40 fuse prog [-y] <bank> <word> <hexval> [<hexval>...]
41 Program fuse words. This operation directly affects the fusebox and is
42 irreversible. The shadow cache is updated accordingly or not, depending on
43 each IP.
44
45 Only the bits to be programmed should be set in the input value (i.e. for
46 fuse bits that have already been programmed and hence should be left
47 unchanged by a further programming, it is preferable to clear the
48 corresponding bits in the input value in order not to perform a new
49 hardware programming operation on these fuse bits).
50
51 int fuse_override(u32 bank, u32 word, u32 val);
52 fuse override <bank> <word> <hexval> [<hexval>...]
53 Override fuse words in the shadow cache.
54
55 The fusebox is unaffected, so following this operation, the shadow cache
56 may differ from the fusebox values. Read or sense operations can then be
57 used to get the values from the shadow cache or from the fusebox.
58
59 This is useful to change the behaviors linked to some cached fuse values,
60 either because this is needed only temporarily, or because some of the
61 fuses have already been programmed or are locked (if the SoC allows to
62 override a locked fuse).
63
64Configuration:
65
66 CONFIG_CMD_FUSE
67 Define this to enable the fuse commands.
68
README.generic-board
1#
2# (C) Copyright 2014 Google, Inc
3# Simon Glass <sjg@chromium.org>
4#
5# SPDX-License-Identifier: GPL-2.0+
6#
7
8Background
9----------
10
11U-Boot traditionally had a board.c file for each architecture. This introduced
12quite a lot of duplication, with each architecture tending to do
13initialisation slightly differently. To address this, a new 'generic board
14init' feature was introduced in March 2013 (further motivation is
15provided in the cover letter below).
16
17All boards and architectures have moved to this as of mid 2016.
18
19
20What has changed?
21-----------------
22
23The main change is that the arch/<arch>/lib/board.c file is removed in
24favour of common/board_f.c (for pre-relocation init) and common/board_r.c
25(for post-relocation init).
26
27Related to this, the global_data and bd_t structures now have a core set of
28fields which are common to all architectures. Architecture-specific fields
29have been moved to separate structures.
30
31
32Further Background
33------------------
34
35The full text of the original generic board series is reproduced below.
36
37--8<-------------
38
39This series creates a generic board.c implementation which contains
40the essential functions of the major arch/xxx/lib/board.c files.
41
42What is the motivation for this change?
43
441. There is a lot of repeated code in the board.c files. Any change to
45things like setting up the baud rate requires a change in 10 separate
46places.
47
482. Since there are 10 separate files, adding a new feature which requires
49initialisation is painful since it must be independently added in 10
50places.
51
523. As time goes by the architectures naturally diverge since there is limited
53pressure to compare features or even CONFIG options against similar things
54in other board.c files.
55
564. New architectures must implement all the features all over again, and
57sometimes in subtle different ways. This places an unfair burden on getting
58a new architecture fully functional and running with U-Boot.
59
605. While it is a bit of a tricky change, I believe it is worthwhile and
61achievable. There is no requirement that all code be common, only that
62the code that is common should be located in common/board.c rather than
63arch/xxx/lib/board.c.
64
65All the functions of board_init_f() and board_init_r() are broken into
66separate function calls so that they can easily be included or excluded
67for a particular architecture. It also makes it easier to adopt Graeme's
68initcall proposal when it is ready.
69
70http://lists.denx.de/pipermail/u-boot/2012-January/114499.html
71
72This series removes the dependency on generic relocation. So relocation
73happens as one big chunk and is still completely arch-specific. See the
74relocation series for a proposed solution to this for ARM:
75
76http://lists.denx.de/pipermail/u-boot/2011-December/112928.html
77
78or Graeme's recent x86 series v2:
79
80http://lists.denx.de/pipermail/u-boot/2012-January/114467.html
81
82Instead of moving over a whole architecture, this series takes the approach
83of simply enabling generic board support for an architecture. It is then up
84to each board to opt in by defining CONFIG_SYS_GENERIC_BOARD in the board
85config file. If this is not done, then the code will be generated as
86before. This allows both sets of code to co-exist until we are comfortable
87with the generic approach, and enough boards run.
88
89ARM is a relatively large board.c file and one which I can test, therefore
90I think it is a good target for this series. On the other hand, x86 is
91relatively small and simple, but different enough that it introduces a
92few issues to be solved. So I have chosen both ARM and x86 for this series.
93After a suggestion from Wolfgang I have added PPC also. This is the
94largest and most feature-full board, so hopefully we have all bases
95covered in this RFC.
96
97A generic global_data structure is also required. This might upset a few
98people. Here is my basic reasoning: most fields are the same, all
99architectures include and need it, most global_data.h files already have
100#ifdefs to select fields for a particular SOC, so it is hard to
101see why architecures are different in this area. We can perhaps add a
102way to put architecture-specific fields into a separate header file, but
103for now I have judged that to be counter-productive.
104
105Similarly we need a generic bd_info structure, since generic code will
106be accessing it. I have done this in the same way as global_data and the
107same comments apply.
108
109There was dicussion on the list about passing gd_t around as a parameter
110to pre-relocation init functions. I think this makes sense, but it can
111be done as a separate change, and this series does not require it.
112
113While this series needs to stand on its own (as with the link script
114cleanup series and the generic relocation series) the goal is the
115unification of the board init code. So I hope we can address issues with
116this in mind, rather than focusing too narrowly on particular ARM, x86 or
117PPC issues.
118
119I have run-tested ARM on Tegra Seaboard only. To try it out, define
120CONFIG_SYS_GENERIC_BOARD in your board file and rebuild. Most likely on
121x86 and PPC at least it will hang, but if you are lucky it will print
122something first :-)
123
124I have run this though MAKEALL with CONFIG_SYS_GENERIC_BOARD on for all
125ARM, PPC and x86 boards. There are a few failures due to errors in
126the board config, which I have sent patches for. The main issue is
127just the difference between __bss_end and __bss_end__.
128
129Note: the first group of commits are required for this series to build,
130but could be separated out if required. I have included them here for
131convenience.
132
133------------->8--
134
135Simon Glass, sjg@chromium.org
136March 2014
137Updated after final removal, May 2016
138
README.generic_usb_ohci
1Notes on the the generic USB-OHCI driver
2========================================
3
4This driver (drivers/usb/usb_ohci.[ch]) is the result of the merge of
5various existing OHCI drivers that were basically identical beside
6cpu/board dependant initalization. This initalization has been moved
7into cpu/board directories and are called via the hooks below.
8
9Configuration options
10----------------------
11
12 CONFIG_USB_OHCI_NEW: enable the new OHCI driver
13
14 CONFIG_SYS_USB_OHCI_BOARD_INIT: call the board dependant hooks:
15
16 - extern int usb_board_init(void);
17 - extern int usb_board_stop(void);
18 - extern int usb_cpu_init_fail(void);
19
20 CONFIG_SYS_USB_OHCI_CPU_INIT: call the cpu dependant hooks:
21
22 - extern int usb_cpu_init(void);
23 - extern int usb_cpu_stop(void);
24 - extern int usb_cpu_init_fail(void);
25
26 CONFIG_SYS_USB_OHCI_REGS_BASE: defines the base address of the OHCI
27 registers
28
29 CONFIG_SYS_USB_OHCI_SLOT_NAME: slot name
30
31 CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS: maximal number of ports of the
32 root hub.
33
34
35Endianness issues
36------------------
37
38The USB bus operates in little endian, but unfortunately there are
39OHCI controllers that operate in big endian such as ppc4xx. For these the
40config option
41
42 CONFIG_SYS_OHCI_BE_CONTROLLER
43
44needs to be defined.
45
46
47PCI Controllers
48----------------
49
50You'll need to define
51
52 CONFIG_PCI_OHCI
53
54If you have several USB PCI controllers, define
55
56 CONFIG_PCI_OHCI_DEVNO: number of the OHCI device in PCI list
57
58If undefined, the first instance found in PCI space will be used.
59
60PCI Controllers need to do byte swapping on register accesses, so they
61should to define:
62
63 CONFIG_SYS_OHCI_SWAP_REG_ACCESS
64
README.gpt
1#
2# Copyright (C) 2012 Samsung Electronics
3#
4# Lukasz Majewski <l.majewski@samsung.com>
5#
6#
7# SPDX-License-Identifier: GPL-2.0+
8
9Glossary:
10========
11- UUID -(Universally Unique Identifier)
12- GUID - (Globally Unique ID)
13- EFI - (Extensible Firmware Interface)
14- UEFI - (Unified EFI) - EFI evolution
15- GPT (GUID Partition Table) - it is the EFI standard part
16- partitions - lists of available partitions (defined at u-boot):
17 ./include/configs/{target}.h
18
19Introduction:
20=============
21This document describes the GPT partition table format and usage of
22the gpt command in u-boot.
23
24UUID introduction:
25====================
26
27GPT for marking disks/partitions is using the UUID. It is supposed to be a
28globally unique value. A UUID is a 16-byte (128-bit) number. The number of
29theoretically possible UUIDs is therefore about 3 x 10^38.
30More often UUID is displayed as 32 hexadecimal digits, in 5 groups,
31separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters
32(32 digits and 4 hyphens)
33
34For instance, GUID of Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
35and GUID of Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
36
37Historically there are 5 methods to generate this number. The oldest one is
38combining machine's MAC address and timer (epoch) value.
39
40Successive versions are using MD5 hash, random numbers and SHA-1 hash. All major
41OSes and programming languages are providing libraries to compute UUID (e.g.
42uuid command line tool).
43
44GPT brief explanation:
45======================
46
47 Layout:
48 -------
49
50 --------------------------------------------------
51 LBA 0 |Protective MBR |
52 ----------------------------------------------------------
53 LBA 1 |Primary GPT Header | Primary
54 -------------------------------------------------- GPT
55 LBA 2 |Entry 1|Entry 2| Entry 3| Entry 4|
56 --------------------------------------------------
57 LBA 3 |Entries 5 - 128 |
58 | |
59 | |
60 ----------------------------------------------------------
61 LBA 34 |Partition 1 |
62 | |
63 -----------------------------------
64 |Partition 2 |
65 | |
66 -----------------------------------
67 |Partition n |
68 | |
69 ----------------------------------------------------------
70 LBA -34 |Entry 1|Entry 2| Entry 3| Entry 4| Backup
71 -------------------------------------------------- GPT
72 LBA -33 |Entries 5 - 128 |
73 | |
74 | |
75 LBA -2 | |
76 --------------------------------------------------
77 LBA -1 |Backup GPT Header |
78 ----------------------------------------------------------
79
80For a legacy reasons, GPT's LBA 0 sector has a MBR structure. It is called
81"protective MBR".
82Its first partition entry ID has 0xEE value, and disk software, which is not
83handling the GPT sees it as a storage device without free space.
84
85It is possible to define 128 linearly placed partition entries.
86
87"LBA -1" means the last addressable block (in the mmc subsystem:
88"dev_desc->lba - 1")
89
90Primary/Backup GPT header:
91----------------------------
92Offset Size Description
93
940 8 B Signature ("EFI PART", 45 46 49 20 50 41 52 54)
958 4 B Revision (For version 1.0, the value is 00 00 01 00)
9612 4 B Header size (in bytes, usually 5C 00 00 00 meaning 92 bytes)
9716 4 B CRC32 of header (0 to header size), with this field zeroed
98 during calculation
9920 4 B Reserved (ZERO);
10024 8 B Current LBA (location of this header copy)
10132 8 B Backup LBA (location of the other header copy)
10240 8 B First usable LBA for partitions (primary partition table last
103 LBA + 1)
10448 8 B Last usable LBA (secondary partition table first LBA - 1)
10556 16 B Disk GUID (also referred as UUID on UNIXes)
10672 8 B Partition entries starting LBA (always 2 in primary copy)
10780 4 B Number of partition entries
10884 4 B Size of a partition entry (usually 128)
10988 4 B CRC32 of partition array
11092 * Reserved; must be ZERO (420 bytes for a 512-byte LBA)
111
112TOTAL: 512 B
113
114
115IMPORTANT:
116
117GPT headers and partition entries are protected by CRC32 (the POSIX CRC32).
118
119Primary GPT header and Backup GPT header have swapped values of "Current LBA"
120and "Backup LBA" and therefore different CRC32 check-sum.
121
122CRC32 for GPT headers (field "CRC of header") are calculated up till
123"Header size" (92), NOT 512 bytes.
124
125CRC32 for partition entries (field "CRC32 of partition array") is calculated for
126the whole array entry ( Number_of_partition_entries *
127sizeof(partition_entry_size (usually 128)))
128
129Observe, how Backup GPT is placed in the memory. It is NOT a mirror reflect
130of the Primary.
131
132 Partition Entry Format:
133 ----------------------
134 Offset Size Description
135
136 0 16 B Partition type GUID (Big Endian)
137 16 16 B Unique partition GUID in (Big Endian)
138 32 8 B First LBA (Little Endian)
139 40 8 B Last LBA (inclusive)
140 48 8 B Attribute flags [+]
141 56 72 B Partition name (text)
142
143 Attribute flags:
144 Bit 0 - System partition
145 Bit 1 - Hide from EFI
146 Bit 2 - Legacy BIOS bootable
147 Bit 48-63 - Defined and used by the individual partition type
148 For Basic data partition :
149 Bit 60 - Read-only
150 Bit 62 - Hidden
151 Bit 63 - Not mount
152
153Creating GPT partitions in U-Boot:
154==============
155
156To restore GUID partition table one needs to:
1571. Define partition layout in the environment.
158 Format of partitions layout:
159 "uuid_disk=...;name=u-boot,size=60MiB,uuid=...;
160 name=kernel,size=60MiB,uuid=...;"
161 or
162 "uuid_disk=${uuid_gpt_disk};name=${uboot_name},
163 size=${uboot_size},uuid=${uboot_uuid};"
164
165 The fields 'name' and 'size' are mandatory for every partition.
166 The field 'start' is optional.
167
168 If field 'size' of the last partition is 0, the partition is extended
169 up to the end of the device.
170
171 The fields 'uuid' and 'uuid_disk' are optional if CONFIG_RANDOM_UUID is
172 enabled. A random uuid will be used if omitted or they point to an empty/
173 non-existent environment variable. The environment variable will be set to
174 the generated UUID. The 'gpt guid' command reads the current value of the
175 uuid_disk from the GPT.
176
177 The field 'bootable' is optional, it is used to mark the GPT partition
178 bootable (set attribute flags "Legacy BIOS bootable").
179 "name=u-boot,size=60MiB;name=boot,size=60Mib,bootable;name=rootfs,size=0"
180 It can be used to locate bootable disks with command
181 "part list <interface> <dev> -bootable <varname>",
182 please check out doc/README.distro for use.
183
1842. Define 'CONFIG_EFI_PARTITION' and 'CONFIG_CMD_GPT'
185
1863. From u-boot prompt type:
187 gpt write mmc 0 $partitions
188
189Checking (validating) GPT partitions in U-Boot:
190===============================================
191
192Procedure is the same as above. The only change is at point 3.
193
194At u-boot prompt one needs to write:
195 gpt verify mmc 0 [$partitions]
196
197where [$partitions] is an optional parameter.
198
199When it is not provided, only basic checks based on CRC32 calculation for GPT
200header and PTEs are performed.
201When provided, additionally partition data - name, size and starting
202offset (last two in LBA) - are compared with data defined in '$partitions'
203environment variable.
204
205After running this command, return code is set to 0 if no errors found in
206on non-volatile medium stored GPT.
207
208Following line can be used to assess if GPT verification has succeed:
209
210U-BOOT> gpt verify mmc 0 $partitions
211U-BOOT> if test $? = 0; then echo "GPT OK"; else echo "GPT ERR"; fi
212
213Renaming GPT partitions from U-Boot:
214====================================
215
216GPT partition names are a mechanism via which userspace and U-Boot can
217communicate about software updates and boot failure. The 'gpt guid',
218'gpt read', 'gpt rename' and 'gpt swap' commands facilitate
219programmatic renaming of partitions from bootscripts by generating and
220modifying the partitions layout string. Here is an illustration of
221employing 'swap' to exchange 'primary' and 'backup' partition names:
222
223U-BOOT> gpt swap mmc 0 primary backup
224
225Afterwards, all partitions previously named 'primary' will be named
226'backup', and vice-versa. Alternatively, single partitions may be
227renamed. In this example, mmc0's first partition will be renamed
228'primary':
229
230U-BOOT> gpt rename mmc 0 1 primary
231
232The GPT functionality may be tested with the 'sandbox' board by
233creating a disk image as described under 'Block Device Emulation' in
234board/sandbox/README.sandbox:
235
236=>host bind 0 ./disk.raw
237=> gpt read host 0
238[ . . . ]
239=> gpt swap host 0 name othername
240[ . . . ]
241
242Partition type GUID:
243====================
244
245For created partition, the used partition type GUID is
246PARTITION_BASIC_DATA_GUID (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7).
247
248If you define 'CONFIG_PARTITION_TYPE_GUID', a optionnal parameter 'type'
249can specify a other partition type guid:
250
251 "uuid_disk=...;name=u-boot,size=60MiB,uuid=...;
252 name=kernel,size=60MiB,uuid=...,
253 type=0FC63DAF-8483-4772-8E79-3D69D8477DE4;"
254
255Some strings can be also used at the place of known GUID :
256 "system" = PARTITION_SYSTEM_GUID
257 (C12A7328-F81F-11D2-BA4B-00A0C93EC93B)
258 "mbr" = LEGACY_MBR_PARTITION_GUID
259 (024DEE41-33E7-11D3-9D69-0008C781F39F)
260 "msft" = PARTITION_MSFT_RESERVED_GUID
261 (E3C9E316-0B5C-4DB8-817D-F92DF00215AE)
262 "data" = PARTITION_BASIC_DATA_GUID
263 (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7)
264 "linux" = PARTITION_LINUX_FILE_SYSTEM_DATA_GUID
265 (0FC63DAF-8483-4772-8E79-3D69D8477DE4)
266 "raid" = PARTITION_LINUX_RAID_GUID
267 (A19D880F-05FC-4D3B-A006-743F0F84911E)
268 "swap" = PARTITION_LINUX_SWAP_GUID
269 (0657FD6D-A4AB-43C4-84E5-0933C84B4F4F)
270 "lvm" = PARTITION_LINUX_LVM_GUID
271 (E6D6D379-F507-44C2-A23C-238F2A3DF928)
272
273 "uuid_disk=...;name=u-boot,size=60MiB,uuid=...;
274 name=kernel,size=60MiB,uuid=...,type=linux;"
275
276They are also used to display the type of partition in "part list" command.
277
278
279Useful info:
280============
281
282Two programs, namely: 'gdisk' and 'parted' are recommended to work with GPT
283recovery. Both are able to handle GUID partitions.
284Please, pay attention at -l switch for parted.
285
286"uuid" program is recommended to generate UUID string. Moreover it can decode
287(-d switch) passed in UUID string. It can be used to generate partitions UUID
288passed to u-boot environment variables.
289If optional CONFIG_RANDOM_UUID is defined then for any partition which environment
290uuid is unset, uuid is randomly generated and stored in correspond environment
291variable.
292
293note:
294Each string block of UUID generated by program "uuid" is in big endian and it is
295also stored in big endian in disk GPT.
296Partitions layout can be printed by typing "mmc part". Note that each partition
297GUID has different byte order than UUID generated before, this is because first
298three blocks of GUID string are in Little Endian.
299
README.hwconfig
1To enable this feature just define CONFIG_HWCONFIG in your board
2config file.
3
4This implements a simple hwconfig infrastructure: an
5interface for software knobs to control hardware.
6
7This a is very simple implementation, i.e. it is implemented
8via the `hwconfig' environment variable. Later we could write
9some "hwconfig <enable|disable|list>" commands, ncurses
10interface for Award BIOS-like interface, and frame-buffer
11interface for AMI GUI[1] BIOS-like interface with mouse
12support[2].
13
14Current implementation details/limitations:
15
161. Doesn't support options dependencies and mutual exclusion.
17 We can implement this by integrating apt-get[3] into Das
18 U-Boot. But I haven't bothered yet.
19
202. Since we don't implement a hwconfig command, i.e. we're working
21 with the environment directly, there is no way to tell that
22 toggling a particular option will need a reboot to take
23 effect. So, for now it's advised to always reboot the
24 target after modifying the hwconfig variable.
25
263. We support hwconfig options with arguments. For example,
27
28 set hwconfig "dr_usb:mode=peripheral,phy_type=ulpi"
29
30 This selects three hwconfig options:
31 1. dr_usb - enable Dual-Role USB controller;
32 2. dr_usb_mode:peripheral - USB in Function mode;
33 3. dr_usb_phy_type:ulpi - USB should work with ULPI PHYs.
34
35The purpose of this simple implementation is to refine the
36internal API and then we can continue improving the user
37experience by adding more mature interfaces, like a hwconfig
38command with bells and whistles. Or not adding, if we feel
39that the current interface fits people's needs.
40
41[1] http://en.wikipedia.org/wiki/American_Megatrends
42[2] Regarding ncurses and GUI with mouse support -- I'm just
43 kidding.
44[3] The comment regarding apt-get is also a joke, meaning that
45 dependency tracking could be non-trivial. For example, for
46 enabling HW feature X we may need to disable Y, and turn Z
47 into reduced mode (like RMII-only interface for ethernet,
48 no MII).
49
50 It's quite trivial to implement simple cases though.
51
README.i2c
1I2C Bus Arbitration
2===================
3
4While I2C supports multi-master buses this is difficult to get right.
5The implementation on the master side in software is quite complex.
6Clock-stretching and the arbitrary time that an I2C transaction can take
7make it difficult to share the bus fairly in the face of high traffic.
8When one or more masters can be reset independently part-way through a
9transaction it is hard to know the state of the bus.
10
11U-Boot provides a scheme based on two 'claim' GPIOs, one driven by the
12AP (Application Processor, meaning the main CPU) and one driven by the EC
13(Embedded Controller, a small CPU aimed at handling system tasks). With
14these they can communicate and reliably share the bus. This scheme has
15minimal overhead and involves very little code. The scheme can survive
16reboots by either side without difficulty.
17
18Since U-Boot runs on the AP, the terminology used is 'our' claim GPIO,
19meaning the AP's, and 'their' claim GPIO, meaning the EC's. This terminology
20is used by the device tree bindings in Linux also.
21
22The driver is implemented as an I2C mux, as it is in Linux. See
23i2c-arb-gpio-challenge for the implementation.
24
25GPIO lines are shared between the AP and EC to manage the bus. The AP and EC
26each have a 'bus claim' line, which is an output that the other can see.
27
28- AP_CLAIM: output from AP, signalling to the EC that the AP wants the bus
29- EC_CLAIM: output from EC, signalling to the AP that the EC wants the bus
30
31The basic algorithm is to assert your line when you want the bus, then make
32sure that the other side doesn't want it also. A detailed explanation is best
33done with an example.
34
35Let's say the AP wants to claim the bus. It:
36
371. Asserts AP_CLAIM
382. Waits a little bit for the other side to notice (slew time)
393. Checks EC_CLAIM. If this is not asserted, then the AP has the bus, and we
40 are done
414. Otherwise, wait for a few milliseconds (retry time) and see if EC_CLAIM is
42 released
435. If not, back off, release the claim and wait for a few more milliseconds
44 (retry time again)
456. Go back to 1 if things don't look wedged (wait time has expired)
467. Panic. The other side is hung with the CLAIM line set.
47
48The same algorithm applies on the EC.
49
50To release the bus, just de-assert the claim line.
51
52Typical delays are:
53- slew time 10 us
54- retry time 3 ms
55- wait time - 50ms
56
57In general the traffic is fairly light, and in particular the EC wants access
58to the bus quite rarely (maybe every 10s or 30s to check the battery). This
59scheme works very nicely with very low contention. There is only a 10 us
60wait for access to the bus assuming that the other side isn't using it.
61
README.imx25
1U-Boot for Freescale i.MX25
2
3This file contains information for the port of U-Boot to the Freescale i.MX25
4SoC.
5
61. CONVENTIONS FOR FUSE ASSIGNMENTS
7-----------------------------------
8
91.1 MAC Address: It is stored in the words 26 to 31 of fuse bank 0, using the
10 natural MAC byte order (i.e. MSB first).
11
README.imx27
1U-Boot for Freescale i.MX27
2
3This file contains information for the port of U-Boot to the Freescale i.MX27
4SoC.
5
61. CONVENTIONS FOR FUSE ASSIGNMENTS
7-----------------------------------
8
91.1 MAC Address: It is stored in the words 4 to 9 of fuse bank 0, using the
10 reversed MAC byte order (i.e. LSB first).
11
README.imx5
1U-Boot for Freescale i.MX5x
2
3This file contains information for the port of U-Boot to the Freescale
4i.MX5x SoCs.
5
61. CONFIGURATION OPTIONS/SETTINGS
7---------------------------------
8
91.1 CONFIG_MX51_PLL_ERRATA: Workaround for i.MX51 PLL errata.
10 This option should be enabled by all boards using the i.MX51 silicon
11 version up until (including) 3.0 running at 800MHz.
12 The PLL's in the i.MX51 processor can go out of lock due to a metastable
13 condition in an analog flip-flop when used at high frequencies.
14 This workaround implements an undocumented feature in the PLL (dither
15 mode), which causes the effect of this failure to be much lower (in terms
16 of frequency deviation), avoiding system failure, or at least decreasing
17 the likelihood of system failure.
18
191.2 CONFIG_SYS_MAIN_PWR_ON: Trigger MAIN_PWR_ON upon startup.
20 This option should be enabled for boards having a SYS_ON_OFF_CTL signal
21 connected to GPIO1[23] and triggering the MAIN_PWR_ON signal like in the
22 reference designs.
23
242. CONVENTIONS FOR FUSE ASSIGNMENTS
25-----------------------------------
26
272.1 MAC Address: It is stored in the words 9 to 14 of fuse bank 1, using the
28 natural MAC byte order (i.e. MSB first).
29
30 This is an example how to program an example MAC address 01:23:45:67:89:ab
31 into the eFuses. Assure that the programming voltage is available and then
32 execute:
33
34 => fuse prog -y 1 9 01 23 45 67 89 ab
35
36 After programming a MAC address, consider locking the MAC fuses. This is
37 done by programming the MAC_ADDR_LOCK fuse, which is bit 4 of word 0 in
38 bank 1:
39
40 => fuse prog -y 1 0 10
41
README.imx6
1U-Boot for Freescale i.MX6
2
3This file contains information for the port of U-Boot to the Freescale i.MX6
4SoC.
5
61. CONVENTIONS FOR FUSE ASSIGNMENTS
7-----------------------------------
8
91.1 MAC Address: It is stored in fuse bank 4, with the 32 lsbs in word 2 and the
10 16 msbs in word 3[15:0].
11 For i.MX6SX and i.MX6UL, they have two MAC addresses. The second MAC address
12 is stored in fuse bank 4, with the 16 lsb in word 3[31:16] and the 32 msbs in
13 word 4.
14
15Example:
16
17For reading the MAC address fuses on a MX6Q:
18
19- The MAC address is stored in two fuse addresses (the fuse addresses are
20described in the Fusemap Descriptions table from the mx6q Reference Manual):
21
220x620[31:0] - MAC_ADDR[31:0]
230x630[15:0] - MAC_ADDR[47:32]
24
25In order to use the fuse API, we need to pass the bank and word values, which
26are calculated as below:
27
28Fuse address for the lower MAC address: 0x620
29Base address for the fuses: 0x400
30
31(0x620 - 0x400)/0x10 = 0x22 = 34 decimal
32
33As the fuses are arranged in banks of 8 words:
34
3534 / 8 = 4 and the remainder is 2, so in this case:
36
37bank = 4
38word = 2
39
40And the U-Boot command would be:
41
42=> fuse read 4 2
43Reading bank 4:
44
45Word 0x00000002: 9f027772
46
47Doing the same for the upper MAC address:
48
49Fuse address for the upper MAC address: 0x630
50Base address for the fuses: 0x400
51
52(0x630 - 0x400)/0x10 = 0x23 = 35 decimal
53
54As the fuses are arranged in banks of 8 words:
55
5635 / 8 = 4 and the remainder is 3, so in this case:
57
58bank = 4
59word = 3
60
61And the U-Boot command would be:
62
63=> fuse read 4 3
64Reading bank 4:
65
66Word 0x00000003: 00000004
67
68,which matches the ethaddr value:
69=> echo ${ethaddr}
7000:04:9f:02:77:72
71
72Some other useful hints:
73
74- The 'bank' and 'word' numbers can be easily obtained from the mx6 Reference
75Manual. For the mx6quad case, please check the "46.5 OCOTP Memory Map/Register
76Definition" from the "i.MX 6Dual/6Quad Applications Processor Reference Manual,
77Rev. 1, 04/2013" document. For example, for the MAC fuses we have:
78
79Address:
8021B_C620 Value of OTP Bank4 Word2 (MAC Address)(OCOTP_MAC0)
81
8221B_C630 Value of OTP Bank4 Word3 (MAC Address)(OCOTP_MAC1)
83
84- The command '=> fuse read 4 2 2' reads the whole MAC addresses at once:
85
86=> fuse read 4 2 2
87Reading bank 4:
88
89Word 0x00000002: 9f027772 00000004
90
912. Using imx_usb_loader for first install with SPL
92--------------------------------------------------
93
94imx_usb_loader is a very nice tool by Boundary Devices that
95allow to install U-Boot without a JTAG debugger, using
96the USB boot mode as described in the manual. It is
97a replacement for Freescale's MFGTOOLS.
98
99The sources can be found here:
100
101 https://github.com/boundarydevices/imx_usb_loader.git
102
103Booting in USB mode, the i.MX6 announces itself to the Linux Host as:
104
105Bus 001 Device 111: ID 15a2:0061 Freescale Semiconductor, Inc.
106
107imx_usb_loader is able to download a single file (u-boot.imx)
108to the board. For boards without SPL support, it is enough to
109issue the command:
110
111 sudo ../imx_usb_loader/imx_usb -v u-boot.imx
112
113Getting U-Boot when SPL support is active, it requires
114two downloads. imx_usb_loader downloads the SPL into
115OCRAM and starts it. SPL will check for a valid u-boot.img, and
116because it is not found, it will wait for it using the y-modem
117protocol via the console.
118
119A first install is then possible by combining imx_usb_loader with
120another tool such as kermit.
121
122sudo ../imx_usb_loader/imx_usb -v SPL
123kermit kermit_uboot
124
125and kermit_uboot contains something like this (set line should be adjusted):
126
127set line /dev/ttyUSB1
128set speed 115200
129SET CARRIER-WATCH OFF
130set flow-control none
131set handshake none
132set prefixing all
133set file type bin
134set protocol ymodem
135send u-boot.img
136c
137
138The last "c" command tells kermit (from ckermit package in most distros)
139to switch from command line mode to communication mode, and when the
140script is finished, the U-Boot prompt is shown in the same shell.
141
1423. Using Secure Boot on i.MX6 machines with SPL support
143-------------------------------------------------------
144
145This version of U-Boot is able to build a signable version of the SPL
146as well as a signable version of the U-Boot image. The signature can
147be verified through High Assurance Boot (HAB).
148
149CONFIG_SECURE_BOOT is needed to build those two binaries.
150After building, you need to create a command sequence file and use
151Freescales Code Signing Tool to sign both binaries. After creation,
152the mkimage tool outputs the required information about the HAB Blocks
153parameter for the CSF. During the build, the information is preserved
154in log files named as the binaries. (SPL.log and u-boot-ivt.log).
155
156More information about the CSF and HAB can be found in the AN4581.
157https://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf
158
159We don't want to explain how to create a PKI tree or SRK table as
160this is well explained in the Application Note.
161
162Example Output of the SPL (imximage) creation:
163 Image Type: Freescale IMX Boot Image
164 Image Ver: 2 (i.MX53/6/7 compatible)
165 Mode: DCD
166 Data Size: 61440 Bytes = 60.00 kB = 0.06 MB
167 Load Address: 00907420
168 Entry Point: 00908000
169 HAB Blocks: 00907400 00000000 0000cc00
170
171Example Output of the u-boot-ivt.img (firmware_ivt) creation:
172 Image Name: U-Boot 2016.11-rc1-31589-g2a4411
173 Created: Sat Nov 5 21:53:28 2016
174 Image Type: ARM U-Boot Firmware with HABv4 IVT (uncompressed)
175 Data Size: 352192 Bytes = 343.94 kB = 0.34 MB
176 Load Address: 17800000
177 Entry Point: 00000000
178 HAB Blocks: 0x177fffc0 0x0000 0x00054020
179
180The CST (Code Signing Tool) can be downloaded from NXP.
181# Compile CSF and create signature
182./cst --o csf-u-boot.bin < command_sequence_uboot.csf
183./cst --o csf-SPL.bin < command_sequence_spl.csf
184# Append compiled CSF to Binary
185cat SPL csf-SPL.bin > SPL-signed
186cat u-boot-ivt.img csf-u-boot.bin > u-boot-signed.img
187
188These two signed binaries can be used on an i.MX6 in closed
189configuration when the according SRK Table Hash has been flashed.
README.imximage
1---------------------------------------------
2Imximage Boot Image generation using mkimage
3---------------------------------------------
4
5This document describes how to set up a U-Boot image that can be booted
6by Freescale MX25, MX35, MX51, MX53 and MX6 processors via internal boot
7mode.
8
9These processors can boot directly from NAND, SPI flash and SD card flash
10using its internal boot ROM support. MX6 processors additionally support
11boot from NOR flash and SATA disks. All processors can boot from an internal
12UART, if booting from device media fails.
13Booting from NOR flash does not require to use this image type.
14
15For more details refer Chapter 2 - System Boot and section 2.14
16(flash header description) of the processor's manual.
17
18Command syntax:
19--------------
20./tools/mkimage -l <mx u-boot_file>
21 to list the imx image file details
22
23./tools/mkimage -T imximage \
24 -n <board specific configuration file> \
25 -e <execution address> -d <u-boot binary> <output image file>
26
27For example, for the mx51evk board:
28./tools/mkimage -n ./board/freescale/mx51evk/imximage.cfg \
29 -T imximage -e 0x97800000 \
30 -d u-boot.bin u-boot.imx
31
32You can generate directly the image when you compile u-boot with:
33
34$ make u-boot.imx
35
36The output image can be flashed on the board SPI flash or on a SD card.
37In both cases, you have to copy the image at the offset required for the
38chosen media devices (0x400 for both SPI flash or SD card).
39
40Please check Freescale documentation for further details.
41
42Board specific configuration file specifications:
43-------------------------------------------------
441. This file must present in the $(BOARDDIR) and the name should be
45 imximage.cfg (since this is used in Makefile).
462. This file can have empty lines and lines starting with "#" as first
47 character to put comments.
483. This file can have configuration command lines as mentioned below,
49 any other information in this file is treated as invalid.
50
51Configuration command line syntax:
52---------------------------------
531. Each command line is must have two strings, first one command or address
54 and second one data string
552. Following are the valid command strings and associated data strings:-
56 Command string data string
57 -------------- -----------
58 IMXIMAGE_VERSION 1/2
59 1 is for mx25/mx35/mx51 compatible,
60 2 is for mx53/mx6 compatible,
61 others is invalid and error is generated.
62 This command need appear the fist before
63 other valid commands in configuration file.
64
65 BOOT_OFFSET value
66
67 This command is parallel to BOOT_FROM and
68 is preferred over BOOT_FROM.
69
70 value: Offset of the image header, this
71 value shall be set to one of the
72 values found in the file:
73 arch/arm/include/asm/\
74 mach-imx/imximage.cfg
75 Example:
76 BOOT_OFFSET FLASH_OFFSET_STANDARD
77
78 BOOT_FROM nand/spi/sd/onenand/nor/sata
79
80 This command is parallel to BOOT_OFFSET and
81 is to be deprecated in favor of BOOT_OFFSET.
82
83 Example:
84 BOOT_FROM spi
85
86 CSF value
87
88 Total size of CSF (Command Sequence File)
89 used for Secure Boot/ High Assurance Boot
90 (HAB).
91
92 Using this command will populate the IVT
93 (Initial Vector Table) CSF pointer and adjust
94 the length fields only. The CSF itself needs
95 to be generated with Freescale tools and
96 'manually' appended to the u-boot.imx file.
97
98 The CSF is then simply concatenated
99 to the u-boot image, making a signed bootloader,
100 that the processor can verify
101 if the fuses for the keys are burned.
102
103 Further infos how to configure the SOC to verify
104 the bootloader can be found in the "High
105 Assurance Boot Version Application Programming
106 Interface Reference Manual" as part of the
107 Freescale Code Signing Tool, available on the
108 manufacturer's website.
109
110 Example:
111 CSF 0x2000
112
113 DATA type address value
114
115 type: word=4, halfword=2, byte=1
116 address: physycal register address
117 value: value to be set in register
118 All values are in in hexadecimal.
119 Example (write to IOMUXC):
120 DATA 4 0x73FA88a0 0x200
121
122The processor support up to 60 register programming commands for IMXIMAGE_VERSION 1
123and 220 register programming commands for IMXIMAGE_VERSION 2.
124An error is generated if more commands are found in the configuration file.
125
1263. All commands are optional to program.
127
128Setup a SD Card for booting
129--------------------------------
130
131The following example prepare a SD card with u-boot and a FAT partition
132to be used to stored the kernel to be booted.
133I will set the SD in the most compatible mode, setting it with
134255 heads and 63 sectors, as suggested from several documentation and
135howto on line (I took as reference the preparation of a SD Card for the
136Beagleboard, running u-boot as bootloader).
137
138You should start clearing the partitions table on the SD card. Because
139the u-boot image must be stored at the offset 0x400, it must be assured
140that there is no partition at that address. A new SD card is already
141formatted with FAT filesystem and the partition starts from the first
142cylinder, so we need to change it.
143
144You can do all steps with fdisk. If the device for the SD card is
145/dev/mmcblk0, the following commands make the job:
146
1471. Start the fdisk utility (as superuser)
148 fdisk /dev/mmcblk0
149
1502. Clear the actual partition
151
152Command (m for help): o
153
1543. Print card info:
155
156Command (m for help): p
157Disk /dev/mmcblk0: 1981 MB, 1981284352 bytes
158
159In my case, I have a 2 GB card. I need the size to set later the correct value
160for the cylinders.
161
1624. Go to expert mode:
163
164Command (m for help): x
165
1665. Set card geometry
167
168Expert command (m for help): h
169Number of heads (1-256, default 4): 255
170
171Expert command (m for help): s
172Number of sectors (1-63, default 16): 63
173Warning: setting sector offset for DOS compatiblity
174
175We have set 255 heads, 63 sector. We have to set the cylinder.
176The value to be set can be calculated with:
177
178 cilynder = <total size> / <heads> / <sectors> / <blocksize>
179
180in this example,
181 1981284352 / 255 / 63 / 512 = 239.x = 239
182
183
184Expert command (m for help): c
185Number of cylinders (1-1048576, default 60032): 239
186
1876. Leave the expert mode
188Expert command (m for help): r
189
1907. Set up a partition
191
192Now set a partition table to store the kernel or whatever you want. Of course,
193you can set additional partitions to store rootfs, data, etc.
194In my example I want to set a single partition. I must take care
195to not overwrite the space where I will put u-boot.
196
197Command (m for help): n
198Command action
199 e extended
200 p primary partition (1-4)
201p
202Partition number (1-4): 1
203First cylinder (1-239, default 1): 3
204Last cylinder, +cylinders or +size{K,M,G} (3-239, default 239): +100M
205
206Command (m for help): p
207
208Disk /dev/mmcblk0: 1967 MB, 1967128576 bytes
209255 heads, 63 sectors/track, 239 cylinders
210Units = cylinders of 16065 * 512 = 8225280 bytes
211Disk identifier: 0xb712a870
212
213 Device Boot Start End Blocks Id System
214/dev/mmcblk0p1 3 16 112455 83 Linux
215
216I have set 100MB, leaving the first 2 sectors free. I will copy u-boot
217there.
218
2198. Write the partition table and exit.
220
221Command (m for help): w
222The partition table has been altered!
223
224Calling ioctl() to re-read partition table.
225
2269. Copy u-boot.imx on the SD card
227
228I use dd:
229
230dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
231
232This command copies the u-boot image at the address 0x400, as required
233by the processor.
234
235Now remove your card from the PC and go to the target. If evrything went right,
236the u-boot prompt should come after power on.
237
238------------------------------------------------
239Author: Stefano babic <sbabic@denx.de>
240
README.iomux
1/*
2 * (C) Copyright 2008
3 * Gary Jennejohn, DENX Software Engineering GmbH <garyj@denx.de>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8U-Boot console multiplexing
9===========================
10
11HOW CONSOLE MULTIPLEXING WORKS
12------------------------------
13
14This functionality is controlled with CONFIG_CONSOLE_MUX in the board
15configuration file.
16
17Two new files, common/iomux.c and include/iomux.h, contain the heart
18(iomux_doenv()) of the environment setting implementation.
19
20iomux_doenv() is called in common/cmd_nvedit.c to handle setenv and in
21common/console.c in console_init_r() during bootup to initialize
22stdio_devices[].
23
24A user can use a comma-separated list of devices to set stdin, stdout
25and stderr. For example: "setenv stdin serial,nc". NOTE: No spaces
26are allowed around the comma(s)!
27
28The length of the list is limited by malloc(), since the array used
29is allocated and freed dynamically.
30
31It should be possible to specify any device which console_assign()
32finds acceptable, but the code has only been tested with serial and
33nc.
34
35iomux_doenv() prevents multiple use of the same device, e.g. "setenv
36stdin nc,nc,serial" will discard the second nc. iomux_doenv() is
37not able to modify the environment, however, so that "pri stdin" still
38shows "nc,nc,serial".
39
40The major change in common/console.c was to modify fgetc() to call
41the iomux_tstc() routine in a for-loop. iomux_tstc() in turn calls
42the tstc() routine for every registered device, but exits immediately
43when one of them returns true. fgetc() then calls iomux_getc(),
44which calls the corresponding getc() routine. fgetc() hangs in
45the for-loop until iomux_tstc() returns true and the input can be
46retrieved.
47
48Thus, a user can type into any device registered for stdin. No effort
49has been made to demulitplex simultaneous input from multiple stdin
50devices.
51
52fputc() and fputs() have been modified to call iomux_putc() and
53iomux_puts() respectively, which call the corresponding output
54routines for every registered device.
55
56Thus, a user can see the ouput for any device registered for stdout
57or stderr on all devices registered for stdout or stderr. As an
58example, if stdin=serial,nc and stdout=serial,nc then all output
59for serial, e.g. echos of input on serial, will appear on serial and nc.
60
61Just as with the old console code, this statement is still true:
62If not defined in the environment, the first input device is assigned
63to the 'stdin' file, the first output one to 'stdout' and 'stderr'.
64
65If CONFIG_SYS_CONSOLE_IS_IN_ENV is defined then multiple input/output
66devices can be set at boot time if defined in the environment.
67
68CAVEATS
69-------
70
71Note that common/iomux.c calls console_assign() for every registered
72device as it is discovered. This means that the environment settings
73for application consoles will be set to the last device in the list.
74
75On a slow machine, such as MPC852T clocked at 66MHz, the overhead associated
76with calling tstc() and then getc() means that copy&paste will normally not
77work, even when stdin=stdout=stderr=serial.
78On a faster machine, such as a sequoia, cut&paste of longer (about 80
79characters) lines works fine when serial is the only device used.
80
81Using nc as a stdin device results in even more overhead because nc_tstc()
82is quite slow. Even on a sequoia cut&paste does not work on the serial
83interface when nc is added to stdin, although there is no character loss using
84the ethernet interface for input. In this test case stdin=serial,nc and
85stdout=serial.
86
87In addition, the overhead associated with sending to two devices, when one of
88them is nc, also causes problems. Even on a sequoia cut&paste does not work
89on the serial interface (stdin=serial) when nc is added to stdout (stdout=
90serial,nc).
91
README.kconfig
1Kconfig in U-Boot
2=================
3
4This document describes the configuration infrastructure of U-Boot.
5
6The conventional configuration was replaced by Kconfig at v2014.10-rc1 release.
7
8
9Language Specification
10----------------------
11
12Kconfig originates in Linux Kernel.
13See the file "Documentation/kbuild/kconfig*.txt" in your Linux Kernel
14source directory for a basic specification of Kconfig.
15
16
17Difference from Linux's Kconfig
18-------------------------------
19
20Here are some worth-mentioning configuration targets.
21
22- silentoldconfig
23
24 This target updates .config, include/generated/autoconf.h and
25 include/configs/* as in Linux. In U-Boot, it also does the following
26 for the compatibility with the old configuration system:
27
28 * create a symbolic link "arch/${ARCH}/include/asm/arch" pointing to
29 the SoC/CPU specific header directory
30 * create include/config.h
31 * create include/autoconf.mk
32 * create spl/include/autoconf.mk (SPL and TPL only)
33 * create tpl/include/autoconf.mk (TPL only)
34
35 If we could completely switch to Kconfig in a long run
36 (i.e. remove all the include/configs/*.h), those additional processings
37 above would be removed.
38
39- defconfig
40
41 In U-Boot, "make defconfig" is a shorthand of "make sandbox_defconfig"
42
43- <board>_defconfig
44
45 Now it works as in Linux.
46 The prefixes such as "+S:" in *_defconfig are deprecated.
47 You can simply remove the prefixes. Do not add them for new boards.
48
49- <board>_config
50
51 This does not exist in Linux's Kconfig.
52 "make <board>_config" works the same as "make <board>_defconfig".
53 Prior to Kconfig, in U-Boot, "make <board>_config" was used for the
54 configuration. It is still supported for backward compatibility, so
55 we do not need to update the distro recipes.
56
57
58The other configuration targets work as in Linux Kernel.
59
60
61Migration steps to Kconfig
62--------------------------
63
64Prior to Kconfig, the C preprocessor based board configuration had been used
65in U-Boot.
66
67Although Kconfig was introduced and some configs have been moved to Kconfig,
68many of configs are still defined in C header files. It will take a very
69long term to move all of them to Kconfig. In the interim, the two different
70configuration infrastructures should coexist.
71The configuration files are generated by both Kconfig and the old preprocessor
72based configuration as follows:
73
74Configuration files for use in C sources
75 - include/generated/autoconf.h (generated by Kconfig for Normal)
76 - include/configs/<board>.h (exists for all boards)
77
78Configuration file for use in makefiles
79 - include/config/auto.conf (generated by Kconfig)
80 - include/autoconf.mk (generated by the old config for Normal)
81 - spl/include/autoconfig.mk (generated by the old config for SPL)
82 - tpl/include/autoconfig.mk (generated by the old config for TPL)
83
84When adding a new CONFIG macro, it is highly recommended to add it to Kconfig
85rather than to a header file.
86
87
88Conversion from boards.cfg to Kconfig
89-------------------------------------
90
91Prior to Kconfig, boards.cfg was a primary database that contained Arch, CPU,
92SoC, etc. of all the supported boards. It was deleted when switching to
93Kconfig. Each field of boards.cfg was converted as follows:
94
95 Status -> "S:" entry of MAINTAINERS
96 Arch -> CONFIG_SYS_ARCH defined by Kconfig
97 CPU -> CONFIG_SYS_CPU defined by Kconfig
98 SoC -> CONFIG_SYS_SOC defined by Kconfig
99 Vendor -> CONFIG_SYS_VENDOR defined by Kconfig
100 Board -> CONFIG_SYS_BOARD defined by Kconfig
101 Target -> File name of defconfig (configs/<target>_defconfig)
102 Options -> CONFIG_SYS_EXTRA_OPTIONS defined by Kconfig
103 Maintainers -> "M:" entry of MAINTAINERS
104
105
106Tips to add/remove boards
107-------------------------
108
109When adding a new board, the following steps are generally needed:
110
111 [1] Add a header file include/configs/<target>.h
112 [2] Make sure to define necessary CONFIG_SYS_* in Kconfig:
113 Define CONFIG_SYS_CPU="cpu" to compile arch/<arch>/cpu/<cpu>
114 Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc>
115 Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
116 and board/<vendor>/<board>/*
117 Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
118 (or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)
119 Define CONFIG_SYS_CONFIG_NAME="target" to include
120 include/configs/<target>.h
121 [3] Add a new entry to the board select menu in Kconfig.
122 The board select menu is located in arch/<arch>/Kconfig or
123 arch/<arch>/*/Kconfig.
124 [4] Add a MAINTAINERS file
125 It is generally placed at board/<board>/MAINTAINERS or
126 board/<vendor>/<board>/MAINTAINERS
127 [5] Add configs/<target>_defconfig
128
129When removing an obsolete board, the following steps are generally needed:
130
131 [1] Remove configs/<target>_defconfig
132 [2] Remove include/configs/<target>.h if it is not used by any other boards
133 [3] Remove board/<vendor>/<board>/* or board/<board>/* if it is not used
134 by any other boards
135 [4] Update MAINTAINERS if necessary
136 [5] Remove the unused entry from the board select menu in Kconfig
137 [6] Add an entry to doc/README.scrapyard
138
139
140TODO
141----
142
143- The option field of boards.cfg, which was used for the pre-Kconfig
144 configuration, moved to CONFIG_SYS_EXTRA_OPTIONS verbatim now.
145 Board maintainers are expected to implement proper Kconfig options
146 and switch over to them. Eventually CONFIG_SYS_EXTRA_OPTIONS will go away.
147 CONFIG_SYS_EXTRA_OPTIONS should not be used for new boards.
148
149- In the pre-Kconfig, a single board had multiple entries in the boards.cfg
150 file with differences in the option fields. The corresponding defconfig
151 files were auto-generated when switching to Kconfig. Now we have too many
152 defconfig files compared with the number of the supported boards. It is
153 recommended to have only one defconfig per board and allow users to select
154 the config options.
155
156- Move the config macros in header files to Kconfig. When we move at least
157 macros used in makefiles, we can drop include/autoconfig.mk, which makes
158 the build scripts much simpler.
159
README.kwbimage
1---------------------------------------------
2Kirkwood Boot Image generation using mkimage
3---------------------------------------------
4
5This document describes the U-Boot feature as it
6is implemented for the Kirkwood family of SoCs.
7
8The Kirkwood SoC's can boot directly from NAND FLASH,
9SPI FLASH, SATA etc. using its internal bootRom support.
10
11for more details refer section 24.2 of Kirkwood functional specifications.
12ref: www.marvell.com/products/embedded.../kirkwood/index.jsp
13
14Command syntax:
15--------------
16./tools/mkimage -l <kwboot_file>
17 to list the kwb image file details
18
19./tools/mkimage -n <board specific configuration file> \
20 -T kwbimage -a <start address> -e <execution address> \
21 -d <input_raw_binary> <output_kwboot_file>
22
23for ex.
24./tools/mkimage -n ./board/Marvell/openrd_base/kwbimage.cfg \
25 -T kwbimage -a 0x00600000 -e 0x00600000 \
26 -d u-boot.bin u-boot.kwb
27
28
29kwbimage support available with mkimage utility will generate kirkwood boot
30image that can be flashed on the board NAND/SPI flash. The make target
31which uses mkimage to produce such an image is "u-boot.kwb". For example:
32
33 export KBUILD_OUTPUT=/tmp/build
34 make distclean
35 make yourboard_config
36 make u-boot.kwb
37
38
39Board specific configuration file specifications:
40------------------------------------------------
411. This file must present in the $(BOARDDIR). The default name is
42 kwbimage.cfg. The name can be set as part of the full path
43 to the file using CONFIG_SYS_KWD_CONFIG (probably in
44 include/configs/<yourboard>.h). The path should look like:
45 $(CONFIG_BOARDDIR)/<yourkwbimagename>.cfg
462. This file can have empty lines and lines starting with "#" as first
47 character to put comments
483. This file can have configuration command lines as mentioned below,
49 any other information in this file is treated as invalid.
50
51Configuration command line syntax:
52---------------------------------
531. Each command line is must have two strings, first one command or address
54 and second one data string
552. Following are the valid command strings and associated data strings:-
56 Command string data string
57 -------------- -----------
58 BOOT_FROM nand/spi/sata
59 NAND_ECC_MODE default/rs/hamming/disabled
60 NAND_PAGE_SIZE any uint16_t hex value
61 SATA_PIO_MODE any uint32_t hex value
62 DDR_INIT_DELAY any uint32_t hex value
63 DATA regaddr and regdara hex value
64 you can have maximum 55 such register programming commands
65
663. All commands are optional to program
67
68Typical example of kwimage.cfg file:
69-----------------------------------
70
71# Boot Media configurations
72BOOT_FROM nand
73NAND_ECC_MODE default
74NAND_PAGE_SIZE 0x0800
75
76# Configure RGMII-0 interface pad voltage to 1.8V
77DATA 0xFFD100e0 0x1b1b1b9b
78# DRAM Configuration
79DATA 0xFFD01400 0x43000c30
80DATA 0xFFD01404 0x37543000
81DATA 0xFFD01408 0x22125451
82DATA 0xFFD0140C 0x00000a33
83DATA 0xFFD01410 0x000000cc
84DATA 0xFFD01414 0x00000000
85DATA 0xFFD01418 0x00000000
86DATA 0xFFD0141C 0x00000C52
87DATA 0xFFD01420 0x00000040
88DATA 0xFFD01424 0x0000F17F
89DATA 0xFFD01428 0x00085520
90DATA 0xFFD0147C 0x00008552
91DATA 0xFFD01504 0x0FFFFFF1
92DATA 0xFFD01508 0x10000000
93DATA 0xFFD0150C 0x0FFFFFF5
94DATA 0xFFD01514 0x00000000
95DATA 0xFFD0151C 0x00000000
96DATA 0xFFD01494 0x00030000
97DATA 0xFFD01498 0x00000000
98DATA 0xFFD0149C 0x0000E803
99DATA 0xFFD01480 0x00000001
100# End of Header extension
101DATA 0x0 0x0
102
103------------------------------------------------
104Author: Prafulla Wadaskar <prafulla@marvell.com>
105
README.link-local
1------------------------------------------
2 Link-local IP address auto-configuration
3------------------------------------------
4
5Negotiate with other link-local clients on the local network
6for an address that doesn't require explicit configuration.
7This is especially useful if a DHCP server cannot be guaranteed
8to exist in all environments that the device must operate.
9
10This is an implementation of RFC3927.
11
12----------
13 Commands
14----------
15
16When CONFIG_CMD_LINK_LOCAL is defined in the board config file,
17the "linklocal" command is available. This running this will
18take approximately 5 seconds while the address is negotiated.
19
20------------------------
21 Environment interation
22------------------------
23
24The "llipaddr" variable is set with the most recently
25negotiated address and is preferred in future negotiations.
26
27The "ipaddr", "netmask", and "gatewayip" variables are set
28after successful negotiation to enable network access.
29
30-------------
31 Limitations
32-------------
33
34RFC3927 requires that addresses are continuously checked to
35avoid conflicts, however this can only happen when the net_loop
36is getting called. It is possible for a conflict to go undetected
37until a command that accesses the network is executed.
38
39Using NetConsole is one way to ensure that net_loop is always
40processing packets and monitoring for conflicts.
41
42This is also not a concern if the feature is use to connect
43directly to another machine that may not be running a DHCP server.
44
45----------------
46 Example script
47----------------
48
49This script allows use of DHCP and/or Link-local controlled
50by env variables. It depends on CONFIG_CMD_LINK_LOCAL, CONFIG_CMD_DHCP,
51and CONFIG_BOOTP_MAY_FAIL.
52If both fail or are disabled, static settings are used.
53
54#define CONFIG_EXTRA_ENV_SETTINGS \
55 "ipconfigcmd=if test \\\"$dhcpenabled\\\" -ne 0;" \
56 "then " \
57 "dhcpfail=0;dhcp || dhcpfail=1;" \
58 "else " \
59 "dhcpfail=-1;" \
60 "fi;" \
61 "if test \\\"$linklocalenabled\\\" -ne 0 -a " \
62 "\\\"$dhcpfail\\\" -ne 0;" \
63 "then " \
64 "linklocal;" \
65 "llfail=0;" \
66 "else " \
67 "llfail=-1;" \
68 "fi;" \
69 "if test \\\"$llfail\\\" -ne 0 -a " \
70 "\\\"$dhcpfail\\\" -ne 0; " \
71 "then " \
72 "setenv ipaddr $sipaddr; " \
73 "setenv netmask $snetmask; " \
74 "setenv gatewayip $sgatewayip; " \
75 "fi;\0" \
76
README.log
1Logging in U-Boot
2=================
3
4Introduction
5------------
6
7U-Boot's internal operation involves many different steps and actions. From
8setting up the board to displaying a start-up screen to loading an Operating
9System, there are many component parts each with many actions.
10
11Most of the time this internal detail is not useful. Displaying it on the
12console would delay booting (U-Boot's primary purpose) and confuse users.
13
14But for digging into what is happening in a particular area, or for debugging
15a problem it is often useful to see what U-Boot is doing in more detail than
16is visible from the basic console output.
17
18U-Boot's logging feature aims to satisfy this goal for both users and
19developers.
20
21
22Logging levels
23--------------
24
25There are a number logging levels available, in increasing order of verbosity:
26
27 LOGL_EMERG - Printed before U-Boot halts
28 LOGL_ALERT - Indicates action must be taken immediate or U-Boot will crash
29 LOGL_CRIT - Indicates a critical error that will cause boot failure
30 LOGL_ERR - Indicates an error that may cause boot failure
31 LOGL_WARNING - Warning about an unexpected condition
32 LOGL_NOTE - Important information about progress
33 LOGL_INFO - Information about normal boot progress
34 LOGL_DEBUG - Debug information (useful for debugging a driver or subsystem)
35 LOGL_DEBUG_CONTENT - Debug message showing full message content
36 LOGL_DEBUG_IO - Debug message showing hardware I/O access
37
38
39Logging category
40----------------
41
42Logging can come from a wide variety of places within U-Boot. Each log message
43has a category which is intended to allow messages to be filtered according to
44their source.
45
46The following main categories are defined:
47
48 LOGC_NONE - Unknown category (e.g. a debug() statement)
49 UCLASS_... - Related to a particular uclass (e.g. UCLASS_USB)
50 LOGC_ARCH - Related to architecture-specific code
51 LOGC_BOARD - Related to board-specific code
52 LOGC_CORE - Related to core driver-model support
53 LOGC_DT - Related to device tree control
54
55
56Enabling logging
57----------------
58
59The following options are used to enable logging at compile time:
60
61 CONFIG_LOG - Enables the logging system
62 CONFIG_MAX_LOG_LEVEL - Max log level to build (anything higher is compiled
63 out)
64 CONFIG_LOG_CONSOLE - Enable writing log records to the console
65
66If CONFIG_LOG is not set, then no logging will be available.
67
68The above have SPL versions also, e.g. CONFIG_SPL_MAX_LOG_LEVEL.
69
70
71Using DEBUG
72-----------
73
74U-Boot has traditionally used a #define called DEBUG to enable debugging on a
75file-by-file basis. The debug() macro compiles to a printf() statement if
76DEBUG is enabled, and an empty statement if not.
77
78With logging enabled, debug() statements are interpreted as logging output
79with a level of LOGL_DEBUG and a category of LOGC_NONE.
80
81The logging facilities are intended to replace DEBUG, but if DEBUG is defined
82at the top of a file, then it takes precedence. This means that debug()
83statements will result in output to the console and this output will not be
84logged.
85
86
87Logging destinations
88--------------------
89
90If logging information goes nowhere then it serves no purpose. U-Boot provides
91several possible determinations for logging information, all of which can be
92enabled or disabled independently:
93
94 console - goes to stdout
95
96
97Filters
98-------
99
100Filters are attached to log drivers to control what those drivers emit. Only
101records that pass through the filter make it to the driver.
102
103Filters can be based on several criteria:
104
105 - maximum log level
106 - in a set of categories
107 - in a set of files
108
109If no filters are attached to a driver then a default filter is used, which
110limits output to records with a level less than CONFIG_LOG_MAX_LEVEL.
111
112
113Logging statements
114------------------
115
116The main logging function is:
117
118 log(category, level, format_string, ...)
119
120Also debug() and error() will generate log records - these use LOG_CATEGORY
121as the category, so you should #define this right at the top of the source
122file to ensure the category is correct.
123
124
125Code size
126---------
127
128Code size impact depends largely on what is enabled. The following numbers are
129for snow, which is a Thumb-2 board:
130
131This series: adds bss +20.0 data +4.0 rodata +4.0 text +44.0
132CONFIG_LOG: bss -52.0 data +92.0 rodata -635.0 text +1048.0
133CONFIG_LOG_MAX_LEVEL=7: bss +188.0 data +4.0 rodata +49183.0 text +98124.0
134
135The last option turns every debug() statement into a logging call, which
136bloats the code hugely. The advantage is that it is then possible to enable
137all logging within U-Boot.
138
139
140To Do
141-----
142
143There are lots of useful additions that could be made. None of the below is
144implemented! If you do one, please add a test in test/py/tests/test_log.py
145
146Convenience functions to support setting the category:
147
148 log_arch(level, format_string, ...) - category LOGC_ARCH
149 log_board(level, format_string, ...) - category LOGC_BOARD
150 log_core(level, format_string, ...) - category LOGC_CORE
151 log_dt(level, format_string, ...) - category LOGC_DT
152
153Convenience functions to support a category defined for a single file, for
154example:
155
156 #define LOG_CATEGORY UCLASS_USB
157
158all of these can use LOG_CATEGORY as the category, and a log level
159corresponding to the function name:
160
161 logc(level, format_string, ...)
162
163More logging destinations:
164
165 device - goes to a device (e.g. serial)
166 buffer - recorded in a memory buffer
167
168Convert debug() statements in the code to log() statements
169
170Support making printf() emit log statements a L_INFO level
171
172Convert error() statements in the code to log() statements
173
174Figure out what to do with BUG(), BUG_ON() and warn_non_spl()
175
176Figure out what to do with assert()
177
178Add a way to browse log records
179
180Add a way to record log records for browsing using an external tool
181
182Add commands to add and remove filters
183
184Add commands to add and remove log devices
185
186Allow sharing of printf format strings in log records to reduce storage size
187for large numbers of log records
188
189Add a command-line option to sandbox to set the default logging level
190
191Convert core driver model code to use logging
192
193Convert uclasses to use logging with the correct category
194
195Consider making log() calls emit an automatic newline, perhaps with a logn()
196 function to avoid that
197
198Passing log records through to linux (e.g. via device tree /chosen)
199
200Provide a command to access the number of log records generated, and the
201number dropped due to them being generated before the log system was ready.
202
203Add a printf() format string pragma so that log statements are checked properly
204
205Enhance the log console driver to show level / category / file / line
206information
207
208Add a command to add new log records and delete existing records.
209
210Provide additional log() functions - e.g. logc() to specify the category
211
212--
213Simon Glass <sjg@chromium.org>
21415-Sep-17
215
README.lynxkdi
1 LYNX KDI SUPPORT
2
3 Last Update: July 20, 2003
4=======================================================================
5
6This file describes support for LynuxWorks KDI within U-Boot. Support
7is enabled by defining CONFIG_LYNXKDI.
8
9
10LYNXOS AND BLUECAT SUPPORTED
11============================
12Both LynxOS and BlueCat linux KDIs are supported. The implementation
13automatically detects which is being booted. When you use mkimage
14you should specify "lynxos" for both (see target-specific notes).
15
16
17SUPPORTED ARCHITECTURE/TARGETS
18==============================
19The following targets have been tested:
20
21-PowerPC MPC8260ADS
22
23
24FILES TO LOOK AT
25================
26include/lynxkdi.h -defines a simple struct passed to a kdi.
27common/lynxkdi.c -implements the call to the kdi.
28common/cmd_bootm.c -top-level command implementation ("bootm").
29
30
31====================================================================
32TARGET SPECIFIC NOTES
33====================================================================
34
35MPC8260ADS
36===========
37The default LynxOS and BlueCat implementations require some
38modifications to the config file.
39
40Edit include/configs/MPC8260ADS.h to use the following:
41
42#define CONFIG_SYS_IMMR 0xFA200000
43#define CONFIG_SYS_BCSR 0xFA100000
44#define CONFIG_SYS_BR1_PRELIM 0xFA101801
45
46When creating a LynxOS or BlueCat u-boot image using mkimage,
47you must specify the following:
48
49Both: -A ppc -O lynxos -T kernel -C none
50LynxOS: -a 0x00004000 -e 0x00004020
51BlueCat: -a 0x00500000 -e 0x00507000
52
53To pass the MAC address to BlueCat you should define the
54"fcc2_ether_addr" parameter in the "bootargs" environment
55variable. E.g.:
56
57==> setenv bootargs fcc2_ether_addr=00:11:22:33:44:55:66
58
README.m54418twr
1Freescale MCF54418TWR ColdFire Development Board
2================================================
3
4TsiChung Liew(Tsi-Chung.Liew@freescale.com)
5Created Mar 22, 2012
6===========================================
7
8
9Changed files:
10==============
11
12- board/freescale/m54418twr/m54418twr.c Dram setup
13- board/freescale/m54418twr/Makefile Makefile
14- board/freescale/m54418twr/config.mk config make
15- board/freescale/m54418twr/u-boot.lds Linker description
16
17- arch/m68k/cpu/mcf5445x/cpu.c cpu specific code
18- arch/m68k/cpu/mcf5445x/cpu_init.c Flexbus ChipSelect, Mux pins setup, icache and RTC extra regs
19- arch/m68k/cpu/mcf5445x/interrupts.c cpu specific interrupt support
20- arch/m68k/cpu/mcf5445x/speed.c system, pci, flexbus, and cpu clock
21- arch/m68k/cpu/mcf5445x/Makefile Makefile
22- arch/m68k/cpu/mcf5445x/config.mk config make
23- arch/m68k/cpu/mcf5445x/start.S start up assembly code
24
25- doc/README.m54418twr This readme file
26
27- drivers/net/mcffec.c ColdFire common FEC driver
28- drivers/net/mcfmii.c ColdFire common MII driver
29- drivers/serial/mcfuart.c ColdFire common UART driver
30
31- arch/m68k/include/asm/bitops.h Bit operation function export
32- arch/m68k/include/asm/byteorder.h Byte order functions
33- arch/m68k/include/asm/fec.h FEC structure and definition
34- arch/m68k/include/asm/global_data.h Global data structure
35- arch/m68k/include/asm/immap.h ColdFire specific header file and driver macros
36- arch/m68k/include/asm/immap_5441x.h mcf5441x specific header file
37- arch/m68k/include/asm/io.h io functions
38- arch/m68k/include/asm/m5441x.h mcf5441x specific header file
39- arch/m68k/include/asm/posix_types.h Posix
40- arch/m68k/include/asm/processor.h header file
41- arch/m68k/include/asm/ptrace.h Exception structure
42- arch/m68k/include/asm/rtc.h Realtime clock header file
43- arch/m68k/include/asm/string.h String function export
44- arch/m68k/include/asm/timer.h Timer structure and definition
45- arch/m68k/include/asm/types.h Data types definition
46- arch/m68k/include/asm/uart.h Uart structure and definition
47- arch/m68k/include/asm/u-boot.h u-boot structure
48
49- include/configs/M54418TWR.h Board specific configuration file
50
51- arch/m68k/lib/board.c board init function
52- arch/m68k/lib/cache.c
53- arch/m68k/lib/interrupts.c Coldfire common interrupt functions
54- arch/m68k/lib/time.c Timer functions (Dma timer and PIT)
55- arch/m68k/lib/traps.c Exception init code
56
571 MCF5441x specific Options/Settings
58====================================
591.1 pre-loader is no longer suppoer in thie coldfire family
60
611.2 Configuration settings for M54418TWR Development Board
62CONFIG_MCF5441x -- define for all MCF5441x CPUs
63CONFIG_M54418 -- define for all Freescale MCF54418 CPUs
64CONFIG_M54418TWR -- define for M54418TWR board
65
66CONFIG_MCFUART -- define to use common CF Uart driver
67CONFIG_SYS_UART_PORT -- define UART port number, start with 0, 1 and 2
68CONFIG_BAUDRATE -- define UART baudrate
69
70CONFIG_MCFFEC -- define to use common CF FEC driver
71CONFIG_MII -- enable to use MII driver
72CONFIG_SYS_DISCOVER_PHY -- enable PHY discovery
73CONFIG_SYS_RX_ETH_BUFFER -- Set FEC Receive buffer
74CONFIG_SYS_FAULT_ECHO_LINK_DOWN --
75CONFIG_SYS_FEC0_PINMUX -- Set FEC0 Pin configuration
76CONFIG_SYS_FEC1_PINMUX -- Set FEC1 Pin configuration
77CONFIG_SYS_FEC0_MIIBASE -- Set FEC0 MII base register
78CONFIG_SYS_FEC1_MIIBASE -- Set FEC0 MII base register
79MCFFEC_TOUT_LOOP -- set FEC timeout loop
80CONFIG_HAS_ETH1 -- define to enable second FEC in u-boot
81
82CONFIG_MCFTMR -- define to use DMA timer
83
84CONFIG_SYS_IMMR -- define for MBAR offset
85
86CONFIG_EXTRA_CLOCK -- Enable extra clock such as vco, flexbus, pci, etc
87
88CONFIG_SYS_MBAR -- define MBAR offset
89
90CONFIG_MONITOR_IS_IN_RAM -- Not support
91
92CONFIG_SYS_INIT_RAM_ADDR -- defines the base address of the MCF54455 internal SRAM
93
94CONFIG_SYS_CSn_BASE -- defines the Chip Select Base register
95CONFIG_SYS_CSn_MASK -- defines the Chip Select Mask register
96CONFIG_SYS_CSn_CTRL -- defines the Chip Select Control register
97
98CONFIG_SYS_SDRAM_BASE -- defines the DRAM Base
99
1002. MEMORY MAP UNDER U-BOOT AND LINUX KERNEL
101===========================================
1022.1. System memory map:
103 MRAM: 0x00000000-0x0003FFFF (256KB)
104 DDR: 0x40000000-0x47FFFFFF (128MB)
105 SRAM: 0x80000000-0x8000FFFF (64KB)
106 IP: 0xE0000000-0xFFFFFFFF (512MB)
107
1083. COMPILATION
109==============
1103.1 To create U-Boot the gcc-4.x compiler set (ColdFire ELF version)
111from codesourcery.com was used. Download it from:
112http://www.codesourcery.com/gnu_toolchains/coldfire/download.html
113
1143.2 Compilation
115 export CROSS_COMPILE=cross-compile-prefix
116 cd u-boot
117 make distclean
118 make M54418TWR_config, or - default to spi serial flash boot, 50Mhz input clock
119 make M54418TWR_nand_mii_config, or - default to nand flash boot, mii mode, 25Mhz input clock
120 make M54418TWR_nand_rmii_config, or - default to nand flash boot, rmii mode, 50Mhz input clock
121 make M54418TWR_nand_rmii_lowfreq_config, or - default to nand flash boot, rmii mode, 50Mhz input clock
122 make M54418TWR_serial_mii_config, or - default to spi serial flash boot, 25Mhz input clock
123 make M54418TWR_serial_rmii_config, or - default to spi serial flash boot, 50Mhz input clock
124 make
125
1264. SCREEN DUMP
127==============
1284.1 M54418TWR Development board
129 Boot from NAND flash (NOTE: May not show exactly the same)
130
131U-Boot 2012.10-00209-g12ae1d8-dirty (Oct 18 2012 - 15:54:54)
132
133CPU: Freescale MCF54418 (Mask:a3 Version:1)
134 CPU CLK 250 MHz BUS CLK 125 MHz FLB CLK 125 MHz
135 INP CLK 50 MHz VCO CLK 500 MHz
136Board: Freescale MCF54418 Tower System
137SPI: ready
138DRAM: 128 MiB
139NAND: 256 MiB
140In: serial
141Out: serial
142Err: serial
143Net: FEC0, FEC1
144-> pri
145baudrate=115200
146bootargs=root=/dev/mtdblock2 rw rootfstype=jffs2 mtdparts=NAND:1M(u-boot)ro,7M(k
147ernel)ro,-(jffs2) console=ttyS0,115200
148bootdelay=2
149eth1addr=00:e0:0c:bc:e5:61
150ethact=FEC0
151ethaddr=00:e0:0c:bc:e5:60
152fileaddr=40010000
153filesize=27354
154gatewayip=192.168.1.1
155hostname=M54418TWR
156inpclk=50000000
157ipaddr=192.168.1.2
158load=tftp ${loadaddr} ${u-boot};
159loadaddr=0x40010000
160mem=129024k
161netdev=eth0
162netmask=255.255.255.0
163prog=nand device 0;nand erase 0 40000;nb_update ${loadaddr} ${filesize};save
164serverip=192.168.1.1
165stderr=serial
166stdin=serial
167stdout=serial
168u-boot=u-boot.bin
169upd=run load; run prog
170
171Environment size: 653/131068 bytes
172-> bdinfo
173memstart = 0x40000000
174memsize = 0x08000000
175flashstart = 0x00000000
176flashsize = 0x00000000
177flashoffset = 0x00000000
178sramstart = 0x80000000
179sramsize = 0x00010000
180mbar = 0xFC000000
181cpufreq = 250 MHz
182busfreq = 125 MHz
183flbfreq = 125 MHz
184inpfreq = 50 MHz
185vcofreq = 500 MHz
186ethaddr = 00:e0:0c:bc:e5:60
187eth1addr = 00:e0:0c:bc:e5:61
188ip_addr = 192.168.1.2
189baudrate = 115200 bps
190-> help
191? - alias for 'help'
192base - print or set address offset
193bdinfo - print Board Info structure
194boot - boot default, i.e., run 'bootcmd'
195bootd - boot default, i.e., run 'bootcmd'
196bootelf - Boot from an ELF image in memory
197bootm - boot application image from memory
198bootp - boot image via network using BOOTP/TFTP protocol
199bootvx - Boot vxWorks from an ELF image
200cmp - memory compare
201coninfo - print console devices and information
202cp - memory copy
203crc32 - checksum calculation
204dcache - enable or disable data cache
205dhcp - boot image via network using DHCP/TFTP protocol
206echo - echo args to console
207editenv - edit environment variable
208env - environment handling commands
209exit - exit script
210false - do nothing, unsuccessfully
211go - start application at address 'addr'
212help - print command description/usage
213icache - enable or disable instruction cache
214iminfo - print header information for application image
215imxtract- extract a part of a multi-image
216itest - return true/false on integer compare
217loop - infinite loop on address range
218md - memory display
219mdio - MDIO utility commands
220mii - MII utility commands
221mm - memory modify (auto-incrementing address)
222mtest - simple RAM read/write test
223mw - memory write (fill)
224nand - NAND sub-system
225nb_update- Nand boot update program
226nboot - boot from NAND device
227nfs - boot image via network using NFS protocol
228nm - memory modify (constant address)
229ping - send ICMP ECHO_REQUEST to network host
230printenv- print environment variables
231reginfo - print register information
232reset - Perform RESET of the CPU
233run - run commands in an environment variable
234saveenv - save environment variables to persistent storage
235setenv - set environment variables
236sf - SPI flash sub-system
237showvar - print local hushshell variables
238sleep - delay execution for some time
239source - run script from memory
240sspi - SPI utility command
241test - minimal test like /bin/sh
242tftpboot- boot image via network using TFTP protocol
243true - do nothing, successfully
244version - print monitor, compiler and linker version
245
README.m68k
1
2U-Boot for Motorola M68K
3
4====================================================================
5History
6
7August 08,2005; Jens Scharsig <esw@bus-elektronik.de>
8 MCF5282 implementation without preloader
9January 12, 2004; <josef.baumgartner@telex.de>
10====================================================================
11
12This file contains status information for the port of U-Boot to the
13Motorola M68K series of CPUs.
14
151. OVERVIEW
16-----------
17Bernhard Kuhn ported U-Boot 0.4.0 to the Motorola Coldfire
18architecture. The patches of Bernhard support the MCF5272 and
19MCF5282. A great disadvantage of these patches was that they needed
20a pre-bootloader to start U-Boot. Because of this, a new port was
21created which no longer needs a first stage booter.
22
23Although this port is intended to cover all M68k processors, only
24the parts for the Motorola Coldfire MCF5272 and MCF5282 are
25implemented at the moment. Additional CPUs and boards will be
26hopefully added soon!
27
28
292. SUPPORTED CPUs
30-----------------
31
322.1 Motorola Coldfire MCF5272
33-----------------------------
34CPU specific code is located in: arch/m68k/cpu/mcf52x2
35
36
372.1 Motorola Coldfire MCF5282
38-----------------------------
39CPU specific code is located in: arch/m68k/cpu/mcf52x2
40
41The MCF5282 Port no longer needs a preloader and can place in external or
42internal FLASH.
43
44
453. SUPPORTED BOARDs
46-------------------
47
483.1 Motorola M5272C3 EVB
49------------------------
50Board specific code is located in: board/m5272c3
51
52To configure the board, type: make M5272C3_config
53
54U-Boot Memory Map:
55------------------
560xffe00000 - 0xffe3ffff U-Boot
570xffe04000 - 0xffe05fff environment (embedded in U-Boot!)
580xffe40000 - 0xffffffff free for linux/applications
59
60
613.2 Motorola M5282 EVB
62------------------------
63Board specific code is located in: board/m5282evb
64
65To configure the board, type: make M5272C3_config
66
67At the moment the code isn't fully implemented and still needs a pre-loader!
68The preloader must initialize the processor and then start U-Boot. The board
69must be configured for a pre-loader (see 4.1)
70
71For the preloader, please see
72http://mailman.uclinux.org/pipermail/uclinux-dev/2003-December/023384.html
73
74U-Boot is configured to run at 0x20000 at default. This can be configured by
75change CONFIG_SYS_TEXT_BASE in board/m5282evb/config.mk and CONFIG_SYS_MONITOR_BASE in
76include/configs/M5282EVB.h.
77
783.2 BuS EB+MCF-EV123
79---------------------
80
81Board specific code is located in: board/bus/EB+MCF-EV123
82
83To configure the board, type:
84
85make EB+MCF-EV123_config for external FLASH
86make EB+MCF-EV123_internal_config for internal FLASH
87
88
894. CONFIGURATION OPTIONS/SETTINGS
90----------------------------------
91
924.1 Configuration to use a pre-loader
93-------------------------------------
94If U-Boot should be loaded to RAM and started by a pre-loader
95CONFIG_MONITOR_IS_IN_RAM must be defined. If it is defined the
96initial vector table and basic processor initialization will not
97be compiled in. The start address of U-Boot must be adjusted in
98the boards config header file (CONFIG_SYS_MONITOR_BASE) and Makefile
99(CONFIG_SYS_TEXT_BASE) to the load address.
100
1014.1 MCF5272 specific Options/Settings
102-------------------------------------
103
104CONFIG_MCF52x2 -- defined for all MCF52x2 CPUs
105CONFIG_M5272 -- defined for all Motorola MCF5272 CPUs
106
107CONFIG_MONITOR_IS_IN_RAM
108 -- defined if U-Boot is loaded by a pre-loader
109
110CONFIG_SYS_MBAR -- defines the base address of the MCF5272 configuration registers
111CONFIG_SYS_INIT_RAM_ADDR
112 -- defines the base address of the MCF5272 internal SRAM
113CONFIG_SYS_ENET_BD_BASE
114 -- defines the base address of the FEC buffer descriptors
115
116CONFIG_SYS_SCR -- defines the contents of the System Configuration Register
117CONFIG_SYS_SPR -- defines the contents of the System Protection Register
118CONFIG_SYS_BRx_PRELIM -- defines the contents of the Chip Select Base Registers
119CONFIG_SYS_ORx_PRELIM -- defines the contents of the Chip Select Option Registers
120
121CONFIG_SYS_PxDDR -- defines the contents of the Data Direction Registers
122CONFIG_SYS_PxDAT -- defines the contents of the Data Registers
123CONFIG_SYS_PXCNT -- defines the contents of the Port Configuration Registers
124
125
1264.2 MCF5282 specific Options/Settings
127-------------------------------------
128
129CONFIG_MCF52x2 -- defined for all MCF52x2 CPUs
130CONFIG_M5282 -- defined for all Motorola MCF5282 CPUs
131
132CONFIG_MONITOR_IS_IN_RAM
133 -- defined if U-Boot is loaded by a pre-loader
134
135CONFIG_SYS_MBAR -- defines the base address of the MCF5282 internal register space
136CONFIG_SYS_INIT_RAM_ADDR
137 -- defines the base address of the MCF5282 internal SRAM
138CONFIG_SYS_INT_FLASH_BASE
139 -- defines the base address of the MCF5282 internal Flash memory
140CONFIG_SYS_ENET_BD_BASE
141 -- defines the base address of the FEC buffer descriptors
142
143CONFIG_SYS_MFD
144 -- defines the PLL Multiplication Factor Devider
145 (see table 9-4 of MCF user manual)
146CONFIG_SYS_RFD -- defines the PLL Reduce Frecuency Devider
147 (see table 9-4 of MCF user manual)
148
149CONFIG_SYS_CSx_BASE -- defines the base address of chip select x
150CONFIG_SYS_CSx_SIZE -- defines the memory size (address range) of chip select x
151CONFIG_SYS_CSx_WIDTH -- defines the bus with of chip select x
152CONFIG_SYS_CSx_RO -- if set to 0 chip select x is read/wirte
153 else chipselct is read only
154CONFIG_SYS_CSx_WS -- defines the number of wait states of chip select x
155
156CONFIG_SYS_PxDDR -- defines the contents of the Data Direction Registers
157CONFIG_SYS_PxDAT -- defines the contents of the Data Registers
158CONFIG_SYS_PXCNT -- defines the contents of the Port Configuration Registers
159
160CONFIG_SYS_PxPAR -- defines the function of ports
161
162
1635. COMPILER
164-----------
165To create U-Boot the gcc-2.95.3 compiler set (m68k-elf-20030314) from uClinux.org was used.
166You can download it from: http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
167
README.malta
README.marubun-pcmcia
1
2U-Boot MARUBUN MR-SHPC-01 PCMCIA controller driver
3 Last update 21/11/2007 by Nobuhiro Iwamatsu
4
5========================================================================================
6
70. What's this?
8 This driver supports MARUBUN MR-SHPC-01.
9 url: http://www.marubun.co.jp/product/semicon/devices/qgc18e0000002n2z.html
10 (Sorry Japanese only.)
11
12 This chip is used with SuperH well, and adopted by the
13 reference board.
14 ex. * MS7750SE01
15 * MS7722SE01
16 * other
17
18 This chip doesn't support CardBus.
19
201. base source code
21 The code is based on sources from the Linux kernel
22 ( arch/sh/kernel/cf-enabler.c ).
23
242. How to use
25 The options you have to specify in the config file are (with the
26 value for my board as an example):
27
28 * CONFIG_MARUBUN_PCCARD
29 If you want to use this device driver, should define CONFIG_MARUBUN_PCCARD.
30 ex. #define CONFIG_MARUBUN_PCCARD
31
32 * CONFIG_PCMCIA_SLOT_A
33 Most devices have only one slot. You should define CONFIG_PCMCIA_SLOT_A .
34 ex. #define CONFIG_PCMCIA_SLOT_A 1
35
36 * CONFIG_SYS_MARUBUN_MRSHPC
37 This is MR-SHPC-01 PCMCIA controller base address.
38 You should do the setting matched to your environment.
39 ex. #define CONFIG_SYS_MARUBUN_MRSHPC 0xb03fffe0
40 ( for MS7722SE01 environment )
41
42 * CONFIG_SYS_MARUBUN_MW1
43 This is MR-SHPC-01 memory window base address.
44 You should do the setting matched to your environment.
45 ex. #define CONFIG_SYS_MARUBUN_MW1 0xb0400000
46 ( for MS7722SE01 environment )
47
48 * CONFIG_SYS_MARUBUN_MW1
49 This is MR-SHPC-01 attribute window base address.
50 You should do the setting matched to your environment.
51 ex. #define CONFIG_SYS_MARUBUN_MW2 0xb0500000
52 ( for MS7722SE01 environment )
53
54 * CONFIG_SYS_MARUBUN_MW1
55 This is MR-SHPC-01 I/O window base address.
56 You should do the setting matched to your environment.
57 ex. #define CONFIG_SYS_MARUBUN_IO 0xb0600000
58 ( for MS7722SE01 environment )
59
603. Other
61 * Check Compact Flash only.
62 * Maybe, NE2000 compatible NIC is sure to move.
63
64Copyright (c) 2007
65 Nobuhiro Iwamatsu <iwamatsu@nigaur.org>
66
README.marvell
1Marvell U-Boot Build Instructions
2=================================
3
4This document describes how to compile the U-Boot and how to change U-Boot configuration
5
6Build Procedure
7----------------
81. Install required packages:
9
10 # sudo apt-get install libssl-dev
11 # sudo apt-get install device-tree-compiler
12 # sudo apt-get install swig libpython-dev
13
142. Set the cross compiler:
15
16 # export CROSS_COMPILE=/path/to/toolchain/aarch64-marvell-linux-gnu-
17
183. Clean-up old residuals:
19
20 # make mrproper
21
224. Configure the U-Boot:
23
24 # make <defconfig_file>
25
26 - For the Armada-70x0/80x0 DB board use "mvebu_db_armada8k_defconfig"
27 - For the Armada-80x0 MacchiatoBin use "make mvebu_mcbin-88f8040_defconfig"
28 - For the Armada-3700 DB board use "make mvebu_db-88f3720_defconfig"
29 - For the Armada-3700 EsspressoBin use "make mvebu_espressobin-88f3720_defconfig"
30
315. Configure the device-tree and build the U-Boot image:
32
33 Compile u-boot and set the required device-tree using:
34
35 # make DEVICE_TREE=<name>
36
37 NOTE:
38 Compilation with "mvebu_db_armada8k_defconfig" requires explicitly exporting DEVICE_TREE
39 for the requested board.
40 By default, u-boot is compiled with armada-8040-db device-tree.
41 Using A80x0 device-tree on A70x0 might break the device.
42 In order to prevent this, the required device-tree MUST be set during compilation.
43 All device-tree files are located in ./arch/arm/dts/ folder.
44
45 NOTE:
46 The u-boot.bin should not be used as a stand-alone image.
47 The ARM Trusted Firmware (ATF) build process uses this image to generate the
48 flash image.
49
50Configuration update
51---------------------
52 To update the U-Boot configuration, please refer to doc/README.kconfig
53
54
README.memory-test
1The most frequent cause of problems when porting U-Boot to new
2hardware, or when using a sloppy port on some board, is memory errors.
3In most cases these are not caused by failing hardware, but by
4incorrect initialization of the memory controller. So it appears to
5be a good idea to always test if the memory is working correctly,
6before looking for any other potential causes of any problems.
7
8U-Boot implements 3 different approaches to perform memory tests:
9
101. The get_ram_size() function (see "common/memsize.c").
11
12 This function is supposed to be used in each and every U-Boot port
13 determine the presence and actual size of each of the potential
14 memory banks on this piece of hardware. The code is supposed to be
15 very fast, so running it for each reboot does not hurt. It is a
16 little known and generally underrated fact that this code will also
17 catch 99% of hardware related (i. e. reliably reproducible) memory
18 errors. It is strongly recommended to always use this function, in
19 each and every port of U-Boot.
20
212. The "mtest" command.
22
23 This is probably the best known memory test utility in U-Boot.
24 Unfortunately, it is also the most problematic, and the most
25 useless one.
26
27 There are a number of serious problems with this command:
28
29 - It is terribly slow. Running "mtest" on the whole system RAM
30 takes a _long_ time before there is any significance in the fact
31 that no errors have been found so far.
32
33 - It is difficult to configure, and to use. And any errors here
34 will reliably crash or hang your system. "mtest" is dumb and has
35 no knowledge about memory ranges that may be in use for other
36 purposes, like exception code, U-Boot code and data, stack,
37 malloc arena, video buffer, log buffer, etc. If you let it, it
38 will happily "test" all such areas, which of course will cause
39 some problems.
40
41 - It is not easy to configure and use, and a large number of
42 systems are seriously misconfigured. The original idea was to
43 test basically the whole system RAM, with only exempting the
44 areas used by U-Boot itself - on most systems these are the areas
45 used for the exception vectors (usually at the very lower end of
46 system memory) and for U-Boot (code, data, etc. - see above;
47 these are usually at the very upper end of system memory). But
48 experience has shown that a very large number of ports use
49 pretty much bogus settings of CONFIG_SYS_MEMTEST_START and
50 CONFIG_SYS_MEMTEST_END; this results in useless tests (because
51 the ranges is too small and/or badly located) or in critical
52 failures (system crashes).
53
54 Because of these issues, the "mtest" command is considered depre-
55 cated. It should not be enabled in most normal ports of U-Boot,
56 especially not in production. If you really need a memory test,
57 then see 1. and 3. above resp. below.
58
593. The most thorough memory test facility is available as part of the
60 POST (Power-On Self Test) sub-system, see "post/drivers/memory.c".
61
62 If you really need to perform memory tests (for example, because
63 it is mandatory part of your requirement specification), then
64 enable this test which is generic and should work on all archi-
65 tectures.
66
67WARNING:
68
69It should pointed out that _all_ these memory tests have one
70fundamental, unfixable design flaw: they are based on the assumption
71that memory errors can be found by writing to and reading from memory.
72Unfortunately, this is only true for the relatively harmless, usually
73static errors like shorts between data or address lines, unconnected
74pins, etc. All the really nasty errors which will first turn your
75hair gray, only to make you tear it out later, are dynamical errors,
76which usually happen not with simple read or write cycles on the bus,
77but when performing back-to-back data transfers in burst mode. Such
78accesses usually happen only for certain DMA operations, or for heavy
79cache use (instruction fetching, cache flushing). So far I am not
80aware of any freely available code that implements a generic, and
81efficient, memory test like that. The best known test case to stress
82a system like that is to boot Linux with root file system mounted over
83NFS, and then build some larger software package natively (say,
84compile a Linux kernel on the system) - this will cause enough context
85switches, network traffic (and thus DMA transfers from the network
86controller), varying RAM use, etc. to trigger any weak spots in this
87area.
88
89Note: An attempt was made once to implement such a test to catch
90memory problems on a specific board. The code is pretty much board
91specific (for example, it includes setting specific GPIO signals to
92provide triggers for an attached logic analyzer), but you can get an
93idea how it works: see "examples/standalone/test_burst*".
94
95Note 2: Ironically enough, the "test_burst" did not catch any RAM
96errors, not a single one ever. The problems this code was supposed
97to catch did not happen when accessing the RAM, but when reading from
98NOR flash.
99
README.menu
1/*
2 * Copyright 2010-2011 Calxeda, Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7U-Boot provides a set of interfaces for creating and using simple, text
8based menus. Menus are displayed as lists of labeled entries on the
9console, and an entry can be selected by entering its label.
10
11To use the menu code, enable CONFIG_MENU, and include "menu.h" where
12the interfaces should be available.
13
14Menus are composed of items. Each item has a key used to identify it in
15the menu, and an opaque pointer to data controlled by the consumer.
16
17If you want to show a menu, instead starting the shell, define
18CONFIG_MENU_SHOW. You have to code the int menu_show(int bootdelay)
19function, which handle your menu. This function returns the remaining
20bootdelay.
21
22Interfaces
23----------
24#include "menu.h"
25
26/*
27 * Consumers of the menu interfaces will use a struct menu * as the
28 * handle for a menu. struct menu is only fully defined in menu.c,
29 * preventing consumers of the menu interfaces from accessing its
30 * contents directly.
31 */
32struct menu;
33
34/*
35 * NOTE: See comments in common/menu.c for more detailed documentation on
36 * these interfaces.
37 */
38
39/*
40 * menu_create() - Creates a menu handle with default settings
41 */
42struct menu *menu_create(char *title, int timeout, int prompt,
43 void (*item_data_print)(void *),
44 char *(*item_choice)(void *),
45 void *item_choice_data);
46
47/*
48 * menu_item_add() - Adds or replaces a menu item
49 */
50int menu_item_add(struct menu *m, char *item_key, void *item_data);
51
52/*
53 * menu_default_set() - Sets the default choice for the menu
54 */
55int menu_default_set(struct menu *m, char *item_key);
56
57/*
58 * menu_default_choice() - Set *choice to point to the default item's data
59 */
60int menu_default_choice(struct menu *m, void **choice);
61
62/*
63 * menu_get_choice() - Returns the user's selected menu entry, or the
64 * default if the menu is set to not prompt or the timeout expires.
65 */
66int menu_get_choice(struct menu *m, void **choice);
67
68/*
69 * menu_destroy() - frees the memory used by a menu and its items.
70 */
71int menu_destroy(struct menu *m);
72
73/*
74 * menu_display_statusline(struct menu *m);
75 * shows a statusline for every menu_display call.
76 */
77void menu_display_statusline(struct menu *m);
78
79Example Code
80------------
81This example creates a menu that always prompts, and allows the user
82to pick from a list of tools. The item key and data are the same.
83
84#include "menu.h"
85
86char *tools[] = {
87 "Hammer",
88 "Screwdriver",
89 "Nail gun",
90 NULL
91};
92
93char *pick_a_tool(void)
94{
95 struct menu *m;
96 int i;
97 char *tool = NULL;
98
99 m = menu_create("Tools", 0, 1, NULL);
100
101 for(i = 0; tools[i]; i++) {
102 if (menu_item_add(m, tools[i], tools[i]) != 1) {
103 printf("failed to add item!");
104 menu_destroy(m);
105 return NULL;
106 }
107 }
108
109 if (menu_get_choice(m, (void **)&tool) != 1)
110 printf("Problem picking tool!\n");
111
112 menu_destroy(m);
113
114 return tool;
115}
116
117void caller(void)
118{
119 char *tool = pick_a_tool();
120
121 if (tool) {
122 printf("picked a tool: %s\n", tool);
123 use_tool(tool);
124 }
125}
126
README.mips
1
2Notes for the MIPS architecture port of U-Boot
3
4Toolchains
5----------
6
7 http://www.denx.de/wiki/DULG/ELDK
8 ELDK < DULG < DENX
9
10 http://www.emdebian.org/crosstools.html
11 Embedded Debian -- Cross-development toolchains
12
13 http://buildroot.uclibc.org/
14 Buildroot
15
16Known Issues
17------------
18
19 * Cache incoherency issue caused by do_bootelf_exec() at cmd_elf.c
20
21 Cache will be disabled before entering the loaded ELF image without
22 writing back and invalidating cache lines. This leads to cache
23 incoherency in most cases, unless the code gets loaded after U-Boot
24 re-initializes the cache. The more common uImage 'bootm' command does
25 not suffer this problem.
26
27 [workaround] To avoid this cache incoherency,
28 1) insert flush_cache(all) before calling dcache_disable(), or
29 2) fix dcache_disable() to do both flushing and disabling cache.
30
31 * Note that Linux users need to kill dcache_disable() in do_bootelf_exec()
32 or override do_bootelf_exec() not to disable I-/D-caches, because most
33 Linux/MIPS ports don't re-enable caches after entering kernel_entry.
34
35TODOs
36-----
37
38 * Probe CPU types, I-/D-cache and TLB size etc. automatically
39
40 * Secondary cache support missing
41
42 * Initialize TLB entries redardless of their use
43
44 * R2000/R3000 class parts are not supported
45
46 * Limited testing across different MIPS variants
47
48 * Due to cache initialization issues, the DRAM on board must be
49 initialized in board specific assembler language before the cache init
50 code is run -- that is, initialize the DRAM in lowlevel_init().
51
52 * centralize/share more CPU code of MIPS32, MIPS64 and XBurst
53
54 * support Qemu Malta
55
README.mpc74xx
1This file contains status information for the port of U-Boot to the
2Motorola mpc74xx series of CPUs.
3
4Author: Josh Huber <huber@mclx.com>
5 Mission Critical Linux, Inc.
6
7Currently the support for these CPUs is pretty minimal, but enough to
8get things going. (much like the support for the Galileo Eval Board)
9
10There is a framework in place to enable the L2 cache, and to program
11the BATs. Currently, there are still problems with the code which
12sets up the L2 cache, so it's not enabled. (IMHO, it shouldn't be
13anyway). Additionally, there is support for enabling the MMU, which
14we also don't do. The BATs are programmed just for the benefit of
15jumping into Linux in a sane configuration.
16
17Most of the code was based on other cpus supported by U-Boot.
18
19If you find any errors in the CPU setup code, please send us a note.
20
21Thanks,
22Josh
23
README.mpc83xx.ddrecc
1Overview
2========
3
4The overall usage pattern for ECC diagnostic commands is the following:
5
6 * (injecting errors is initially disabled)
7
8 * define inject mask (which tells the DDR controller what type of errors
9 we'll be injecting: single/multiple bit etc.)
10
11 * enable injecting errors - from now on the controller injects errors as
12 indicated in the inject mask
13
14IMPORTANT NOTICE: enabling injecting multiple-bit errors is potentially
15dangerous as such errors are NOT corrected by the controller. Therefore caution
16should be taken when enabling the injection of multiple-bit errors: it is only
17safe when used on a carefully selected memory area and used under control of
18the 'ecc testdw' 'ecc testword' command (see example 'Injecting Multiple-Bit
19Errors' below). In particular, when you simply set the multiple-bit errors in
20inject mask and enable injection, U-Boot is very likely to hang quickly as the
21errors will be injected when it accesses its code, data etc.
22
23
24Use cases for DDR 'ecc' command:
25================================
26
27Before executing particular tests reset target board or clear status registers:
28
29=> ecc captureclear
30=> ecc errdetectclr all
31=> ecc sbecnt 0
32
33
34Injecting Single-Bit Errors
35---------------------------
36
371. Set 1 bit in Data Path Error Inject Mask
38
39=> ecc injectdatahi 1
40
412. Run test over some memory region
42
43=> ecc testdw 200000 10
44
453. Check ECC status
46
47=> ecc status
48...
49Memory Data Path Error Injection Mask High/Low: 00000001 00000000
50...
51Memory Single-Bit Error Management (0..255):
52 Single-Bit Error Threshold: 255
53 Single Bit Error Counter: 16
54...
55Memory Error Detect:
56 Multiple Memory Errors: 0
57 Multiple-Bit Error: 0
58 Single-Bit Error: 0
59...
60
6116 errors were generated, Single-Bit Error flag was not set as Single Bit Error
62Counter did not reach Single-Bit Error Threshold.
63
644. Make sure used memory region got re-initialized with 0x0123456789abcdef
65
66=> md 200000
6700200000: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
6800200010: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
6900200020: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
7000200030: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
7100200040: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
7200200050: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
7300200060: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
7400200070: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
7500200080: deadbeef deadbeef deadbeef deadbeef ................
7600200090: deadbeef deadbeef deadbeef deadbeef ................
77
78Injecting Multiple-Bit Errors
79-----------------------------
80
811. Set more than 1 bit in Data Path Error Inject Mask
82
83=> ecc injectdatahi 1
84=> ecc injectdatalo 1
85
862. Run test over some memory region
87
88=> ecc testword 200000 1
89
903. Check ECC status
91
92=> ecc status
93...
94Memory Data Path Error Injection Mask High/Low: 00000001 00000001
95...
96Memory Error Detect:
97 Multiple Memory Errors: 0
98 Multiple-Bit Error: 1
99 Single-Bit Error: 0
100...
101
102The Multiple Memory Errors flags not set and Multiple-Bit Error flags are set.
103
1044. Make sure used memory region got re-initialized with 0x0123456789abcdef
105
106=> md 200000
10700200000: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
10800200010: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
10900200020: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
11000200030: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
11100200040: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
11200200050: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
11300200060: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
11400200070: 01234567 89abcdef 01234567 89abcdef .#Eg.....#Eg....
11500200080: deadbeef deadbeef deadbeef deadbeef ................
11600200090: deadbeef deadbeef deadbeef deadbeef ................
117
118
119Test Single-Bit Error Counter and Threshold
120-------------------------------------------
121
1221. Set 1 bit in Data Path Error Inject Mask
123
124=> ecc injectdatahi 1
125
1262. Enable error injection
127
128=> ecc inject en
129
1303. Let u-boot run for a with Single-Bit error injection enabled
131
1324. Disable error injection
133
134=> ecc inject dis
135
1364. Check status
137
138=> ecc status
139
140...
141Memory Single-Bit Error Management (0..255):
142 Single-Bit Error Threshold: 255
143 Single Bit Error Counter: 199
144
145Memory Error Detect:
146 Multiple Memory Errors: 1
147 Multiple-Bit Error: 0
148 Single-Bit Error: 1
149...
150
151Observe that Single-Bit Error is 'on' which means that Single-Bit Error Counter
152reached Single-Bit Error Threshold. Multiple Memory Errors bit is also 'on', that
153is Counter reached Threshold more than one time (it wraps back after reaching
154Threshold).
155
README.mpc83xxads
1Freescale MPC83xx ADS Boards
2-----------------------------------------
3
40. Toolchain / Building
5
6 $ PATH=$PATH:/usr/powerpc/bin
7 $ CROSS_COMPILE=powerpc-linux-
8 $ export PATH CROSS_COMPILE
9
10 $ powerpc-linux-gcc -v
11 Reading specs from /usr/powerpc/lib/gcc/powerpc-linux/3.4.3/specs
12 Configured with: ../configure --prefix=/usr/powerpc
13 --exec-prefix=/usr/powerpc --target=powerpc-linux --enable-shared
14 --disable-nls --disable-multilib --enable-languages=c,c++,ada,f77,objc
15 Thread model: posix
16 gcc version 3.4.3 (Debian)
17
18 $ powerpc-linux-as -v
19 GNU assembler version 2.15 (powerpc-linux) using BFD version 2.15
20
21
22 $ make MPC8349ADS_config
23 Configuring for MPC8349ADS board...
24
25 $ make
26
27
281. Board Switches and Jumpers
29
30
312. Memory Map
32
332.1. The memory map should look pretty much like this:
34
35 0x0000_0000 0x7fff_ffff DDR 2G
36 0x8000_0000 0x9fff_ffff PCI MEM 512M
37 0xc000_0000 0xdfff_ffff Rapid IO 512M
38 0xe000_0000 0xe00f_ffff CCSR 1M
39 0xe200_0000 0xe2ff_ffff PCI IO 16M
40 0xf000_0000 0xf7ff_ffff SDRAM 128M
41 0xf800_0000 0xf80f_ffff BCSR 1M
42 0xfe00_0000 0xffff_ffff FLASH (boot bank) 16M
43
44
453. Definitions
46
473.1 Explanation of NEW definitions in:
48
49 include/configs/MPC8349ADS.h
50
51 CONFIG_MPC83xx MPC83xx family
52 CONFIG_MPC8349 MPC8349 specific
53 CONFIG_TSEC_ENET Use on-chip 10/100/1000 ethernet
54
55
564. Compilation
57
58 Assuming you're using BASH shell:
59
60 export CROSS_COMPILE=your-cross-compile-prefix
61 cd u-boot
62 make distclean
63 make MPC8349ADS_config
64 make
65
665. Downloading and Flashing Images
67
685.0 Download over serial line using Kermit:
69
70 loadb
71 [Drop to kermit:
72 ^\c
73 send <u-boot-bin-image>
74 c
75 ]
76
77
78 Or via tftp:
79
80 tftp 10000 u-boot.bin
81
825.1 Reflash U-Boot Image using U-Boot
83
84 tftp 10000 u-boot.bin
85 protect off fe000000 fe09ffff
86 erase fe000000 fe09ffff
87
88 cp.b 10000 fe000000 xxxx
89or
90 cp.b 10000 fe000000 a0000
91
92You might have to supply the correct byte count for 'xxxx' from
93the TFTP. Maybe a0000 will work too, that corresponds to the
94erased sectors.
95
96
976. Notes
98
README.mpc85xx
1External Debug Support
2----------------------
3
4Freescale's e500v1 and e500v2 cores (used in mpc85xx chips) have some
5restrictions on external debugging (JTAG). In particular, for the debugger to
6be able to receive control after a single step or breakpoint:
7 - MSR[DE] must be set
8 - A valid opcode must be fetchable, through the MMU, from the debug
9 exception vector (IVPR + IVOR15).
10
11To maximize the time during which this requirement is met, U-Boot sets MSR[DE]
12immediately on entry and keeps it set. It also uses a temporary TLB to keep a
13mapping to a valid opcode at the debug exception vector, even if we normally
14don't support exception vectors being used that early, and that's not the area
15where U-Boot currently executes from.
16
17Note that there may still be some small windows where debugging will not work,
18such as in between updating IVPR and IVOR15.
19
20Config Switches:
21----------------
22
23Please refer README section "MPC85xx External Debug Support"
24
25Major Config Switches during various boot Modes
26----------------------------------------------
27
28NOR boot
29 !defined(CONFIG_SYS_RAMBOOT) && !defined(CONFIG_SPL)
30NOR boot Secure
31 !defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SECURE_BOOT)
32RAMBOOT(SD, SPI & NAND boot)
33 defined(CONFIG_SYS_RAMBOOT)
34RAMBOOT Secure (SD, SPI & NAND)
35 defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SECURE_BOOT)
36NAND SPL BOOT
37 defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_NAND_SPL)
38
39
40TLB Entries during u-boot execution
41-----------------------------------
42
43Note: Sequence number is in order of execution
44
45A) defined(CONFIG_SYS_RAMBOOT) i.e. SD, SPI, NAND RAMBOOT & NAND_SPL boot
46
47 1) TLB entry to overcome e500 v1/v2 debug restriction
48 Location : Label "_start_e500"
49 TLB Entry : CONFIG_SYS_PPC_E500_DEBUG_TLB
50 EPN -->RPN : CONFIG_SYS_MONITOR_BASE --> CONFIG_SYS_MONITOR_BASE
51 Properties : 256K, AS0, I, IPROT
52
53 2) TLB entry for working in AS1
54 Location : Label "create_init_ram_area"
55 TLB Entry : 15
56 EPN -->RPN : CONFIG_SYS_MONITOR_BASE --> CONFIG_SYS_MONITOR_BASE
57 Properties : 1M, AS1, I, G, IPROT
58
59 3) TLB entry for the stack during AS1
60 Location : Lable "create_init_ram_area"
61 TLB Entry : 14
62 EPN -->RPN : CONFIG_SYS_INIT_RAM_ADDR --> CONFIG_SYS_INIT_RAM_ADDR
63 Properties : 16K, AS1, IPROT
64
65 4) TLB entry for CCSRBAR during AS1 execution
66 Location : cpu_init_early_f
67 TLB Entry : 13
68 EPN -->RPN : CONFIG_SYS_CCSRBAR --> CONFIG_SYS_CCSRBAR
69 Properties : 1M, AS1, I, G
70
71 5) Invalidate unproctected TLB Entries
72 Location : cpu_init_early_f
73 Invalidated: 13
74
75 6) Create TLB entries as per boards/freescale/<board>/tlb.c
76 Location : cpu_init_early_f --> init_tlbs()
77 Properties : ..., AS0, ...
78 Please note It can overwrites previous TLB Entries.
79
80 7) Disable TLB Entries of AS1
81 Location : cpu_init_f --> disable_tlb()
82 Disable : 15, 14
83
84 8) Update Flash's TLB entry
85 Location : Board_init_r
86 TLB entry : Search from TLB entries
87 EPN -->RPN : CONFIG_SYS_FLASH_BASE --> CONFIG_SYS_FLASH_BASE_PHYS
88 Properties : Board specific size, AS0, I, G, IPROT
89
90
91B) !defined(CONFIG_SYS_RAMBOOT) i.e. NOR boot
92
93 1) TLB entry to overcome e500 v1/v2 debug restriction
94 Location : Label "_start_e500"
95 TLB Entry : CONFIG_SYS_PPC_E500_DEBUG_TLB
96#if defined(CONFIG_SECURE_BOOT)
97 EPN -->RPN : CONFIG_SYS_MONITOR_BASE --> CONFIG_SYS_PBI_FLASH_WINDOW
98 Properties : 1M, AS1, I, G, IPROT
99#else
100 EPN -->RPN : CONFIG_SYS_MONITOR_BASE & 0xffc00000 --> 0xffc00000
101 Properties : 4M, AS0, I, G, IPROT
102#endif
103
104 2) TLB entry for working in AS1
105 Location : Label "create_init_ram_area"
106 TLB Entry : 15
107#if defined(CONFIG_SECURE_BOOT)
108 EPN -->RPN : CONFIG_SYS_MONITOR_BASE --> CONFIG_SYS_PBI_FLASH_WINDOW
109 Properties : 1M, AS1, I, G, IPROT
110#else
111 EPN -->RPN : CONFIG_SYS_MONITOR_BASE & 0xffc00000 --> 0xffc00000
112 Properties : 4M, AS1, I, G, IPROT
113#endif
114
115 3) TLB entry for the stack during AS1
116 Location : Lable "create_init_ram_area"
117 TLB Entry : 14
118 EPN -->RPN : CONFIG_SYS_INIT_RAM_ADDR --> CONFIG_SYS_INIT_RAM_ADDR
119 Properties : 16K, AS1, IPROT
120
121 4) TLB entry for CCSRBAR during AS1 execution
122 Location : cpu_init_early_f
123 TLB Entry : 13
124 EPN -->RPN : CONFIG_SYS_CCSRBAR --> CONFIG_SYS_CCSRBAR
125 Properties : 1M, AS1, I, G
126
127 5) TLB entry for Errata workaround CONFIG_SYS_FSL_ERRATUM_IFC_A003399
128 Location : cpu_init_early_f
129 TLB Entry : 9
130 EPN -->RPN : SRAM_BASE_ADDR --> SRAM_BASE_ADDR
131 Properties : 1M, AS1, I
132
133 6) CONFIG_SYS_FSL_ERRATUM_IFC_A003399 Adjust flash's phys addr
134 Location : cpu_init_early_f --> setup_ifc
135 TLB Entry : Get Flash TLB
136 EPN -->RPN : Adjusted flash_phys --> Adjusted flash_phys
137 Properties : 4M, AS1, I, G, IPROT
138
139 7) CONFIG_SYS_FSL_ERRATUM_IFC_A003399: E500 v1,v2 debug restriction
140 Location : cpu_init_early_f --> setup_ifc
141 TLB Entry : CONFIG_SYS_PPC_E500_DEBUG_TLB
142 EPN -->RPN : Adjusted flash_phys --> Adjusted flash_phys
143 Properties : 4M, AS0, I, G, IPROT
144
145 8) Invalidate unproctected TLB Entries
146 Location : cpu_init_early_f
147 Invalidated: 13, 9
148
149 9) Create TLB entries as per boards/freescale/<board>/tlb.c
150 Location : cpu_init_early_f --> init_tlbs()
151 Properties : ..., AS0, ...
152 Note: It can overwrites previous TLB Entries
153
154 10) Disable TLB Entries of AS1
155 Location : cpu_init_f --> disable_tlb()
156 Disable : 15, 14
157
158 11) Create DDR's TLB entriy
159 Location : Board_init_f -> dram_init
160 TLB entry : Search free TLB entry
161
162 12) Update Flash's TLB entry
163 Location : Board_init_r
164 TLB entry : Search from TLB entries
165 EPN -->RPN : CONFIG_SYS_FLASH_BASE --> CONFIG_SYS_FLASH_BASE_PHYS
166 Properties : Board specific size, AS0, I, G, IPROT
167
README.mpc85xx-sd-spi-boot
README.mpc85xx-spin-table
1Spin table in cache
2=====================================
3As specified by ePAPR v1.1, the spin table needs to be in cached memory. After
4DDR is initialized and U-Boot relocates itself into DDR, the spin table is
5accessible for core 0. It is part of release.S, within 4KB range after
6__secondary_start_page. For other cores to use the spin table, the booting
7process is described below:
8
9Core 0 sets up the reset page on the top 4K of memory (or 4GB if total memory
10is more than 4GB), and creates a TLB to map it to 0xffff_f000, regardless of
11the physical address of this page, with WIMGE=0b01010. Core 0 also enables boot
12page translation for secondary cores to use this page of memory. Then 4KB
13memory is copied from __secondary_start_page to the boot page, after flusing
14cache because this page is mapped as normal DDR. Before copying the reset page,
15core 0 puts the physical address of the spin table (which is in release.S and
16relocated to the top of mapped memory) into a variable __spin_table_addr so
17that secondary cores can see it.
18
19When secondary cores boot up from 0xffff_f000 page, they only have one default
20TLB. While booting, they set up another TLB in AS=1 space and jump into
21the new space. The new TLB covers the physical address of the spin table page,
22with WIMGE =0b00100. Now secondary cores can keep polling the spin table
23without stress DDR bus because both the code and the spin table is in cache.
24
25For the above to work, DDR has to set the 'M' bit of WIMGE, in order to keep
26cache coherence.
27
README.mpc85xxcds
1Motorola MPC85xxCDS boards
2--------------------------
3
4The CDS family of boards consists of a PCI backplane called the
5"Arcadia", a PCI-form-factor carrier card that plugs into a PCI slot,
6and a CPU daughter card that bolts onto the daughter card.
7
8Much of the content of the README.mpc85xxads for the 85xx ADS boards
9applies to the 85xx CDS boards as well. In particular the toolchain,
10the switch nomenclature, and the basis for the memory map. There are
11some differences, though.
12
13
14Building U-Boot
15---------------
16
17The Binutils in current ELDK toolchain will not support MPC85xx
18chip. You need to use binutils-2.14.tar.bz2 (or newer) from
19 http://ftp.gnu.org/gnu/binutils.
20
21The 85xx CDS code base is known to compile using:
22 gcc (GCC) 3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a)
23
24
25Memory Map
26----------
27
28The memory map for U-Boot and linux has been extended w.r.t. the ADS
29platform to allow for utilization of all 85xx CDS devices. The memory
30map is setup for linux to operate properly. The linux source when
31configured for MPC85xx CDS has been updated to reflect the new memory
32map.
33
34The mapping is:
35
36 0x0000_0000 0x7fff_ffff DDR 2G
37 0x8000_0000 0x9fff_ffff PCI1 MEM 512M
38 0xa000_0000 0xbfff_ffff PCI2 MEM 512M
39 0xe000_0000 0xe00f_ffff CCSR 1M
40 0xe200_0000 0xe2ff_ffff PCI1 IO 16M
41 0xe300_0000 0xe3ff_ffff PCI2 IO 16M
42 0xf000_0000 0xf7ff_ffff SDRAM 128M
43 0xf800_0000 0xf80f_ffff NVRAM/CADMUS (*) 1M
44 0xff00_0000 0xff7f_ffff FLASH (2nd bank) 8M
45 0xff80_0000 0xffff_ffff FLASH (boot bank) 8M
46
47 (*) The system control registers (CADMUS) start at offset 0xfdb0_4000
48 within the NVRAM/CADMUS region of memory.
49
50
51Using Flash
52-----------
53
54The CDS board has two flash banks, each 8MB in size (2^23 = 0x00800000).
55There is a switch which allows the boot-bank to be selected. The switch
56settings for updating flash are given below.
57
58The U-Boot commands for copying the boot-bank into the secondary bank are
59as follows:
60
61 erase ff780000 ff7fffff
62 cp.b fff80000 ff780000 80000
63
64
65U-Boot/kermit commands for downloading an image, then copying
66it into the secondary bank:
67
68 loadb
69 [Drop to kermit:
70 ^\c
71 send <u-boot-bin-image>
72 c
73 ]
74
75 erase ff780000 ff7fffff
76 cp.b $loadaddr ff780000 80000
77
78
79U-Boot commands for downloading an image via tftp and flashing
80it into the second bank:
81
82 tftp 10000 <u-boot.bin.image>
83 erase ff780000 ff7fffff
84 cp.b 10000 ff780000 80000
85
86
87After copying the image into the second bank of flash, be sure to toggle
88SW2[2] on the carrier card before resetting the board in order to set the
89secondary bank as the boot-bank.
90
91
92Carrier Board Switches
93----------------------
94
95As a reminder, you should read the README.mpc85xxads too.
96
97Most switches on the carrier board should not be changed. The only
98user-settable switches on the carrier board are used to configure
99the flash banks and determining the PCI slot.
100
101The first two bits of SW2 control how flash is used on the board:
102
103 12345678
104 --------
105 SW2=00XXXXXX FLASH: Boot bank 1, bank 2 available.
106 01XXXXXX FLASH: Boot bank 2, bank 1 available (swapped).
107 10XXXXXX FLASH: Boot promjet, bank 1 available
108 11XXXXXX FLASH: Boot promjet, bank 2 available
109
110The boot bank is always mapped to FF80_0000 and listed first by
111the "flinfo" command. The secondary bank is always FF00_0000.
112
113When using PCI, linux needs to know to which slot the CDS carrier is
114connected.. By convention, the user-specific bits of SW2 are used to
115convey this information:
116
117 12345678
118 --------
119 SW2=xxxxxx00 PCI SLOT INFORM: The CDS carrier is in slot0 of the Arcadia
120 xxxxxx01 PCI SLOT INFORM: The CDS carrier is in slot1 of the Arcadia
121 xxxxxx10 PCI SLOT INFORM: The CDS carrier is in slot2 of the Arcadia
122 xxxxxx11 PCI SLOT INFORM: The CDS carrier is in slot3 of the Arcadia
123
124These are cleverly, er, clearly silkscreened as Slot 1 through 4,
125respectively, on the Arcadia near the support posts.
126
127
128The default setting of all switches on the carrier board is:
129
130 12345678
131 --------
132 SW1=01101100
133 SW2=0x1111yy x=Flash bank, yy=PCI slot
134 SW3=11101111
135 SW4=10001000
136
137
1388555/41 CPU Card Switches
139-------------------------
140
141Most switches on the CPU Card should not be changed. However, the
142frequency can be changed by setting SW3:
143
144 12345678
145 --------
146 SW3=XX00XXXX == CORE:CCB 2:1
147 XX01XXXX == CORE:CCB 5:2
148 XX10XXXX == CORE:CCB 3:1
149 XX11XXXX == CORE:CCB 7:2
150 XXXX1000 == CCB:SYSCLK 8:1
151 XXXX1010 == CCB:SYSCLK 10:1
152
153A safe default setting for all switches on the CPU board is:
154
155 12345678
156 --------
157 SW1=10001111
158 SW2=01000111
159 SW3=00001000
160 SW4=11111110
161
162
1638548 CPU Card Switches
164----------------------
165And, just to be confusing, in this set of switches:
166
167 ON = 1
168 OFF = 0
169
170Default
171 SW1=11111101
172 SW2=10011111
173 SW3=11001000 (8X) (2:1)
174 SW4=11110011
175
176 SW3=X000XXXX == CORE:CCB 4:1
177 X001XXXX == CORE:CCB 9:2
178 X010XXXX == CORE:CCB 1:1
179 X011XXXX == CORE:CCB 3:2
180 X100XXXX == CORE:CCB 2:1
181 X101XXXX == CORE:CCB 5:2
182 X110XXXX == CORE:CCB 3:1
183 X111XXXX == CORE:CCB 7:2
184 XXXX0000 == CCB:SYSCLK 16:1
185 XXXX0001 == RESERVED
186 XXXX0010 == CCB:SYSCLK 2:1
187 XXXX0011 == CCB:SYSCLK 3:1
188 XXXX0100 == CCB:SYSCLK 4:1
189 XXXX0101 == CCB:SYSCLK 5:1
190 XXXX0110 == CCB:SYSCLK 6:1
191 XXXX0111 == RESERVED
192 XXXX1000 == CCB:SYSCLK 8:1
193 XXXX1001 == CCB:SYSCLK 9:1
194 XXXX1010 == CCB:SYSCLK 10:1
195 XXXX1011 == RESERVED
196 XXXX1100 == CCB:SYSCLK 12:1
197 XXXX1101 == CCB:SYSCLK 20:1
198 XXXX1110 == RESERVED
199 XXXX1111 == RESERVED
200
201
202eDINK Info
203----------
204
205One bank of flash may contain an eDINK image.
206
207Memory Map:
208
209 CCSRBAR @ 0xe0000000
210 Flash Bank 1 @ 0xfe000000
211 Flash Bank 2 @ 0xff000000
212 Ram @ 0
213
214Commands for downloading a U-Boot image to memory from edink:
215
216 env -c
217 time -s 4/8/2004 4:30p
218 dl -k -b -o 100000
219 [Drop to kermit:
220 ^\c
221 transmit /binary <u-boot-bin-image>
222 c
223 ]
224
225 fu -l 100000 fe780000 80000
226
README.multi-dtb-fit
1MULTI DTB FIT and SPL_MULTI_DTB_FIT
2
3The purpose of this feature is to enable U-Boot or the SPL to select its DTB
4from a FIT appended at the end of the binary.
5It comes in two flavors: U-Boot (CONFIG_MULTI_DTB_FIT) and SPL
6(CONFIG_SPL_MULTI_DTB_FIT).
7
8U-Boot flavor:
9Usually the DTB is selected by the SPL and passed down to U-Boot. But some
10platforms don't use the SPL. In this case MULTI_DTB_FIT can used to provide
11U-Boot with a choice of DTBs.
12The relevant DTBs are packed into a FIT (list provided by CONFIG__OF_LIST). The
13FIT is automatically generated at the end of the compilation and appended to
14u-boot.bin so that U-Boot can locate it and select the correct DTB from inside
15the FIT.
16The selection is done using board_fit_config_name_match() (same as what the SPL
17uses to select the DTB for U-Boot). The selection happens during fdtdec_setup()
18which is called during before relocation by board_init_f().
19
20SPL flavor:
21the SPL uses only a small subset of the DTB and it usually depends more
22on the SOC than on the board. So it's usually fine to include a DTB in the
23SPL that doesn't exactly match the board. There are howerver some cases
24where it's not possible. In the later case, in order to support multiple
25boards (or board revisions) with the same SPL binary, SPL_MULTI_DTB_FIT
26can be used.
27The relevant DTBs are packed into a FIT. This FIT is automatically generated
28at the end of the compilation, compressed and appended to u-boot-spl.bin, so
29that SPL can locate it and select the correct DTB from inside the FIT.
30CONFIG_SPL__OF_LIST is used to list the relevant DTBs.
31The compression stage is optional but reduces the impact on the size of the
32SPL. LZO and GZIP compressions are supported. By default, the area where the
33FIT is uncompressed is dynamicaly allocated but this behaviour can be changed
34for platforms that don't provide a HEAP big enough to contain the uncompressed
35FIT.
36The SPL uses board_fit_config_name_match() to find the correct DTB within the
37FIT (same as what the SPL uses to select the DTB for U-Boot).
38Uncompression and selection stages happen in fdtdec_setup() which is called
39during the early initialization stage of the SPL (spl_early_init() or
40spl_init())
41
42Impacts and performances (SPL flavor):
43The impact of this option is relatively small. Here are some numbers measured
44for a TI DRA72 platform:
45
46 +----------+------------+-----------+------------+
47 | size | size delta | SPL boot | boot time |
48 | (bytes) | (bytes) | time (s) | delta (s) |
49+---------------------------+----------+------------+-----------+------------+
50| 1 DTB | | | | |
51+---------------------------+----------+------------+-----------+------------+
52| reference | 125305 | 0 | 1.389 | 0 |
53| LZO (dynamic allocation) | 125391 | 86 | 1.381 | -0.008 |
54+---------------------------+----------+------------+-----------+------------+
55| 4 DTBs (DRA7, DRA71, | | | | |
56| DRA72, DRA72 revC) | | | | |
57+---------------------------+----------+------------+-----------+------------+
58| LZO (dynamic allocation) | 125991 | 686 | 1.39 | 0.001 |
59| LZO (user defined area) | 125927 | 622 | 1.403 | 0.014 |
60| GZIP (user defined area) | 133880 | 8575 | 1.421 | 0.032 |
61| No compression (in place) | 137472 | 12167 | 1.412 | 0.023 |
62+---------------------------+----------+------------+-----------+------------+
63
64Note: SPL boot time is the time elapsed between the 'reset' command is entered
65and the time when the first U-Boot (not SPL) version string is displayed.
66
README.mxc_hab
1High Assurance Boot (HAB) for i.MX6 CPUs
2
3To enable the authenticated or encrypted boot mode of U-Boot, it is
4required to set the proper configuration for the target board. This
5is done by adding the following configuration in the defconfig file:
6
7CONFIG_SECURE_BOOT=y
8
9In addition, the U-Boot image to be programmed into the
10boot media needs to be properly constructed, i.e. it must contain a
11proper Command Sequence File (CSF).
12
13The Initial Vector Table contains a pointer to the CSF. Please see
14doc/README.imximage for how to prepare u-boot.imx.
15
16The CSF itself is being generated by Freescale HAB tools.
17
18mkimage will output additional information about "HAB Blocks"
19which can be used in the Freescale tooling to authenticate U-Boot
20(entries in the CSF file).
21
22Image Type: Freescale IMX Boot Image
23Image Ver: 2 (i.MX53/6 compatible)
24Data Size: 327680 Bytes = 320.00 kB = 0.31 MB
25Load Address: 177ff420
26Entry Point: 17800000
27HAB Blocks: 177ff400 00000000 0004dc00
28 ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
29 | | |
30 | | -------- (1)
31 | |
32 | ------------------- (2)
33 |
34 --------------------------- (3)
35
36(1) Size of area in file u-boot.imx to sign
37 This area should include the IVT, the Boot Data the DCD
38 and U-Boot itself.
39(2) Start of area in u-boot.imx to sign
40(3) Start of area in RAM to authenticate
41
42CONFIG_SECURE_BOOT currently enables only an additional command
43'hab_status' in U-Boot to retrieve the HAB status and events. This
44can be useful while developing and testing HAB.
45
46Commands to generate a signed U-Boot using Freescale HAB tools:
47cst --o U-Boot_CSF.bin < U-Boot.CSF
48objcopy -I binary -O binary --pad-to 0x2000 --gap-fill=0x00 \
49 U-Boot_CSF.bin U-Boot_CSF_pad.bin
50cat u-boot.imx U-Boot_CSF_pad.bin > u-boot-signed.imx
51
52NOTE: U-Boot_CSF.bin needs to be padded to the value specified in
53the imximage.cfg file.
54
55Setup U-Boot Image for Encrypted Boot
56-------------------------------------
57An authenticated U-Boot image is used as starting point for
58Encrypted Boot. The image is encrypted by Freescale's Code
59Signing Tool (CST). The CST replaces only the image data of
60u-boot.imx with the encrypted data. The Initial Vector Table,
61DCD, and Boot data, remains in plaintext.
62
63The image data is encrypted with a Encryption Key (DEK).
64Therefore, this key is needed to decrypt the data during the
65booting process. The DEK is protected by wrapping it in a Blob,
66which needs to be appended to the U-Boot image and specified in
67the CSF file.
68
69The DEK blob is generated by an authenticated U-Boot image with
70the dek_blob cmd enabled. The image used for DEK blob generation
71needs to have the following configurations enabled:
72
73CONFIG_SECURE_BOOT
74CONFIG_SYS_FSL_SEC_COMPAT 4 /* HAB version */
75CONFIG_FSL_CAAM
76CONFIG_CMD_DEKBLOB
77CONFIG_SYS_FSL_SEC_LE
78
79Note: The encrypted boot feature is only supported by HABv4 or
80greater.
81
82The dek_blob command then can be used to generate the DEK blob of
83a DEK previously loaded in memory. The command is used as follows:
84
85dek_blob <DEK address> <Output Address> <Key Size in Bits>
86example: dek_blob 0x10800000 0x10801000 192
87
88The resulting DEK blob then is used to construct the encrypted
89U-Boot image. Note that the blob needs to be transferred back
90to the host.Then the following commands are used to construct
91the final image.
92
93objcopy -I binary -O binary --pad-to 0x2000 --gap-fill=0x00 \
94 U-Boot_CSF.bin U-Boot_CSF_pad.bin
95cat u-boot.imx U-Boot_CSF_pad.bin > u-boot-signed.imx
96objcopy -I binary -O binary --pad-to <blob_dst> --gap-fill=0x00 \
97 u-boot-signed.imx u-boot-signed-pad.bin
98cat u-boot-signed-pad.imx DEK_blob.bin > u-boot-encrypted.imx
99
100 NOTE: u-boot-signed.bin needs to be padded to the value
101 equivalent to the address in which the DEK blob is specified
102 in the CSF.
103
README.mxc_ocotp
1Driver implementing the fuse API for Freescale's On-Chip OTP Controller (OCOTP)
2on MXC
3
4This IP can be found on the following SoCs:
5 - Vybrid VF610,
6 - i.MX6.
7
8Note that this IP is different from albeit similar to the IPs of the same name
9that can be found on the following SoCs:
10 - i.MX23,
11 - i.MX28,
12 - i.MX50.
13
14The section numbers in this file refer to the i.MX6 Reference Manual.
15
16A fuse word contains 32 fuse bit slots, as explained in 46.2.1.
17
18A bank contains 8 fuse word slots, as explained in 46.2.1 and shown by the
19memory map in 46.4.
20
21Some fuse bit or word slots may not have the corresponding fuses actually
22implemented in the fusebox.
23
24See the README files of the SoCs using this driver in order to know the
25conventions used by U-Boot to store some specific data in the fuses, e.g. MAC
26addresses.
27
28Fuse operations:
29
30 Read
31 Read operations are implemented as read accesses to the shadow registers,
32 using "Bankx Wordy" from the memory map in 46.4. This is explained in
33 detail by the first two paragraphs in 46.2.1.2.
34
35 Sense
36 Sense operations are implemented as the direct fusebox read explained by
37 the steps in 46.2.1.2.
38
39 Program
40 Program operations are implemented as explained by the steps in 46.2.1.3.
41 Following this operation, the shadow registers are not reloaded by the
42 hardware.
43
44 Override
45 Override operations are implemented as write accesses to the shadow
46 registers, as explained by the first paragraph in 46.2.1.3.
47
48Configuration:
49
50 CONFIG_MXC_OCOTP
51 Define this to enable the mxc_ocotp driver.
52
README.mxs
1Booting U-Boot on a MXS processor
2=================================
3
4This document describes the MXS U-Boot port. This document mostly covers topics
5related to making the module/board bootable.
6
7Terminology
8-----------
9
10The term "MXS" refers to a family of Freescale SoCs that is composed by MX23
11and MX28.
12
13The dollar symbol ($) introduces a snipped of shell code. This shall be typed
14into the unix command prompt in U-Boot source code root directory.
15
16The (=>) introduces a snipped of code that should by typed into U-Boot command
17prompt
18
19Contents
20--------
21
221) Prerequisites
232) Compiling U-Boot for a MXS based board
243) Installation of U-Boot for a MXS based board to SD card
254) Installation of U-Boot into NAND flash on a MX28 based board
265) Installation of U-Boot into SPI NOR flash on a MX28 based board
27
281) Prerequisites
29----------------
30
31To make a MXS based board bootable, some tools are necessary. The only
32mandatory tool is the "mxsboot" tool found in U-Boot source tree. The
33tool is built automatically when compiling U-Boot for i.MX23 or i.MX28.
34
35The production of BootStream image is handled via "mkimage", which is
36also part of the U-Boot source tree. The "mkimage" requires OpenSSL
37development libraries to be installed. In case of Debian and derivates,
38this is installed by running:
39
40 $ sudo apt-get install libssl-dev
41
42NOTE: The "elftosb" tool distributed by Freescale Semiconductor is no
43 longer necessary for general use of U-Boot on i.MX23 and i.MX28.
44 The mkimage supports generation of BootStream images encrypted
45 with a zero key, which is the vast majority of use-cases. In
46 case you do need to produce image encrypted with non-zero key
47 or other special features, please use the "elftosb" tool,
48 otherwise continue to section 2). The installation procedure of
49 the "elftosb" is outlined below:
50
51Firstly, obtain the elftosb archive from the following location:
52
53 ftp://ftp.denx.de/pub/tools/elftosb-10.12.01.tar.gz
54
55We use a $VER variable here to denote the current version. At the time of
56writing of this document, that is "10.12.01". To obtain the file from command
57line, use:
58
59 $ VER="10.12.01"
60 $ wget ftp://ftp.denx.de/pub/tools/elftosb-${VER}.tar.gz
61
62Extract the file:
63
64 $ tar xzf elftosb-${VER}.tar.gz
65
66Compile the file. We need to manually tell the linker to use also libm:
67
68 $ cd elftosb-${VER}/
69 $ make LIBS="-lstdc++ -lm" elftosb
70
71Optionally, remove debugging symbols from elftosb:
72
73 $ strip bld/linux/elftosb
74
75Finally, install the "elftosb" binary. The "install" target is missing, so just
76copy the binary by hand:
77
78 $ sudo cp bld/linux/elftosb /usr/local/bin/
79
80Make sure the "elftosb" binary can be found in your $PATH, in this case this
81means "/usr/local/bin/" has to be in your $PATH.
82
832) Compiling U-Boot for a MXS based board
84-------------------------------------------
85
86Compiling the U-Boot for a MXS board is straightforward and done as compiling
87U-Boot for any other ARM device. For cross-compiler setup, please refer to
88ELDK5.0 documentation. First, clean up the source code:
89
90 $ make mrproper
91
92Next, configure U-Boot for a MXS based board
93
94 $ make <mxs_based_board_name>_config
95
96Examples:
97
981. For building U-Boot for Aries M28EVK board:
99
100 $ make m28evk_config
101
1022. For building U-Boot for Freescale MX28EVK board:
103
104 $ make mx28evk_config
105
1063. For building U-Boot for Freescale MX23EVK board:
107
108 $ make mx23evk_config
109
1104. For building U-Boot for Olimex MX23 Olinuxino board:
111
112 $ make mx23_olinuxino_config
113
114Lastly, compile U-Boot and prepare a "BootStream". The "BootStream" is a special
115type of file, which MXS CPUs can boot. This is handled by the following
116command:
117
118 $ make u-boot.sb
119
120HINT: To speed-up the build process, you can add -j<N>, where N is number of
121 compiler instances that'll run in parallel.
122
123The code produces "u-boot.sb" file. This file needs to be augmented with a
124proper header to allow successful boot from SD or NAND. Adding the header is
125discussed in the following chapters.
126
127NOTE: The process that produces u-boot.sb uses the mkimage to generate the
128 BootStream. The BootStream is encrypted with zero key. In case you need
129 some special features of the BootStream and plan on using the "elftosb"
130 tool instead, the invocation to produce a compatible BootStream with the
131 one produced by mkimage is outlined below. For further details, refer to
132 the documentation bundled with the "elftosb" package.
133
134 $ elftosb -zf imx23 -c arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd \
135 -o u-boot.sb
136 $ elftosb -zf imx28 -c arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd \
137 -o u-boot.sb
138
1393) Installation of U-Boot for a MXS based board to SD card
140----------------------------------------------------------
141
142To boot a MXS based board from SD, set the boot mode DIP switches according to
143to MX28 manual, section 12.2.1 (Table 12-2) or MX23 manual, section 35.1.2
144(Table 35-3).
145
146The SD card used to boot U-Boot must contain a DOS partition table, which in
147turn carries a partition of special type and which contains a special header.
148The rest of partitions in the DOS partition table can be used by the user.
149
150To prepare such partition, use your favourite partitioning tool. The partition
151must have the following parameters:
152
153 * Start sector .......... sector 2048
154 * Partition size ........ at least 1024 kb
155 * Partition type ........ 0x53 (sometimes "OnTrack DM6 Aux3")
156
157For example in Linux fdisk, the sequence for a clear card follows. Be sure to
158run fdisk with the option "-u=sectors" to set units to sectors:
159
160 * o ..................... create a clear partition table
161 * n ..................... create new partition
162 * p ............. primary partition
163 * 1 ............. first partition
164 * 2048 .......... first sector is 2048
165 * +1M ........... make the partition 1Mb big
166 * t 1 ................... change first partition ID
167 * 53 ............ change the ID to 0x53 (OnTrack DM6 Aux3)
168 * <create other partitions>
169 * w ..................... write partition table to disk
170
171The partition layout is ready, next the special partition must be filled with
172proper contents. The contents is generated by running the following command
173(see chapter 2)):
174
175 $ ./tools/mxsboot sd u-boot.sb u-boot.sd
176
177The resulting file, "u-boot.sd", shall then be written to the partition. In this
178case, we assume the first partition of the SD card is /dev/mmcblk0p1:
179
180 $ dd if=u-boot.sd of=/dev/mmcblk0p1
181
182Last step is to insert the card into the MXS based board and boot.
183
184NOTE: If the user needs to adjust the start sector, the "mxsboot" tool contains
185 a "-p" switch for that purpose. The "-p" switch takes the sector number as
186 an argument.
187
1884) Installation of U-Boot into NAND flash on a MX28 based board
189---------------------------------------------------------------
190
191To boot a MX28 based board from NAND, set the boot mode DIP switches according
192to MX28 manual section 12.2.1 (Table 12-2), PORT=GPMI, NAND 1.8 V.
193
194There are two possibilities when preparing an image writable to NAND flash.
195
196 I) The NAND wasn't written at all yet or the BCB is broken
197 ----------------------------------------------------------
198 In this case, both BCB (FCB and DBBT) and firmware needs to be
199 written to NAND. To generate NAND image containing all these,
200 there is a tool called "mxsboot" in the "tools/" directory. The tool
201 is invoked on "u-boot.sb" file from chapter 2):
202
203 $ ./tools/mxsboot nand u-boot.sb u-boot.nand
204
205 NOTE: The above invokation works for NAND flash with geometry of
206 2048b per page, 64b OOB data, 128kb erase size. If your chip
207 has a different geometry, please use:
208
209 -w <size> change page size (default 2048 b)
210 -o <size> change oob size (default 64 b)
211 -e <size> change erase size (default 131072 b)
212
213 The geometry information can be obtained from running U-Boot
214 on the MX28 board by issuing the "nand info" command.
215
216 The resulting file, "u-boot.nand" can be written directly to NAND
217 from the U-Boot prompt. To simplify the process, the U-Boot default
218 environment contains script "update_nand_full" to update the system.
219
220 This script expects a working TFTP server containing the file
221 "u-boot.nand" in it's root directory. This can be changed by
222 adjusting the "update_nand_full_filename" variable.
223
224 To update the system, run the following in U-Boot prompt:
225
226 => run update_nand_full
227
228 In case you would only need to update the bootloader in future,
229 see II) below.
230
231 II) The NAND was already written with a good BCB
232 ------------------------------------------------
233 This part applies after the part I) above was done at least once.
234
235 If part I) above was done correctly already, there is no need to
236 write the FCB and DBBT parts of NAND again. It's possible to upgrade
237 only the bootloader image.
238
239 To simplify the process of firmware update, the U-Boot default
240 environment contains script "update_nand_firmware" to update only
241 the firmware, without rewriting FCB and DBBT.
242
243 This script expects a working TFTP server containing the file
244 "u-boot.sb" in it's root directory. This can be changed by
245 adjusting the "update_nand_firmware_filename" variable.
246
247 To update the system, run the following in U-Boot prompt:
248
249 => run update_nand_firmware
250
251 III) Special settings for the update scripts
252 --------------------------------------------
253 There is a slight possibility of the user wanting to adjust the
254 STRIDE and COUNT options of the NAND boot. For description of these,
255 see MX28 manual section 12.12.1.2 and 12.12.1.3.
256
257 The update scripts take this possibility into account. In case the
258 user changes STRIDE by blowing fuses, the user also has to change
259 "update_nand_stride" variable. In case the user changes COUNT by
260 blowing fuses, the user also has to change "update_nand_count"
261 variable for the update scripts to work correctly.
262
263 In case the user needs to boot a firmware image bigger than 1Mb, the
264 user has to adjust the "update_nand_firmware_maxsz" variable for the
265 update scripts to work properly.
266
2675) Installation of U-Boot into SPI NOR flash on a MX28 based board
268------------------------------------------------------------------
269
270The u-boot.sb file can be directly written to SPI NOR from U-Boot prompt.
271
272Load u-boot.sb into RAM, this can be done in several ways and one way is to use
273tftp:
274 => tftp u-boot.sb 0x42000000
275
276Probe the SPI NOR flash:
277 => sf probe
278
279(SPI NOR should be succesfully detected in this step)
280
281Erase the blocks where U-Boot binary will be written to:
282 => sf erase 0x0 0x80000
283
284Write u-boot.sb to SPI NOR:
285 => sf write 0x42000000 0 0x80000
286
287Power off the board and set the boot mode DIP switches to boot from the SPI NOR
288according to MX28 manual section 12.2.1 (Table 12-2)
289
290Last step is to power up the board and U-Boot should start from SPI NOR.
291
README.mxsimage
1Freescale i.MX233/i.MX28 SB image generator via mkimage
2=======================================================
3
4This tool allows user to produce SB BootStream encrypted with a zero key.
5Such a BootStream is then bootable on i.MX23/i.MX28.
6
7Usage -- producing image:
8=========================
9The mxsimage tool is targeted to be a simple replacement for the elftosb2 .
10To generate an image, write an image configuration file and run:
11
12 mkimage -A arm -O u-boot -T mxsimage -n <path to configuration file> \
13 <output bootstream file>
14
15The output bootstream file is usually using the .sb file extension. Note
16that the example configuration files for producing bootable BootStream with
17the U-Boot bootloader can be found under arch/arm/boot/cpu/arm926ejs/mxs/
18directory. See the following files:
19
20 mxsimage.mx23.cfg -- This is an example configuration for i.MX23
21 mxsimage.mx28.cfg -- This is an example configuration for i.MX28
22
23Each configuration file uses very simple instruction semantics and a few
24additional rules have to be followed so that a useful image can be produced.
25These semantics and rules will be outlined now.
26
27- Each line of the configuration file contains exactly one instruction.
28- Every numeric value must be encoded in hexadecimal and in format 0xabcdef12 .
29- The configuration file is a concatenation of blocks called "sections" and
30 optionally "DCD blocks" (see below), and optional flags lines.
31 - Each "section" is started by the "SECTION" instruction.
32 - The "SECTION" instruction has the following semantics:
33
34 SECTION u32_section_number [BOOTABLE]
35 - u32_section_number :: User-selected ID of the section
36 - BOOTABLE :: Sets the section as bootable
37
38 - A bootable section is one from which the BootROM starts executing
39 subsequent instructions or code. Exactly one section must be selected
40 as bootable, usually the one containing the instructions and data to
41 load the bootloader.
42
43 - A "SECTION" must be immediatelly followed by a "TAG" instruction.
44 - The "TAG" instruction has the following semantics:
45
46 TAG [LAST]
47 - LAST :: Flag denoting the last section in the file
48
49 - After a "TAG" unstruction, any of the following instructions may follow
50 in any order and any quantity:
51
52 NOOP
53 - This instruction does nothing
54
55 LOAD u32_address string_filename
56 - Instructs the BootROM to load file pointed by "string_filename" onto
57 address "u32_address".
58
59 LOAD IVT u32_address u32_IVT_entry_point
60 - Crafts and loads IVT onto address "u32_address" with the entry point
61 of u32_IVT_entry_point.
62 - i.MX28-specific instruction!
63
64 LOAD DCD u32_address u32_DCD_block_ID
65 - Loads the DCD block with ID "u32_DCD_block_ID" onto address
66 "u32_address" and executes the contents of this DCD block
67 - i.MX28-specific instruction!
68
69 FILL u32_address u32_pattern u32_length
70 - Starts to write memory from addres "u32_address" with a pattern
71 specified by "u32_pattern". Writes exactly "u32_length" bytes of the
72 pattern.
73
74 JUMP [HAB] u32_address [u32_r0_arg]
75 - Jumps onto memory address specified by "u32_address" by setting this
76 address in PT. The BootROM will pass the "u32_r0_arg" value in ARM
77 register "r0" to the executed code if this option is specified.
78 Otherwise, ARM register "r0" will default to value 0x00000000. The
79 optional "HAB" flag is i.MX28-specific flag turning on the HAB boot.
80
81 CALL [HAB] u32_address [u32_r0_arg]
82 - See JUMP instruction above, as the operation is exactly the same with
83 one difference. The CALL instruction does allow returning into the
84 BootROM from the executed code. U-Boot makes use of this in it's SPL
85 code.
86
87 MODE string_mode
88 - Restart the CPU and start booting from device specified by the
89 "string_mode" argument. The "string_mode" differs for each CPU
90 and can be:
91 i.MX23, string_mode = USB/I2C/SPI1_FLASH/SPI2_FLASH/NAND_BCH
92 JTAG/SPI3_EEPROM/SD_SSP0/SD_SSP1
93 i.MX28, string_mode = USB/I2C/SPI2_FLASH/SPI3_FLASH/NAND_BCH
94 JTAG/SPI2_EEPROM/SD_SSP0/SD_SSP1
95
96 - An optional "DCD" blocks can be added at the begining of the configuration
97 file. Note that the DCD is only supported on i.MX28.
98 - The DCD blocks must be inserted before the first "section" in the
99 configuration file.
100 - The DCD block has the following semantics:
101
102 DCD u32_DCD_block_ID
103 - u32_DCD_block_ID :: The ID number of the DCD block, must match
104 the ID number used by "LOAD DCD" instruction.
105
106 - The DCD block must be followed by one of the following instructions. All
107 of the instructions operate either on 1, 2 or 4 bytes. This is selected by
108 the 'n' suffix of the instruction:
109
110 WRITE.n u32_address u32_value
111 - Write the "u32_value" to the "u32_address" address.
112
113 ORR.n u32_address u32_value
114 - Read the "u32_address", perform a bitwise-OR with the "u32_value" and
115 write the result back to "u32_address".
116
117 ANDC.n u32_address u32_value
118 - Read the "u32_address", perform a bitwise-AND with the complement of
119 "u32_value" and write the result back to "u32_address".
120
121 EQZ.n u32_address u32_count
122 - Read the "u32_address" at most "u32_count" times and test if the value
123 read is zero. If it is, break the loop earlier.
124
125 NEZ.n u32_address u32_count
126 - Read the "u32_address" at most "u32_count" times and test if the value
127 read is non-zero. If it is, break the loop earlier.
128
129 EQ.n u32_address u32_mask
130 - Read the "u32_address" in a loop and test if the result masked with
131 "u32_mask" equals the "u32_mask". If the values are equal, break the
132 reading loop.
133
134 NEQ.n u32_address u32_mask
135 - Read the "u32_address" in a loop and test if the result masked with
136 "u32_mask" does not equal the "u32_mask". If the values are not equal,
137 break the reading loop.
138
139 NOOP
140 - This instruction does nothing.
141
142 - An optional flags lines can be one of the following:
143
144 DISPLAYPROGRESS
145 - Enable boot progress output form the BootROM.
146
147- If the boot progress output from the BootROM is enabled, the BootROM will
148 produce a letter on the Debug UART for each instruction it started processing.
149 Here is a mapping between the above instructions and the BootROM output:
150
151 H -- SB Image header loaded
152 T -- TAG instruction
153 N -- NOOP instruction
154 L -- LOAD instruction
155 F -- FILL instruction
156 J -- JUMP instruction
157 C -- CALL instruction
158 M -- MODE instruction
159
160Usage -- verifying image:
161=========================
162
163The mxsimage can also verify and dump contents of an image. Use the following
164syntax to verify and dump contents of an image:
165
166 mkimage -l <input bootstream file>
167
168This will output all the information from the SB image header and all the
169instructions contained in the SB image. It will also check if the various
170checksums in the SB image are correct.
171
README.nand
1NAND FLASH commands and notes
2
3See NOTE below!!!
4
5# (C) Copyright 2003
6# Dave Ellis, SIXNET, dge@sixnetio.com
7#
8# SPDX-License-Identifier: GPL-2.0+
9
10Commands:
11
12 nand bad
13 Print a list of all of the bad blocks in the current device.
14
15 nand device
16 Print information about the current NAND device.
17
18 nand device num
19 Make device `num' the current device and print information about it.
20
21 nand erase off|partition size
22 nand erase clean [off|partition size]
23 Erase `size' bytes starting at offset `off'. Alternatively partition
24 name can be specified, in this case size will be eventually limited
25 to not exceed partition size (this behaviour applies also to read
26 and write commands). Only complete erase blocks can be erased.
27
28 If `erase' is specified without an offset or size, the entire flash
29 is erased. If `erase' is specified with partition but without an
30 size, the entire partition is erased.
31
32 If `clean' is specified, a JFFS2-style clean marker is written to
33 each block after it is erased.
34
35 This command will not erase blocks that are marked bad. There is
36 a debug option in cmd_nand.c to allow bad blocks to be erased.
37 Please read the warning there before using it, as blocks marked
38 bad by the manufacturer must _NEVER_ be erased.
39
40 nand info
41 Print information about all of the NAND devices found.
42
43 nand read addr ofs|partition size
44 Read `size' bytes from `ofs' in NAND flash to `addr'. Blocks that
45 are marked bad are skipped. If a page cannot be read because an
46 uncorrectable data error is found, the command stops with an error.
47
48 nand read.oob addr ofs|partition size
49 Read `size' bytes from the out-of-band data area corresponding to
50 `ofs' in NAND flash to `addr'. This is limited to the 16 bytes of
51 data for one 512-byte page or 2 256-byte pages. There is no check
52 for bad blocks or ECC errors.
53
54 nand write addr ofs|partition size
55 Write `size' bytes from `addr' to `ofs' in NAND flash. Blocks that
56 are marked bad are skipped. If a page cannot be read because an
57 uncorrectable data error is found, the command stops with an error.
58
59 As JFFS2 skips blocks similarly, this allows writing a JFFS2 image,
60 as long as the image is short enough to fit even after skipping the
61 bad blocks. Compact images, such as those produced by mkfs.jffs2
62 should work well, but loading an image copied from another flash is
63 going to be trouble if there are any bad blocks.
64
65 nand write.trimffs addr ofs|partition size
66 Enabled by the CONFIG_CMD_NAND_TRIMFFS macro. This command will write to
67 the NAND flash in a manner identical to the 'nand write' command
68 described above -- with the additional check that all pages at the end
69 of eraseblocks which contain only 0xff data will not be written to the
70 NAND flash. This behaviour is required when flashing UBI images
71 containing UBIFS volumes as per the UBI FAQ[1].
72
73 [1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo
74
75 nand write.oob addr ofs|partition size
76 Write `size' bytes from `addr' to the out-of-band data area
77 corresponding to `ofs' in NAND flash. This is limited to the 16 bytes
78 of data for one 512-byte page or 2 256-byte pages. There is no check
79 for bad blocks.
80
81 nand read.raw addr ofs|partition [count]
82 nand write.raw addr ofs|partition [count]
83 Read or write one or more pages at "ofs" in NAND flash, from or to
84 "addr" in memory. This is a raw access, so ECC is avoided and the
85 OOB area is transferred as well. If count is absent, it is assumed
86 to be one page. As with .yaffs2 accesses, the data is formatted as
87 a packed sequence of "data, oob, data, oob, ..." -- no alignment of
88 individual pages is maintained.
89
90Configuration Options:
91
92 CONFIG_SYS_NAND_U_BOOT_OFFS
93 NAND Offset from where SPL will read u-boot image. This is the starting
94 address of u-boot MTD partition in NAND.
95
96 CONFIG_CMD_NAND
97 Enables NAND support and commands.
98
99 CONFIG_CMD_NAND_TORTURE
100 Enables the torture command (see description of this command below).
101
102 CONFIG_SYS_MAX_NAND_DEVICE
103 The maximum number of NAND devices you want to support.
104
105 CONFIG_SYS_NAND_MAX_ECCPOS
106 If specified, overrides the maximum number of ECC bytes
107 supported. Useful for reducing image size, especially with SPL.
108 This must be at least 48 if nand_base.c is used.
109
110 CONFIG_SYS_NAND_MAX_OOBFREE
111 If specified, overrides the maximum number of free OOB regions
112 supported. Useful for reducing image size, especially with SPL.
113 This must be at least 2 if nand_base.c is used.
114
115 CONFIG_SYS_NAND_MAX_CHIPS
116 The maximum number of NAND chips per device to be supported.
117
118 CONFIG_SYS_NAND_SELF_INIT
119 Traditionally, glue code in drivers/mtd/nand/raw/nand.c has driven
120 the initialization process -- it provides the mtd and nand
121 structs, calls a board init function for a specific device,
122 calls nand_scan(), and registers with mtd.
123
124 This arrangement does not provide drivers with the flexibility to
125 run code between nand_scan_ident() and nand_scan_tail(), or other
126 deviations from the "normal" flow.
127
128 If a board defines CONFIG_SYS_NAND_SELF_INIT, drivers/mtd/nand/raw/nand.c
129 will make one call to board_nand_init(), with no arguments. That
130 function is responsible for calling a driver init function for
131 each NAND device on the board, that performs all initialization
132 tasks except setting mtd->name, and registering with the rest of
133 U-Boot. Those last tasks are accomplished by calling nand_register()
134 on the new mtd device.
135
136 Example of new init to be added to the end of an existing driver
137 init:
138
139 /* chip is struct nand_chip, and is now provided by the driver. */
140 mtd = nand_to_mtd(&chip);
141
142 /*
143 * Fill in appropriate values if this driver uses these fields,
144 * or uses the standard read_byte/write_buf/etc. functions from
145 * nand_base.c that use these fields.
146 */
147 chip.IO_ADDR_R = ...;
148 chip.IO_ADDR_W = ...;
149
150 if (nand_scan_ident(mtd, CONFIG_SYS_MAX_NAND_CHIPS, NULL))
151 error out
152
153 /*
154 * Insert here any code you wish to run after the chip has been
155 * identified, but before any other I/O is done.
156 */
157
158 if (nand_scan_tail(mtd))
159 error out
160
161 /*
162 * devnum is the device number to be used in nand commands
163 * and in mtd->name. Must be less than CONFIG_SYS_MAX_NAND_DEVICE.
164 */
165 if (nand_register(devnum, mtd))
166 error out
167
168 In addition to providing more flexibility to the driver, it reduces
169 the difference between a U-Boot driver and its Linux counterpart.
170 nand_init() is now reduced to calling board_nand_init() once, and
171 printing a size summary. This should also make it easier to
172 transition to delayed NAND initialization.
173
174 Please convert your driver even if you don't need the extra
175 flexibility, so that one day we can eliminate the old mechanism.
176
177
178 CONFIG_SYS_NAND_ONFI_DETECTION
179 Enables detection of ONFI compliant devices during probe.
180 And fetching device parameters flashed on device, by parsing
181 ONFI parameter page.
182
183Platform specific options
184=========================
185 CONFIG_NAND_OMAP_GPMC
186 Enables omap_gpmc.c driver for OMAPx and AMxxxx platforms.
187 GPMC controller is used for parallel NAND flash devices, and can
188 do ECC calculation (not ECC error detection) for HAM1, BCH4, BCH8
189 and BCH16 ECC algorithms.
190
191 CONFIG_NAND_OMAP_ELM
192 Enables omap_elm.c driver for OMAPx and AMxxxx platforms.
193 ELM controller is used for ECC error detection (not ECC calculation)
194 of BCH4, BCH8 and BCH16 ECC algorithms.
195 Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine,
196 thus such SoC platforms need to depend on software library for ECC error
197 detection. However ECC calculation on such plaforms would still be
198 done by GPMC controller.
199
200 CONFIG_SPL_NAND_AM33XX_BCH
201 Enables SPL-NAND driver (am335x_spl_bch.c) which supports ELM based
202 hardware ECC correction. This is useful for platforms which have ELM
203 hardware engine and use NAND boot mode.
204 Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine,
205 so those platforms should use CONFIG_SPL_NAND_SIMPLE for enabling
206 SPL-NAND driver with software ECC correction support.
207
208 CONFIG_NAND_OMAP_ECCSCHEME
209 On OMAP platforms, this CONFIG specifies NAND ECC scheme.
210 It can take following values:
211 OMAP_ECC_HAM1_CODE_SW
212 1-bit Hamming code using software lib.
213 (for legacy devices only)
214 OMAP_ECC_HAM1_CODE_HW
215 1-bit Hamming code using GPMC hardware.
216 (for legacy devices only)
217 OMAP_ECC_BCH4_CODE_HW_DETECTION_SW
218 4-bit BCH code (unsupported)
219 OMAP_ECC_BCH4_CODE_HW
220 4-bit BCH code (unsupported)
221 OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
222 8-bit BCH code with
223 - ecc calculation using GPMC hardware engine,
224 - error detection using software library.
225 - requires CONFIG_BCH to enable software BCH library
226 (For legacy device which do not have ELM h/w engine)
227 OMAP_ECC_BCH8_CODE_HW
228 8-bit BCH code with
229 - ecc calculation using GPMC hardware engine,
230 - error detection using ELM hardware engine.
231 OMAP_ECC_BCH16_CODE_HW
232 16-bit BCH code with
233 - ecc calculation using GPMC hardware engine,
234 - error detection using ELM hardware engine.
235
236 How to select ECC scheme on OMAP and AMxx platforms ?
237 -----------------------------------------------------
238 Though higher ECC schemes have more capability to detect and correct
239 bit-flips, but still selection of ECC scheme is dependent on following
240 - hardware engines present in SoC.
241 Some legacy OMAP SoC do not have ELM h/w engine thus such
242 SoC cannot support BCHx_HW ECC schemes.
243 - size of OOB/Spare region
244 With higher ECC schemes, more OOB/Spare area is required to
245 store ECC. So choice of ECC scheme is limited by NAND oobsize.
246
247 In general following expression can help:
248 NAND_OOBSIZE >= 2 + (NAND_PAGESIZE / 512) * ECC_BYTES
249 where
250 NAND_OOBSIZE = number of bytes available in
251 OOB/spare area per NAND page.
252 NAND_PAGESIZE = bytes in main-area of NAND page.
253 ECC_BYTES = number of ECC bytes generated to
254 protect 512 bytes of data, which is:
255 3 for HAM1_xx ecc schemes
256 7 for BCH4_xx ecc schemes
257 14 for BCH8_xx ecc schemes
258 26 for BCH16_xx ecc schemes
259
260 example to check for BCH16 on 2K page NAND
261 NAND_PAGESIZE = 2048
262 NAND_OOBSIZE = 64
263 2 + (2048 / 512) * 26 = 106 > NAND_OOBSIZE
264 Thus BCH16 cannot be supported on 2K page NAND.
265
266 However, for 4K pagesize NAND
267 NAND_PAGESIZE = 4096
268 NAND_OOBSIZE = 224
269 ECC_BYTES = 26
270 2 + (4096 / 512) * 26 = 210 < NAND_OOBSIZE
271 Thus BCH16 can be supported on 4K page NAND.
272
273
274 CONFIG_NAND_OMAP_GPMC_PREFETCH
275 On OMAP platforms that use the GPMC controller
276 (CONFIG_NAND_OMAP_GPMC_PREFETCH), this options enables the code that
277 uses the prefetch mode to speed up read operations.
278
279NOTE:
280=====
281
282The Disk On Chip driver is currently broken and has been for some time.
283There is a driver in drivers/mtd/nand/raw, taken from Linux, that works with
284the current NAND system but has not yet been adapted to the u-boot
285environment.
286
287Additional improvements to the NAND subsystem by Guido Classen, 10-10-2006
288
289JFFS2 related commands:
290
291 implement "nand erase clean" and old "nand erase"
292 using both the new code which is able to skip bad blocks
293 "nand erase clean" additionally writes JFFS2-cleanmarkers in the oob.
294
295Miscellaneous and testing commands:
296 "markbad [offset]"
297 create an artificial bad block (for testing bad block handling)
298
299 "scrub [offset length]"
300 like "erase" but don't skip bad block. Instead erase them.
301 DANGEROUS!!! Factory set bad blocks will be lost. Use only
302 to remove artificial bad blocks created with the "markbad" command.
303
304 "torture offset [size]"
305 Torture block to determine if it is still reliable.
306 Enabled by the CONFIG_CMD_NAND_TORTURE configuration option.
307 This command returns 0 if the block is still reliable, else 1.
308 If the block is detected as unreliable, it is up to the user to decide to
309 mark this block as bad.
310 The analyzed block is put through 3 erase / write cycles (or less if the block
311 is detected as unreliable earlier).
312 This command can be used in scripts, e.g. together with the markbad command to
313 automate retries and handling of possibly newly detected bad blocks if the
314 nand write command fails.
315 It can also be used manually by users having seen some NAND errors in logs to
316 search the root cause of these errors.
317 The underlying nand_torture() function is also useful for code willing to
318 automate actions following a nand->write() error. This would e.g. be required
319 in order to program or update safely firmware to NAND, especially for the UBI
320 part of such firmware.
321 Optionally, a second parameter size can be given to test multiple blocks with
322 one call. If size is not a multiple of the NAND's erase size, then the block
323 that contains offset + size will be tested in full. If used with size, this
324 command returns 0 if all tested blocks have been found reliable, else 1.
325
326
327NAND locking command (for chips with active LOCKPRE pin)
328
329 "nand lock"
330 set NAND chip to lock state (all pages locked)
331
332 "nand lock tight"
333 set NAND chip to lock tight state (software can't change locking anymore)
334
335 "nand lock status"
336 displays current locking status of all pages
337
338 "nand unlock [offset] [size]"
339 unlock consecutive area (can be called multiple times for different areas)
340
341 "nand unlock.allexcept [offset] [size]"
342 unlock all except specified consecutive area
343
344I have tested the code with board containing 128MiB NAND large page chips
345and 32MiB small page chips.
346
README.nand-boot-ppc440
1-----------------------------
2NAND boot on PPC440 platforms
3-----------------------------
4
5This document describes the U-Boot NAND boot feature as it
6is implemented for the AMCC Sequoia (PPC440EPx) board.
7
8The PPC440EP(x)/GR(x) cpu's can boot directly from NAND FLASH,
9completely without NOR FLASH. This can be done by using the NAND
10boot feature of the 440 NAND flash controller (NDFC).
11
12Here a short description of the different boot stages:
13
14a) IPL (Initial Program Loader, integrated inside CPU)
15------------------------------------------------------
16Will load first 4k from NAND (SPL) into cache and execute it from there.
17
18b) SPL (Secondary Program Loader)
19---------------------------------
20Will load special U-Boot version (NUB) from NAND and execute it. This SPL
21has to fit into 4kByte. It sets up the CPU and configures the SDRAM
22controller and the NAND controller so that the special U-Boot image can be
23loaded from NAND to SDRAM.
24This special image is build in the directory "nand_spl".
25
26c) NUB (NAND U-Boot)
27--------------------
28This NAND U-Boot (NUB) is a special U-Boot version which can be started
29from RAM. Therefore it mustn't (re-)configure the SDRAM controller.
30
31On 440EPx the SPL is copied to internal SRAM before the NAND controller
32is set up. While still running from cache, I experienced problems accessing
33the NAND controller.
34
35
36Example: Build and install NAND boot image for Sequoia (440EPx):
37
38a) Configure for sequoia with NAND boot support:
39# make sequoia_nand_config
40
41b) Build image(s)
42# make
43
44This will generate the SPL image in the "nand_spl" directory:
45nand_spl/u-boot-spl.bin
46Also another image is created spanning a whole NAND block (16kBytes):
47nand_spl/u-boot-spl-16k.bin
48The main NAND U-Boot image is generated in the toplevel directory:
49u-boot.bin
50A combined image of u-boot-spl-16k.bin and u-boot.bin is also created:
51u-boot-nand.bin
52
53This image should be programmed at offset 0 in the NAND flash:
54
55# tftp 100000 /tftpboot/sequoia/u-boot-nand.bin
56# nand erase 0 60000
57# nand write 100000 0 60000
58
59
60September 07 2006, Stefan Roese <sr@denx.de>
61
README.ne2000
1This driver supports NE2000 compatible cards (those based on DP8390,
2DP83902 and similar). It can be used with PCMCIA/CF cards provided
3that the CCR is correctly initialized.
4
5The code is based on sources from the Linux kernel (pcnet_cs.c,
68390.h) and eCOS(if_dp83902a.c, if_dp83902a.h). Both of these 2
7wonderful world are GPL, so this is, of course, GPL.
8
9I developed and tested this driver on a custom PXA255 based system and
10with a billionton CF network card connected to the PCMCIA interface of
11the micro (have a look at README.PXA_CF for the support of this port).
12
13The options you have to specify in the config file are (with the
14value for my board as an example):
15
16#define CONFIG_DRIVER_NE2000
17
18- Enables the driver
19
20#define CONFIG_DRIVER_NE2000_BASE (0x20000000+0x300)
21
22- Address where the board is mapped
23
24#define CONFIG_DRIVER_NE2000_CCR (0x28000000+0x3f8)
25
26- Address of the CCR (card configuration register). It could be found
27by enabling DEBUG in cmd_pcmcia.c. If this is not defined nothing is
28done as far as PCMCIA support is concerned.
29
30#define CONFIG_DRIVER_NE2000_VAL (0x20)
31
32- The value to be written in the CCR. It selects among different I/O
33spaces that could be used by the card.
34
35
36Enjoy!
37
38Christian Pellegrin <chri@ascensit.com>
39
README.nios2
1Nios II is a 32-bit embedded-processor architecture designed
2specifically for the Altera family of FPGAs.
3
4Please refer to the link for more information on Nios II,
5https://www.altera.com/products/processors/overview.html
6
7Please refer to the link for Linux port and toolchains,
8http://rocketboards.org/foswiki/view/Documentation/NiosIILinuxUserManual
9
10The Nios II port of u-boot is controlled by device tree. Please check
11out doc/README.fdt-control.
12
13To add a new board/configuration (eg, mysystem) to u-boot, you will need
14three files.
15
161. The device tree source which describes the hardware, dts file.
17 arch/nios2/dts/mysystem.dts
18
192. Default configuration of Kconfig, defconfig file.
20 configs/mysystem_defconfig
21
223. The legacy board header file.
23 include/configs/mysystem.h
24
25The device tree source must be generated from your qsys/sopc design
26using the sopc2dts tool. Then modified to fit your configuration. Please
27find the sopc2dts download and usage at the wiki,
28http://www.alterawiki.com/wiki/Sopc2dts
29
30$ java -jar sopc2dts.jar --force-altr -i mysystem.sopcinfo -o mysystem.dts
31
32You will need to add additional properties to the dts. Please find an
33example at, arch/nios2/dts/10m50_devboard.dts.
34
351. Add "stdout-path=..." property with your serial path to the chosen
36node, like this,
37 chosen {
38 stdout-path = &uart_0;
39 };
40
412. If you use SPI/EPCS or I2C, you will need to add aliases to number
42the sequence of these devices, like this,
43 aliases {
44 spi0 = &epcs_controller;
45 };
46
47Next, you will need a default config file. You may start with
4810m50_defconfig, modify the options and save it.
49
50$ make 10m50_defconfig
51$ make menuconfig
52$ make savedefconfig
53$ cp defconfig configs/mysystem_defconfig
54
55You will need to change the names of board header file and device tree,
56and select the drivers with menuconfig.
57
58Nios II architecture --->
59 (mysystem) Board header file
60Device Tree Control --->
61 (mysystem) Default Device Tree for DT control
62
63There is a selection of "Provider of DTB for DT control" in the Device
64Tree Control menu.
65
66( ) Separate DTB for DT control, will cat the dtb to end of u-boot
67binary, output u-boot-dtb.bin. This should be used for production.
68If you use boot copier, like EPCS boot copier, make sure the copier
69copies all the u-boot-dtb.bin, not just u-boot.bin.
70
71( ) Embedded DTB for DT control, will include the dtb inside the u-boot
72binary. This is handy for development, eg, using gdb or nios2-download.
73
74The last thing, legacy board header file describes those config options
75not covered in Kconfig yet. You may copy it from 10m50_devboard.h.
76
77$ cp include/configs/10m50_devboard.h include/configs/mysystem.h
78
79Please change the SDRAM base and size to match your board. The base
80should be cached virtual address, for Nios II with MMU it is 0xCxxx_xxxx
81to 0xDxxx_xxxx.
82
83#define CONFIG_SYS_SDRAM_BASE 0xc8000000
84#define CONFIG_SYS_SDRAM_SIZE 0x08000000
85
86You will need to change the environment variables location and setting,
87too. You may change other configs to fit your board.
88
89After all these changes, you may build and test.
90
91$ export CROSS_COMPILE=nios2-elf- (or nios2-linux-gnu-)
92$ make mysystem_defconfig
93$ make
94
95Enjoy!
96
README.nokia_rx51
1Board: Nokia RX-51 aka N900
2
3This board definition results in a u-boot.bin which can be chainloaded
4from NOLO in qemu or on a real N900. It does very little hardware config
5because NOLO has already configured the board. Only needed is enabling
6internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
7
8NOLO is expecting a kernel image and will treat any image it finds in
9onenand as such. This u-boot is intended to be flashed to the N900 like
10a kernel. In order to transparently boot the original kernel, it will be
11appended to u-boot.bin at 0x40000. NOLO will load the entire image into
12(random) memory and execute u-boot, which saves hw revision, boot reason
13and boot mode ATAGs set by NOLO. Then the bootscripts will attempt to load
14uImage or boot.scr from a fat, ext2/ext3 or ext4 filesystem in external
15SD card or internal eMMC memory. If this fails or keyboard is closed then
16the appended kernel image will be booted using some generated and some
17stored ATAGs (see boot order).
18
19There is support for hardware watchdog. Hardware watchdog is started by
20NOLO so u-boot must kick watchdog to prevent reboot device (but not very
21often, max every 2 seconds). There is also support for framebuffer display
22output with ANSI espace codes and the N900 HW keyboard input. USB tty works
23but is disabled because it prevents the current Maemo kernel from booting.
24
25When U-Boot is starting it enable IBE bit in Auxiliary Control Register,
26which is needed for Thumb-2 ISA support. It is workaround for errata 430973.
27
28Default boot order:
29
30 * 0. if keyboard is closed boot automatically attached kernel image
31 * 1. try boot from external SD card
32 * 2. try boot from internal eMMC memory
33 * 3. try boot from attached kernel image
34
35Boot from SD or eMMC in this order:
36
37 * 1.
38 * 1.1 find boot.scr on first fat partition
39 * 1.2 find uImage on first fat parition
40 * 1.3 same order for 2. - 4. fat partition
41 * 2. same as 1. but for ext2/3 partition
42 * 3. same as 1. but for ext4 partition
43
44
45Available additional commands/variables:
46
47 * run sercon - Use serial port for control
48 * run usbcon - Use usbtty for control
49 * run vgacon - Use framebuffer and HW keyboard for control (default)
50
51 * run sdboot - Boot from external SD card (see boot order)
52 * run emmcboot - Boot from internal eMMC memory (see boot order)
53 * run attachboot - Boot attached kernel image (attached to U-Boot binary)
54
55 * run scriptload - Load boot script ${mmcscriptfile}
56 * run scriptboot - Run loaded boot script
57 * run kernload - Load kernel image ${mmckernfile}
58 * run initrdload - Load initrd image ${mmcinitrdfile}
59 * run kernboot - Boot loaded kernel image
60 * run kerninitrdboot - Boot loaded kernel image with loaded initrd image
61
62 * run trymmcscriptboot - Try to load and boot script ${mmcscriptfile}
63 * run trymmckernboot - Try to load and boot kernel image ${mmckernfile}
64 * run trymmckerninitrdboot - Try to load and boot kernel image ${mmckernfile}
65 with initrd image ${mmcinitrdfile}
66
67Additional variables for loading files from mmc:
68
69 * mmc ${mmcnum} (0 - external, 1 - internal)
70 * partition number ${mmcpart} (1 - 4)
71 * parition type ${mmctype} (fat, ext2)
72
73Additional varuables for booting kernel:
74
75 * setup_omap_atag - Add OMAP table into atags structure (needs maemo kernel)
76 * setup_console_atag - Enable serial console in OMAP table
77 * setup_boot_reason_atag - Change boot reason in OMAP table
78 * setup_boot_mode_atag - Change boot mode in OMAP table
79
80USB TTY:
81
82 Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTY is disabled.
83 For enabling USB TTY just add this line to file include/configs/nokia_rx51.h
84
85 #define CONFIG_USB_TTY
86
87
88ONENAND support:
89
90 ONENAND support is disabled because not working yet and cause linux kernel to
91 crash or no access to mtd. For enabling ONENAND support add this line at begin
92 of file include/configs/nokia_rx51.h
93
94 #define ONENAND_SUPPORT
95
96
97UBIFS support:
98
99 UBIFS support is disabled, because U-Boot image is too big and cannot be
100 flashed with attached zImage to RX-51 kernel nand area. For enabling UBIFS
101 support first enable ONENAND support and then add this line at begin of file
102 include/configs/nokia_rx51.h
103
104 #define UBIFS_SUPPORT
105
README.nvme
1#
2# Copyright (C) 2017 NXP Semiconductors
3# Copyright (C) 2017 Bin Meng <bmeng.cn@gmail.com>
4#
5# SPDX-License-Identifier: GPL-2.0+
6#
7
8What is NVMe
9============
10
11NVM Express (NVMe) is a register level interface that allows host software to
12communicate with a non-volatile memory subsystem. This interface is optimized
13for enterprise and client solid state drives, typically attached to the PCI
14express interface. It is a scalable host controller interface designed to
15address the needs of enterprise and client systems that utilize PCI express
16based solid state drives (SSD). The interface provides optimized command
17submission and completion paths. It includes support for parallel operation by
18supporting up to 64K I/O queues with up to 64K commands per I/O queue.
19
20The device is comprised of some number of controllers, where each controller
21is comprised of some number of namespaces, where each namespace is comprised
22of some number of logical blocks. A namespace is a quantity of non-volatile
23memory that is formatted into logical blocks. An NVMe namespace is equivalent
24to a SCSI LUN. Each namespace is operated as an independent "device".
25
26How it works
27------------
28There is an NVMe uclass driver (driver name "nvme"), an NVMe host controller
29driver (driver name "nvme") and an NVMe namespace block driver (driver name
30"nvme-blk"). The host controller driver is supposed to probe the hardware and
31do necessary initialization to put the controller into a ready state at which
32it is able to scan all available namespaces attached to it. Scanning namespace
33is triggered by the NVMe uclass driver and the actual work is done in the NVMe
34namespace block driver.
35
36Status
37------
38It only support basic block read/write functions in the NVMe driver.
39
40Config options
41--------------
42CONFIG_NVME Enable NVMe device support
43CONFIG_CMD_NVME Enable basic NVMe commands
44
45Usage in U-Boot
46---------------
47To use an NVMe hard disk from U-Boot shell, a 'nvme scan' command needs to
48be executed for all NVMe hard disks attached to the NVMe controller to be
49identified.
50
51To list all of the NVMe hard disks, try:
52
53 => nvme info
54 Device 0: Vendor: 0x8086 Rev: 8DV10131 Prod: CVFT535600LS400BGN
55 Type: Hard Disk
56 Capacity: 381554.0 MB = 372.6 GB (781422768 x 512)
57
58and print out detailed information for controller and namespaces via:
59
60 => nvme detail
61
62Raw block read/write to can be done via the 'nvme read/write' commands:
63
64 => nvme read a0000000 0 11000
65
66 => tftp 80000000 /tftpboot/kernel.itb
67 => nvme write 80000000 0 11000
68
69Of course, file system command can be used on the NVMe hard disk as well:
70
71 => fatls nvme 0:1
72 32376967 kernel.itb
73 22929408 100m
74
75 2 file(s), 0 dir(s)
76
77 => fatload nvme 0:1 a0000000 /kernel.itb
78 => bootm a0000000
79
80Testing NVMe with QEMU x86
81--------------------------
82QEMU supports NVMe emulation and we can test NVMe driver with QEMU x86 running
83U-Boot. Please see README.x86 for how to build u-boot.rom image for QEMU x86.
84
85Example command line to call QEMU x86 below with emulated NVMe device:
86$ ./qemu-system-i386 -drive file=nvme.img,if=none,id=drv0 -device nvme,drive=drv0,serial=QEMUNVME0001 -bios u-boot.rom
87
README.odroid
1 U-Boot for Odroid X2/U3/XU3/XU4
2========================
3
41. Summary
5==========
6This is a quick instruction for setup Odroid boards.
7Board config: odroid_config for X2/U3
8Board config: odroid-xu3_config for XU3/XU4
9
102. Supported devices
11====================
12This U-BOOT config can be used on three boards:
13- Odroid U3
14- Odroid X2
15with CPU Exynos 4412 rev 2.0 and 2GB of RAM
16- Odroid XU3
17- Odroid XU4
18with CPU Exynos5422 and 2GB of RAM
19
203. Boot sequence
21================
22iROM->BL1->(BL2 + TrustZone)->U-BOOT
23
24This version of U-BOOT doesn't implement SPL. So, BL1, BL2, and TrustZone
25binaries are needed to boot up.
26
27<< X2/U3 >>
28It can be found in "boot.tar.gz" from here:
29http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz
30or here:
31http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
32
33<< XU3/XU4 >>
34It can be downloaded from:
35https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot
36
37
384. Boot media layout
39====================
40The table below shows SD/eMMC cards layout for U-Boot.
41The block offset is starting from 0 and the block size is 512B.
42 -------------------------------------
43| Binary | Block offset| part type |
44| name | SD | eMMC |(eMMC only)|
45 -------------------------------------
46| Bl1 | 1 | 0 | 1 (boot) |
47| Bl2 | 31 | 30 | 1 (boot) |
48| U-Boot | 63 | 62 | 1 (boot) |
49| Tzsw | 2111 | 2110 | 1 (boot) |
50| Uboot Env | 2560 | 2560 | 0 (user) |
51 -------------------------------------
52
535. Prepare the SD boot card - with SD card reader
54=================================================
55To prepare bootable media you need boot binaries provided by hardkernel.
56From the downloaded files, You can find:
57- bl1.bin
58- tzsw.bin
59- bl2.bin
60- sd_fusing.sh
61- u-boot.bin
62(The file names can be slightly different, but you can distinguish what they are
63without problem)
64
65This is all you need to boot this board. But if you want to use your custom
66U-Boot then you need to change u-boot.bin with your own U-Boot binary*
67and run the script "sd_fusing.sh" - this script is valid only for SD card.
68
69*note:
70The proper binary file of current U-Boot is u-boot-dtb.bin.
71
72quick steps for Linux:
73- Download all files from the link at point 3 and extract it if needed.
74- put any SD card into the SD reader
75- check the device with "dmesg"
76- run ./sd_fusing.sh /dev/sdX - where X is SD card device (but not a partition)
77Check if Hardkernel U-Boot is booting, and next do the same with your U-Boot.
78
796. Prepare the eMMC boot card
80 with a eMMC card reader (boot from eMMC card slot)
81=====================================================
82To boot the device from the eMMC slot you should use a special card reader
83which supports eMMC partition switch. All of the boot binaries are stored
84on the eMMC boot partition which is normally hidden.
85
86The "sd_fusing.sh" script can be used after updating offsets of binaries
87according to the table from point 4. Be sure that you are working on the right
88eMMC partition - its size is usually very small, about 1-4 MiB.
89
907. Prepare the eMMC boot card
91 with a SD card reader (boot from SD card slot)
92=================================================
93If you have an eMMC->microSD adapter you can prepare the card as in point 5.
94But then the device can boot only from the SD card slot.
95
968. Prepare the boot media using Hardkernel U-Boot
97=================================================
98You can update the U-Boot to the custom one if you have a working bootloader
99delivered with the board on the eMMC/SD card. Then follow the steps:
100- install the android fastboot tool
101- connect a micro usb cable to the board
102- on the U-Boot prompt, run command: fastboot (as a root)
103- on the host, run command: "fastboot flash bootloader u-boot-dtb.bin"
104- the custom U-Boot should start after the board resets.
105
1069. Partition layout
107====================
108Default U-Boot environment is setup for fixed partition layout.
109
110Partition table: MSDOS. Disk layout and files as listed in the table below.
111 ----- ------ ------ ------ -------- ---------------------------------
112| Num | Name | FS | Size | Offset | Reguired files |
113| | | Type | MiB | MiB | |
114 ----- ------ ------ ------ -------- ---------------------------------
115| 1 | BOOT | fat | 100 | 2 | kernel, fdt** |
116| 2 | ROOT | ext4 | - | | any Linux system |
117 ----- ------ ------ ------ -------- ---------------------------------
118
119**note:
120Supported fdt files are:
121- exynos4412-odroidx2.dtb
122- exynos4412-odroidu3.dtb
123- exynos5422-odroidxu3.dtb
124- exynos5422-odroidxu4.dtb
125
126Supported kernel files are:
127- Image.itb
128- zImage
129- uImage
130
131The default environmental variable "dfu_alt_info" is set* for above layout.
132Each partition size is just an example, dfu_alt_info tries init two partitions.
133The size of each is not important.
134
135*note:
136$dfu_alt_info is set on a boot time and it is concatenated using two variables:
137- $dfu_alt_boot(set dynamically)
138- $dfu_alt_system(from current env).
139
140To add any changes to dfu_alt_info - please modify $dfu_alt_system only.
141Changes are visible after board reset.
142
14310. The environment and booting the kernel
144==========================================
145There are three macros defined in config for various boot options:
146Two for both, kernel with device tree support and also without it:
147- boot_uimg - load uImage
148- boot_zimg - load zImage
149If proper fdt file exists then it will be automatically loaded,
150so for old kernel types, please remove fdt file from boot partition.
151
152The third boot option for multi image support (more info: doc/uImage.FIT/)
153- boot_fit - for binary file: "Image.itb"
154
155Default boot command: "autoboot"
156And the boot sequence is:
157- boot_fit - if "Image.itb" exists
158- boot_zimg - if "zImage" exists
159- boot_uimg - if "uImage" exists
160
16111. USB host support
162====================
163NOTE: This section is only for Odroid X2/U3.
164
165The ethernet can be accessed after starting the USB subsystem in U-Boot.
166The adapter does not come with a preconfigured MAC address, and hence it needs
167to be set before starting USB.
168setenv usbethaddr 02:DE:AD:BE:EF:FF
169
170Note that in this example a locally managed MAC address is chosen. Care should
171be taken to make these MAC addresses unique within the same subnet.
172
173Start the USB subsystem:
174Odroid # setenv usbethaddr 02:DE:AD:BE:EF:FF
175Odroid # usb start
176(Re)start USB...
177USB0: USB EHCI 1.00
178scanning bus 0 for devices... 4 USB Device(s) found
179 scanning usb for storage devices... 1 Storage Device(s) found
180 scanning usb for ethernet devices... 1 Ethernet Device(s) found
181Odroid #
182
183Automatic IP assignment:
184------------------------
185If the ethernet is connected to a DHCP server (router maybe with DHCP enabled),
186then the below will automatically assign an ip address through DHCP.
187setenv autoload no
188dhcp
189
190Odroid # setenv autoload no
191Odroid # dhcp
192Waiting for Ethernet connection... done.
193BOOTP broadcast 1
194DHCP client bound to address 192.168.1.10 (524 ms)
195Odroid #
196
197Note that this automatically sets the many IP address related variables in
198U-Boot that is obtained from the DHCP server.
199
200Odroid # printenv ipaddr netmask gatewayip dnsip
201ipaddr=192.168.1.10
202netmask=255.255.255.0
203gatewayip=192.168.1.1
204dnsip=192.168.1.1
205
206Ping example:
207The ping command can be used a test to check connectivity. In this example,
208192.168.1.27 is a pingable server in the network.
209Odroid # ping 192.168.1.27
210Waiting for Ethernet connection... done.
211Using sms0 device
212host 192.168.1.27 is alive
213Odroid #
214
215Static IP assignment:
216---------------------
217In the case where there are no DHCP servers in the network, or you want to
218set the IP address statically, it can be done by:
219Odroid # setenv ipaddr 192.168.1.10
220Odroid # ping 192.168.1.27
221Waiting for Ethernet connection... done.
222Using sms0 device
223host 192.168.1.27 is alive
224
225TFTP booting:
226-------------
227Say there exists a tftp server in the network with address 192.168.1.27 and
228it serves a kernel image (zImage.3.17) and a DTB blob (exynos4412-odroidu3.dtb)
229that needs to be loaded and booted. It can be accomplished as below:
230(Assumes that you have setenv usbethaddr, and have not set autoload to no)
231
232Odroid # setenv serverip 192.168.1.27
233Odroid # tftpboot 0x40080000 zImage.3.17
234Waiting for Ethernet connection... done.
235Using sms0 device
236TFTP from server 192.168.1.27; our IP address is 192.168.1.10
237Filename 'zImage.3.17'.
238Load address: 0x40080000
239Loading: #################################################################
240 #################################################################
241 #################################################################
242 #######################
243 52.7 KiB/s
244done
245Bytes transferred = 3194200 (30bd58 hex)
246Odroid # tftpboot 0x42000000 exynos4412-odroidu3.dtb
247Waiting for Ethernet connection... done.
248Using sms0 device
249TFTP from server 192.168.1.27; our IP address is 192.168.1.10
250Filename 'exynos4412-odroidu3.dtb'.
251Load address: 0x42000000
252Loading: ####
253 40 KiB/s
254done
255Bytes transferred = 46935 (b757 hex)
256Odroid # printenv bootargs
257bootargs=Please use defined boot
258Odroid # setenv bootargs console=ttySAC1,115200n8 root=/dev/mmcblk0p2 rootwait
259Odroid # bootz 40080000 - 42000000
260Kernel image @ 0x40080000 [ 0x000000 - 0x30bd58 ]
261## Flattened Device Tree blob at 42000000
262 Booting using the fdt blob at 0x42000000
263 Loading Device Tree to 4fff1000, end 4ffff756 ... OK
264
265Starting kernel ...
266
267[ 0.000000] Booting Linux on physical CPU 0xa00
268... etc ...
269
270In the above example you can substitute 'dhcp' for 'tftpboot' as well.
271
272USB Storage booting:
273--------------------
274Similarly we can use the USB storage to load the kernel image/initrd/fdt etc
275and boot. For this example, there is a USB drive plugged in. It has a FAT
2761st partition and an EXT 2nd partition. Using the generic FS (ls/load) makes
277it even easier to work with FAT/EXT file systems.
278For this example the second EXT partition is used for booting and as rootfs.
279The boot files - kernel and the dtb are present in the /boot directory of the
280second partition.
281
282Odroid # usb start
283(Re)start USB...
284USB0: USB EHCI 1.00
285scanning bus 0 for devices... 4 USB Device(s) found
286 scanning usb for storage devices... 1 Storage Device(s) found
287 scanning usb for ethernet devices...
288Error: sms0 address not set. <----- Note the error as usbethaddr
289Warning: failed to set MAC address <----- is not set.
2901 Ethernet Device(s) found
291Odroid # usb part 0
292
293Partition Map for USB device 0 -- Partition Type: DOS
294
295Part Start Sector Num Sectors UUID Type
296 1 3072 263168 000c4046-01 06
297 2 266240 13457408 000c4046-02 83
298
299Odroid # ls usb 0:2 /boot
300<DIR> 4096 .
301<DIR> 4096 ..
302 353 boot.scr
303 281 boot.txt
304 101420 config-3.8.13.23
305 2127254 initrd.img-3.8.13.23
306 2194825 uInitrd
307 2194825 uInitrd-3.8.13.23
308 2453112 zImage
309 101448 config-3.8.13.26
310 2127670 uInitrd-3.8.13.26
311 2127606 initrd.img-3.8.13.26
312 3194200 zImage.3.17 <--- Kernel
313 46935 exynos4412-odroidu3.dtb <--- DTB
314Odroid # load usb 0:2 40080000 /boot/zImage.3.17
3153194200 bytes read in 471 ms (6.5 MiB/s)
316Odroid # load usb 0:2 42000000 /boot/exynos4412-odroidu3.dtb
31746935 bytes read in 233 ms (196.3 KiB/s)
318Odroid # setenv bootargs console=ttySAC1,115200n8 root=/dev/sda2 rootwait
319Odroid # bootz 40080000 - 42000000
320Kernel image @ 0x40080000 [ 0x000000 - 0x30bd58 ]
321## Flattened Device Tree blob at 42000000
322 Booting using the fdt blob at 0x42000000
323 Loading Device Tree to 4fff1000, end 4ffff756 ... OK
324
325Starting kernel ...
326
327[ 0.000000] Booting Linux on physical CPU 0xa00
328
329Please refer to README.usb for additional information.
330
README.omap-ulpi-viewport
1Reference code ""drivers/usb/ulpi/omap-ulpi-viewport.c"
2
3Contains the ulpi read write api's to perform
4any ulpi phy port access on omap platform.
5
6On omap ehci reg map contains INSNREG05_ULPI
7register which offers the ulpi phy access so
8any ulpi phy commands should be passsed using this
9register.
10
11omap-ulpi-viewport.c is a low level function
12implementation of "drivers/usb/ulpi/ulpi.c"
13
14To enable and use omap-ulpi-viewport.c
15we require CONFIG_USB_ULPI_VIEWPORT_OMAP and
16CONFIG_USB_ULPI be enabled in config file.
17
18Any ulpi ops request can be done with ulpi.c
19and soc specific binding and usage is done with
20omap-ulpi-viewport implementation.
21
22Ex: scenario:
23omap-ehci driver code requests for ulpi phy reset if
24ehci is used in phy mode, which will call ulpi phy reset
25the ulpi phy reset does ulpi_read/write from viewport
26implementation which will do ulpi reset using the
27INSNREG05_ULPI register.
28
README.omap3
1
2Summary
3=======
4
5This README is about U-Boot support for TI's ARM Cortex-A8 based OMAP3 [1]
6family of SoCs. TI's OMAP3 SoC family contains an ARM Cortex-A8. Additionally,
7some family members contain a TMS320C64x+ DSP and/or an Imagination SGX 2D/3D
8graphics processor and various other standard peripherals.
9
10Currently the following boards are supported:
11
12* OMAP3530 BeagleBoard [2]
13
14* Gumstix Overo [3]
15
16* TI EVM [4]
17
18* OpenPandora Ltd. Pandora [5]
19
20* TI/Logic PD Zoom MDK [6]
21
22* TI/Logic PD Zoom 2 [7]
23
24* CompuLab Ltd. CM-T35 [8]
25
26Toolchain
27=========
28
29While ARM Cortex-A8 support ARM v7 instruction set (-march=armv7a) we compile
30with -march=armv5 to allow more compilers to work. For U-Boot code this has
31no performance impact.
32
33Build
34=====
35
36* BeagleBoard:
37
38make omap3_beagle_config
39make
40
41* Gumstix Overo:
42
43make omap3_overo_config
44make
45
46* TI EVM:
47
48make omap3_evm_config
49make
50
51* Pandora:
52
53make omap3_pandora_config
54make
55
56* Zoom MDK:
57
58make omap3_zoom1_config
59make
60
61* Zoom 2:
62
63make omap3_zoom2_config
64make
65
66* CM-T35:
67
68make cm_t35_config
69make
70
71
72Custom commands
73===============
74
75To make U-Boot for OMAP3 support NAND device SW or HW ECC calculation, U-Boot
76for OMAP3 supports custom user command
77
78nandecc hw/sw
79
80To be compatible with NAND drivers using SW ECC (e.g. kernel code)
81
82nandecc sw
83
84enables SW ECC calculation. HW ECC enabled with
85
86nandecc hw
87
88is typically used to write 2nd stage bootloader (known as 'x-loader') which is
89executed by OMAP3's boot rom and therefore has to be written with HW ECC.
90
91For all other commands see
92
93help
94
95Interfaces
96==========
97
98gpio
99----
100
101To set a bit :
102
103 if (!gpio_request(N, "")) {
104 gpio_direction_output(N, 0);
105 gpio_set_value(N, 1);
106 }
107
108To clear a bit :
109
110 if (!gpio_request(N, "")) {
111 gpio_direction_output(N, 0);
112 gpio_set_value(N, 0);
113 }
114
115To read a bit :
116
117 if (!gpio_request(N, "")) {
118 gpio_direction_input(N);
119 val = gpio_get_value(N);
120 gpio_free(N);
121 }
122 if (val)
123 printf("GPIO N is set\n");
124 else
125 printf("GPIO N is clear\n");
126
127dma
128---
129void omap3_dma_init(void)
130 Init the DMA module
131int omap3_dma_get_conf_chan(uint32_t chan, struct dma4_chan *config);
132 Read config of the channel
133int omap3_dma_conf_chan(uint32_t chan, struct dma4_chan *config);
134 Write config to the channel
135int omap3_dma_conf_transfer(uint32_t chan, uint32_t *src, uint32_t *dst,
136 uint32_t sze)
137 Config source, destination and size of a transfer
138int omap3_dma_wait_for_transfer(uint32_t chan)
139 Wait for a transfer to end - this hast to be called before a channel
140 or the data the channel transferd are used.
141int omap3_dma_get_revision(uint32_t *minor, uint32_t *major)
142 Read silicon Revision of the DMA module
143
144NAND
145====
146
147There are some OMAP3 devices out there with NAND attached. Due to the fact that
148OMAP3 ROM code can only handle 1-bit hamming ECC for accessing first page
149(place where SPL lives) we require this setup for u-boot at least when reading
150the second progam within SPL. A lot of newer NAND chips however require more
151than 1-bit ECC for the pages, some can live with 1-bit for the first page. To
152handle this we can switch to another ECC algorithm after reading the payload
153within SPL.
154
155BCH8
156----
157
158To enable hardware assisted BCH8 (8-bit BCH [Bose, Chaudhuri, Hocquenghem]) on
159OMAP3 devices we can use the BCH library in lib/bch.c. To do so add CONFIG_BCH
160and set CONFIG_NAND_OMAP_ECCSCHEME=5 (refer README.nand) for selecting BCH8_SW.
161The NAND OOB layout is the same as in linux kernel, if the linux kernel BCH8
162implementation for OMAP3 works for you so the u-boot version should also.
163When you require the SPL to read with BCH8 there are two more configs to
164change:
165
166 * CONFIG_SYS_NAND_ECCPOS (must be the same as .eccpos in
167 GPMC_NAND_HW_BCH8_ECC_LAYOUT defined in
168 arch/arm/include/asm/arch-omap3/omap_gpmc.h)
169 * CONFIG_SYS_NAND_ECCSIZE must be 512
170 * CONFIG_SYS_NAND_ECCBYTES must be 13 for this BCH8 setup
171
172Acknowledgements
173================
174
175OMAP3 U-Boot is based on U-Boot tar ball [9] for BeagleBoard and EVM done by
176several TI employees.
177
178Links
179=====
180
181[1] OMAP3:
182
183http://www.ti.com/omap3 (high volume) and
184http://www.ti.com/omap35x (broad market)
185
186[2] OMAP3530 BeagleBoard:
187
188http://beagleboard.org/
189
190[3] Gumstix Overo:
191
192http://www.gumstix.net/Overo/
193
194[4] TI EVM:
195
196http://focus.ti.com/docs/toolsw/folders/print/tmdxevm3503.html
197
198[5] OpenPandora Ltd. Pandora:
199
200http://openpandora.org/
201
202[6] TI/Logic PD Zoom MDK:
203
204http://www.logicpd.com/products/devkit/ti/zoom_mobile_development_kit
205
206[7] TI/Logic PD Zoom 2
207
208http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf
209
210[8] CompuLab Ltd. CM-T35:
211
212http://www.compulab.co.il/t3530/html/t3530-cm-datasheet.htm
213
214[9] TI OMAP3 U-Boot:
215
216http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz
217
README.pblimage
1------------------------------------------------------------------
2Freescale PBL(pre-boot loader) Boot Image generation using mkimage
3------------------------------------------------------------------
4
5The CoreNet SoC's can boot directly from eSPI FLASH, SD/MMC and
6NAND, etc. These SoCs use PBL to load RCW and/or pre-initialization
7instructions. For more details refer section 5 Pre-boot loader
8specifications of reference manual P3041RM/P4080RM/P5020RM at link:
9http://www.freescale.com/webapp/search/Serp.jsp?Reference+Manuals
10
11Building PBL Boot Image and boot steps
12--------------------------------------
13
141. Building PBL Boot Image.
15 The default Image is u-boot.pbl.
16
17 For eSPI boot(available on P2041/P3041/P4080/P5020/P5040/T4240):
18 To build the eSPI boot image:
19 make <board_name>_SPIFLASH
20
21 For SD boot(available on P2041/P3041/P4080/P5020/P5040/T4240):
22 To build the SD boot image:
23 make <board_name>_SDCARD
24
25 For Nand boot(available on P2041/P3041/P5020/P5040):
26 To build the NAND boot image:
27 make <board_name>_NAND
28
29
302. pblimage support available with mkimage utility will generate Freescale PBL
31boot image that can be flashed on the board eSPI flash, SD/MMC and NAND.
32Following steps describe it in detail.
33
34 1). Boot from eSPI flash
35 Write u-boot.pbl to eSPI flash from offset 0x0.
36 for ex in u-boot:
37 =>tftp 100000 u-boot.pbl
38 =>sf probe 0
39 =>sf erase 0 100000
40 =>sf write 100000 0 $filesize
41 Change SW1[1:5] = off off on off on.
42
43 2). Boot from SD/MMC
44 Write u-boot.pbl to SD/MMC from offset 0x1000.
45 for ex in u-boot:
46 =>tftp 100000 u-boot.pbl
47 =>mmcinfo
48 =>mmc write 100000 8 441
49 Change SW1[1:5] = off off on on off.
50
51 3). Boot from Nand
52 Write u-boot.pbl to Nand from offset 0x0.
53 for ex in u-boot:
54 =>tftp 100000 u-boot.pbl
55 =>nand info
56 =>nand erase 0 100000
57 =>nand write 100000 0 $filesize
58 Change SW1[1:5] = off on off off on
59 Change SW7[1:4] = on off off on
60
61Board specific configuration file specifications:
62------------------------------------------------
631. Configuration files rcw.cfg and pbi.cfg must present in the
64board/freescale/corenet_ds/, rcw.cfg is for RCW, pbi.cfg is for
65PBI instructions. File name must not be changed since they are used
66in Makefile.
672. These files can have empty lines and lines starting with "#" as first
68character to put comments
69
70Typical example of rcw.cfg file:
71-----------------------------------
72
73#PBL preamble and RCW header
74aa55aa55 010e0100
75#64 bytes RCW data
764c580000 00000000 18185218 0000cccc
7740464000 3c3c2000 58000000 61000000
7800000000 00000000 00000000 008b6000
7900000000 00000000 00000000 00000000
80
81Typical example of pbi.cfg file:
82-----------------------------------
83
84#PBI commands
85#Initialize CPC1
8609010000 00200400
8709138000 00000000
88091380c0 00000100
8909010100 00000000
9009010104 fff0000b
9109010f00 08000000
9209010000 80000000
93#Configure LAW for CPC1
9409000d00 00000000
9509000d04 fff00000
9609000d08 81000013
9709000010 00000000
9809000014 ff000000
9909000018 81000000
100#Initialize eSPI controller
10109110000 80000403
10209110020 2d170008
10309110024 00100008
10409110028 00100008
1050911002c 00100008
106#Flush PBL data
10709138000 00000000
108091380c0 00000000
109
110------------------------------------------------
111Author: Shaohui Xie<Shaohui.Xie@freescale.com>
112
README.plan9
1Plan 9 from Bell Labs kernel images require additional setup to pass
2configuration information to the kernel. An environment variable named
3confaddr must be defined with the same value as CONFADDR (see mem.h).
4Use of this facility is optional, but should be preferable to manual
5configuration.
6
7When booting an image, arguments supplied to the bootm command will be
8copied to CONFADDR. If no arguments are specified, the contents of the
9bootargs environment variable will be copied.
10
11If no command line arguments or bootargs are defined, CONFADDR is left
12uninitialized to permit manual configuration. For example, PC-style
13configuration could be simulated by issuing a fatload in bootcmd:
14
15 # setenv bootcmd fatload mmc 0 $confaddr plan9.ini; ...; bootm
16
17Steven Stallion
18June 2013
19
README.power-framework
1#
2# (C) Copyright 2014 Samsung Electronics
3# Lukasz Majewski <l.majewski@samsung.com>
4#
5# SPDX-License-Identifier: GPL-2.0+
6#
7
8Introduction
9------------
10
11This document describes the second version of the u-boot's PMIC (Power
12Management IC) framework. As a reference boards please consider Samsungs' Trats
13and Trats2.
14
15Background
16----------
17
18Boards supported by u-boot are getting increasingly complex. Developers and
19designers strive to cut down power consumption. Hence several different types of
20devices are now available on the board - namely power managers (PMIC), fuel
21gauges (FG), micro USB interface controllers (MUIC), batteries, multi-function
22devices (MFD).
23
24Explanation of key design decisions
25-----------------------------------
26
27One package can integrate PMIC and MUIC with different addresses on the I2C bus.
28The same device - e.g. MAX8997 uses two different I2C busses and addresses.
29
30Power devices use not only I2C for communication, but SPI as well. Additionally
31different ICs use different endianess. For this reason struct pmic holds
32information about I2C/SPI transmission, which is used with generic
33pmic_req_write() function.
34
35The "flat" hierarchy for power devices works well when each device performs only
36one operation - e.g. PMIC enables LDO.
37
38The problem emerges when we have a device (battery) which conceptually shall be
39the master and uses methods exported by other devices. We need to control MUIC
40to start charging the battery, use PMIC to reduce board's overall power
41consumption (by disabling not needed LDOs, BUCKs) and get current state of
42energy on the battery from FG.
43Up till now u-boot doesn't support device model, so a simple one had to be
44added.
45
46The directory hierarchy has following structure:
47./include/power/<device_name>_<device_function>.h
48e.g. ./include/power/max8997_pmic.h
49
50./drivers/power/pmic/power_{core files}.c
51e.g. ./drivers/power/pmic/power_core.c
52
53./drivers/power/pmic/<device_function>/<device_function>_<device_name>.c
54e.g. ./drivers/power/pmic/pmic_max8997.c
55e.g. ./drivers/power/battery/trats/bat_trats.c
56e.g. ./drivers/power/fuel_gauge/fg_max17042.c
57
58The framework classifies devices by their function - separate directories should
59be maintained for different classes of devices.
60
61Current design
62--------------
63
64Everything is a power device described by struct pmic. Even battery is
65considered as a valid power device. This helps for better management of those
66devices.
67
68- Block diagram of the hierarchy:
69 -----------------
70 --------| BAT |------------
71 | | | |
72 | ----------------- |
73 | | |
74 \|/ \|/ \|/
75 ----------- ----------------- ---------
76 |FG | |MUIC | |CHRG |
77 | | | | | |
78 ----------- ----------------- ---------
79
80
811. When hierarchy is not needed (no complex battery charge):
82
83Definition of the struct pmic is only required with proper name and parameters
84for communication. This is enough to use the "pmic" command in the u-boot
85prompt to change values of device's register (enable/disable LDO, BUCK).
86
87The PG, MUIC and CHRG above are regarded to be in the same level in the
88hierarchy.
89
902. Complex battery charging.
91
92To charge a battery, information from several "abstract" power devices is
93needed (defined at ./include/power/pmic.h):
94- FG device (struct power_fg):
95 -- *fg_battery_check - check if battery is not above its limits
96 -- *fg_battery_update - update the pmic framework with current
97 battery state(voltage and current capacity)
98
99- Charger device (struct power_chrq):
100 -- *chrg_type - type/capacity of the charger (including information
101 about USB cable disconnection)
102 -- *chrg_bat_present - detection if battery to be charged is
103 present
104 -- *chrg_state - status of the charger - if it is enabled or
105 disabled
106
107- Battery device (struct power_battery):
108 -- *battery_init - assign proper callbacks to be used by top
109 hierarchy battery device
110 -- *battery_charge - called from "pmic" command, responsible
111 for performing the charging
112
113Now two batteries are supported; trats and trats2 [*]. Those differ in the way
114how they handle the exact charging. Trats uses polling (MAX8997) and trats2
115relies on the PMIC/MUIC HW completely (MAX77693).
116
117__Example for trats (this can be very different for other board):__
118 -- *fg_battery_check -> FG device (fg_max17042.c)
119 -- *fg_battery_update -> FG device (fg_max17042.c)
120 -- *chrg_type -> MUIC device (muic_max8997.c)
121 -- *chrg_bat_present -> PMIC device (pmic_max8997.c)
122 -- *chrg_state -> PMIC device (pmic_max8997.c)
123 -- *battery_init -> BAT device (bat_trats.c)
124 -- *battery_charge -> BAT device (bat_trats.c)
125
126Also the struct pmic holds method (*low_power_mode) for reducing board's
127power consumption when one calls "pmic BAT_TRATS bat charge" command.
128
129How to add a new power device
130-----------------------------
131
1321. Simple device should be added with creation of file
133<pmic_function>_<pmic_name>.c, <pmic_name>_<pmic_function>.h according to the
134proposed and described above scheme.
135
136Then "pmic" command supports reading/writing/dump of device's internal
137registers.
138
1392. Charging battery with hierarchy
140Define devices as listed at 1.
141
142Define battery file (bat_<board>.c). Please also note that one might need a
143corresponding battery model description for FG.
144
145For points 1 and 2 use a generic function power_init_board() to initialise the
146power framework on your board.
147
148For reference, please look into the trats/trats2 boards.
149
150TO DO list (for PMICv3) - up till v2014.04
151------------------------------------------
152
1531. Description of the devices related to power via device tree is not available.
154This is the main problem when a developer tries to build a multi-boot u-boot
155binary. The best would be to parse the DTS from Linux kernel.
156
1572. To support many instances of the same IC, like two MAX8997, one needs to
158copy the corresponding pmic_max8997.c file with changed name to "MAX8997_PMICX",
159where X is the device number. This problem will be addressed when extended
160pmic_core.c will support storing available devices in a list.
161
1623. Definition of batteries [*] (for trats/trats2) should be excluded from the
163code responsible for charging them and since it in fact describes the charging
164profile it should be put to a separate file.
165
1664. Adjust the framework to work with the device model.
167
README.pxe
1/*
2 * Copyright 2010-2011 Calxeda, Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7The 'pxe' commands provide a near subset of the functionality provided by
8the PXELINUX boot loader. This allows U-Boot based systems to be controlled
9remotely using the same PXE based techniques that many non U-Boot based servers
10use.
11
12Commands
13========
14
15pxe get
16-------
17 syntax: pxe get
18
19 follows PXELINUX's rules for retrieving configuration files from a tftp
20 server, and supports a subset of PXELINUX's config file syntax.
21
22 Environment
23 -----------
24 'pxe get' requires two environment variables to be set:
25
26 pxefile_addr_r - should be set to a location in RAM large enough to hold
27 pxe files while they're being processed. Up to 16 config files may be
28 held in memory at once. The exact number and size of the files varies with
29 how the system is being used. A typical config file is a few hundred bytes
30 long.
31
32 bootfile,serverip - these two are typically set in the DHCP response
33 handler, and correspond to fields in the DHCP response.
34
35 'pxe get' optionally supports these two environment variables being set:
36
37 ethaddr - this is the standard MAC address for the ethernet adapter in use.
38 'pxe get' uses it to look for a configuration file specific to a system's
39 MAC address.
40
41 pxeuuid - this is a UUID in standard form using lower case hexadecimal
42 digits, for example, 550e8400-e29b-41d4-a716-446655440000. 'pxe get' uses
43 it to look for a configuration file based on the system's UUID.
44
45 File Paths
46 ----------
47 'pxe get' repeatedly tries to download config files until it either
48 successfully downloads one or runs out of paths to try. The order and
49 contents of paths it tries mirrors exactly that of PXELINUX - you can
50 read in more detail about it at:
51
52 http://syslinux.zytor.com/wiki/index.php/Doc/pxelinux
53
54pxe boot
55--------
56 syntax: pxe boot [pxefile_addr_r]
57
58 Interprets a pxe file stored in memory.
59
60 pxefile_addr_r is an optional argument giving the location of the pxe file.
61 The file must be terminated with a NUL byte.
62
63 Environment
64 -----------
65 There are some environment variables that may need to be set, depending
66 on conditions.
67
68 pxefile_addr_r - if the optional argument pxefile_addr_r is not supplied,
69 an environment variable named pxefile_addr_r must be supplied. This is
70 typically the same value as is used for the 'pxe get' command.
71
72 bootfile - typically set in the DHCP response handler based on the
73 same field in the DHCP respone, this path is used to generate the base
74 directory that all other paths to files retrieved by 'pxe boot' will use.
75 If no bootfile is specified, paths used in pxe files will be used as is.
76
77 serverip - typically set in the DHCP response handler, this is the IP
78 address of the tftp server from which other files will be retrieved.
79
80 kernel_addr_r, initrd_addr_r - locations in RAM at which 'pxe boot' will
81 store the kernel(or FIT image) and initrd it retrieves from tftp. These
82 locations will be passed to the bootm command to boot the kernel. These
83 environment variables are required to be set.
84
85 fdt_addr_r - location in RAM at which 'pxe boot' will store the fdt blob it
86 retrieves from tftp. The retrieval is possible if 'fdt' label is defined in
87 pxe file and 'fdt_addr_r' is set. If retrieval is possible, 'fdt_addr_r'
88 will be passed to bootm command to boot the kernel.
89
90 fdt_addr - the location of a fdt blob. 'fdt_addr' will be passed to bootm
91 command if it is set and 'fdt_addr_r' is not passed to bootm command.
92
93pxe file format
94===============
95The pxe file format is nearly a subset of the PXELINUX file format; see
96http://syslinux.zytor.com/wiki/index.php/PXELINUX. It's composed of one line
97commands - global commands, and commands specific to labels. Lines begining
98with # are treated as comments. White space between and at the beginning of
99lines is ignored.
100
101The size of pxe files and the number of labels is only limited by the amount
102of RAM available to U-Boot. Memory for labels is dynamically allocated as
103they're parsed, and memory for pxe files is statically allocated, and its
104location is given by the pxefile_addr_r environment variable. The pxe code is
105not aware of the size of the pxefile memory and will outgrow it if pxe files
106are too large.
107
108Supported global commands
109-------------------------
110Unrecognized commands are ignored.
111
112default <label> - the label named here is treated as the default and is
113 the first label 'pxe boot' attempts to boot.
114
115menu title <string> - sets a title for the menu of labels being displayed.
116
117menu include <path> - use tftp to retrieve the pxe file at <path>, which
118 is then immediately parsed as if the start of its
119 contents were the next line in the current file. nesting
120 of include up to 16 files deep is supported.
121
122prompt <flag> - if 1, always prompt the user to enter a label to boot
123 from. if 0, only prompt the user if timeout expires.
124
125timeout <num> - wait for user input for <num>/10 seconds before
126 auto-booting a node.
127
128label <name> - begin a label definition. labels continue until
129 a command not recognized as a label command is seen,
130 or EOF is reached.
131
132Supported label commands
133------------------------
134labels end when a command not recognized as a label command is reached, or EOF.
135
136menu default - set this label as the default label to boot; this is
137 the same behavior as the global default command but
138 specified in a different way
139
140kernel <path> - if this label is chosen, use tftp to retrieve the kernel
141 (or FIT image) at <path>. it will be stored at the address
142 indicated in the kernel_addr_r environment variable, and
143 that address will be passed to bootm to boot this kernel.
144
145append <string> - use <string> as the kernel command line when booting this
146 label.
147
148initrd <path> - if this label is chosen, use tftp to retrieve the initrd
149 at <path>. it will be stored at the address indicated in
150 the initrd_addr_r environment variable, and that address
151 will be passed to bootm.
152
153fdt <path> - if this label is chosen, use tftp to retrieve the fdt blob
154 at <path>. it will be stored at the address indicated in
155 the fdt_addr_r environment variable, and that address will
156 be passed to bootm.
157
158fdtdir <path> - if this label is chosen, use tftp to retrieve a fdt blob
159 relative to <path>. If the fdtfile environment variable
160 is set, <path>/<fdtfile> is retrieved. Otherwise, the
161 filename is generated from the soc and board environment
162 variables, i.e. <path>/<soc>-<board>.dtb is retrieved.
163 If the fdt command is specified, fdtdir is ignored.
164
165localboot <flag> - Run the command defined by "localcmd" in the environment.
166 <flag> is ignored and is only here to match the syntax of
167 PXELINUX config files.
168
169Example
170-------
171Here's a couple of example files to show how this works.
172
173------------/tftpboot/pxelinux.cfg/menus/base.menu-----------
174menu title Linux selections
175
176# This is the default label
177label install
178 menu label Default Install Image
179 kernel kernels/install.bin
180 append console=ttyAMA0,38400 debug earlyprintk
181 initrd initrds/uzInitrdDebInstall
182
183# Just another label
184label linux-2.6.38
185 kernel kernels/linux-2.6.38.bin
186 append root=/dev/sdb1
187
188# The locally installed kernel
189label local
190 menu label Locally installed kernel
191 append root=/dev/sdb1
192 localboot 1
193-------------------------------------------------------------
194
195------------/tftpboot/pxelinux.cfg/default-------------------
196menu include pxelinux.cfg/menus/base.menu
197timeout 500
198
199default linux-2.6.38
200-------------------------------------------------------------
201
202When a pxe client retrieves and boots the default pxe file,
203'pxe boot' will wait for user input for 5 seconds before booting
204the linux-2.6.38 label, which will cause /tftpboot/kernels/linux-2.6.38.bin
205to be downloaded, and boot with the command line "root=/dev/sdb1"
206
207Differences with PXELINUX
208=========================
209The biggest difference between U-Boot's pxe and PXELINUX is that since
210U-Boot's pxe support is written entirely in C, it can run on any platform
211with network support in U-Boot. Here are some other differences between
212PXELINUX and U-Boot's pxe support.
213
214- U-Boot's pxe does not support the PXELINUX DHCP option codes specified
215 in RFC 5071, but could be extended to do so.
216
217- when U-Boot's pxe fails to boot, it will return control to U-Boot,
218 allowing another command to run, other U-Boot command, instead of resetting
219 the machine like PXELINUX.
220
221- U-Boot's pxe doesn't rely on or provide an UNDI/PXE stack in memory, it
222 only uses U-Boot.
223
224- U-Boot's pxe doesn't provide the full menu implementation that PXELINUX
225 does, only a simple text based menu using the commands described in
226 this README. With PXELINUX, it's possible to have a graphical boot
227 menu, submenus, passwords, etc. U-Boot's pxe could be extended to support
228 a more robust menuing system like that of PXELINUX's.
229
230- U-Boot's pxe expects U-Boot uimg's as kernels. Anything that would work
231 with the 'bootm' command in U-Boot could work with the 'pxe boot' command.
232
233- U-Boot's pxe only recognizes a single file on the initrd command line. It
234 could be extended to support multiple.
235
236- in U-Boot's pxe, the localboot command doesn't necessarily cause a local
237 disk boot - it will do whatever is defined in the 'localcmd' env
238 variable. And since it doesn't support a full UNDI/PXE stack, the
239 type field is ignored.
240
241- the interactive prompt in U-Boot's pxe only allows you to choose a label
242 from the menu. If you want to boot something not listed, you can ctrl+c
243 out of 'pxe boot' and use existing U-Boot commands to accomplish it.
244
README.qemu-mips
1By Vlad Lungu vlad.lungu@windriver.com 2007-Oct-01
2----------------------------------------
3Qemu is a full system emulator. See
4
5http://www.nongnu.org/qemu/
6
7Limitations & comments
8----------------------
9Supports the "-M mips" configuration of qemu: serial,NE2000,IDE.
10Supports little and big endian as well as 32 bit and 64 bit.
11Derived from au1x00 with a lot of things cut out.
12
13Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with
14recent qemu versions. When using emulated flash, launch with
15-pflash <filename> and erase mips_bios.bin.
16
17
18Notes for the Qemu MIPS port
19----------------------------
20
21I) Example usage:
22
23Using u-boot.bin as ROM (replaces Qemu monitor):
24
2532 bit, big endian:
26# make qemu_mips
27# qemu-system-mips -M mips -bios u-boot.bin -nographic
28
2932 bit, little endian:
30# make qemu_mipsel
31# qemu-system-mipsel -M mips -bios u-boot.bin -nographic
32
3364 bit, big endian:
34# make qemu_mips64
35# qemu-system-mips64 -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic
36
3764 bit, little endian:
38# make qemu_mips64el
39# qemu-system-mips64el -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic
40
41or using u-boot.bin from emulated flash:
42
43if you use a qemu version after commit 4224
44
45create image:
46# dd of=flash bs=1k count=4k if=/dev/zero
47# dd of=flash bs=1k conv=notrunc if=u-boot.bin
48start it (see above):
49# qemu-system-mips[64][el] [-cpu MIPS64R2-generic] -M mips -pflash flash -nographic
50
512) Download kernel + initrd
52
53On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/
54you can downland
55
56#config to build the kernel
57qemu_mips_defconfig
58#patch to fix mips interrupt init on 2.6.24.y kernel
59qemu_mips_kernel.patch
60initrd.gz
61vmlinux
62vmlinux.bin
63System.map
64
654) Generate uImage
66
67# tools/mkimage -A mips -O linux -T kernel -C gzip -a 0x80010000 -e 0x80245650 -n "Linux 2.6.24.y" -d vmlinux.bin.gz uImage
68
695) Copy uImage to Flash
70# dd if=uImage bs=1k conv=notrunc seek=224 of=flash
71
726) Generate Ide Disk
73
74# dd of=ide bs=1k cout=100k if=/dev/zero
75
76# sfdisk -C 261 -d ide
77# partition table of ide
78unit: sectors
79
80 ide1 : start= 63, size= 32067, Id=83
81 ide2 : start= 32130, size= 32130, Id=83
82 ide3 : start= 64260, size= 4128705, Id=83
83 ide4 : start= 0, size= 0, Id= 0
84
857) Copy to ide
86
87# dd if=uImage bs=512 conv=notrunc seek=63 of=ide
88
898) Generate ext2 on part 2 on Copy uImage and initrd.gz
90
91# Attached as loop device ide offset = 32130 * 512
92# losetup -o 16450560 -f ide
93# Format as ext2 ( arg2 : nb blocks)
94# mke2fs /dev/loop0 16065
95# losetup -d /dev/loop0
96# Mount and copy uImage and initrd.gz to it
97# mount -o loop,offset=16450560 -t ext2 ide /mnt
98# mkdir /mnt/boot
99# cp {initrd.gz,uImage} /mnt/boot/
100# Umount it
101# umount /mnt
102
1039) Set Environment
104
105setenv rd_start 0x80800000
106setenv rd_size 2663940
107setenv kernel BFC38000
108setenv oad_addr 80500000
109setenv load_addr2 80F00000
110setenv kernel_flash BFC38000
111setenv load_addr_hello 80200000
112setenv bootargs 'root=/dev/ram0 init=/bin/sh'
113setenv load_rd_ext2 'ide res; ext2load ide 0:2 ${rd_start} /boot/initrd.gz'
114setenv load_rd_tftp 'tftp ${rd_start} /initrd.gz'
115setenv load_kernel_hda 'ide res; diskboot ${load_addr} 0:2'
116setenv load_kernel_ext2 'ide res; ext2load ide 0:2 ${load_addr} /boot/uImage'
117setenv load_kernel_tftp 'tftp ${load_addr} /qemu_mips/uImage'
118setenv boot_ext2_ext2 'run load_rd_ext2; run load_kernel_ext2; run addmisc; bootm ${load_addr}'
119setenv boot_ext2_flash 'run load_rd_ext2; run addmisc; bootm ${kernel_flash}'
120setenv boot_ext2_hda 'run load_rd_ext2; run load_kernel_hda; run addmisc; bootm ${load_addr}'
121setenv boot_ext2_tftp 'run load_rd_ext2; run load_kernel_tftp; run addmisc; bootm ${load_addr}'
122setenv boot_tftp_hda 'run load_rd_tftp; run load_kernel_hda; run addmisc; bootm ${load_addr}'
123setenv boot_tftp_ext2 'run load_rd_tftp; run load_kernel_ext2; run addmisc; bootm ${load_addr}'
124setenv boot_tftp_flash 'run load_rd_tftp; run addmisc; bootm ${kernel_flash}'
125setenv boot_tftp_tftp 'run load_rd_tftp; run load_kernel_tftp; run addmisc; bootm ${load_addr}'
126setenv load_hello_tftp 'tftp ${load_addr_hello} /examples/hello_world.bin'
127setenv go_tftp 'run load_hello_tftp; go ${load_addr_hello}'
128setenv addmisc 'setenv bootargs ${bootargs} console=ttyS0,${baudrate} rd_start=${rd_start} rd_size=${rd_size} ethaddr=${ethaddr}'
129setenv bootcmd 'run boot_tftp_flash'
130
13110) Now you can boot from flash, ide, ide+ext2 and tfp
132
133# qemu-system-mips -M mips -pflash flash -monitor null -nographic -net nic -net user -tftp `pwd` -hda ide
134
135II) How to debug U-Boot
136
137In order to debug U-Boot you need to start qemu with gdb server support (-s)
138and waiting the connection to start the CPU (-S)
139
140# qemu-system-mips -S -s -M mips -pflash flash -monitor null -nographic -net nic -net user -tftp `pwd` -hda ide
141
142in an other console you start gdb
143
1441) Debugging of U-Boot Before Relocation
145
146Before relocation, the addresses in the ELF file can be used without any problems
147by connecting to the gdb server localhost:1234
148
149# mipsel-unknown-linux-gnu-gdb u-boot
150GNU gdb 6.6
151Copyright (C) 2006 Free Software Foundation, Inc.
152GDB is free software, covered by the GNU General Public License, and you are
153welcome to change it and/or distribute copies of it under certain conditions.
154Type "show copying" to see the conditions.
155There is absolutely no warranty for GDB. Type "show warranty" for details.
156This GDB was configured as "--host=i486-linux-gnu --target=mipsel-unknown-linux-gnu"...
157(gdb) target remote localhost:1234
158Remote debugging using localhost:1234
159_start () at start.S:64
16064 RVECENT(reset,0) /* U-Boot entry point */
161Current language: auto; currently asm
162(gdb) b board.c:289
163Breakpoint 1 at 0xbfc00cc8: file board.c, line 289.
164(gdb) c
165Continuing.
166
167Breakpoint 1, board_init_f (bootflag=<value optimized out>) at board.c:290
168290 relocate_code (addr_sp, id, addr);
169Current language: auto; currently c
170(gdb) p/x addr
171$1 = 0x87fa0000
172
1732) Debugging of U-Boot After Relocation
174
175For debugging U-Boot after relocation we need to know the address to which
176U-Boot relocates itself to 0x87fa0000 by default.
177And replace the symbol table to this offset.
178
179(gdb) symbol-file
180Discard symbol table from `/private/u-boot-arm/u-boot'? (y or n) y
181Error in re-setting breakpoint 1:
182No symbol table is loaded. Use the "file" command.
183No symbol file now.
184(gdb) add-symbol-file u-boot 0x87fa0000
185add symbol table from file "u-boot" at
186 .text_addr = 0x87fa0000
187(y or n) y
188Reading symbols from /private/u-boot-arm/u-boot...done.
189Breakpoint 1 at 0x87fa0cc8: file board.c, line 289.
190(gdb) c
191Continuing.
192
193Program received signal SIGINT, Interrupt.
1940xffffffff87fa0de4 in udelay (usec=<value optimized out>) at time.c:78
19578 while ((tmo - read_c0_count()) < 0x7fffffff)
196
README.ramboot-ppc85xx
1 RAMBOOT for MPC85xx Platforms
2 ==============================
3
4RAMBOOT literally means boot from DDR. But since DDR is volatile memory some
5pre-mechanism is required to load the DDR with the bootloader binary.
6- In case of SD and SPI boot this is done by BootROM code inside the chip
7 itself.
8- In case of NAND boot FCM supports loading initial 4K code from NAND flash
9 which can initialize the DDR and get the complete bootloader copied to DDR.
10
11In addition to the above there could be some more methods to initialize the DDR
12and load it manually.
13Two of them are described below.There is also an explanation as to where these
14methods could be handy.
151. Load the RAM based bootloader onto DDR via JTAG/BDI interface. And then
16 execute the bootloader from DDR.
17 This may be handy in the following cases:
18 - In very early stage of platform bringup where other boot options are not
19 functional because of various reasons.
20 - In case the support to program the flashes on the board is not available.
21
222. Load the RAM based bootloader onto DDR using already existing bootloader on
23 the board.And then execute the bootloader from DDR.
24 Some usecases where this may be used:
25 - While developing some new feature of u-boot, for example USB driver or
26 SPI driver.
27 Suppose the board already has a working bootloader on it. And you would
28 prefer to keep it intact, at the same time want to test your bootloader.
29 In this case you can get your test bootloader binary into DDR via tftp
30 for example. Then execute the test bootloader.
31 - Suppose a platform already has a propreitery bootloader which does not
32 support for example AMP boot. In this case also RAM boot loader can be
33 utilized.
34
35 So basically when the original bootloader is required to be kept intact
36 RAM based bootloader can offer an updated bootloader on the system.
37
38Both the above Bootloaders are slight variants of SDcard or SPI Flash
39bootloader or for that matter even NAND bootloader.
40All of them define CONFIG_SYS_RAMBOOT.
41The main difference among all of them is the way the pre-environment is getting
42configured and who is doing that.
43- In case of SD card and SPI flash bootloader this is done by On Chip BootROM inside the Si itself.
44- In case of NAND boot SPL/TPL code does it with some support from Si itself.
45- In case of the pure RAM based bootloaders we have to do it by JTAG manually or already existing bootloader.
46
47How to use them:
481. Using JTAG
49 Boot up in core hold off mode or stop the core after reset using JTAG
50 interface.
51 Preconfigure DDR/L2SRAM through JTAG interface.
52 - setup DDR controller registers.
53 - setup DDR LAWs
54 - setup DDR TLB
55 Load the RAM based boot loader to the proper location in DDR/L2SRAM.
56 set up IAR (Instruction counter properly)
57 Enable the core to execute.
58
592. Using already existing bootloader.
60 get the rambased boot loader binary into DDR/L2SRAM via tftp.
61 execute the RAM based bootloader.
62 => tftp 11000000 u-boot-ram.bin
63 => go 1107f000
64
65Please note that L2SRAM can also be used instead of DDR if the SOC has
66sufficient size of L2SRAM.
67
68Necessary Code changes Required:
69=====================================
70Please note that below mentioned changes are for 85xx platforms.
71They have been tested on P1020/P2020/P1010 RDB.
72
73The main difference between the above two methods from technical perspective is
74that in 1st case SOC is just out of reset so it is in default configuration.
75(CCSRBAR is at 0xff700000).
76In the 2nd case bootloader has already re-located CCSRBAR to 0xffe00000
77
781. File name-> boards.cfg
79 There can be added specific Make options for RAMBoot. We can keep different
80 options for the two cases mentioned above.
81 for example
82 P1020RDB_JTAG_RAMBOOT and P1020RDB_GO_RAMBOOT.
83
842. platform config file
85 for example include/configs/P1_P2_RDB.h
86
87 #ifdef CONFIG_RAMBOOT
88 #define CONFIG_SDCARD
89 #endif
90
91 This will finally use the CONFIG_SYS_RAMBOOT.
92
933. Change CONFIG_SYS_CCSRBAR_DEFAULT in menuconfig accordingly.
94 In the section of the particular SOC, for example P1020, pseudo code
95
96 #if defined(CONFIG_GO)
97 #define CONFIG_SYS_CCSRBAR_DEFAULT 0xffe00000
98 #else
99 #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000
100 #endif
101
102For JTAG RAMBOOT this is not required because CCSRBAR is at ff700000.
103
README.rknand
1rknand (Rockchip NAND FLASH drivers with FTL)
2=====================================================
3
4Overview
5--------
6
7The rknand is used for Rockchip Soc NAND FLASH devices.
8
9Status
10------
11It supprot SLC and MLC NAND Flash with fully FTL.
12
13Usage in U-Boot
14---------------
15
16To list all of the rknand hard disks, try:
17
18 => rknand info
19 Device 0: Vendor: 0x2207 Rev: V1.00 Prod: rknand
20 Type: Hard Disk
21 Capacity: 7304.0 MB = 7.1 GB (14958592 x 512)
22
23To find and initialize nand devices, try:
24 => rknand dev 0
25 Device 0: Vendor: 0x2207 Rev: V1.00 Prod: rknand
26 Type: Hard Disk
27 Capacity: 7304.0 MB = 7.1 GB (14958592 x 512)
28... is now current device
29
README.rksfc
1rksfc (Rockchip SPI FLASH SFC drivers)
2=====================================================
3
4Overview
5--------
6
7The rksfc is used for Rockchip Soc sfc devices with
8block interface.
9
10Status
11------
12It supprot SFC SPI NOR.
13
14Usage in U-Boot
15---------------
16
17To list all of the rksfc hard disks, try:
18
19 => rksfc info
20 Device 0: Vendor: 0x0308 Rev: V1.00 Prod: rksfc
21 Type: Hard Disk
22 Capacity: 32.0 MB = 0.0 GB (65600 x 512)
23
24To find and initialize sfc devices, try:
25 => rksfc dev 0
26 Device 0: Vendor: 0x0308 Rev: V1.00 Prod: rksfc
27 Type: Hard Disk
28 Capacity: 32.0 MB = 0.0 GB (65600 x 512)
29... is now current device
30
README.rmobile
README.rockchip
1#
2# Copyright (C) 2015 Google. Inc
3# Written by Simon Glass <sjg@chromium.org>
4#
5# SPDX-License-Identifier: GPL-2.0+
6#
7
8U-Boot on Rockchip
9==================
10
11There are several repositories available with versions of U-Boot that support
12many Rockchip devices [1] [2].
13
14The current mainline support is experimental only and is not useful for
15anything. It should provide a base on which to build.
16
17So far only support for the RK3288 and RK3036 is provided.
18
19
20Prerequisites
21=============
22
23You will need:
24
25 - Firefly RK3288 board or something else with a supported RockChip SoC
26 - Power connection to 5V using the supplied micro-USB power cable
27 - Separate USB serial cable attached to your computer and the Firefly
28 (connect to the micro-USB connector below the logo)
29 - rkflashtool [3]
30 - openssl (sudo apt-get install openssl)
31 - Serial UART connection [4]
32 - Suitable ARM cross compiler, e.g.:
33 sudo apt-get install gcc-4.7-arm-linux-gnueabi
34
35
36Building
37========
38
39At present nine RK3288 boards are supported:
40
41 - EVB RK3288 - use evb-rk3288 configuration
42 - Fennec RK3288 - use fennec-rk3288 configuration
43 - Firefly RK3288 - use firefly-rk3288 configuration
44 - Hisense Chromebook - use chromebook_jerry configuration
45 - MiQi RK3288 - use miqi-rk3288 configuration
46 - phyCORE-RK3288 RDK - use phycore-rk3288 configuration
47 - PopMetal RK3288 - use popmetal-rk3288 configuration
48 - Radxa Rock 2 - use rock2 configuration
49 - Tinker RK3288 - use tinker-rk3288 configuration
50
51Two RK3036 board are supported:
52
53 - EVB RK3036 - use evb-rk3036 configuration
54 - Kylin - use kylin_rk3036 configuration
55
56For example:
57
58 CROSS_COMPILE=arm-linux-gnueabi- make O=firefly firefly-rk3288_defconfig all
59
60(or you can use another cross compiler if you prefer)
61
62
63Writing to the board with USB
64=============================
65
66For USB to work you must get your board into ROM boot mode, either by erasing
67your MMC or (perhaps) holding the recovery button when you boot the board.
68To erase your MMC, you can boot into Linux and type (as root)
69
70 dd if=/dev/zero of=/dev/mmcblk0 bs=1M
71
72Connect your board's OTG port to your computer.
73
74To create a suitable image and write it to the board:
75
76 ./firefly-rk3288/tools/mkimage -n rk3288 -T rkimage -d \
77 ./firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
78 cat out | openssl rc4 -K 7c4e0304550509072d2c7b38170d1711 | rkflashtool l
79
80If all goes well you should something like:
81
82 U-Boot SPL 2015.07-rc1-00383-ge345740-dirty (Jun 03 2015 - 10:06:49)
83 Card did not respond to voltage select!
84 spl: mmc init failed with error: -17
85 ### ERROR ### Please RESET the board ###
86
87You will need to reset the board before each time you try. Yes, that's all
88it does so far. If support for the Rockchip USB protocol or DFU were added
89in SPL then we could in principle load U-Boot and boot to a prompt from USB
90as several other platforms do. However it does not seem to be possible to
91use the existing boot ROM code from SPL.
92
93
94Booting from an SD card
95=======================
96
97To write an image that boots from an SD card (assumed to be /dev/sdc):
98
99 ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \
100 firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
101 sudo dd if=out of=/dev/sdc seek=64 && \
102 sudo dd if=firefly-rk3288/u-boot-dtb.img of=/dev/sdc seek=16384
103
104This puts the Rockchip header and SPL image first and then places the U-Boot
105image at block 16384 (i.e. 8MB from the start of the SD card). This
106corresponds with this setting in U-Boot:
107
108 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x4000
109
110Put this SD (or micro-SD) card into your board and reset it. You should see
111something like:
112
113 U-Boot 2016.01-rc2-00309-ge5bad3b-dirty (Jan 02 2016 - 23:41:59 -0700)
114
115 Model: Radxa Rock 2 Square
116 DRAM: 2 GiB
117 MMC: dwmmc@ff0f0000: 0, dwmmc@ff0c0000: 1
118 *** Warning - bad CRC, using default environment
119
120 In: serial
121 Out: vop@ff940000.vidconsole
122 Err: serial
123 Net: Net Initialization Skipped
124 No ethernet found.
125 Hit any key to stop autoboot: 0
126 =>
127
128The rockchip bootrom can load and boot an initial spl, then continue to
129load a second-level bootloader(ie. U-BOOT) as soon as it returns to bootrom.
130Therefore RK3288 has another loading sequence like RK3036. The option of
131U-Boot is controlled with this setting in U-Boot:
132
133 #define CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
134
135You can create the image via the following operations:
136
137 ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \
138 firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
139 cat firefly-rk3288/u-boot-dtb.bin >> out && \
140 sudo dd if=out of=/dev/sdc seek=64
141
142If you have an HDMI cable attached you should see a video console.
143
144For evb_rk3036 board:
145 ./evb-rk3036/tools/mkimage -n rk3036 -T rksd -d evb-rk3036/spl/u-boot-spl.bin out && \
146 cat evb-rk3036/u-boot-dtb.bin >> out && \
147 sudo dd if=out of=/dev/sdc seek=64
148
149Note: rk3036 SDMMC and debug uart use the same iomux, so if you boot from SD, the
150 debug uart must be disabled
151
152
153Booting from an SD card on RK3288 with TPL
154==========================================
155
156Since the size of SPL can't be exceeded 0x8000 bytes in RK3288, it is not possible add
157new SPL features like Falcon mode or etc.
158
159So introduce TPL so-that adding new features to SPL is possible because now TPL should
160run minimal with code like DDR, clock etc and rest of new features in SPL.
161
162As of now TPL is added on Vyasa-RK3288 board.
163
164To write an image that boots from an SD card (assumed to be /dev/mmcblk0):
165
166 ./tools/mkimage -n rk3288 -T rksd -d ./tpl/u-boot-tpl.bin out &&
167 cat ./spl/u-boot-spl-dtb.bin >> out &&
168 sudo dd if=out of=/dev/mmcblk0 seek=64 &&
169 sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 seek=16384
170
171Booting from an SD card on RK3188
172=================================
173
174For rk3188 boards the general storage onto the card stays the same as
175described above, but the image creation needs a bit more care.
176
177The bootrom of rk3188 expects to find a small 1kb loader which returns
178control to the bootrom, after which it will load the real loader, which
179can then be up to 29kb in size and does the regular ddr init. This is
180handled by a single image (built as the SPL stage) that tests whether
181it is handled for the first or second time via code executed from the
182boot0-hook.
183
184Additionally the rk3188 requires everything the bootrom loads to be
185rc4-encrypted. Except for the very first stage the bootrom always reads
186and decodes 2kb pages, so files should be sized accordingly.
187
188# copy tpl, pad to 1020 bytes and append spl
189tools/mkimage -n rk3188 -T rksd -d spl/u-boot-spl.bin out
190
191# truncate, encode and append u-boot.bin
192truncate -s %2048 u-boot.bin
193cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out
194
195
196Using fastboot on rk3288
197========================
198- Write GPT partition layout to mmc device which fastboot want to use it to
199store the image
200
201 => gpt write mmc 1 $partitions
202
203- Invoke fastboot command to prepare
204
205 => fastboot 1
206
207- Start fastboot request on PC
208
209 fastboot -i 0x2207 flash loader evb-rk3288/spl/u-boot-spl-dtb.bin
210
211You should see something like:
212
213 => fastboot 1
214 WARNING: unknown variable: partition-type:loader
215 Starting download of 357796 bytes
216 ..
217 downloading of 357796 bytes finished
218 Flashing Raw Image
219 ........ wrote 357888 bytes to 'loader'
220
221Booting from SPI
222================
223
224To write an image that boots from SPI flash (e.g. for the Haier Chromebook):
225
226 ./chromebook_jerry/tools/mkimage -n rk3288 -T rkspi \
227 -d chromebook_jerry/spl/u-boot-spl-dtb.bin spl.bin && \
228 dd if=spl.bin of=spl-out.bin bs=128K conv=sync && \
229 cat spl-out.bin chromebook_jerry/u-boot-dtb.img >out.bin && \
230 dd if=out.bin of=out.bin.pad bs=4M conv=sync
231
232This converts the SPL image to the required SPI format by adding the Rockchip
233header and skipping every 2KB block. Then the U-Boot image is written at
234offset 128KB and the whole image is padded to 4MB which is the SPI flash size.
235The position of U-Boot is controlled with this setting in U-Boot:
236
237 #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
238
239If you have a Dediprog em100pro connected then you can write the image with:
240
241 sudo em100 -s -c GD25LQ32 -d out.bin.pad -r
242
243When booting you should see something like:
244
245 U-Boot SPL 2015.07-rc2-00215-g9a58220-dirty (Jun 23 2015 - 12:11:32)
246
247
248 U-Boot 2015.07-rc2-00215-g9a58220-dirty (Jun 23 2015 - 12:11:32 -0600)
249
250 Model: Google Jerry
251 DRAM: 2 GiB
252 MMC:
253 Using default environment
254
255 In: serial@ff690000
256 Out: serial@ff690000
257 Err: serial@ff690000
258 =>
259
260Future work
261===========
262
263Immediate priorities are:
264
265- USB host
266- USB device
267- Run CPU at full speed (code exists but we only see ~60 DMIPS maximum)
268- NAND flash
269- Support for other Rockchip parts
270- Boot U-Boot proper over USB OTG (at present only SPL works)
271
272
273Development Notes
274=================
275
276There are plenty of patches in the links below to help with this work.
277
278[1] https://github.com/rkchrome/uboot.git
279[2] https://github.com/linux-rockchip/u-boot-rockchip.git branch u-boot-rk3288
280[3] https://github.com/linux-rockchip/rkflashtool.git
281[4] http://wiki.t-firefly.com/index.php/Firefly-RK3288/Serial_debug/en
282
283rkimage
284-------
285
286rkimage.c produces an SPL image suitable for sending directly to the boot ROM
287over USB OTG. This is a very simple format - just the string RK32 (as 4 bytes)
288followed by u-boot-spl-dtb.bin.
289
290The boot ROM loads image to 0xff704000 which is in the internal SRAM. The SRAM
291starts at 0xff700000 and extends to 0xff718000 where we put the stack.
292
293rksd
294----
295
296rksd.c produces an image consisting of 32KB of empty space, a header and
297u-boot-spl-dtb.bin. The header is defined by 'struct header0_info' although
298most of the fields are unused by U-Boot. We just need to specify the
299signature, a flag and the block offset and size of the SPL image.
300
301The header occupies a single block but we pad it out to 4 blocks. The header
302is encoding using RC4 with the key 7c4e0304550509072d2c7b38170d1711. The SPL
303image can be encoded too but we don't do that.
304
305The maximum size of u-boot-spl-dtb.bin which the boot ROM will read is 32KB,
306or 0x40 blocks. This is a severe and annoying limitation. There may be a way
307around this limitation, since there is plenty of SRAM, but at present the
308board refuses to boot if this limit is exceeded.
309
310The image produced is padded up to a block boundary (512 bytes). It should be
311written to the start of an SD card using dd.
312
313Since this image is set to load U-Boot from the SD card at block offset,
314CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR, dd should be used to write
315u-boot-dtb.img to the SD card at that offset. See above for instructions.
316
317rkspi
318-----
319
320rkspi.c produces an image consisting of a header and u-boot-spl-dtb.bin. The
321resulting image is then spread out so that only the first 2KB of each 4KB
322sector is used. The header is the same as with rksd and the maximum size is
323also 32KB (before spreading). The image should be written to the start of
324SPI flash.
325
326See above for instructions on how to write a SPI image.
327
328rkmux.py
329--------
330
331You can use this script to create #defines for SoC register access. See the
332script for usage.
333
334
335Device tree and driver model
336----------------------------
337
338Where possible driver model is used to provide a structure to the
339functionality. Device tree is used for configuration. However these have an
340overhead and in SPL with a 32KB size limit some shortcuts have been taken.
341In general all Rockchip drivers should use these features, with SPL-specific
342modifications where required.
343
344GPT partition layout
345----------------------------
346
347Rockchip use a unified GPT partition layout in open source support.
348With this GPT partition layout, uboot can be compatilbe with other components,
349like miniloader, trusted-os, arm-trust-firmware.
350
351There are some documents about partitions in the links below.
352http://rockchip.wikidot.com/partitions
353
354--
355Simon Glass <sjg@chromium.org>
35624 June 2015
357
README.rockusb
1Rockusb (Rockchip USB protocol)
2=====================================================
3
4Overview
5--------
6
7Rockusb protocol is widely used by Rockchip SoC based devices. It can
8read/write info, image to/from devices. This document briefly describes how to
9use Rockusb for upgrading firmware (e.g. kernel, u-boot, rootfs, etc.).
10
11Tools
12--------
13There are many tools can support Rockusb protocol. rkdeveloptool
14(https://github.com/rockchip-linux/rkdeveloptool) is open source,
15It is maintained by Rockchip. People don't want to build from source
16can download from here
17(https://github.com/rockchip-linux/rkbin/blob/master/tools/rkdeveloptool)
18
19Usage
20--------
21The Usage of Rockusb command is:
22
23rockusb <USB_controller> <devtype> <dev[:part]>
24
25e.g. rockusb 0 mmc 0
26
27On your U-Boot console, type this command to enter rockusb mode.
28On your host PC. use lsusb command. you should see a usb device
29using 0x2207 as its USB verdor id.
30
31for more detail about the rkdeveloptool. please read the usage.
32
33rkdeveloptool -h
34
35use rkdeveloptool wl command to write lba. BeginSec is the lba on device
36you want to write.
37
38sudo rkdeveloptool wl <BeginSec> <File>
39
40to flash U-Boot image use below command. U-Boot binary is made by mkimage.
41see doc/README.rockchip for more detail about how to get U-Boot binary.
42
43sudo rkdeveloptool wl 64 <U-Boot binary>
44
45There are plenty of Rockusb command. but wl(write lba) and
46rd(reboot) command. These two command can let people flash
47image to device.
48
49To do
50-----
51* Fully support Rockusb protocol
52
README.s5pc1xx
1
2Summary
3=======
4
5This README is about U-Boot support for SAMSUNG's ARM Cortex-A8 based S5PC1xx
6family of SoCs (S5PC100 [1] and S5PC110).
7
8Currently the following board is supported:
9
10* SMDKC100 [2]
11
12Toolchain
13=========
14
15While ARM Cortex-A8 support ARM v7 instruction set (-march=armv7a) we compile
16with -march=armv5 to allow more compilers to work. For U-Boot code this has
17no performance impact.
18
19Build
20=====
21
22* SMDKC100
23
24make smdkc100_config
25make
26
27
28Interfaces
29==========
30
31cpu
32
33To check SoC:
34
35 if (cpu_is_s5pc100())
36 printf("cpu is s5pc100\n");
37
38 or
39
40 if (cpu_is_s5pc110())
41 printf("cpu is s5pc110\n");
42
43gpio
44
45 struct s5pc100_gpio *gpio = (struct s5pc100_gpio*)S5PC100_GPIO_BASE;
46
47 /* GPA[0] pin set to irq */
48 gpio_cfg_pin(&gpio->gpio_a, 0, GPIO_IRQ);
49
50 /* GPA[0] pin set to input */
51 gpio_direction_input(&gpio->gpio_a, 0);
52
53 /* GPA[0] pin set to output/high */
54 gpio_direction_output(&gpio->gpio_a, 0, 1);
55
56 /* GPA[0] value set to low */
57 gpio_set_value(&gpio->gpio_a, 0, 0);
58
59 /* get GPA[0] value */
60 value = gpio_get_value(&gpio->gpio_a, 0);
61
62Links
63=====
64
65[1] S5PC100:
66
67http://www.samsung.com/global/business/semiconductor/productInfo.do?
68fmly_id=229&partnum=S5PC100
69
70[2] SMDKC100:
71
72http://meritech.co.kr/eng/products/product_view.php?num=28
73
README.sata
11. SATA usage in U-Boot
2
3 There are two ways to operate the hard disk
4
5 * Read/write raw blocks from/to SATA hard disk
6 * ext2load to read a file from ext2 file system
7
81.0 How to read the SATA hard disk's information?
9
10 => sata info
11
12SATA device 0: Model: ST3320620AS Firm: 3.AAD Ser#: 4QF01ZTN
13 Type: Hard Disk
14 Supports 48-bit addressing
15 Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
16
171.1 How to raw write the kernel, file system, dtb to a SATA hard disk?
18
19 Notes: Hard disk sectors are normally 512 bytes, so
20 0x1000 sectors = 2 MBytes
21
22 write kernel
23 => tftp 40000 /tftpboot/uImage.837x
24 => sata write 40000 0 2000
25
26 write ramdisk
27 => tftp 40000 /tftpboot/ramdisk.837x
28 => sata write 40000 2000 8000
29
30 write dtb
31 => tftp 40000 /tftpboot/mpc837xemds.dtb
32 => sata write 40000 a000 1000
33
341.2 How to raw read the kernel, file system, dtb from a SATA hard disk?
35
36 load kernel
37 => sata read 200000 0 2000
38
39 load ramdisk
40 => sata read 1000000 2000 8000
41
42 load dtb
43 => sata read 2000000 a000 1000
44
45 boot
46 => bootm 200000 1000000 2000000
47
481.3 How to load an image from an ext2 file system in U-Boot?
49
50 U-Boot doesn't support writing to an ext2 file system, so the
51 files must be written by other means (e.g. linux).
52
53 => ext2ls sata 0:1 /
54 <DIR> 4096 .
55 <DIR> 4096 ..
56 <DIR> 16384 lost+found
57 1352023 uImage.837x
58 3646377 ramdisk.837x
59 12288 mpc837xemds.dtb
60 12 hello.txt
61
62 => ext2load sata 0:1 200000 /uImage.837x
63
64 => ext2load sata 0:1 1000000 /ramdisk.837x
65
66 => ext2load sata 0:1 2000000 /mpc837xemds.dtb
67
68 => bootm 200000 1000000 2000000
69
README.sched
1Notes on the scheduler in sched.c:
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4 'sched.c' provides an very simplistic multi-threading scheduler.
5 See the example, function 'sched(...)', in the same file for its
6 API usage.
7
8 Until an exhaustive testing can be done, the implementation cannot
9 qualify as that of production quality. It works with the example
10 in 'sched.c', it may or may not work in other cases.
11
12
13Limitations:
14~~~~~~~~~~~~
15
16 - There are NO primitives for thread synchronization (locking,
17 notify etc).
18
19 - Only the GPRs and FPRs context is saved during a thread context
20 switch. Other registers on the PowerPC processor (60x, 7xx, 7xxx
21 etc) are NOT saved.
22
23 - The scheduler is NOT transparent to the user. The user
24 applications must invoke thread_yield() to allow other threads to
25 scheduler.
26
27 - There are NO priorities, and the scheduling policy is round-robin
28 based.
29
30 - There are NO capabilities to collect thread CPU usage, scheduler
31 stats, thread status etc.
32
33 - The semantics are somewhat based on those of pthreads, but NOT
34 the same.
35
36 - Only seven threads are allowed. These can be easily increased by
37 changing "#define MAX_THREADS" depending on the available memory.
38
39 - The stack size of each thread is 8KBytes. This can be easily
40 increased depending on the requirement and the available memory,
41 by increasing "#define STK_SIZE".
42
43 - Only one master/parent thread is allowed, and it cannot be
44 stopped or deleted. Any given thread is NOT allowed to stop or
45 delete itself.
46
47 - There NOT enough safety checks as are probably in the other
48 threads implementations.
49
50 - There is no parent-child relationship between threads. Only one
51 thread may thread_join, preferably the master/parent thread.
52
53(C) 2003 Arun Dharankar <ADharankar@ATTBI.Com>
54
README.scrapyard
1Over time, support for more and more boards gets added to U-Boot -
2while other board support code dies a silent death caused by
3negligence in combination with ordinary bitrot. Sometimes this goes
4by unnoticed, but often build errors will result. If nobody cares any
5more to resolve such problems, then the code is really dead and will
6be removed from the U-Boot source tree. The remainders rest in peace
7in the imperishable depths of the git history. This document tries to
8maintain a list of such former fellows, so archaeologists can check
9easily if there is something they might want to dig for...
10The list should be sorted in reverse chronological order.
11
12
13Board Arch CPU Commit Removed Last known maintainer/contact
14=================================================================================================
15ocotea powerpc ppc4xx 29155e73 2015-10-27 Stefan Roese <sr@denx.de>
16taishan powerpc ppc4xx bb5553c6 2015-10-27 Stefan Roese <sr@denx.de>
17ebony powerpc ppc4xx 9d9e2f5d 2015-10-27 Stefan Roese <sr@denx.de>
18taihu powerpc ppc4xx 123b6cd7 2015-10-27 John Otken <jotken@softadvances.com>
19lcd4_lwmon5 powerpc ppc4xx b6b5e394 2015-10-02 Stefan Roese <sr@denx.de>
20da830evm arm arm926ejs d7e8b2b9 2015-09-12 Nick Thompson <nick.thompson@gefanuc.com>
21wireless_space arm arm926ejs b352182a 2015-09-12 Albert ARIBAUD <albert.u.boot@aribaud.net>
22stxgp3 powerpc mpc85xx 2ec69b88 2015-09-02 Dan Malek <dan@embeddedalley.com>
23stxssa powerpc mpc85xx 2ec69b88 2015-09-02 Dan Malek <dan@embeddedalley.com>
24cmi_mpc5xx powerpc mpc5xx 972f5320 2015-09-02
25zeus powerpc ppc4xx eb5d1dc7 2015-09-02 Stefan Roese <sr@denx.de>
26sbc405 powerpc ppc4xx 0e030593 2015-09-02
27pcs440ep powerpc ppc4xx 242836a8 2015-09-02 Stefan Roese <sr@denx.de>
28p3p440 powerpc ppc4xx c6999e5f 2015-09-02 Stefan Roese <sr@denx.de>
29csb272/csb472 powerpc ppc4xx 54a3f260 2015-09-02 Tolunay Orkun <torkun@nextio.com>
30alpr powerpc ppc4xx 0d2fc811 2015-09-02 Stefan Roese <sr@denx.de>
31balloon3 arm pxa 679d4456 2015-08-30 Marek Vasut <marex@denx.de>
32cpu9260_128M arm arm926ejs af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
33cpu9260 arm arm926ejs af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
34cpu9260_nand_128M arm arm926ejs af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
35cpu9260_nand arm arm926ejs af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
36cpu9G20_128M arm arm926ejs af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
37cpu9G20 arm arm926ejs af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
38cpuat91 arm arm920t af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
39cpuat91_ram arm arm920t af7f884b 2015-08-30 Eric Benard <eric@eukrea.com>
40davinci_dm355evm arm arm926ejs 6761946f 2015-08-30
41davinci_dm355leopard arm arm926ejs 6761946f 2015-08-30
42davinci_dm365evm arm arm926ejs 6761946f 2015-08-30
43davinci_dm6467evm arm arm926ejs 6761946f 2015-08-30
44davinci_dm6467Tevm arm arm926ejs 6761946f 2015-08-30
45davinci_dvevm arm arm926ejs 6761946f 2015-08-30
46davinci_schmoogie arm arm926ejs 6761946f 2015-08-30
47davinci_sffsdr arm arm926ejs 6761946f 2015-08-30
48davinci_sonata arm arm926ejs 6761946f 2015-08-30
49dig297 arm armv7 5ff33d04 2015-08-30 Luca Ceresoli <luca.ceresoli@comelit.it>
50ea20 arm arm926ejs 6761946f 2015-08-30
51eb_cpux9k2 arm arm920t 5522f12b 2015-08-30 Jens Scharsig <esw@bus-elektronik.de>
52eb_cpux9k2_ram arm arm920t 5522f12b 2015-08-30 Jens Scharsig <esw@bus-elektronik.de>
53enbw_cmc arm arm926ejs a6f7f787 2015-08-30 Heiko Schocher <hs@denx.de>
54ima3-mx53 arm armv7 3eb8f58d 2015-08-30
55imx27lite arm arm926ejs bc0840bc 2015-08-30 Wolfgang Denk <wd@denx.de>
56imx31_litekit arm arm1136 36d14178 2015-08-30
57jornada arm sa1100 df0b116d 2015-08-30 Kristoffer Ericson <kristoffer.ericson@gmail.com>
58lp8x4x arm pxa 9f840b8d 2015-08-30 Sergey Yanovich <ynvich@gmail.com>
59magnesium arm arm926ejs bc0840bc 2015-08-30 Heiko Schocher <hs@denx.de>
60mv88f6281gtw_ge arm arm926ejs 7cd768cf 2015-08-30 Prafulla Wadaskar <prafulla@marvell.com>
61mx51_efikamx arm armv7 b6073fd2 2015-08-30
62mx51_efikasb arm armv7 b6073fd2 2015-08-30
63nhk8815 arm arm926ejs 0abdd9d0 2015-08-30 Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
64nhk8815_onenand arm arm926ejs 0abdd9d0 2015-08-30 Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
65omap3_mvblx arm armv7 8dc372f9 2015-08-30 Michael Jones <michael.jones@matrix-vision.de>
66omap3_sdp3430 arm armv7 93b25c08 2015-08-30 Nishanth Menon <nm@ti.com>
67otc570 arm arm926ejs 819216dd 2015-08-30 Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
68otc570_dataflash arm arm926ejs 819216dd 2015-08-30 Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
69palmld arm pxa 35782e9c 2015-08-30 Marek Vasut <marex@denx.de>
70palmtc arm pxa 8896325d 2015-08-30 Marek Vasut <marex@denx.de>
71palmtreo680 arm pxa ad4f54ea 2015-08-30 Mike Dunn <mikedunn@newsguy.com>
72polaris arm pxa f6eac00a 2015-08-30 Stefano Babic <sbabic@denx.de>
73portuxg20 arm arm926ejs 79d19734 2015-08-30 Markus Hubig <mhubig@imko.de>
74pxa255_idp arm pxa 49d8899b 2015-08-30 Marek Vasut <marex@denx.de>
75qong arm arm1136 daf77086 2015-08-30 Wolfgang Denk <wd@denx.de>
76rd6281a arm arm926ejs 47b87d2e 2015-08-30 Prafulla Wadaskar <prafulla@marvell.com>
77scb9328 arm arm920t 7650beb7 2015-08-30 Torsten Koschorrek <koschorrek@synertronixx.de>
78snowball arm armv7 7495e41b 2015-08-30 Mathieu Poirier <mathieu.poirier@linaro.org>
79stamp9g20 arm arm926ejs 79d19734 2015-08-30 Markus Hubig <mhubig@imko.de>
80tk71 arm arm926ejs f73db66d 2015-08-30
81trizepsiv arm pxa f6eac00a 2015-08-30 Stefano Babic <sbabic@denx.de>
82tt01 arm arm1136 0c81f37d 2015-08-30 Helmut Raiger <helmut.raiger@hale.at>
83tx25 arm arm926ejs b9599dd8 2015-08-30 John Rigby <jcrigby@gmail.com>
84u8500_href arm armv7 7495e41b 2015-08-30
85versatileab arm arm926ejs b928e658 2015-08-30
86versatilepb arm arm926ejs b928e658 2015-08-30
87versatileqemu arm arm926ejs b928e658 2015-08-30
88vision2 arm armv7 bee2b99d 2015-08-30 Stefano Babic <sbabic@denx.de>
89vl_ma2sc arm arm926ejs 6e830dfc 2015-08-30 Jens Scharsig <esw@bus-elektronik.de>
90vl_ma2sc_ram arm arm926ejs 6e830dfc 2015-08-30 Jens Scharsig <esw@bus-elektronik.de>
91vpac270_nor_128 arm pxa 452ef830 2015-08-30 Marek Vasut <marex@denx.de>
92vpac270_nor_256 arm pxa 452ef830 2015-08-30 Marek Vasut <marex@denx.de>
93vpac270_ond_256 arm pxa 452ef830 2015-08-30 Marek Vasut <marex@denx.de>
94xaeniax arm pxa 1c87dd76 2015-08-30
95zipitz2 arm pxa 49d8899b 2015-08-30 Cliff Brake <cliff.brake@gmail.com>
96cam_enc_4xx arm arm926ejs 8d775763 2015-08-20 Heiko Schocher <hs@denx.de>
97afeb9260 arm arm926ejs f6b42c14 2015-05-13 Sergey Lapin <slapin@ossfans.org>
98tny_a9260 arm arm926ejs f6b42c14 2015-05-13 Albin Tonnerre <albin.tonnerre@free-electrons.com>
99sbc35_a9g20 arm arm926ejs f6b42c14 2015-05-13 Albin Tonnerre <albin.tonnerre@free-electrons.com>
100sc3 powerpc ppc4xx 27e72156 2015-05-10 Heiko Schocher <hs@denx.de>
101T4240EMU powerpc mpc85xx 7fc63cca 2015-05-05 York Sun <yorksun@freescale.com>
102korat powerpc ppc4xx 5043045d 2015-03-17 Larry Johnson <lrj@acm.org>
103W7OLMC powerpc ppc4xx 6beecd5d 2015-03-17 Erik Theisen <etheisen@mindspring.com>
104W7OLMG powerpc ppc4xx 6beecd5d 2015-03-17 Erik Theisen <etheisen@mindspring.com>
105JSE powerpc ppc4xx 2da8137b 2015-03-17 Stephen Williams <steve@icarus.com>
106hawkboard arm arm926ejs cb957cda 2015-02-24 Syed Mohammed Khasim <sm.khasim@gmail.com>:Sughosh Ganu <urwithsughosh@gmail.com>
107tnetv107x arm arm1176 50b82c4b 2015-02-24 Chan-Taek Park <c-park@ti.com>
108a320evb arm arm920t 29fc6f24 2015-02-24 Po-Yu Chuang <ratbert@faraday-tech.com>
109cm4008 arm arm920t a2f39e83 2015-02-24 Greg Ungerer <greg.ungerer@opengear.com>
110cm41xx arm arm920t a2f39e83 2015-02-24
111dkb arm arm926ejs 346cfba4 2015-02-24 Lei Wen <leiwen@marvell.com>
112jadecpu arm arm926ejs 41fbbbbc 2015-02-24 Matthias Weisser <weisserm@arcor.de>
113CATcenter powerpc ppc4xx 5344cc1a 2015-01-23
114PPChameleonEVB powerpc ppc4xx 5344cc1a 2015-01-23 Andrea "llandre" Marson <andrea.marson@dave-tech.it>
115P2020DS powerpc mpc85xx 168dcc6c 2015-01-23
116P2020COME powerpc mpc85xx 89123536 2015-01-23 Ira W. Snyder <iws@ovro.caltech.edu>
117P2020RDB powerpc mpc85xx 743d4815 2015-01-23 Poonam Aggrwal <poonam.aggrwal@freescale.com>
118P2010RDB powerpc mpc85xx 743d4815 2015-01-23
119P1020RDB powerpc mpc85xx 743d4815 2015-01-23
120P1011RDB powerpc mpc85xx 743d4815 2015-01-23
121MPC8360EMDS powerpc mpc83xx 8d1e3cb1 2015-01-23 Dave Liu <daveliu@freescale.com>
122MPC8360ERDK powerpc mpc83xx 8d1e3cb1 2015-01-23 Anton Vorontsov <avorontsov@ru.mvista.com>
123P3G4 powerpc 74xx_7xx d928664f 2015-01-16 Wolfgang Denk <wd@denx.de>
124ZUMA powerpc 74xx_7xx d928664f 2015-01-16 Nye Liu <nyet@zumanetworks.com>
125ppmc7xx powerpc 74xx_7xx d928664f 2015-01-16
126ELPPC powerpc 74xx_7xx d928664f 2015-01-16
127mpc7448hpc2 powerpc 74xx_7xx d928664f 2015-01-16 Roy Zang <tie-fei.zang@freescale.com>
128CPCI405 ppc4xx 405gp 5f1459dc 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
129CPCI405DT ppc4xx 405gpr 5f1459dc 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
130CPCI405AB ppc4xx 405gpr 5f1459dc 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
131G2000 ppc4xx 405ep 5f8f6294 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
132WUH405 ppc4xx 405ep fc88a5bf 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
133VOH405 ppc4xx 405ep 807db88b 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
134PMC405 ppc4xx 405gp d5263304 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
135PCI405 ppc4xx 405gp dbe7bb0d 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
136OCRTC ppc4xx 405gpr cc6e715f 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
137HUB405 ppc4xx 405ep e434d5d7 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
138HH405 ppc4xx 405ep 843125da 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
139DU440 ppc4xx 440epx 7ac9d47a 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
140DU405 ppc4xx 405gpr bc114076 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
141DP405 ppc4xx 405ep 9a4018e0 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
142CPCIISER4 ppc4xx 405gp 37057260 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
143CMS700 ppc4xx 405ep 2404124c 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
144ASH405 ppc4xx 405ep b5e7c84f 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
145AR405 ppc4xx 405gpr 61b57c4a 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
146APC405 ppc4xx 405gpr 2b8a04e5 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
147TASREG m68k mcf52x2 cbdc662a 2015-01-13 Matthias Fuchs <matthias.fuchs@esd.eu>
148A3000 powerpc mpc824x d622ac39 2015-01-05
149CPC45 powerpc mpc824x d622ac39 2015-01-05 Josef Wagner <Wagner@Microsys.de>
150CU824 powerpc mpc824x d622ac39 2015-01-05 Wolfgang Denk <wd@denx.de>
151eXalion powerpc mpc824x d622ac39 2015-01-05 Torsten Demke <torsten.demke@fci.com>
152MVBLUE powerpc mpc824x d622ac39 2015-01-05
153MUSENKI powerpc mpc824x d622ac39 2015-01-05 Jim Thompson <jim@musenki.com>
154Sandpoint8240 powerpc mpc824x d622ac39 2015-01-05 Wolfgang Denk <wd@denx.de>
155Sandpoint8245 powerpc mpc824x d622ac39 2015-01-05 Jim Thompson <jim@musenki.com>
156utx8245 powerpc mpc824x d622ac39 2015-01-05 Greg Allen <gallen@arlut.utexas.edu>
157atc powerpc mpc8260 9067b300 2015-01-05 Wolfgang Denk <wd@denx.de>
158CPU86 powerpc mpc8260 f7e1af86 2015-01-05 Wolfgang Denk <wd@denx.de>
159CPU87 powerpc mpc8260 f7e1af86 2015-01-05
160ep82xxm powerpc mpc8260 e2b19629 2015-01-05
161gw8260 powerpc mpc8260 8eecbaf3 2015-01-05 Oliver Brown <obrown@adventnetworks.com>
162IPHASE4539 powerpc mpc8260 87882f57 2015-01-05 Wolfgang Grandegger <wg@denx.de>
163muas3001 powerpc mpc8260 d2fd1d66 2015-01-05 Heiko Schocher <hs@denx.de>
164PM825 powerpc mpc8260 dc0b2fb4 2015-01-05 Wolfgang Denk <wd@denx.de>
165PM826 powerpc mpc8260 dc0b2fb4 2015-01-05 Wolfgang Denk <wd@denx.de>
166PM828 powerpc mpc8260 dc0b2fb4 2015-01-05
167MPC8266ADS powerpc mpc8260 b3a2bbe1 2015-01-05 Rune Torgersen <runet@innovsys.com>
168VoVPN-GW powerpc mpc8260 cc90905f 2015-01-05
169ep8260 powerpc mpc8260 4ad015ba 2015-01-05 Frank Panno <fpanno@delphintech.com>
170ppmc8260 powerpc mpc8260 793116d2 2015-01-05 Brad Kemp <Brad.Kemp@seranoa.com>
171sacsng powerpc mpc8260 b35c0ad6 2015-01-05 Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
172cogent_mpc8260 powerpc mpc8260 d19f6a60 2015-01-05 Murray Jensen <Murray.Jensen@csiro.au>
173cogent_8xx powerpc mpc8xx d19f6a60 2015-01-05 Murray Jensen <Murray.Jensen@csiro.au>
174ESTEEM192E powerpc mpc8xx af0e3514 2015-01-05 Conn Clark <clark@esteem.com>
175IP860 powerpc mpc8xx 5ec71100 2015-01-05 Wolfgang Denk <wd@denx.de>
176IVML24 powerpc mpc8xx ca620cd1 2015-01-05 Wolfgang Denk <wd@denx.de>
177IVMS8 powerpc mpc8xx ca620cd1 2015-01-05 Wolfgang Denk <wd@denx.de>
178lwmon powerpc mpc8xx acc2372d 2015-01-05 Wolfgang Denk <wd@denx.de>
179NETVIA powerpc mpc8xx f017cd7f 2015-01-05 Pantelis Antoniou <panto@intracom.gr>
180R360MPI powerpc mpc8xx 79cbecb8 2015-01-05 Wolfgang Denk <wd@denx.de>
181RRvision powerpc mpc8xx 8737fc75 2015-01-05 Wolfgang Denk <wd@denx.de>
182SPD823TS powerpc mpc8xx 72ba368f 2015-01-05 Wolfgang Denk <wd@denx.de>
183KUP4K powerpc mpc8xx 4317d070 2015-01-05 Klaus Heydeck <heydeck@kieback-peter.de>
184KUP4X powerpc mpc8xx 4317d070 2015-01-05 Klaus Heydeck <heydeck@kieback-peter.de>
185ELPT860 powerpc mpc8xx 3c5b20f1 2015-01-05 The LEOX team <team@leox.org>
186uc100 powerpc mpc8xx ceaf499b 2015-01-05 Stefan Roese <sr@denx.de>
187FPS850L powerpc mpc8xx 5d2a5ef7 2015-01-05 Wolfgang Denk <wd@denx.de>
188FPS860L powerpc mpc8xx 5d2a5ef7 2015-01-05 Wolfgang Denk <wd@denx.de>
189NSCU powerpc mpc8xx 5d2a5ef7 2015-01-05
190SM850 powerpc mpc8xx 5d2a5ef7 2015-01-05 Wolfgang Denk <wd@denx.de>
191TK885D powerpc mpc8xx 5d2a5ef7 2015-01-05
192virtlab2 powerpc mpc8xx 5d2a5ef7 2015-01-05 Wolfgang Denk <wd@denx.de>
193hermes powerpc mpc8xx 36da51e 2014-12-08 Wolfgang Denk <wd@denx.de>
194TOP860 powerpc mpc860 d58a945 2014-10-28 Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
195TOP9000 arm at91sam9xeXXX d58a945 2014-10-28 Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
196TQM8272 powerpc mpc8260 f06f9a1 2014-10-27 Wolfgang Denk <wd@denx.de>
197TQM8260 powerpc mpc8260 ccc1950 2014-10-27 Wolfgang Denk <wd@denx.de>
198IDS8247 powerpc mpc8260 6afb357 2014-10-27 Heiko Schocher <hs@denx.de>
199HWW1U1A powerpc mpc85xx 4109cb0 2014-10-27 Kyle Moffett <Kyle.D.Moffett@boeing.com>
200hymod powerpc mpc8260 5038d7f 2014-10-27 Murray Jensen <Murray.Jensen@csiro.au>
201MHPC powerpc mpc8xx 1655f9f 2014-10-27 Frank Gottschling <fgottschling@eltec.de>
202ICU862 powerpc mpc8xx 4af5f0f 2014-10-27 Wolfgang Denk <wd@denx.de>
203CPCI750 powerpc 74xx_7xx 03b0040 2014-10-27 Reinhard Arlt <reinhard.arlt@esd-electronics.com>
204DB64360 powerpc 74xx_7xx 03b0040 2014-10-27
205DB64460 powerpc 74xx_7xx 03b0040 2014-10-27
206p3m750 powerpc 74xx_7xx 03b0040 2014-10-27 Stefan Roese <sr@denx.de>
207p3m7448 powerpc 74xx_7xx 03b0040 2014-10-27 Stefan Roese <sr@denx.de>
208MERGERBOX powerpc mpc83xx e7a5656 2014-10-10 Andre Schwarz <andre.schwarz@matrix-vision.de>
209MVBLM7 powerpc mpc83xx e7a5656 2014-10-10 Andre Schwarz <andre.schwarz@matrix-vision.de>
210bluestone powerpc ppc4xx 9ed3246 2014-10-10 Tirumala Marri <tmarri@apm.com>
211CRAYL1 powerpc ppc4xx 1521cdc 2014-10-10 David Updegraff <dave@cray.com>
212KAREF powerpc ppc4xx dc9617e 2014-10-10 Travis Sawyer <travis.sawyer@sandburst.com>
213METROBOX powerpc ppc4xx dc9617e 2014-10-10 Travis Sawyer <travis.sawyer@sandburst.com>
214PK1C20 nios2 - 70fbc461 2014-08-24 Scott McNutt <smcnutt@psyent.com>
215PCI5441 nios2 - 70fbc461 2014-08-24 Scott McNutt <smcnutt@psyent.com>
216flagadm powerpc mpc8xx aec6f8c5 2014-08-22 Kári Davíðsson <kd@flaga.is>
217gen860t powerpc mpc8xx 6bde1ec1 2014-08-22 Keith Outwater <Keith_Outwater@mvis.com>
218sixnet powerpc mpc8xx 4723ce49 2014-08-22 Dave Ellis <DGE@sixnetio.com>
219svm_sc8xx powerpc mpc8xx d1a4aafd 2014-08-22 John Zhan <zhanz@sinovee.com>
220stxxtc powerpc mpc8xx 0ace4d9d 2014-08-22 Dan Malek <dan@embeddedalley.com>
221omap5912osk arm arm926ejs 62d636aa 2014-08-22 Rishi Bhattacharya <rishi@ti.com>
222p1023rds powerpc mpc85xx d0bc5140 2014-07-22 Roy Zang <tie-fei.zang@freescale.com>
223spc1920 powerpc mpc8xx 98ad54be 2014-07-07
224v37 powerpc mpc8xx b8c1438a 2014-07-07
225fads powerpc mpc8xx 03f9d7d1 2014-07-07
226netphone powerpc mpc8xx c51c1c9a 2014-07-07
227netta2 powerpc mpc8xx c51c1c9a 2014-07-07
228netta powerpc mpc8xx c51c1c9a 2014-07-07
229rbc823 powerpc mpc8xx c750b9c0 2014-07-07
230quantum powerpc mpc8xx 0657e46e 2014-07-07
231RPXlite_dw powerpc mpc8xx 0657e46e 2014-07-07
232qs850 powerpc mpc8xx dab0f762 2014-07-07
233qs860t powerpc mpc8xx dab0f762 2014-07-07
234simpc8313 powerpc mpc83xx 7445207f 2014-06-05 Ron Madrid <info@sheldoninst.com>
235hidden_dragon powerpc mpc824x 3fe1a854 2014-05-30 Yusdi Santoso <yusdi_santoso@adaptec.com>
236debris powerpc mpc824x 7edb1f7b 2014-05-30 Sangmoon Kim <dogoil@etinsys.com>
237kvme080 powerpc mpc824x 2868f862 2014-05-30 Sangmoon Kim <dogoil@etinsys.com>
238ep8248 powerpc mpc8260 49ad566d 2014-05-30 Yuli Barcohen <yuli@arabellasw.com>
239ispan powerpc mpc8260 80bae39a 2014-05-30 Yuli Barcohen <yuli@arabellasw.com>
240rattler powerpc mpc8260 d0664db4 2014-05-30 Yuli Barcohen <yuli@arabellasw.com>
241zpc1900 powerpc mpc8260 6f80bb48 2014-05-30 Yuli Barcohen <yuli@arabellasw.com>
242mpc8260ads powerpc mpc8260 facb6725 2014-05-30 Yuli Barcohen <yuli@arabellasw.com>
243adder powerpc mpc8xx 373a9788 2014-05-30 Yuli Barcohen <yuli@arabellasw.com>
244quad100hd powerpc ppc405ep 3569571d 2014-05-30 Gary Jennejohn <gljennjohn@googlemail.com>
245incaip mips mips32 538cf92c 2014-04-20 Wolfgang Denk <wd@denx.de>
246lubbock arm pxa 36bf57b 2014-04-18 Kyle Harris <kharris@nexus-tech.net>
247EVB64260 powerpc mpc824x bb3aef9 2014-04-18
248MOUSSE powerpc mpc824x 03f2ecc 2014-04-18
249rsdproto powerpc mpc8260 8b043e6 2014-04-18
250RPXsuper powerpc mpc8260 0ebf5f5 2014-04-18
251RPXClassic powerpc mpc8xx 4fb3925 2014-04-18
252RPXlite powerpc mpc8xx 4fb3925 2014-04-18
253FADS powerpc mpc8xx aa6e1e4 2014-04-18
254genietv powerpc mpc8xx b8a49bd 2014-04-18
255mbx8xx powerpc mpc8xx d6b11fd 2014-04-18
256nx823 powerpc mpc8xx a146e8b 2014-04-18
257idmr m68k mcf52x2 ba650e9b 2014-01-28
258M5271EVB m68k mcf52x2 ba650e9b 2014-01-28
259dvl_host arm ixp e317de6b 2014-01-28 Michael Schwingen <michael@schwingen.org>
260actux4 arm ixp 6ff7aafa 2014-01-28 Michael Schwingen <michael@schwingen.org>
261actux3 arm ixp 38da33f3 2014-01-28 Michael Schwingen <michael@schwingen.org>
262actux2 arm ixp 13e0ee7f 2014-01-28 Michael Schwingen <michael@schwingen.org>
263actux1 arm ixp 373ee048 2014-01-28 Michael Schwingen <michael@schwingen.org>
264mx1ads arm arm920t e570aca9 2014-01-13
265mini2440 arm arm920t af5b9b1f 2014-01-13 Gabriel Huau <contact@huau-gabriel.fr>
266omap730p2 arm arm926ejs 79c5c08d 2013-11-11
267pn62 powerpc mpc824x 649acfe1 2013-11-11 Wolfgang Grandegger <wg@grandegger.com>
268pdnb3 arm ixp 304db0b 2013-09-24 Stefan Roese <sr@denx.de>
269scpu arm ixp 304db0b 2013-09-24 Stefan Roese <sr@denx.de>
270omap1510inn arm arm925t 0610a16 2013-09-23 Kshitij Gupta <kshitij@ti.com>
271CANBT powerpc 405CR fb8f4fd 2013-08-07 Matthias Fuchs <matthias.fuchs@esd.eu>
272omap2420h4 arm omap24xx 7f5eef9 2013-06-04 Richard Woodruff <r-woodruff2@ti.com>
273Alaska8220 powerpc mpc8220 d6ed322 2013-05-11
274Yukon8220 powerpc mpc8220 d6ed322 2013-05-11
275sorcery powerpc mpc8220 d6ed322 2013-05-11
276smdk6400 arm arm1176 52587f1 2013-04-12 Zhong Hongbo <bocui107@gmail.com>
277ns9750dev arm arm926ejs 4cfc611 2013-02-28 Markus Pietrek <mpietrek@fsforth.de>
278eNET x86 x86 7e8c53d 2013-02-14 Graeme Russ <graeme.russ@gmail.com>
279PCIPPC2 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk <wd@denx.de>
280PCIPPC6 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk <wd@denx.de>
281AMX860 powerpc mpc860 1b0757e 2012-10-28 Wolfgang Denk <wd@denx.de>
282c2mon powerpc mpc855 1b0757e 2012-10-28 Wolfgang Denk <wd@denx.de>
283EP88x powerpc mpc885 1b0757e 2012-10-28
284ETX094 powerpc mpc850 1b0757e 2012-10-28 Wolfgang Denk <wd@denx.de>
285IAD210 powerpc mpc860 1b0757e 2012-10-28 -
286LANTEC powerpc mpc850 1b0757e 2012-10-28 Wolfgang Denk <wd@denx.de>
287SCM powerpc mpc8260 1b0757e 2012-10-28 Wolfgang Grandegger <wg@denx.de>
288SX1 arm arm925t 53c4154 2012-10-26
289TQM85xx powerpc MPC85xx d923a5d 2012-10-04 Stefan Roese <sr@denx.de>
290ADCIOP powerpc ppc4xx 99bcad1 2012-09-19 Matthias Fuchs <matthias.fuchs@esd-electronics.com>
291DASA_SIM powerpc ppc4xx 99bcad1 2012-09-19 Matthias Fuchs <matthias.fuchs@esd-electronics.com>
292apollon arm omap24xx 535c74f 2012-09-18 Kyungmin Park <kyungmin.park@samsung.com>
293tb0229 mips mips32 3f3110d 2011-12-12
294OXC powerpc MPC8240 309a292 2011-12-07
295BAB7xx powerpc MPC740/MPC750 c53043b 2011-12-07 Frank Gottschling <fgottschling@eltec.de>
296xm250 arm pxa c477d72 2011-11-25
297pleb2 arm pxa d299173 2011-11-25
298cradle arm pxa 00c4aca 2011-11-25 Kyle Harris <kharris@nexus-tech.net>
299cerf250 arm pxa f13eba6 2011-11-25 Prakash Kumar <prakash@embedx.com>
300mpq101 powerpc mpc85xx e877fab 2011-10-23 Alex Dubov <oakad@yahoo.com>
301ixdpg425 arm ixp 0ca8eb7 2011-09-22 Stefan Roese <sr@denx.de>
302ixdp425 arm ixp 0ca8eb7 2011-09-22 Kyle Harris <kharris@nexus-tech.net>
303zylonite arm pxa b66521a 2011-09-05
304shannon arm sa1100 5df092d 2011-09-05 Rolf Offermanns <rof@sysgo.de>
305modnet50 arm arm720t 9c62815 2011-09-05 Thomas Elste <info@elste.org>
306lpc2292sodimm arm arm720t d1a067a 2011-09-05
307lart arm sa1100 3d57573 2011-09-05 Alex Züpke <azu@sysgo.de>
308impa7 arm arm720t c1f8750 2011-09-05 Marius Gröger <mag@sysgo.de>
309gcplus arm sa1100 2c650e2 2011-09-05 George G. Davis <gdavis@mvista.com>
310evb4510 arm arm720t 26e670e 2011-09-05 Curt Brune <curt@cucy.com>
311ep7312 arm arm720t c8f63b4 2011-09-05 Marius Gröger <mag@sysgo.de>
312dnp1110 arm sa1100 fc5e5ce 2011-09-05 Alex Züpke <azu@sysgo.de>
313SMN42 arm arm720t 6aac646 2011-09-05
314at91rm9200dk arm arm920t 1c85752 2011-07-17
315m501sk arm arm920t b1a2bd4 2011-07-17
316kb9202 arm arm920t 5bd3814 2011-07-17
317csb637 arm arm920t d14af08 2011-07-17
318cmc_pu2 arm arm920t 37a9b4d 2011-07-17
319at91cap9adk arm arm926ejs b550834 2011-07-17 Stelian Pop <stelian@popies.net>
320voiceblue arm arm925t 1b793a4 2011-07-17
321smdk2400 arm arm920t ad218a8 2011-07-17 Gary Jennejohn <garyj@denx.de>
322sbc2410x arm arm920t 1f7f0ed 2011-07-17
323netstar arm arm925t 6ea2405 2011-07-17
324mx1fs2 arm arm920t 6962419 2011-07-17
325lpd7a404 arm lh7a40x 957731e 2011-07-17
326edb9301 arm arm920t 716f7ad 2011-07-17
327edb9302 arm arm920t 716f7ad 2011-07-17
328edb9302a arm arm920t 716f7ad 2011-07-17
329edb9307 arm arm920t 716f7ad 2011-07-17
330edb9307a arm arm920t 716f7ad 2011-07-17
331edb9312 arm arm920t 716f7ad 2011-07-17
332edb9315 arm arm920t 716f7ad 2011-07-17
333edb9315a arm arm920t 716f7ad 2011-07-17
334B2 arm s3c44b0 5dcf536 2011-07-16 Andrea Scian <andrea.scian@dave-tech.it>
335armadillo arm arm720t be28857 2011-07-16 Rowel Atienza <rowel@diwalabs.com>
336assabet arm sa1100 c91e90d 2011-07-16 George G. Davis <gdavis@mvista.com>
337trab arm S3C2400 566e5cf 2011-05-01 Gary Jennejohn <garyj@denx.de>
338mp2usb ARM AT91RM2900 ee986e2 2011-01-25 Eric Bénard <eric@eukrea.com>
339barco powerpc MPC8245 afaa27b 2010-11-23 Marc Leeman <marc.leeman@barco.com>
340ERIC powerpc 405GP d9ba451 2010-11-21 Swen Anderson <sand@peppercon.de>
341VoVPN-GW_100MHz powerpc MPC8260 26fe3d2 2010-10-24 Juergen Selent <j.selent@elmeg.de>
342xsengine ARM PXA2xx 4262a7c 2010-10-20
343wepep250 ARM PXA2xx 7369478 2010-10-20 Peter Figuli <peposh@etc.sk>
344delta ARM PXA2xx 75e2035 2010-10-20
345NC650 powerpc MPC852 333d86d 2010-10-19 Wolfgang Denk <wd@denx.de>
346CP850 powerpc MPC852 333d86d 2010-10-19 Wolfgang Denk <wd@denx.de>
347logodl ARM PXA2xx 059e778 2010-10-18 August Hoeraendl <august.hoerandl@gmx.at>
348CCM powerpc MPC860 dff07e1 2010-10-06 Wolfgang Grandegger <wg@denx.de>
349PCU_E powerpc MPC860T 544d97e 2010-10-06 Wolfgang Denk <wd@denx.de>
350HMI10 powerpc MPC823 77efe35 2010-09-19 Wolfgang Denk <wd@denx.de>
351GTH powerpc MPC860 0fe247b 2010-07-17 Thomas Lange <thomas@corelatus.se>
352AmigaOneG3SE powerpc 74xx_7xx 953b7e6 2010-06-23
353suzaku microblaze - 4f18060 2009-10-03 Yasushi Shoji <yashi@atmark-techno.com>
354XUPV2P microblaze - 8fab49e 2008-12-10 Michal Simek <monstr@monstr.eu>
355MVS1 powerpc MPC823 306620b 2008-08-26 Andre Schwarz <andre.schwarz@matrix-vision.de>
356adsvix ARM PXA27x 7610db1 2008-07-30 Adrian Filipi <adrian.filipi@eurotech.com>
357R5200 ColdFire - 48ead7a 2008-03-31 Zachary P. Landau <zachary.landau@labxtechnologies.com>
358CPCI440 powerpc 440GP b568fd2 2007-12-27 Matthias Fuchs <matthias.fuchs@esd-electronics.com>
359
README.sdp
1-------------
2SDP in U-Boot
3-------------
4
5SDP stands for serial download protocol. It is the protocol used in NXP's
6i.MX SoCs ROM Serial Downloader and provides means to download a program
7image to the chip over USB and UART serial connection.
8
9The implementation in U-Boot uses the USB Downloader Gadget (g_dnl) to
10provide a SDP implementation over USB. This allows to download program
11images to the target in SPL/U-Boot using the same protocol/tooling the
12SoC's recovery mechanism is using.
13
14The SDP protocol over USB is a USB HID class protocol. USB HID class
15protocols allow to access a USB device without OS specific drivers. The
16U-Boot implementation has primarly been tested using the open source
17imx_loader utility (https://github.com/toradex/imx_loader).
18
19The host side utilities are typically capable to interpret the i.MX
20specific image header (see doc/README.imximage). There are extensions
21for imx_loader's imx_usb utility which allow to interpret the U-Boot
22specific legacy image format (see mkimage(1)). Also the U-Boot side
23support beside the i.MX specific header the U-Boot legacy header.
24
25Usage
26-----
27
28This implementation can be started in U-Boot using the sdp command
29(CONFIG_CMD_USB_SDP) or in SPL if Serial Downloader boot mode has been
30detected (CONFIG_SPL_USB_SDP_SUPPORT).
31
32A typical use case is downloading full U-Boot after SPL has been
33downloaded through the boot ROM's Serial Downloader. Using boot mode
34detection the SPL will run the SDP implementation automatically in
35this case:
36
37 # imx_usb SPL
38
39Targets Serial Console:
40
41 Trying to boot from USB SDP
42 SDP: initialize...
43 SDP: handle requests...
44
45At this point the SPL reenumerated as a new HID device and emulating
46the boot ROM's SDP protocol. The USB VID/PID will depend on standard
47U-Boot configurations CONFIG_G_DNL_(VENDOR|PRODUCT)_NUM. Make sure
48imx_usb is aware of the USB VID/PID for your device by adding a
49configuration entry in imx_usb.conf:
50
51 0x1b67:0x4fff, mx6_usb_sdp_spl.conf
52
53And the device specific configuration file mx6_usb_sdp_spl.conf:
54
55 mx6_spl_sdp
56 hid,uboot_header,1024,0x910000,0x10000000,1G,0x00900000,0x40000
57
58This allows to download the regular U-Boot with legacy image headers
59(u-boot.img) using a second invocation of imx_usb:
60
61 # imx_usb u-boot.img
62
63Furthermore, when U-Boot is running the sdp command can be used to
64download and run scripts:
65
66 # imx_usb script.scr
67
68imx_usb configuration files can be also used to download multiple
69files and of arbitrary types, e.g.
70
71 mx6_usb_sdp_uboot
72 hid,1024,0x10000000,1G,0x00907000,0x31000
73 full.itb:load 0x12100000
74 boot.scr:load 0x12000000,jump 0x12000000
75
76There is also a batch mode which allows imx_usb to handle multiple
77consecutive reenumerations by adding multiple VID/PID specifications
78in imx_usb.conf:
79
80 0x15a2:0x0061, mx6_usb_rom.conf, 0x1b67:0x4fff, mx6_usb_sdp_spl.conf
81
82In this mode the file to download (imx_usb job) needs to be specified
83in the configuration files.
84
85mx6_usb_rom.conf:
86
87 mx6_qsb
88 hid,1024,0x910000,0x10000000,1G,0x00900000,0x40000
89 SPL:jump header2
90
91mx6_usb_sdp_spl.conf:
92
93 mx6_spl_sdp
94 hid,uboot_header,1024,0x10000000,1G,0x00907000,0x31000
95 u-boot.img:jump header2
96
97With that SPL and U-Boot can be downloaded with a single invocation
98of imx_usb without arguments:
99
100 # imx_usb
101
README.semihosting
1/*
2 * Copyright 2014 Broadcom Corporation.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7Semihosting is ARM's way of having a real or virtual target communicate
8with a host or host debugger for basic operations such as file I/O,
9console I/O, etc. Please see
10http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjjgij.html for more information.
11
12For developing on armv8 virtual fastmodel platforms, semihosting is a
13valuable tool since it allows access to image/configuration files before
14eMMC or other NV media are available.
15
16There are two main ARM virtual Fixed Virtual Platform (FVP) models,
17Versatile Express (VE) FVP and BASE FVP (See
18http://www.arm.com/products/tools/models/fast-models/foundation-model.php)
19The initial vexpress64 u-boot board created here runs on the VE virtual
20platform using the license-free Foundation_v8 simulator. Fortunately,
21the Foundation_v8 simulator also supports the BASE_FVP model which
22companies can purchase licenses for and contain much more functionality.
23So we can, in u-boot, run either model by either using the VE FVP (default),
24or turning on CONFIG_BASE_FVP for the more full featured model.
25
26Rather than create a new armv8 board similar to armltd/vexpress64, add
27semihosting calls to the existing one, enabled with CONFIG_SEMIHOSTING
28and CONFIG_BASE_FVP both set. Also reuse the existing board config file
29vexpress_aemv8a.h but differentiate the two models by the presence or
30absence of CONFIG_BASE_FVP. This change is tested and works on both the
31Foundation and Base fastmodel simulators.
32
33The semihosting code adds a command:
34
35 smhload <image> <address> [env var]
36
37That will load an image from the host filesystem into RAM at the specified
38address and optionally store the load end address in the specified
39environment variable.
40
README.serial_multi
1The support for multiple serial interfaces as implemented is mainly
2intended to allow for modem dial-in / dial-out while still being able
3to use a serial console on a (different) serial port.
4
5MPC8XX Specific
6===============
7At the moment, the ports must be split on a SMC and a SCC port on a
88xx processor; other configurations are not (yet) supported.
9
10Support for hardware handshake has not been implemented yet (but is
11in the works).
12
13*) The default console depends on the keys pressed:
14 - SMC if keys not pressed (modem not enabled)
15 - SCC if keys pressed (modem enabled)
16
17*) The console can be switched to SCC by any of the following commands:
18
19 setenv stdout serial_scc
20 setenv stdin serial_scc
21 setenv stderr serial_scc
22
23*) The console can be switched to SMC by any of the following commands:
24
25 setenv stdout serial_smc
26 setenv stdin serial_smc
27 setenv stderr serial_smc
28
29*) If a file descriptor is set to "serial" then the current serial device
30will be used which, in turn, can be switched by above commands.
31
32*) The baudrate is the same for all serial devices. But it can be switched
33just after switching the console:
34
35 setenv sout serial_scc; setenv baudrate 38400
36
37After that press 'enter' at the SCC console. Note that baudrates <38400
38are not allowed on LWMON with watchdog enabled (see CONFIG_SYS_BAUDRATE_TABLE in
39include/configs/lwmon.h).
40
41
42PPC4XX Specific
43===============
44*) The default console is UART0
45
46*) The console can be switched to UART1 by any of the following commands:
47 setenv stdout serial1
48 setenv stderr serial1
49 setenv stdin serial1
50
51*) The console can be switched to UART0 by any of the following commands:
52 setenv stdout serial0
53 setenv stderr serial0
54 setenv stdin serial0
55
README.sh
1
2U-Boot for Renesas SuperH
3 Last update 01/18/2008 by Nobuhiro Iwamatsu
4
5================================================================================
60. What's this?
7 This file contains status information for the port of U-Boot to the
8 Renesas SuperH series of CPUs.
9
10================================================================================
111. Overview
12 SuperH has an original boot loader. However, source code is dirty, and
13 maintenance is not done.
14 To improve sharing and the maintenance of the code, Nobuhiro Iwamatsu
15 started the porting to u-boot in 2007.
16
17================================================================================
182. Supported CPUs
19
20 2.1. Renesas SH7750/SH7750R
21 This CPU has the SH4 core.
22
23 2.2. Renesas SH7722
24 This CPU has the SH4AL-DSP core.
25
26 2.3. Renesas SH7720
27 This CPU has the SH3 core.
28
29 2.4. Renesas SH7710/SH7712
30 This CPU has the SH3-DSP core and Ethernet controller.
31
32 2.5. Renesas SH7780
33 This CPU has the SH4A core.
34
35================================================================================
363. Supported Boards
37
38 3.1. Hitachi UL MS7750SE01/MS7750RSE01
39 Board specific code is in board/ms7750se
40 To use this board, type "make ms7750se_config".
41 Support devices are :
42 - SCIF
43 - SDRAM
44 - NOR Flash
45 - Marubun PCMCIA
46
47 3.2. Hitachi UL MS7722SE01
48 Board specific code is in board/ms7722se
49 To use this board, type "make ms7722se_config".
50 Support devices are :
51 - SCIF
52 - SDRAM
53 - NOR Flash
54 - Marubun PCMCIA
55 - SMC91x ethernet
56
57 3.2. Hitachi UL MS7720ERP01
58 Board specific code is in board/ms7720se
59 To use this board, type "make ms7720se_config".
60 Support devices are :
61 - SCIF
62 - SDRAM
63 - NOR Flash
64 - Marubun PCMCIA
65
66 3.3. Renesas R7780MP
67 Board specific code is in board/r7780mp
68 To use this board, type "make r7780mp_config".
69 Support devices are :
70 - SCIF
71 - DDR-SDRAM
72 - NOR Flash
73 - Compact Flash
74 - ASIX ethernet
75 - SH7780 PCI bridge
76 - RTL8110 ethernet
77
78 ** README **
79 In SuperH, S-record and binary of made u-boot work on the memory.
80 When u-boot is written in the flash, it is necessary to change the
81 address by using 'objcopy'.
82 ex) shX-linux-objcopy -Ibinary -Osrec u-boot.bin u-boot.flash.srec
83
84================================================================================
854. Compiler
86 You can use the following of u-boot to compile.
87 - SuperH Linux Open site
88 http://www.superh-linux.org/
89 - KPIT GNU tools
90 http://www.kpitgnutools.com/
91
92================================================================================
935. Future
94 I plan to support the following CPUs and boards.
95 5.1. CPUs
96 - SH7751R(SH4)
97 - SH7785(SH4)
98
99 5.2. Boards
100 - Many boards ;-)
101
102================================================================================
103Copyright (c) 2007,2008
104 Nobuhiro Iwamatsu <iwamatsu@nigaur.org>
105
README.sh7752evb
1========================================
2Renesas R0P7752C00000RZ board
3========================================
4
5This board specification:
6=========================
7
8The R0P7752C00000RZ(board config name:sh7752evb) has the following device:
9
10 - SH7752 (SH-4A)
11 - DDR3-SDRAM 512MB
12 - SPI ROM 8MB
13 - Gigabit Ethernet controllers
14 - eMMC 4GB
15
16
17Configuration for This board:
18=============================
19
20You can select the configuration as follows:
21
22 - make sh7752evb_config
23
24
25This board specific command:
26============================
27
28This board has the following its specific command:
29
30 - write_mac
31
32
331. write_mac
34
35You can write MAC address to SPI ROM.
36
37 Usage 1) Write MAC address
38
39 write_mac [GETHERC ch0] [GETHERC ch1]
40
41 For example)
42 => write_mac 74:90:50:00:33:9e 74:90:50:00:33:9f
43 *) We have to input the command as a single line
44 (without carriage return)
45 *) We have to reset after input the command.
46
47 Usage 2) Show current data
48
49 write_mac
50
51 For example)
52 => write_mac
53 GETHERC ch0 = 74:90:50:00:33:9e
54 GETHERC ch1 = 74:90:50:00:33:9f
55
56
57Update SPI ROM:
58============================
59
601. Copy u-boot image to RAM area.
612. Probe SPI device.
62 => sf probe 0
63 SF: Detected MX25L6405D with page size 64KiB, total 8 MiB
643. Erase SPI ROM.
65 => sf erase 0 80000
664. Write u-boot image to SPI ROM.
67 => sf write 0x48000000 0 80000
68
README.sh7753evb
1========================================
2Renesas SH7753 EVB board
3========================================
4
5This board specification:
6=========================
7
8The SH7753 EVB (board config name:sh7753evb) has the following device:
9
10 - SH7753 (SH-4A)
11 - DDR3-SDRAM 512MB
12 - SPI ROM 8MB
13 - Gigabit Ethernet controllers
14 - eMMC 4GB
15
16
17Configuration for This board:
18=============================
19
20You can select the configuration as follows:
21
22 - make sh7753evb_config
23
24
25This board specific command:
26============================
27
28This board has the following its specific command:
29
30 - write_mac
31
32
331. write_mac
34
35You can write MAC address to SPI ROM.
36
37 Usage 1) Write MAC address
38
39 write_mac [GETHERC ch0] [GETHERC ch1]
40
41 For example)
42 => write_mac 74:90:50:00:33:9e 74:90:50:00:33:9f
43 *) We have to input the command as a single line
44 (without carriage return)
45 *) We have to reset after input the command.
46
47 Usage 2) Show current data
48
49 write_mac
50
51 For example)
52 => write_mac
53 GETHERC ch0 = 74:90:50:00:33:9e
54 GETHERC ch1 = 74:90:50:00:33:9f
55
56
57Update SPI ROM:
58============================
59
601. Copy u-boot image to RAM area.
612. Probe SPI device.
62 => sf probe 0
63 SF: Detected MX25L6405D with page size 64KiB, total 8 MiB
643. Erase SPI ROM.
65 => sf erase 0 80000
664. Write u-boot image to SPI ROM.
67 => sf write 0x48000000 0 80000
68
README.sha1
1SHA1 usage:
2-----------
3
4In the U-Boot Image for the pcs440ep board is a SHA1 checksum integrated.
5This SHA1 sum is used, to check, if the U-Boot Image in Flash is not
6corrupted.
7
8The following command is available:
9
10=> help sha1
11sha1 address len [addr] calculate the SHA1 sum [save at addr]
12 -p calculate the SHA1 sum from the U-Boot image in flash and print
13 -c check the U-Boot image in flash
14
15"sha1 -p"
16 calculates and prints the SHA1 sum, from the Image stored in Flash
17
18"sha1 -c"
19 check, if the SHA1 sum from the Image stored in Flash is correct
20
21
22It is possible to calculate a SHA1 checksum from a memoryrange with:
23
24"sha1 address len"
25
26If you want to store a new Image in Flash for the pcs440ep board,
27which has no SHA1 sum, you can do the following:
28
29a) cp the new Image on a position in RAM (here 0x300000)
30 (for this example we use the Image from Flash, stored at 0xfffa0000 and
31 0x60000 Bytes long)
32
33"cp.b fffa0000 300000 60000"
34
35b) Initialize the SHA1 sum in the Image with 0x00
36 The SHA1 sum is stored in Flash at:
37 CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN + SHA1_SUM_POS
38 for the pcs440ep Flash: 0xfffa0000 + 0x60000 + -0x20
39 = 0xffffffe0
40 for the example in RAM: 0x300000 + 0x60000 + -0x20
41 = 0x35ffe0
42
43 note: a SHA1 checksum is 20 bytes long.
44
45"mw.b 35ffe0 0 14"
46
47c) now calculate the SHA1 sum from the memoryrange and write
48 the calculated checksum at the right place:
49
50"sha1 300000 60000 35ffe0"
51
52Now you have a U-Boot-Image for the pcs440ep board with the correct SHA1 sum.
53
54If you do a "buildman -k pcs440ep" or a "make all" to get the U-Boot image,
55which will be found in ../current/ipam390/ - the correct SHA1 sum will be
56automagically included in the U-Boot image.
57
58Heiko Schocher, 11 Jul 2007
59
README.silent
1The config option CONFIG_SILENT_CONSOLE can be used to quiet messages
2on the console. If the option has been enabled, the output can be
3silenced by setting the environment variable "silent".
4
5- CONFIG_SILENT_CONSOLE_UPDATE_ON_SET
6 When the "silent" variable is changed with env set, the change
7 will take effect immediately.
8
9- CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC
10 Some environments are not available until relocation (e.g. NAND)
11 so this will make the value in the flash env take effect at
12 relocation.
13
14The following actions are taken if "silent" is set at boot time:
15
16 - Until the console devices have been initialized, output has to be
17 suppressed by testing for the flag "GD_FLG_SILENT" in "gd->flags".
18
19 - When the console devices have been initialized, "stdout" and
20 "stderr" are set to "nulldev", so subsequent messages are
21 suppressed automatically. Make sure to enable "nulldev" by
22 #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file.
23
24 - When booting a linux kernel, the "bootargs" are fixed up so that
25 the argument "console=" will be in the command line, no matter how
26 it was set in "bootargs" before. If you don't want the linux command
27 line to be affected, define CONFIG_SILENT_U_BOOT_ONLY in your board
28 config file as well, and this part of the feature will be disabled.
29
README.socfpga
1----------------------------------------
2SOCFPGA Documentation for U-Boot and SPL
3----------------------------------------
4
5This README is about U-Boot and SPL support for Altera's ARM Cortex-A9MPCore
6based SOCFPGA. To know more about the hardware itself, please refer to
7www.altera.com.
8
9
10socfpga_dw_mmc
11--------------
12
13Here are macro and detailed configuration required to enable DesignWare SDMMC
14controller support within SOCFPGA
15
16#define CONFIG_SYS_MMC_MAX_BLK_COUNT 256
17-> Using smaller max blk cnt to avoid flooding the limited stack in OCRAM
18
19--------------------------------------------------
20Generating the handoff header files for U-Boot SPL
21--------------------------------------------------
22
23This text is assuming quartus 16.1, but newer versions will probably work just fine too;
24verified with DE1_SOC_Linux_FB demo project (https://github.com/VCTLabs/DE1_SOC_Linux_FB).
25Updated/working projects should build using either process below.
26
27Note: it *should* work from Quartus 14.0.200 onwards, however, the current vendor demo
28projects must have the IP cores updated as shown below.
29
30Rebuilding your Quartus project
31-------------------------------
32
33Choose one of the follwing methods, either command line or GUI.
34
35Using the comaand line
36~~~~~~~~~~~~~~~~~~~~~~
37
38First run the embedded command shell, using your path to the Quartus install:
39
40 $ /path/to/intelFPGA/16.1/embedded/embedded_command_shell.sh
41
42Then (if necessary) update the IP cores in the project, generate HDL code, and
43build the project:
44
45 $ cd path/to/project/dir
46 $ qsys-generate soc_system.qsys --upgrade-ip-cores
47 $ qsys-generate soc_system.qsys --synthesis=[VERILOG|VHDL]
48 $ quartus_sh --flow compile <project name>
49
50Convert the resulting .sof file (SRAM object file) to .rbf file (Raw bit file):
51
52 $ quartus_cpf -c <project_name>.sof soc_system.rbf
53
54
55Generate BSP handoff files
56~~~~~~~~~~~~~~~~~~~~~~~~~~
57
58You can run the bsp editor GUI below, or run the following command from the
59project directory:
60
61 $ /path/to/bsb/tools/bsp-create-settings --type spl --bsp-dir build \
62 --preloader-settings-dir hps_isw_handoff/soc_system_hps_0/ \
63 --settings build/settings.bsp
64
65You should use the bsp "build" directory above (ie, where the settings.bsp file is)
66in the following u-boot command to update the board headers. Once these headers
67are updated for a given project build, u-boot should be configured for the
68project board (eg, de0-nano-sockit) and then build the normal spl build.
69
70Now you can skip the GUI section.
71
72
73Using the Qsys GUI
74~~~~~~~~~~~~~~~~~~
75
761. Navigate to your project directory
772. Run Quartus II
783. Open Project (Ctrl+J), select <project_name>.qpf
794. Run QSys [Tools->QSys]
80 4.1 In the Open dialog, select '<project_name>.qsys'
81 4.2 In the Open System dialog, wait until completion and press 'Close'
82 4.3 In the Qsys window, click on 'Generate HDL...' in bottom right corner
83 4.3.1 In the 'Generation' window, click 'Generate'
84 4.3.2 In the 'Generate' dialog, wait until completion and click 'Close'
85 4.4 In the QSys window, click 'Finish'
86 4.4.1 In the 'Quartus II' pop up window, click 'OK'
875. Back in Quartus II main window, do the following
88 5.1 Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K)
89 5.2 Use Processing -> Start Compilation (Ctrl+L)
90
91 ... this may take some time, have patience ...
92
936. Start the embedded command shell as shown in the previous section
94 6.1 Change directory to 'software/spl_bsp'
95 6.2 Prepare BSP by launching the BSP editor from ECS
96 => bsp-editor
97 6.3 In BSP editor
98 6.3.1 Use File -> Open
99 6.3.2 Select 'settings.bsp' file
100 6.3.3 Click Generate
101 6.3.4 Click Exit
102
103
104Post handoff generation
105~~~~~~~~~~~~~~~~~~~~~~~
106
107Now that the handoff files are generated, U-Boot can be used to process
108the handoff files generated by the bsp-editor. For this, please use the
109following script from the u-boot source tree:
110
111 $ ./arch/arm/mach-socfpga/qts-filter.sh \
112 <soc_type> \
113 <input_qts_dir> \
114 <input_bsp_dir> \
115 <output_dir>
116
117Process QTS-generated files into U-Boot compatible ones.
118
119 soc_type - Type of SoC, either 'cyclone5' or 'arria5'.
120 input_qts_dir - Directory with compiled Quartus project
121 and containing the Quartus project file (QPF).
122 input_bsp_dir - Directory with generated bsp containing
123 the settings.bsp file.
124 output_dir - Directory to store the U-Boot compatible
125 headers.
126
127This will generate (or update) the following 4 files:
128
129 iocsr_config.h
130 pinmux_config.h
131 pll_config.h
132 sdram_config.h
133
134These files should be copied into "qts" directory in the board directory
135(see output argument of qts-filter.sh command above).
136
137Here is an example for the DE-0 Nano SoC after the above rebuild process:
138
139 $ ll board/terasic/de0-nano-soc/qts/
140 total 36
141 -rw-r--r-- 1 sarnold sarnold 8826 Mar 21 18:11 iocsr_config.h
142 -rw-r--r-- 1 sarnold sarnold 4398 Mar 21 18:11 pinmux_config.h
143 -rw-r--r-- 1 sarnold sarnold 3190 Mar 21 18:11 pll_config.h
144 -rw-r--r-- 1 sarnold sarnold 9022 Mar 21 18:11 sdram_config.h
145
146Note: file sizes will differ slightly depending on the selected board.
147
148Now your board is ready for full mainline support including U-Boot SPL.
149The Preloader will not be needed any more.
150
README.spear
1
2SPEAr (Structured Processor Enhanced Architecture).
3
4SPEAr600 is also known as SPEArPlus and SPEAr300 is also known as SPEArBasic
5
6The SPEAr SoC family embeds a customizable logic that can be programmed
7one-time by a customer at silicon mask level (i.e. not at runtime!).
8
9U-Boot supports four SoCs: SPEAr600, SPEAr3xx
10
11All 4 SoCs (SPEAr3xx and SPEAr600) share common peripherals. SPEAr300 and
12SPEAr600 do not have EMI.
13
141. ARM926ejs core based (sp600 has two cores, the 2nd handled only in Linux)
152. FastEthernet (sp600 has Gbit version, but same controller - GMAC)
163. USB Host
174. USB Device
185. NAND controller (FSMC)
196. Serial NOR ctrl
207. I2C
218. SPI
229. CLCD
2310. others ..
24
25Everything is supported in Linux.
26u-boot is currently not supporting all peripeharls (just a few as listed below).
271. USB Device
282. NAND controller (FSMC)
293. Serial Memory Interface
304. EMI (Parallel NOR interface)
314. I2C
325. UART
33
34Build options
35 make spear320_config
36 spear320 build with environment variables placed at default
37 location i.e. Serial NOR device
38 make spear320_pnor_config
39 This option generates a uboot image that supports emi controller
40 for CFI compliant parallel NOR flash. Environment variables are
41 placed in Parallel NOR device
42 make spear320_nand_config
43 spear320 build with environment variables placed in NAND device
44 make spear320_usbtty_config
45 spear320 build with usbtty terminal as default and environment
46 placed at default location
47 make spear320_usbtty_pnor_config
48 spear320 build with usbtty terminal as default and environment
49 placed in pnor device
50 make spear320_usbtty_nand_config
51 Build with usbtty terminal as default and environment placed in
52 NAND device
53 make spear300_config
54 make spear300_nand_config
55 make spear300_usbtty_config
56 make spear300_usbtty_nand_config
57 make spear310_config
58 make spear310_pnor_config
59 make spear310_nand_config
60 make spear310_usbtty_config
61 make spear310_usbtty_pnor_config
62 make spear310_usbtty_nand_config
63 make spear600_config
64 make spear600_nand_config
65 make spear600_usbtty_config
66 make spear600_usbtty_nand_config
67
68Mac id storage and retrieval in spear platforms
69
70Please read doc/README.enetaddr for the implementation guidelines for mac id
71usage. Basically, environment has precedence over board specific storage. The
72ethaddr beeing used for the network interface is always taken only from
73environment variables. Although, we can check the mac id programmed in i2c
74memory by using chip_config command
75
README.splashprepare
1---------------------------------------------------------------------
2Splash Screen
3---------------------------------------------------------------------
4The splash_screen_prepare() function is a weak function defined in
5common/splash.c. It is called as part of the splash screen display
6sequence. It gives the board an opportunity to prepare the splash
7image data before it is processed and sent to the frame buffer by
8U-Boot. Define your own version to use this feature.
9
10CONFIG_SPLASH_SOURCE
11
12Use the splash_source.c library. This library provides facilities to declare
13board specific splash image locations, routines for loading splash image from
14supported locations, and a way of controlling the selected splash location
15using the "splashsource" environment variable.
16
17splashsource works as follows:
18- If splashsource is set to a supported location name as defined by board code,
19 use that splash location.
20- If splashsource is undefined, use the first splash location as default.
21- If splashsource is set to an unsupported value, do not load a splash screen.
22
23A splash source location can describe either storage with raw data, a storage
24formatted with a file system or a FIT image. In case of a filesystem, the splash
25screen data is loaded as a file. The name of the splash screen file can be
26controlled with the environment variable "splashfile".
27
28To enable loading the splash image from a FIT image, CONFIG_FIT must be
29enabled. Struct splash_location field 'name' should match the splash image
30name within the FIT and the FIT should start at the 'offset' field address in
31the specified storage.
32
README.srio-pcie-boot-corenet
1---------------------------------------
2SRIO and PCIE Boot on Corenet Platforms
3---------------------------------------
4
5For some PowerPC processors with SRIO or PCIE interface, boot location can be
6configured to SRIO or PCIE by RCW. The processor booting from SRIO or PCIE can
7do without flash for u-boot image, ucode and ENV. All the images can be fetched
8from another processor's memory space by SRIO or PCIE link connected between
9them.
10
11This document describes the processes based on an example implemented on P4080DS
12platforms and a RCW example with boot from SRIO or PCIE configuration.
13
14Environment of the SRIO or PCIE boot:
15 a) Master and slave can be SOCs in one board or SOCs in separate boards.
16 b) They are connected with SRIO or PCIE links, whether 1x, 2x or 4x, and
17 directly or through switch system.
18 c) Only Master has NorFlash for booting, and all the Master's and Slave's
19 U-Boot images, UCodes will be stored in this flash.
20 d) Slave has its own EEPROM for RCW and PBI.
21 e) Slave's RCW should configure the SerDes for SRIO or PCIE boot port, set
22 the boot location to SRIO or PCIE, and holdoff all the cores.
23
24 ----------- ----------- -----------
25 | | | | | |
26 | | | | | |
27 | NorFlash|<----->| Master |SRIO or PCIE | Slave |<---->[EEPROM]
28 | | | |<===========>| |
29 | | | | | |
30 ----------- ----------- -----------
31
32The example based on P4080DS platform:
33 Two P4080DS platforms can be used to implement the boot from SRIO or PCIE.
34 Their SRIO or PCIE ports 1 will be connected directly and will be used for
35 the boot from SRIO or PCIE.
36
37 1. Slave's RCW example for boot from SRIO port 1 and all cores in holdoff.
38 00000000: aa55 aa55 010e 0100 0c58 0000 0000 0000
39 00000010: 1818 1818 0000 8888 7440 4000 0000 2000
40 00000020: f440 0000 0100 0000 0000 0000 0000 0000
41 00000030: 0000 0000 0083 0000 0000 0000 0000 0000
42 00000040: 0000 0000 0000 0000 0813 8040 063c 778f
43
44 2. Slave's RCW example for boot from PCIE port 1 and all cores in holdoff.
45 00000000: aa55 aa55 010e 0100 0c58 0000 0000 0000
46 00000010: 1818 1818 0000 8888 1440 4000 0000 2000
47 00000020: f040 0000 0100 0000 0020 0000 0000 0000
48 00000030: 0000 0000 0083 0000 0000 0000 0000 0000
49 00000040: 0000 0000 0000 0000 0813 8040 547e ffc9
50
51 3. Sequence in Step by Step.
52 a) Update RCW for slave with boot from SRIO or PCIE port 1 configuration.
53 b) Program slave's U-Boot image, UCode, and ENV parameters into master's
54 NorFlash.
55 c) Set environment variable "bootmaster" to "SRIO1" or "PCIE1" and save
56 environment for master.
57 setenv bootmaster SRIO1
58 or
59 setenv bootmaster PCIE1
60 saveenv
61 d) Restart up master and it will boot up normally from its NorFlash.
62 Then, it will finish necessary configurations for slave's boot from
63 SRIO or PCIE port 1.
64 e) Master will set inbound SRIO or PCIE windows covered slave's U-Boot
65 image stored in master's NorFlash.
66 f) Master will set an inbound SRIO or PCIE window covered slave's UCode
67 and ENV stored in master's NorFlash.
68 g) Master will set outbound SRIO or PCIE windows in order to configure
69 slave's registers for the core's releasing.
70 h) Since all cores of slave in holdoff, slave should be powered on before
71 all the above master's steps, and wait to be released by master. In the
72 startup phase of the slave from SRIO or PCIE, it will finish some
73 necessary configurations.
74 i) Slave will set a specific TLB entry for the boot process.
75 j) Slave will set a LAW entry with the TargetID SRIO or PCIE port 1 for
76 the boot.
77 k) Slave will set a specific TLB entry in order to fetch UCode and ENV
78 from master.
79 l) Slave will set a LAW entry with the TargetID SRIO or PCIE port 1 for
80 UCode and ENV.
81
82How to use this feature:
83 To use this feature, you need to focus those points.
84
85 1. Slave's RCW with SRIO or PCIE boot configurations, and all cores in holdoff
86 configurations.
87 Please refer to the examples given above.
88
89 2. U-Boot image's compilation.
90 For master, U-Boot image should be generated normally.
91
92 For example, master U-Boot image used on P4080DS should be compiled with
93
94 make P4080DS_config.
95
96 For slave, U-Boot image should be generated specifically by
97
98 make xxxx_SRIO_PCIE_BOOT_config.
99
100 For example, slave U-Boot image used on P4080DS should be compiled with
101
102 make P4080DS_SRIO_PCIE_BOOT_config.
103
104 3. Necessary modifications based on a specific environment.
105 For a specific environment, the addresses of the slave's U-Boot image,
106 UCode, ENV stored in master's NorFlash, and any other configurations
107 can be modified in the file:
108 include/configs/corenet_ds.h.
109
110 4. Set and save the environment variable "bootmaster" with "SRIO1", "SRIO2"
111 or "PCIE1", "PCIE2", "PCIE3" for master, and then restart it in order to
112 perform the role as a master for boot from SRIO or PCIE.
113
114NOTE: When the Slave's ENV parameters are stored in Master's NorFlash,
115 it can fetch them through PCIE or SRIO interface. But the ENV
116 parameters can not be modified by "saveenv" or other commands under
117 the Slave's u-boot environment, because the Slave can not erase,
118 write Master's NorFlash by PCIE or SRIO link.
119
README.standalone
1Design Notes on Exporting U-Boot Functions to Standalone Applications:
2======================================================================
3
41. The functions are exported by U-Boot via a jump table. The jump
5 table is allocated and initialized in the jumptable_init() routine
6 (common/exports.c). Other routines may also modify the jump table,
7 however. The jump table can be accessed as the 'jt' field of the
8 'global_data' structure. The struct members for the jump table are
9 defined in the <include/exports.h> header. E.g., to substitute the
10 malloc() and free() functions that will be available to standalone
11 applications, one should do the following:
12
13 DECLARE_GLOBAL_DATA_PTR;
14
15 gd->jt->malloc = my_malloc;
16 gd->jt->free = my_free;
17
18 Note that the pointers to the functions are real function pointers
19 so the compiler can perform type checks on these assignments.
20
212. The pointer to the jump table is passed to the application in a
22 machine-dependent way. PowerPC, ARM, MIPS, Blackfin and Nios II
23 architectures use a dedicated register to hold the pointer to the
24 'global_data' structure: r2 on PowerPC, r9 on ARM, k0 on MIPS,
25 P3 on Blackfin and gp on Nios II. The x86 architecture does not
26 use such a register; instead, the pointer to the 'global_data'
27 structure is passed as 'argv[-1]' pointer.
28
29 The application can access the 'global_data' structure in the same
30 way as U-Boot does:
31
32 DECLARE_GLOBAL_DATA_PTR;
33
34 printf("U-Boot relocation offset: %x\n", gd->reloc_off);
35
363. The application should call the app_startup() function before any
37 call to the exported functions. Also, implementor of the
38 application may want to check the version of the ABI provided by
39 U-Boot. To facilitate this, a get_version() function is exported
40 that returns the ABI version of the running U-Boot. I.e., a
41 typical application startup may look like this:
42
43 int my_app (int argc, char * const argv[])
44 {
45 app_startup (argv);
46 if (get_version () != XF_VERSION)
47 return 1;
48 }
49
504. The default load and start addresses of the applications are as
51 follows:
52
53 Load address Start address
54 x86 0x00040000 0x00040000
55 PowerPC 0x00040000 0x00040004
56 ARM 0x0c100000 0x0c100000
57 MIPS 0x80200000 0x80200000
58 Blackfin 0x00001000 0x00001000
59 NDS32 0x00300000 0x00300000
60 Nios II 0x02000000 0x02000000
61
62 For example, the "hello world" application may be loaded and
63 executed on a PowerPC board with the following commands:
64
65 => tftp 0x40000 hello_world.bin
66 => go 0x40004
67
685. To export some additional function long foobar(int i,char c), the following steps
69 should be undertaken:
70
71 - Append the following line at the end of the include/_exports.h
72 file:
73
74 EXPORT_FUNC(foobar, long, foobar, int, char)
75
76 Parameters to EXPORT_FUNC:
77 - the first parameter is the function that is exported (default implementation)
78 - the second parameter is the return value type
79 - the third parameter is the name of the member in struct jt_funcs
80 this is also the name that the standalone application will used.
81 the rest of the parameters are the function arguments
82
83 - Add the prototype for this function to the include/exports.h
84 file:
85
86 long foobar(int i, char c);
87
88 Initialization with the default implementation is done in jumptable_init()
89
90 You can override the default implementation using:
91
92 gd->jt->foobar = another_foobar;
93
94 The signature of another_foobar must then match the declaration of foobar.
95
96 - Increase the XF_VERSION value by one in the include/exports.h
97 file
98
99 - If you want to export a function which depends on a CONFIG_XXX
100 use 2 lines like this:
101 #ifdef CONFIG_FOOBAR
102 EXPORT_FUNC(foobar, long, foobar, int, char)
103 #else
104 EXPORT_FUNC(dummy, void, foobar, void)
105 #endif
106
107
1086. The code for exporting the U-Boot functions to applications is
109 mostly machine-independent. The only places written in assembly
110 language are stub functions that perform the jump through the jump
111 table. That said, to port this code to a new architecture, the
112 only thing to be provided is the code in the examples/stubs.c
113 file. If this architecture, however, uses some uncommon method of
114 passing the 'global_data' pointer (like x86 does), one should add
115 the respective code to the app_startup() function in that file.
116
117 Note that these functions may only use call-clobbered registers;
118 those registers that are used to pass the function's arguments,
119 the stack contents and the return address should be left intact.
120
README.t1040-l2switch
1This file contains information for VSC9953, a Vitesse L2 Switch IP
2which is integrated in the T1040/T1020 Freescale SoCs.
3
4About Device:
5=============
6VSC9953 is an 8-port Gigabit Ethernet switch supports the following features:
7 - 8192 MAC addresses
8 - Static Address provisioning
9 - Dynamic learning of MAC addresses and aging
10 - 4096 VLANs
11 - Independent and shared VLAN learning (IVL, SVL)
12 - Policing with storm control and MC/BC protection
13 - IPv4 and IPv6 multicast
14 - Jumbo frames (9.6 KB)
15 - Access Control List
16 - VLAN editing, translation and remarking
17 - RMON counters per port
18
19Switch interfaces:
20 - 8 Gigabit switch ports (ports 0 to 7) are external and are connected to external PHYs
21 - 2 switch ports (ports 8 and 9) of 2.5 G are connected (fixed links)
22 to FMan ports (FM1@DTSEC1 and FM1@DTSEC2)
23
24Commands Overview:
25=============
26Commands supported
27 - enable/disable a port or show its configuration (speed, duplexity, status, etc.)
28 - port statistics
29 - MAC learning
30 - add/remove FDB entries
31 - Port-based VLAN
32 - Private/Shared VLAN learning
33 - VLAN ingress filtering
34 - Port LAG
35
36Commands syntax
37ethsw [port <port_no>] { enable | disable | show } - enable/disable a port; show a port's configuration
38ethsw [port <port_no>] statistics { [help] | [clear] } - show an l2 switch port's statistics
39ethsw [port <port_no>] learning { [help] | show | auto | disable } - enable/disable/show learning configuration on a port
40ethsw [port <port_no>] [vlan <vid>] fdb { [help] | show | flush | { add | del } <mac> } - add/delete a mac entry in FDB; use show to see FDB entries;
41 if [vlan <vid>] is missing, VID 1 will be used
42ethsw [port <port_no>] pvid { [help] | show | <pvid> } - set/show PVID (ingress and egress VLAN tagging) for a port
43ethsw [port <port_no>] vlan { [help] | show | add <vid> | del <vid> } - add a VLAN to a port (VLAN members)
44ethsw [port <port_no>] untagged { [help] | show | all | none | pvid } - set egress tagging mode for a port
45ethsw [port <port_no>] egress tag { [help] | show | pvid | classified } - configure VID source for egress tag.
46 Tag's VID could be the frame's classified VID or the PVID of the port
47ethsw vlan fdb { [help] | show | shared | private } - make VLAN learning shared or private
48ethsw [port <port_no>] ingress filtering { [help] | show | enable | disable } - enable/disable VLAN ingress filtering on port
49ethsw [port <port_no>] aggr { [help] | show | <lag_group_no> } - get/set LAG group for a port
50
51=> ethsw show
52 Port Status Link Speed Duplex
53 0 enabled down 10 half
54 1 enabled down 10 half
55 2 enabled down 10 half
56 3 enabled up 1000 full
57 4 disabled down - half
58 5 disabled down - half
59 6 disabled down - half
60 7 disabled down - half
61 8 enabled up 2500 full
62 9 enabled up 2500 full
63=>
64
README.ti-secure
1README on how boot images are created for secure TI devices
2
3CONFIG_TI_SECURE_DEVICE:
4Secure TI devices require a boot image that is authenticated by ROM
5code to function. Without this, even JTAG remains locked and the
6device is essentially useless. In order to create a valid boot image for
7a secure device from TI, the initial public software image must be signed
8and combined with various headers, certificates, and other binary images.
9
10Information on the details on the complete boot image format can be obtained
11from Texas Instruments. The tools used to generate boot images for secure
12devices are part of a secure development package (SECDEV) that can be
13downloaded from:
14
15 http://www.ti.com/mysecuresoftware (login required)
16
17The secure development package is access controlled due to NDA and export
18control restrictions. Access must be requested and granted by TI before the
19package is viewable and downloadable. Contact TI, either online or by way
20of a local TI representative, to request access.
21
22Booting of U-Boot SPL
23=====================
24
25 When CONFIG_TI_SECURE_DEVICE is set, the U-Boot SPL build process
26 requires the presence and use of these tools in order to create a
27 viable boot image. The build process will look for the environment
28 variable TI_SECURE_DEV_PKG, which should be the path of the installed
29 SECDEV package. If the TI_SECURE_DEV_PKG variable is not defined or
30 if it is defined but doesn't point to a valid SECDEV package, a
31 warning is issued during the build to indicate that a final secure
32 bootable image was not created.
33
34 Within the SECDEV package exists an image creation script:
35
36 ${TI_SECURE_DEV_PKG}/scripts/create-boot-image.sh
37
38 This is called as part of the SPL/u-boot build process. As the secure
39 boot image formats and requirements differ between secure SOC from TI,
40 the purpose of this script is to abstract these details as much as
41 possible.
42
43 The script is basically the only required interface to the TI SECDEV
44 package for creating a bootable SPL image for secure TI devices.
45
46 Invoking the script for AM33xx Secure Devices
47 =============================================
48
49 create-boot-image.sh \
50 <IMAGE_FLAG> <INPUT_FILE> <OUTPUT_FILE> <SPL_LOAD_ADDR>
51
52 <IMAGE_FLAG> is a value that specifies the type of the image to
53 generate OR the action the image generation tool will take. Valid
54 values are:
55 SPI_X-LOADER - Generates an image for SPI flash (byte swapped)
56 X-LOADER - Generates an image for non-XIP flash
57 MLO - Generates an image for SD/MMC/eMMC media
58 2ND - Generates an image for USB, UART and Ethernet
59 XIP_X-LOADER - Generates a single stage u-boot for NOR/QSPI XiP
60
61 <INPUT_FILE> is the full path and filename of the public world boot
62 loaderbinary file (depending on the boot media, this is usually
63 either u-boot-spl.bin or u-boot.bin).
64
65 <OUTPUT_FILE> is the full path and filename of the final secure
66 image. The output binary images should be used in place of the standard
67 non-secure binary images (see the platform-specific user's guides and
68 releases notes for how the non-secure images are typically used)
69 u-boot-spl_HS_SPI_X-LOADER - byte swapped boot image for SPI flash
70 u-boot-spl_HS_X-LOADER - boot image for NAND or SD/MMC/eMMC rawmode
71 u-boot-spl_HS_MLO - boot image for SD/MMC/eMMC media
72 u-boot-spl_HS_2ND - boot image for USB, UART and Ethernet
73 u-boot_HS_XIP_X-LOADER - boot image for NOR or QSPI Xip flash
74
75 <SPL_LOAD_ADDR> is the address at which SOC ROM should load the
76 <INPUT_FILE>
77
78 Invoking the script for AM43xx Secure Devices
79 =============================================
80
81 create-boot-image.sh \
82 <IMAGE_FLAG> <INPUT_FILE> <OUTPUT_FILE> <SPL_LOAD_ADDR>
83
84 <IMAGE_FLAG> is a value that specifies the type of the image to
85 generate OR the action the image generation tool will take. Valid
86 values are:
87 SPI_X-LOADER - Generates an image for SPI flash (byte
88 swapped)
89 XIP_X-LOADER - Generates a single stage u-boot for
90 NOR/QSPI XiP
91 ISSW - Generates an image for all other boot modes
92
93 <INPUT_FILE> is the full path and filename of the public world boot
94 loaderbinary file (depending on the boot media, this is usually
95 either u-boot-spl.bin or u-boot.bin).
96
97 <OUTPUT_FILE> is the full path and filename of the final secure
98 image. The output binary images should be used in place of the standard
99 non-secure binary images (see the platform-specific user's guides and
100 releases notes for how the non-secure images are typically used)
101 u-boot-spl_HS_SPI_X-LOADER - byte swapped boot image for SPI flash
102 u-boot_HS_XIP_X-LOADER - boot image for NOR or QSPI flash
103 u-boot-spl_HS_ISSW - boot image for all other boot media
104
105 <SPL_LOAD_ADDR> is the address at which SOC ROM should load the
106 <INPUT_FILE>
107
108 Invoking the script for DRA7xx/AM57xx Secure Devices
109 ====================================================
110
111 create-boot-image.sh <IMAGE_TYPE> <INPUT_FILE> <OUTPUT_FILE>
112
113 <IMAGE_TYPE> is a value that specifies the type of the image to
114 generate OR the action the image generation tool will take. Valid
115 values are:
116 X-LOADER - Generates an image for NOR or QSPI boot modes
117 MLO - Generates an image for SD/MMC/eMMC boot modes
118 ULO - Generates an image for USB/UART peripheral boot modes
119 Note: ULO is not yet used by the u-boot build process
120
121 <INPUT_FILE> is the full path and filename of the public world boot
122 loader binary file (for this platform, this is always u-boot-spl.bin).
123
124 <OUTPUT_FILE> is the full path and filename of the final secure image.
125 The output binary images should be used in place of the standard
126 non-secure binary images (see the platform-specific user's guides
127 and releases notes for how the non-secure images are typically used)
128 u-boot-spl_HS_MLO - boot image for SD/MMC/eMMC. This image is
129 copied to a file named MLO, which is the name that
130 the device ROM bootloader requires for loading from
131 the FAT partition of an SD card (same as on
132 non-secure devices)
133 u-boot-spl_HS_X-LOADER - boot image for all other flash memories
134 including QSPI and NOR flash
135
136 Invoking the script for Keystone2 Secure Devices
137 =============================================
138
139 create-boot-image.sh \
140 <UNUSED> <INPUT_FILE> <OUTPUT_FILE> <UNUSED>
141
142 <UNUSED> is currently ignored and reserved for future use.
143
144 <INPUT_FILE> is the full path and filename of the public world boot
145 loader binary file (only u-boot.bin is currently supported on
146 Keystone2 devices, u-boot-spl.bin is not currently supported).
147
148 <OUTPUT_FILE> is the full path and filename of the final secure image.
149 The output binary images should be used in place of the standard
150 non-secure binary images (see the platform-specific user's guides
151 and releases notes for how the non-secure images are typically used)
152 u-boot_HS_MLO - signed and encrypted boot image that can be used to
153 boot from all media. Secure boot from SPI NOR flash is not
154 currently supported.
155
156Booting of Primary U-Boot (u-boot.img)
157======================================
158
159 The SPL image is responsible for loading the next stage boot loader,
160 which is the main u-boot image. For secure TI devices, the SPL will
161 be authenticated, as described above, as part of the particular
162 device's ROM boot process. In order to continue the secure boot
163 process, the authenticated SPL must authenticate the main u-boot
164 image that it loads.
165
166 The configurations for secure TI platforms are written to make the boot
167 process use the FIT image format for the u-boot.img (CONFIG_SPL_FRAMEWORK
168 and CONFIG_SPL_LOAD_FIT). With these configurations the binary
169 components that the SPL loads include a specific DTB image and u-boot
170 image. These DTB image may be one of many available to the boot
171 process. In order to secure these components so that they can be
172 authenticated by the SPL as they are loaded from the FIT image, the
173 build procedure for secure TI devices will secure these images before
174 they are integrated into the FIT image. When those images are extracted
175 from the FIT image at boot time, they are post-processed to verify that
176 they are still secure. The outlined security-related SPL post-processing
177 is enabled through the CONFIG_SPL_FIT_IMAGE_POST_PROCESS option which
178 must be enabled for the secure boot scheme to work. In order to allow
179 verifying proper operation of the secure boot chain in case of successful
180 authentication messages like "Authentication passed: CERT_U-BOOT-NOD" are
181 output by the SPL to the console for each blob that got extracted from the
182 FIT image. Note that the last part of this log message is the (truncated)
183 name of the signing certificate embedded into the blob that got processed.
184
185 The exact details of the how the images are secured is handled by the
186 SECDEV package. Within the SECDEV package exists a script to process
187 an input binary image:
188
189 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh
190
191 This is called as part of the u-boot build process. As the secure
192 image formats and requirements can differ between the various secure
193 SOCs from TI, this script in the SECDEV package abstracts these
194 details. This script is essentially the only required interface to the
195 TI SECDEV package for creating a u-boot.img image for secure TI
196 devices.
197
198 The SPL/u-boot code contains calls to dedicated secure ROM functions
199 to perform the validation on the secured images. The details of the
200 interface to those functions is shown in the code. The summary
201 is that they are accessed by invoking an ARM secure monitor call to
202 the device's secure ROM (fixed read-only-memory that is secure and
203 only accessible when the ARM core is operating in the secure mode).
204
205 Invoking the secure-binary-image script for Secure Devices
206 ==========================================================
207
208 secure-binary-image.sh <INPUT_FILE> <OUTPUT_FILE>
209
210 <INPUT_FILE> is the full path and filename of the input binary image
211
212 <OUTPUT_FILE> is the full path and filename of the output secure image.
213
README.trace
1#
2# Copyright (c) 2013 The Chromium OS Authors.
3#
4# SPDX-License-Identifier: GPL-2.0+
5#
6
7Tracing in U-Boot
8=================
9
10U-Boot supports a simple tracing feature which allows a record of excecution
11to be collected and sent to a host machine for analysis. At present the
12main use for this is to profile boot time.
13
14
15Overview
16--------
17
18The trace feature uses GCC's instrument-functions feature to trace all
19function entry/exit points. These are then recorded in a memory buffer.
20The memory buffer can be saved to the host over a network link using
21tftpput or by writing to an attached memory device such as MMC.
22
23On the host, the file is first converted with a tool called 'proftool',
24which extracts useful information from it. The resulting trace output
25resembles that emitted by Linux's ftrace feature, so can be visually
26displayed by pytimechart.
27
28
29Quick-start using Sandbox
30-------------------------
31
32Sandbox is a build of U-Boot that can run under Linux so it is a convenient
33way of trying out tracing before you use it on your actual board. To do
34this, follow these steps:
35
36Add the following to include/configs/sandbox.h (if not already there)
37
38#define CONFIG_TRACE
39#define CONFIG_CMD_TRACE
40#define CONFIG_TRACE_BUFFER_SIZE (16 << 20)
41#define CONFIG_TRACE_EARLY_SIZE (8 << 20)
42#define CONFIG_TRACE_EARLY
43#define CONFIG_TRACE_EARLY_ADDR 0x00100000
44
45Build sandbox U-Boot with tracing enabled:
46
47$ make FTRACE=1 O=sandbox sandbox_config
48$ make FTRACE=1 O=sandbox
49
50Run sandbox, wait for a bit of trace information to appear, and then capture
51a trace:
52
53$ ./sandbox/u-boot
54
55
56U-Boot 2013.04-rc2-00100-ga72fcef (Apr 17 2013 - 19:25:24)
57
58DRAM: 128 MiB
59trace: enabled
60Using default environment
61
62In: serial
63Out: serial
64Err: serial
65=>trace stats
66 671,406 function sites
67 69,712 function calls
68 0 untracked function calls
69 73,373 traced function calls
70 16 maximum observed call depth
71 15 call depth limit
72 66,491 calls not traced due to depth
73=>trace stats
74 671,406 function sites
75 1,279,450 function calls
76 0 untracked function calls
77 950,490 traced function calls (333217 dropped due to overflow)
78 16 maximum observed call depth
79 15 call depth limit
80 1,275,767 calls not traced due to depth
81=>trace calls 0 e00000
82Call list dumped to 00000000, size 0xae0a40
83=>print
84baudrate=115200
85profbase=0
86profoffset=ae0a40
87profsize=e00000
88stderr=serial
89stdin=serial
90stdout=serial
91
92Environment size: 117/8188 bytes
93=>sb save host 0 trace 0 ${profoffset}
9411405888 bytes written in 10 ms (1.1 GiB/s)
95=>reset
96
97
98Then run proftool to convert the trace information to ftrace format.
99
100$ ./sandbox/tools/proftool -m sandbox/System.map -p trace dump-ftrace >trace.txt
101
102Finally run pytimechart to display it:
103
104$ pytimechart trace.txt
105
106Using this tool you can zoom and pan across the trace, with the function
107calls on the left and little marks representing the start and end of each
108function.
109
110
111CONFIG Options
112--------------
113
114- CONFIG_TRACE
115 Enables the trace feature in U-Boot.
116
117- CONFIG_CMD_TRACE
118 Enables the trace command.
119
120- CONFIG_TRACE_BUFFER_SIZE
121 Size of trace buffer to allocate for U-Boot. This buffer is
122 used after relocation, as a place to put function tracing
123 information. The address of the buffer is determined by
124 the relocation code.
125
126- CONFIG_TRACE_EARLY
127 Define this to start tracing early, before relocation.
128
129- CONFIG_TRACE_EARLY_SIZE
130 Size of 'early' trace buffer. Before U-Boot has relocated
131 it doesn't have a proper trace buffer. On many boards
132 you can define an area of memory to use for the trace
133 buffer until the 'real' trace buffer is available after
134 relocation. The contents of this buffer are then copied to
135 the real buffer.
136
137- CONFIG_TRACE_EARLY_ADDR
138 Address of early trace buffer
139
140
141Building U-Boot with Tracing Enabled
142------------------------------------
143
144Pass 'FTRACE=1' to the U-Boot Makefile to actually instrument the code.
145This is kept as a separate option so that it is easy to enable/disable
146instrumenting from the command line instead of having to change board
147config files.
148
149
150Collecting Trace Data
151---------------------
152
153When you run U-Boot on your board it will collect trace data up to the
154limit of the trace buffer size you have specified. Once that is exhausted
155no more data will be collected.
156
157Collecting trace data has an affect on execution time/performance. You
158will notice this particularly with trvial functions - the overhead of
159recording their execution may even exceed their normal execution time.
160In practice this doesn't matter much so long as you are aware of the
161effect. Once you have done your optimisations, turn off tracing before
162doing end-to-end timing.
163
164The best time to start tracing is right at the beginning of U-Boot. The
165best time to stop tracing is right at the end. In practice it is hard
166to achieve these ideals.
167
168This implementation enables tracing early in board_init_f(). This means
169that it captures most of the board init process, missing only the
170early architecture-specific init. However, it also misses the entire
171SPL stage if there is one.
172
173U-Boot typically ends with a 'bootm' command which loads and runs an
174OS. There is useful trace data in the execution of that bootm
175command. Therefore this implementation provides a way to collect trace
176data after bootm has finished processing, but just before it jumps to
177the OS. In practical terms, U-Boot runs the 'fakegocmd' environment
178variable at this point. This variable should have a short script which
179collects the trace data and writes it somewhere.
180
181Trace data collection relies on a microsecond timer, accesed through
182timer_get_us(). So the first think you should do is make sure that
183this produces sensible results for your board. Suitable sources for
184this timer include high resolution timers, PWMs or profile timers if
185available. Most modern SOCs have a suitable timer for this. Make sure
186that you mark this timer (and anything it calls) with
187__attribute__((no_instrument_function)) so that the trace library can
188use it without causing an infinite loop.
189
190
191Commands
192--------
193
194The trace command has variable sub-commands:
195
196- stats
197 Display tracing statistics
198
199- pause
200 Pause tracing
201
202- resume
203 Resume tracing
204
205- funclist [<addr> <size>]
206 Dump a list of functions into the buffer
207
208- calls [<addr> <size>]
209 Dump function call trace into buffer
210
211If the address and size are not given, these are obtained from environment
212variables (see below). In any case the environment variables are updated
213after the command runs.
214
215
216Environment Variables
217---------------------
218
219The following are used:
220
221- profbase
222 Base address of trace output buffer
223
224- profoffset
225 Offset of first unwritten byte in trace output buffer
226
227- profsize
228 Size of trace output buffer
229
230All of these are set by the 'trace calls' command.
231
232These variables keep track of the amount of data written to the trace
233output buffer by the 'trace' command. The trace commands which write data
234to the output buffer can use these to specify the buffer to write to, and
235update profoffset each time. This allows successive commands to append data
236to the same buffer, for example:
237
238 trace funclist 10000 e00000
239 trace calls
240
241(the latter command appends more data to the buffer).
242
243
244- fakegocmd
245 Specifies commands to run just before booting the OS. This
246 is a useful time to write the trace data to the host for
247 processing.
248
249
250Writing Out Trace Data
251----------------------
252
253Once the trace data is in an output buffer in memory there are various ways
254to transmit it to the host. Notably you can use tftput to send the data
255over a network link:
256
257fakegocmd=trace pause; usb start; set autoload n; bootp;
258 trace calls 10000000 1000000;
259 tftpput ${profbase} ${profoffset} 192.168.1.4:/tftpboot/calls
260
261This starts up USB (to talk to an attached USB Ethernet dongle), writes
262a trace log to address 10000000 and sends it to a host machine using
263TFTP. After this, U-Boot will boot the OS normally, albeit a little
264later.
265
266
267Converting Trace Output Data
268----------------------------
269
270The trace output data is kept in a binary format which is not documented
271here. To convert it into something useful, you can use proftool.
272
273This tool must be given the U-Boot map file and the trace data received
274from running that U-Boot. It produces a text output file.
275
276Options
277 -m <map_file>
278 Specify U-Boot map file
279
280 -p <trace_file>
281 Specifiy profile/trace file
282
283Commands:
284
285- dump-ftrace
286 Write a text dump of the file in Linux ftrace format to stdout
287
288
289Viewing the Trace Data
290----------------------
291
292You can use pytimechart for this (sudo apt-get pytimechart might work on
293your Debian-style machine, and use your favourite search engine to obtain
294documentation). It expects the file to have a .txt extension. The program
295has terse user interface but is very convenient for viewing U-Boot
296profile information.
297
298
299Workflow Suggestions
300--------------------
301
302The following suggestions may be helpful if you are trying to reduce boot
303time:
304
3051. Enable CONFIG_BOOTSTAGE and CONFIG_BOOTSTAGE_REPORT. This should get
306you are helpful overall snapshot of the boot time.
307
3082. Build U-Boot with tracing and run it. Note the difference in boot time
309(it is common for tracing to add 10% to the time)
310
3113. Collect the trace information as descibed above. Use this to find where
312all the time is being spent.
313
3144. Take a look at that code and see if you can optimise it. Perhaps it is
315possible to speed up the initialisation of a device, or remove an unused
316feature.
317
3185. Rebuild, run and collect again. Compare your results.
319
3206. Keep going until you run out of steam, or your boot is fast enough.
321
322
323Configuring Trace
324-----------------
325
326There are a few parameters in the code that you may want to consider.
327There is a function call depth limit (set to 15 by default). When the
328stack depth goes above this then no tracing information is recorded.
329The maximum depth reached is recorded and displayed by the 'trace stats'
330command.
331
332
333Future Work
334-----------
335
336Tracing could be a little tidier in some areas, for example providing
337run-time configuration options for trace.
338
339Some other features that might be useful:
340
341- Trace filter to select which functions are recorded
342- Sample-based profiling using a timer interrupt
343- Better control over trace depth
344- Compression of trace information
345
346
347Simon Glass <sjg@chromium.org>
348April 2013
349
README.ubi
1-------------------
2UBI usage in U-Boot
3-------------------
4
5UBI support in U-Boot is broken down into five separate commands.
6The first is the ubi command, which has six subcommands:
7
8=> help ubi
9ubi - ubi commands
10
11Usage:
12ubi part [part] [offset]
13 - Show or set current partition (with optional VID header offset)
14ubi info [l[ayout]] - Display volume and ubi layout information
15ubi create[vol] volume [size] [type] - create volume name with size
16ubi write[vol] address volume size - Write volume from address with size
17ubi write.part address volume size [fullsize]
18 - Write part of a volume from address
19ubi read[vol] address volume [size] - Read volume to address with size
20ubi remove[vol] volume - Remove volume
21[Legends]
22 volume: character name
23 size: specified in bytes
24 type: s[tatic] or d[ynamic] (default=dynamic)
25
26
27The first command that is needed to be issues is "ubi part" to connect
28one mtd partition to the UBI subsystem. This command will either create
29a new UBI device on the requested MTD partition. Or it will attach a
30previously created UBI device. The other UBI commands will only work
31when such a UBI device is attached (via "ubi part"). Here an example:
32
33=> mtdparts
34
35device nor0 <1fc000000.nor_flash>, # parts = 6
36 #: name size offset mask_flags
37 0: kernel 0x00200000 0x00000000 0
38 1: dtb 0x00040000 0x00200000 0
39 2: root 0x00200000 0x00240000 0
40 3: user 0x01ac0000 0x00440000 0
41 4: env 0x00080000 0x01f00000 0
42 5: u-boot 0x00080000 0x01f80000 0
43
44active partition: nor0,0 - (kernel) 0x00200000 @ 0x00000000
45
46defaults:
47mtdids : nor0=1fc000000.nor_flash
48mtdparts: mtdparts=1fc000000.nor_flash:2m(kernel),256k(dtb),2m(root),27392k(user),512k(env),512k(u-boot)
49
50=> ubi part root
51Creating 1 MTD partitions on "nor0":
520x000000240000-0x000000440000 : "mtd=2"
53UBI: attaching mtd1 to ubi0
54UBI: physical eraseblock size: 262144 bytes (256 KiB)
55UBI: logical eraseblock size: 262016 bytes
56UBI: smallest flash I/O unit: 1
57UBI: VID header offset: 64 (aligned 64)
58UBI: data offset: 128
59UBI: attached mtd1 to ubi0
60UBI: MTD device name: "mtd=2"
61UBI: MTD device size: 2 MiB
62UBI: number of good PEBs: 8
63UBI: number of bad PEBs: 0
64UBI: max. allowed volumes: 128
65UBI: wear-leveling threshold: 4096
66UBI: number of internal volumes: 1
67UBI: number of user volumes: 1
68UBI: available PEBs: 0
69UBI: total number of reserved PEBs: 8
70UBI: number of PEBs reserved for bad PEB handling: 0
71UBI: max/mean erase counter: 2/1
72
73
74Now that the UBI device is attached, this device can be modified
75using the following commands:
76
77ubi info Display volume and ubi layout information
78ubi createvol Create UBI volume on UBI device
79ubi removevol Remove UBI volume from UBI device
80ubi read Read data from UBI volume to memory
81ubi write Write data from memory to UBI volume
82ubi write.part Write data from memory to UBI volume, in parts
83
84
85Here a few examples on the usage:
86
87=> ubi create testvol
88Creating dynamic volume testvol of size 1048064
89
90=> ubi info l
91UBI: volume information dump:
92UBI: vol_id 0
93UBI: reserved_pebs 4
94UBI: alignment 1
95UBI: data_pad 0
96UBI: vol_type 3
97UBI: name_len 7
98UBI: usable_leb_size 262016
99UBI: used_ebs 4
100UBI: used_bytes 1048064
101UBI: last_eb_bytes 262016
102UBI: corrupted 0
103UBI: upd_marker 0
104UBI: name testvol
105
106UBI: volume information dump:
107UBI: vol_id 2147479551
108UBI: reserved_pebs 2
109UBI: alignment 1
110UBI: data_pad 0
111UBI: vol_type 3
112UBI: name_len 13
113UBI: usable_leb_size 262016
114UBI: used_ebs 2
115UBI: used_bytes 524032
116UBI: last_eb_bytes 2
117UBI: corrupted 0
118UBI: upd_marker 0
119UBI: name layout volume
120
121=> ubi info
122UBI: MTD device name: "mtd=2"
123UBI: MTD device size: 2 MiB
124UBI: physical eraseblock size: 262144 bytes (256 KiB)
125UBI: logical eraseblock size: 262016 bytes
126UBI: number of good PEBs: 8
127UBI: number of bad PEBs: 0
128UBI: smallest flash I/O unit: 1
129UBI: VID header offset: 64 (aligned 64)
130UBI: data offset: 128
131UBI: max. allowed volumes: 128
132UBI: wear-leveling threshold: 4096
133UBI: number of internal volumes: 1
134UBI: number of user volumes: 1
135UBI: available PEBs: 0
136UBI: total number of reserved PEBs: 8
137UBI: number of PEBs reserved for bad PEB handling: 0
138UBI: max/mean erase counter: 4/1
139
140=> ubi write 800000 testvol 80000
141Volume "testvol" found at volume id 0
142
143=> ubi read 900000 testvol 80000
144Volume testvol found at volume id 0
145read 524288 bytes from volume 0 to 900000(buf address)
146
147=> cmp.b 800000 900000 80000
148Total of 524288 bytes were the same
149
150
151Next, the ubifsmount command allows you to access filesystems on the
152UBI partition which has been attached with the ubi part command:
153
154=> help ubifsmount
155ubifsmount - mount UBIFS volume
156
157Usage:
158ubifsmount <volume-name>
159 - mount 'volume-name' volume
160
161For example:
162
163=> ubifsmount ubi0:recovery
164UBIFS: mounted UBI device 0, volume 0, name "recovery"
165UBIFS: mounted read-only
166UBIFS: file system size: 46473216 bytes (45384 KiB, 44 MiB, 366 LEBs)
167UBIFS: journal size: 6348800 bytes (6200 KiB, 6 MiB, 50 LEBs)
168UBIFS: media format: w4/r0 (latest is w4/r0)
169UBIFS: default compressor: LZO
170UBIFS: reserved for root: 0 bytes (0 KiB)
171
172Note that unlike Linux, U-Boot can only have one active UBI partition
173at a time, which can be referred to as ubi0, and must be supplied along
174with the name of the filesystem you are mounting.
175
176
177Once a UBI filesystem has been mounted, the ubifsls command allows you
178to list the contents of a directory in the filesystem:
179
180
181=> help ubifsls
182ubifsls - list files in a directory
183
184Usage:
185ubifsls [directory]
186 - list files in a 'directory' (default '/')
187
188For example:
189
190=> ubifsls
191 17442 Thu Jan 01 02:57:38 1970 imx28-evk.dtb
192 2998146 Thu Jan 01 02:57:43 1970 zImage
193
194
195And the ubifsload command allows you to load a file from a UBI
196filesystem:
197
198
199=> help ubifsload
200ubifsload - load file from an UBIFS filesystem
201
202Usage:
203ubifsload <addr> <filename> [bytes]
204 - load file 'filename' to address 'addr'
205
206For example:
207
208=> ubifsload ${loadaddr} zImage
209Loading file 'zImage' to addr 0x42000000 with size 2998146 (0x002dbf82)...
210Done
211
212
213Finally, you can unmount the UBI filesystem with the ubifsumount
214command:
215
216=> help ubifsumount
217ubifsumount - unmount UBIFS volume
218
219Usage:
220ubifsumount - unmount current volume
221
222For example:
223
224=> ubifsumount
225Unmounting UBIFS volume recovery!
226
README.ubispl
1Lightweight UBI and UBI fastmap support
2
3# Copyright (C) Thomas Gleixner <tglx@linutronix.de>
4#
5# SPDX-License-Identifier: GPL 2.0+ BSD-3-Clause
6
7Scans the UBI information and loads the requested static volumes into
8memory.
9
10Configuration Options:
11
12 CONFIG_SPL_UBI
13 Enables the SPL UBI support
14
15 CONFIG_SPL_UBI_MAX_VOL_LEBS
16 The maximum number of logical eraseblocks which a static volume
17 to load can contain. Used for sizing the scan data structure
18
19 CONFIG_SPL_UBI_MAX_PEB_SIZE
20 The maximum physical erase block size. Either a compile time
21 constant or runtime detection. Used for sizing the scan data
22 structure
23
24 CONFIG_SPL_UBI_MAX_PEBS
25 The maximum physical erase block count. Either a compile time
26 constant or runtime detection. Used for sizing the scan data
27 structure
28
29 CONFIG_SPL_UBI_VOL_IDS
30 The maximum volume ids which can be loaded. Used for sizing the
31 scan data structure.
32
33Usage notes:
34
35In the board config file define for example:
36
37#define CONFIG_SPL_UBI
38#define CONFIG_SPL_UBI_MAX_VOL_LEBS 256
39#define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024)
40#define CONFIG_SPL_UBI_MAX_PEBS 4096
41#define CONFIG_SPL_UBI_VOL_IDS 8
42
43The size requirement is roughly as follows:
44
45 2k for the basic data structure
46 + CONFIG_SPL_UBI_VOL_IDS * CONFIG_SPL_UBI_MAX_VOL_LEBS * 8
47 + CONFIG_SPL_UBI_MAX_PEBS * 64
48 + CONFIG_SPL_UBI_MAX_PEB_SIZE * UBI_FM_MAX_BLOCKS
49
50The last one is big, but I really don't care in that stage. Real world
51implementations only use the first couple of blocks, but the code
52handles up to UBI_FM_MAX_BLOCKS.
53
54Given the above configuration example the requirement is about 5M
55which is usually not a problem to reserve in the RAM along with the
56other areas like the kernel/dts load address.
57
58So something like this will do the trick:
59
60#define SPL_FINFO_ADDR 0x80800000
61#define SPL_DTB_LOAD_ADDR 0x81800000
62#define SPL_KERNEL_LOAD_ADDR 0x82000000
63
64In the board file, implement the following:
65
66static struct ubispl_load myvolumes[] = {
67 {
68 .vol_id = 0, /* kernel volume */
69 .load_addr = (void *)SPL_KERNEL_LOAD_ADDR,
70 },
71 {
72 .vol_id = 1, /* DT blob */
73 .load_addr = (void *)SPL_DTB_LOAD_ADDR,
74 }
75};
76
77int spl_start_uboot(void)
78{
79 struct ubispl_info info;
80
81 info.ubi = (struct ubi_scan_info *) SPL_FINFO_ADDR;
82 info.fastmap = 1;
83 info.read = nand_spl_read_flash;
84
85#if COMPILE_TIME_DEFINED
86 /*
87 * MY_NAND_NR_SPL_PEBS is the number of physical erase blocks
88 * in the FLASH which are reserved for the SPL. Think about
89 * mtd partitions:
90 *
91 * part_spl { .start = 0, .end = 4 }
92 * part_ubi { .start = 4, .end = NR_PEBS }
93 */
94 info.peb_offset = MY_NAND_NR_SPL_PEBS;
95 info.peb_size = CONFIG_SYS_NAND_BLOCK_SIZE;
96 info.vid_offset = MY_NAND_UBI_VID_OFFS;
97 info.leb_start = MY_NAND_UBI_DATA_OFFS;
98 info.peb_count = MY_NAND_UBI_NUM_PEBS;
99#else
100 get_flash_info(&flash_info);
101 info.peb_offset = MY_NAND_NR_SPL_PEBS;
102 info.peb_size = flash_info.peb_size;
103
104 /*
105 * The VID and Data offset depend on the capability of the
106 * FLASH chip to do subpage writes.
107 *
108 * If the flash chip supports subpage writes, then the VID
109 * header starts at the second subpage. So for 2k pages size
110 * with 4 subpages the VID offset is 512. The DATA offset is 2k.
111 *
112 * If the flash chip does not support subpage writes then the
113 * VID offset is FLASH_PAGE_SIZE and the DATA offset
114 * 2 * FLASH_PAGE_SIZE
115 */
116 info.vid_offset = flash_info.vid_offset;
117 info.leb_start = flash_info.data_offset;
118
119 /*
120 * The flash reports the total number of erase blocks, so
121 * we need to subtract the number of blocks which are reserved
122 * for the SPL itself and not managed by UBI.
123 */
124 info.peb_count = flash_info.peb_count - MY_NAND_NR_SPL_PEBS;
125#endif
126
127 ret = ubispl_load_volumes(&info, myvolumes, ARRAY_SIZE(myvolumes);
128
129 ....
130
131}
132
133Note: you can load any payload that way. You can even load u-boot from
134UBI, so the only non UBI managed FLASH area is the one which is
135reserved for the SPL itself and read from the SoC ROM.
136
137And you can do fallback scenarios:
138
139 if (ubispl_load_volumes(&info, volumes0, ARRAY_SIZE(volumes0)))
140 if (ubispl_load_volumes(&info, volumes1, ARRAY_SIZE(volumes1)))
141 ubispl_load_volumes(&info, vol_uboot, ARRAY_SIZE(vol_uboot));
142
README.ublimage
1---------------------------------------------
2UBL image Boot Image generation using mkimage
3---------------------------------------------
4
5This document describes how to set up an U-Boot image that can be directly
6booted by a DaVinci processor via NAND boot mode, using an UBL header,
7but without need for UBL.
8
9For more details see section 11.2 "ARM ROM Boot Modes" of
10http://focus.ti.com/lit/ug/sprufg5a/sprufg5a.pdf
11
12Command syntax:
13--------------
14./tools/mkimage -l <u-boot_file>
15 to list the UBL image file details
16
17./tools/mkimage -T ublimage \
18 -n <board specific configuration file> \
19 -d <u-boot binary> <output image file>
20
21For example, for the davinci dm365evm board:
22./tools/mkimage -n ./board/davinci/dm365evm/ublimage.cfg \
23 -T ublimage \
24 -d u-boot-nand.bin u-boot.ubl
25
26You can generate the image directly when you compile u-boot with:
27
28$ make u-boot.ubl
29
30The output image can be flashed into the NAND.
31
32Please check the DaVinci documentation for further details.
33
34Board specific configuration file specifications:
35-------------------------------------------------
361. This file must present in the $(BOARDDIR) and the name should be
37 ublimage.cfg (since this is used in Makefile).
382. This file can have empty lines and lines starting with "#" as first
39 character to put comments.
403. This file can have configuration command lines as mentioned below,
41 any other information in this file is treated as invalid.
42
43Configuration command line syntax:
44---------------------------------
451. Each command line must have two strings, first one command or address
46 and second one data string
472. Following are the valid command strings and associated data strings:-
48 Command string data string
49 -------------- -----------
50 MODE UBL special mode, on of:
51 safe
52 Example:
53 MODE safe
54
55 ENTRY Entry point address for the user
56 bootloader (absolute address) = TEXT_BASE
57 nand_spl loader.
58 Example:
59 ENTRY 0x00000020
60
61 PAGES Number of pages (size of user bootloader
62 in number of pages)
63 Example:
64 PAGES 27
65
66 START_BLOCK Block number where user bootloader is present
67 Example:
68 START_BLOCK 5
69
70 START_PAGE Page number where user bootloader is present
71 (for RBL always 0)
72 Example:
73 START_PAGE 0
74
75------------------------------------------------
76
77Structure of the u-boot.ubl binary:
78
79compile steps:
80
811) nand_spl code compile, with pad_to = (TEXT_BASE +
82 (CONFIG_SYS_NROF_PAGES_NAND_SPL * pagesize))
83 Example: cam_enc_4xx pad_to = 0x20 + (6 * 0x800) = 0x3020 = 12320
84 -> u-boot-spl-16k.bin
85
86 !! TEXT_BASE = 0x20, as the RBL starts at 0x20
87
882) compile u-boot.bin ("normal" u-boot)
89 -> u-boot.bin
90
913) create u-boot-nand.bin = u-boot-spl-16k.bin + u-boot.bin
92
934) create u-boot.ubl, size = 1 page size NAND
94 create UBL header and paste it before u-boot.bin
95
96This steps are done automagically if you do a "make all"
97
98-> You get an u-boot.ubl binary, which you can flash
99 into your NAND.
100
101Structure of this binary (Example for the cam_enc_4xx board with a NAND
102page size = 0x800):
103
104offset : 0x00000 | 0x800 | 0x3800
105content: UBL | nand_spl | u-boot code
106 Header | code |
107
108The NAND layout looks for example like this:
109
110(Example for the cam_enc_4xx board with a NAND page size = 0x800, block
111size = 0x20000 and CONFIG_SYS_NROF_UBL_HEADER 5):
112
113offset : 0x80000 | 0xa0000 | 0xa3000
114content: UBL | nand_spl | u-boot code
115 Header | code |
116 ^ ^
117 ^ 0xa0000 = CONFIG_SYS_NROF_UBL_HEADER * 0x20000
118 ^
119 0x80000 = Block 4 * 0x20000
120
121If the cpu starts in NAND boot mode, it checks the UBL descriptor
122starting with block 1 (page 0). When a valid UBL signature is found,
123the corresponding block number (from 1 to 24) is written to the last 32
124bits of ARM internal memory (0x7ffc-0x8000). This feature is provided
125as a basic debug mechanism. If not found, it continues with block 2
126... last possible block is 24
127
128If a valid UBL descriptor is found, the UBL descriptor is read and
129processed. The descriptor gives the information required for loading
130and control transfer to the nand_spl code. The nand_spl code is then
131read and processed.
132
133Once the user-specified start-up conditions are set, the RBL copies the
134nand_spl into ARM internal RAM, starting at address 0x0000: 0020.
135 ^^^^
136
137The nand_spl code itself now does necessary intializations, and at least,
138copies the u-boot code from NAND into RAM, and jumps to it ...
139
140------------------------------------------------
141Author: Heiko Schocher <hs@denx.de>
142
README.unaligned-memory-access.txt
1Editors note: This document is _heavily_ cribbed from the Linux Kernel, with
2really only the section about "Alignment vs. Networking" removed.
3
4UNALIGNED MEMORY ACCESSES
5=========================
6
7Linux runs on a wide variety of architectures which have varying behaviour
8when it comes to memory access. This document presents some details about
9unaligned accesses, why you need to write code that doesn't cause them,
10and how to write such code!
11
12
13The definition of an unaligned access
14=====================================
15
16Unaligned memory accesses occur when you try to read N bytes of data starting
17from an address that is not evenly divisible by N (i.e. addr % N != 0).
18For example, reading 4 bytes of data from address 0x10004 is fine, but
19reading 4 bytes of data from address 0x10005 would be an unaligned memory
20access.
21
22The above may seem a little vague, as memory access can happen in different
23ways. The context here is at the machine code level: certain instructions read
24or write a number of bytes to or from memory (e.g. movb, movw, movl in x86
25assembly). As will become clear, it is relatively easy to spot C statements
26which will compile to multiple-byte memory access instructions, namely when
27dealing with types such as u16, u32 and u64.
28
29
30Natural alignment
31=================
32
33The rule mentioned above forms what we refer to as natural alignment:
34When accessing N bytes of memory, the base memory address must be evenly
35divisible by N, i.e. addr % N == 0.
36
37When writing code, assume the target architecture has natural alignment
38requirements.
39
40In reality, only a few architectures require natural alignment on all sizes
41of memory access. However, we must consider ALL supported architectures;
42writing code that satisfies natural alignment requirements is the easiest way
43to achieve full portability.
44
45
46Why unaligned access is bad
47===========================
48
49The effects of performing an unaligned memory access vary from architecture
50to architecture. It would be easy to write a whole document on the differences
51here; a summary of the common scenarios is presented below:
52
53 - Some architectures are able to perform unaligned memory accesses
54 transparently, but there is usually a significant performance cost.
55 - Some architectures raise processor exceptions when unaligned accesses
56 happen. The exception handler is able to correct the unaligned access,
57 at significant cost to performance.
58 - Some architectures raise processor exceptions when unaligned accesses
59 happen, but the exceptions do not contain enough information for the
60 unaligned access to be corrected.
61 - Some architectures are not capable of unaligned memory access, but will
62 silently perform a different memory access to the one that was requested,
63 resulting in a subtle code bug that is hard to detect!
64
65It should be obvious from the above that if your code causes unaligned
66memory accesses to happen, your code will not work correctly on certain
67platforms and will cause performance problems on others.
68
69
70Code that does not cause unaligned access
71=========================================
72
73At first, the concepts above may seem a little hard to relate to actual
74coding practice. After all, you don't have a great deal of control over
75memory addresses of certain variables, etc.
76
77Fortunately things are not too complex, as in most cases, the compiler
78ensures that things will work for you. For example, take the following
79structure:
80
81 struct foo {
82 u16 field1;
83 u32 field2;
84 u8 field3;
85 };
86
87Let us assume that an instance of the above structure resides in memory
88starting at address 0x10000. With a basic level of understanding, it would
89not be unreasonable to expect that accessing field2 would cause an unaligned
90access. You'd be expecting field2 to be located at offset 2 bytes into the
91structure, i.e. address 0x10002, but that address is not evenly divisible
92by 4 (remember, we're reading a 4 byte value here).
93
94Fortunately, the compiler understands the alignment constraints, so in the
95above case it would insert 2 bytes of padding in between field1 and field2.
96Therefore, for standard structure types you can always rely on the compiler
97to pad structures so that accesses to fields are suitably aligned (assuming
98you do not cast the field to a type of different length).
99
100Similarly, you can also rely on the compiler to align variables and function
101parameters to a naturally aligned scheme, based on the size of the type of
102the variable.
103
104At this point, it should be clear that accessing a single byte (u8 or char)
105will never cause an unaligned access, because all memory addresses are evenly
106divisible by one.
107
108On a related topic, with the above considerations in mind you may observe
109that you could reorder the fields in the structure in order to place fields
110where padding would otherwise be inserted, and hence reduce the overall
111resident memory size of structure instances. The optimal layout of the
112above example is:
113
114 struct foo {
115 u32 field2;
116 u16 field1;
117 u8 field3;
118 };
119
120For a natural alignment scheme, the compiler would only have to add a single
121byte of padding at the end of the structure. This padding is added in order
122to satisfy alignment constraints for arrays of these structures.
123
124Another point worth mentioning is the use of __attribute__((packed)) on a
125structure type. This GCC-specific attribute tells the compiler never to
126insert any padding within structures, useful when you want to use a C struct
127to represent some data that comes in a fixed arrangement 'off the wire'.
128
129You might be inclined to believe that usage of this attribute can easily
130lead to unaligned accesses when accessing fields that do not satisfy
131architectural alignment requirements. However, again, the compiler is aware
132of the alignment constraints and will generate extra instructions to perform
133the memory access in a way that does not cause unaligned access. Of course,
134the extra instructions obviously cause a loss in performance compared to the
135non-packed case, so the packed attribute should only be used when avoiding
136structure padding is of importance.
137
138
139Code that causes unaligned access
140=================================
141
142With the above in mind, let's move onto a real life example of a function
143that can cause an unaligned memory access. The following function taken
144from the Linux Kernel's include/linux/etherdevice.h is an optimized routine
145to compare two ethernet MAC addresses for equality.
146
147bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
148{
149#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
150 u32 fold = ((*(const u32 *)addr1) ^ (*(const u32 *)addr2)) |
151 ((*(const u16 *)(addr1 + 4)) ^ (*(const u16 *)(addr2 + 4)));
152
153 return fold == 0;
154#else
155 const u16 *a = (const u16 *)addr1;
156 const u16 *b = (const u16 *)addr2;
157 return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0;
158#endif
159}
160
161In the above function, when the hardware has efficient unaligned access
162capability, there is no issue with this code. But when the hardware isn't
163able to access memory on arbitrary boundaries, the reference to a[0] causes
1642 bytes (16 bits) to be read from memory starting at address addr1.
165
166Think about what would happen if addr1 was an odd address such as 0x10003.
167(Hint: it'd be an unaligned access.)
168
169Despite the potential unaligned access problems with the above function, it
170is included in the kernel anyway but is understood to only work normally on
17116-bit-aligned addresses. It is up to the caller to ensure this alignment or
172not use this function at all. This alignment-unsafe function is still useful
173as it is a decent optimization for the cases when you can ensure alignment,
174which is true almost all of the time in ethernet networking context.
175
176
177Here is another example of some code that could cause unaligned accesses:
178 void myfunc(u8 *data, u32 value)
179 {
180 [...]
181 *((u32 *) data) = cpu_to_le32(value);
182 [...]
183 }
184
185This code will cause unaligned accesses every time the data parameter points
186to an address that is not evenly divisible by 4.
187
188In summary, the 2 main scenarios where you may run into unaligned access
189problems involve:
190 1. Casting variables to types of different lengths
191 2. Pointer arithmetic followed by access to at least 2 bytes of data
192
193
194Avoiding unaligned accesses
195===========================
196
197The easiest way to avoid unaligned access is to use the get_unaligned() and
198put_unaligned() macros provided by the <asm/unaligned.h> header file.
199
200Going back to an earlier example of code that potentially causes unaligned
201access:
202
203 void myfunc(u8 *data, u32 value)
204 {
205 [...]
206 *((u32 *) data) = cpu_to_le32(value);
207 [...]
208 }
209
210To avoid the unaligned memory access, you would rewrite it as follows:
211
212 void myfunc(u8 *data, u32 value)
213 {
214 [...]
215 value = cpu_to_le32(value);
216 put_unaligned(value, (u32 *) data);
217 [...]
218 }
219
220The get_unaligned() macro works similarly. Assuming 'data' is a pointer to
221memory and you wish to avoid unaligned access, its usage is as follows:
222
223 u32 value = get_unaligned((u32 *) data);
224
225These macros work for memory accesses of any length (not just 32 bits as
226in the examples above). Be aware that when compared to standard access of
227aligned memory, using these macros to access unaligned memory can be costly in
228terms of performance.
229
230If use of such macros is not convenient, another option is to use memcpy(),
231where the source or destination (or both) are of type u8* or unsigned char*.
232Due to the byte-wise nature of this operation, unaligned accesses are avoided.
233
234--
235In the Linux Kernel,
236Authors: Daniel Drake <dsd@gentoo.org>,
237 Johannes Berg <johannes@sipsolutions.net>
238With help from: Alan Cox, Avuton Olrich, Heikki Orsila, Jan Engelhardt,
239Kyle McMartin, Kyle Moffett, Randy Dunlap, Robert Hancock, Uli Kunitz,
240Vadim Lobanov
241
README.uniphier
1U-Boot for UniPhier SoC family
2==============================
3
4
5Recommended toolchains
6----------------------
7
8The UniPhier platform is well tested with Linaro toolchains.
9You can download pre-built toolchains from:
10
11 http://www.linaro.org/downloads/
12
13
14Compile the source
15------------------
16
17The source can be configured and built with the following commands:
18
19 $ make <defconfig>
20 $ make CROSS_COMPILE=<toolchain-prefix> DEVICE_TREE=<device-tree>
21
22The recommended <toolchain-prefix> is `arm-linux-gnueabihf-` for 32bit SoCs,
23`aarch64-linux-gnu-` for 64bit SoCs, but you may wish to change it to use your
24favorite compiler.
25
26The following tables show <defconfig> and <device-tree> for each board.
27
2832bit SoC boards:
29
30 Board | <defconfig> | <device-tree>
31---------------|------------------------------|------------------------------
32LD4 reference | uniphier_ld4_sld8_defconfig | uniphier-ld4-ref (default)
33sld8 reference | uniphier_ld4_sld8_defconfig | uniphier-sld8-def
34Pro4 reference | uniphier_pro4_defconfig | uniphier-pro4-ref (default)
35Pro4 Ace | uniphier_pro4_defconfig | uniphier-pro4-ace
36Pro4 Sanji | uniphier_pro4_defconfig | uniphier-pro4-sanji
37Pro5 4KBOX | uniphier_pxs2_ld6b_defconfig | uniphier-pro5-4kbox
38PXs2 Gentil | uniphier_pxs2_ld6b_defconfig | uniphier-pxs2-gentil
39PXs2 Vodka | uniphier_pxs2_ld6b_defconfig | uniphier-pxs2-vodka (default)
40LD6b reference | uniphier_pxs2_ld6b_defconfig | uniphier-ld6b-ref
41
4264bit SoC boards:
43
44 Board | <defconfig> | <device-tree>
45---------------|-----------------------|----------------------------
46LD11 reference | uniphier_v8_defconfig | uniphier-ld11-ref
47LD11 Global | uniphier_v8_defconfig | uniphier-ld11-global
48LD20 reference | uniphier_v8_defconfig | uniphier-ld20-ref (default)
49LD20 Global | uniphier_v8_defconfig | uniphier-ld20-global
50
51For example, to compile the source for PXs2 Vodka board, run the following:
52
53 $ make uniphier_pxs2_ld6b_defconfig
54 $ make CROSS_COMPILE=arm-linux-gnueabihf- DEVICE_TREE=uniphier-pxs2-vodka
55
56The device tree marked as (default) can be omitted. `uniphier-pxs2-vodka` is
57the default device tree for the configuration `uniphier_pxs2_ld6b_defconfig`,
58so the following gives the same result.
59
60 $ make uniphier_pxs2_ld6b_defconfig
61 $ make CROSS_COMPILE=arm-linux-gnueabihf-
62
63
64Booting 32bit SoC boards
65------------------------
66
67The build command will generate the following:
68- u-boot.bin
69- spl/u-boot.bin
70
71U-Boot can boot UniPhier 32bit SoC boards by itself. Flash the generated images
72to the storage device (NAND or eMMC) on your board.
73
74 - spl/u-boot-spl.bin at the offset address 0x00000000
75 - u-boot.bin at the offset address 0x00020000
76
77The `u-boot-with-spl.bin` is the concatenation of the two (with appropriate
78padding), so you can also do:
79
80 - u-boot-with-spl.bin at the offset address 0x00000000
81
82If a TFTP server is available, the images can be easily updated.
83Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory,
84and run the following command at the U-Boot command line:
85
86To update the images in NAND:
87
88 => run nandupdate
89
90To update the images in eMMC:
91
92 => run emmcupdate
93
94
95Booting 64bit SoC boards
96------------------------
97
98The build command will generate the following:
99- u-boot.bin
100
101However, U-Boot is not the first stage loader for UniPhier 64bit SoC boards.
102U-Boot serves as a non-secure boot loader loaded by [ARM Trusted Firmware],
103so you need to provide the `u-boot.bin` to the build command of ARM Trusted
104Firmware.
105
106[ARM Trusted Firmware]: https://github.com/ARM-software/arm-trusted-firmware
107
108
109UniPhier specific commands
110--------------------------
111
112 - pinmon (enabled by CONFIG_CMD_PINMON)
113 shows the boot mode pins that has been latched at the power-on reset
114
115 - ddrphy (enabled by CONFIG_CMD_DDRPHY_DUMP)
116 shows the DDR PHY parameters set by the PHY training
117
118 - ddrmphy (enabled by CONFIG_CMD_DDRMPHY_DUMP)
119 shows the DDR Multi PHY parameters set by the PHY training
120
121
122Supported devices
123-----------------
124
125 - UART (on-chip)
126 - NAND
127 - SD/eMMC
128 - USB 2.0 (EHCI)
129 - USB 3.0 (xHCI)
130 - GPIO
131 - LAN (on-board SMSC9118)
132 - I2C
133 - EEPROM (connected to the on-board I2C bus)
134 - Support card (SRAM, NOR flash, some peripherals)
135
136
137Micro Support Card
138------------------
139
140The recommended bit switch settings are as follows:
141
142 SW2 OFF(1)/ON(0) Description
143 ------------------------------------------
144 bit 1 <---- BKSZ[0]
145 bit 2 ----> BKSZ[1]
146 bit 3 <---- SoC Bus Width 16/32
147 bit 4 <---- SERIAL_SEL[0]
148 bit 5 ----> SERIAL_SEL[1]
149 bit 6 ----> BOOTSWAP_EN
150 bit 7 <---- CS1/CS5
151 bit 8 <---- SOC_SERIAL_DISABLE
152
153 SW8 OFF(1)/ON(0) Description
154 ------------------------------------------
155 bit 1 <---- CS1_SPLIT
156 bit 2 <---- CASE9_ON
157 bit 3 <---- CASE10_ON
158 bit 4 Don't Care Reserve
159 bit 5 Don't Care Reserve
160 bit 6 Don't Care Reserve
161 bit 7 ----> BURST_EN
162 bit 8 ----> FLASHBUS32_16
163
164The BKSZ[1:0] specifies the address range of memory slot and peripherals
165as follows:
166
167 BKSZ Description RAM slot Peripherals
168 --------------------------------------------------------------------
169 0b00 15MB RAM / 1MB Peri 00000000-00efffff 00f00000-00ffffff
170 0b01 31MB RAM / 1MB Peri 00000000-01efffff 01f00000-01ffffff
171 0b10 64MB RAM / 1MB Peri 00000000-03efffff 03f00000-03ffffff
172 0b11 127MB RAM / 1MB Peri 00000000-07efffff 07f00000-07ffffff
173
174Set BSKZ[1:0] to 0b01 for U-Boot.
175This mode is the most handy because EA[24] is always supported by the save pin
176mode of the system bus. On the other hand, EA[25] is not supported for some
177newer SoCs. Even if it is, EA[25] is not connected on most of the boards.
178
179--
180Masahiro Yamada <yamada.masahiro@socionext.com>
181Jul. 2017
182
README.update
1Automatic software update from a TFTP server
2============================================
3
4Overview
5--------
6
7This feature allows to automatically store software updates present on a TFTP
8server in NOR Flash. In more detail: a TFTP transfer of a file given in
9environment variable 'updatefile' from server 'serverip' is attempted during
10boot. The update file should be a FIT file, and can contain one or more
11updates. Each update in the update file has an address in NOR Flash where it
12should be placed, updates are also protected with a SHA-1 checksum. If the
13TFTP transfer is successful, the hash of each update is verified, and if the
14verification is positive, the update is stored in Flash.
15
16The auto-update feature is enabled by the CONFIG_UPDATE_TFTP macro:
17
18#define CONFIG_UPDATE_TFTP 1
19
20
21Note that when enabling auto-update, Flash support must be turned on. Also,
22one must enable FIT and LIBFDT support:
23
24#define CONFIG_FIT 1
25#define CONFIG_OF_LIBFDT 1
26
27The auto-update feature uses the following configuration knobs:
28
29- CONFIG_UPDATE_LOAD_ADDR
30
31 Normally, TFTP transfer of the update file is done to the address specified
32 in environment variable 'loadaddr'. If this variable is not present, the
33 transfer is made to the address given in CONFIG_UPDATE_LOAD_ADDR (0x100000
34 by default).
35
36- CONFIG_UPDATE_TFTP_CNT_MAX
37 CONFIG_UPDATE_TFTP_MSEC_MAX
38
39 These knobs control the timeouts during initial connection to the TFTP
40 server. Since a transfer is attempted during each boot, it is undesirable to
41 have a long delay when a TFTP server is not present.
42 CONFIG_UPDATE_TFTP_MSEC_MAX specifies the number of milliseconds to wait for
43 the server to respond to initial connection, and CONFIG_UPDATE_TFTP_CNT_MAX
44 gives the number of such connection retries. CONFIG_UPDATE_TFTP_CNT_MAX must
45 be non-negative and is 0 by default, CONFIG_UPDATE_TFTP_MSEC_MAX must be
46 positive and is 100 by default.
47
48Since the update file is in FIT format, it is created from an *.its file using
49the mkimage tool. dtc tool with support for binary includes, e.g. in version
501.2.0 or later, must also be available on the system where the update file is
51to be prepared. Refer to the doc/uImage.FIT/ directory for more details on FIT
52images.
53
54This mechanism can be also triggered by the command "fitupd".
55If an optional, non-zero address is provided as argument, the TFTP transfer
56is skipped and the image at this address is used.
57The fitupd command is enabled by CONFIG_CMD_FITUPD.
58
59
60Example .its files
61------------------
62
63- doc/uImage.FIT/update_uboot.its
64
65 A simple example that can be used to create an update file for automatically
66 replacing U-Boot image on a system.
67
68 Assuming that an U-Boot image u-boot.bin is present in the current working
69 directory, and that the address given in the 'load' property in the
70 'update_uboot.its' file is where the U-Boot is stored in Flash, the
71 following command will create the actual update file 'update_uboot.itb':
72
73 mkimage -f update_uboot.its update_uboot.itb
74
75 Place 'update_uboot.itb' on a TFTP server, for example as
76 '/tftpboot/update_uboot.itb', and set the 'updatefile' variable
77 appropriately, for example in the U-Boot prompt:
78
79 setenv updatefile /tftpboot/update_uboot.itb
80 saveenv
81
82 Now, when the system boots up and the update TFTP server specified in the
83 'serverip' environment variable is accessible, the new U-Boot image will be
84 automatically stored in Flash.
85
86 NOTE: do make sure that the 'u-boot.bin' image used to create the update
87 file is a good, working image. Also make sure that the address in Flash
88 where the update will be placed is correct. Making mistake here and
89 attempting the auto-update can render the system unusable.
90
91- doc/uImage.FIT/update3.its
92
93 An example containing three updates. It can be used to update Linux kernel,
94 ramdisk and FDT blob stored in Flash. The procedure for preparing the update
95 file is similar to the example above.
96
97TFTP update via DFU
98-------------------
99
100- It is now possible to update firmware (bootloader, kernel, rootfs, etc.) via
101 TFTP by using DFU (Device Firmware Upgrade). More information can be found in
102 ./doc/README.dfutftp documentation entry.
103
README.usb
1/*
2 * (C) Copyright 2001
3 * Denis Peter, MPL AG Switzerland
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8USB Support
9===========
10
11The USB support is implemented on the base of the UHCI Host
12controller.
13
14Currently supported are USB Hubs, USB Keyboards, USB Floppys, USB
15flash sticks and USB network adaptors.
16Tested with a TEAC Floppy TEAC FD-05PUB and Chicony KU-8933 Keyboard.
17
18How it works:
19-------------
20
21The USB (at least the USB UHCI) needs a frame list (4k), transfer
22descripor and queue headers which are all located in the main memory.
23The UHCI allocates every milisecond the PCI bus and reads the current
24frame pointer. This may cause to crash the OS during boot. So the USB
25_MUST_ be stopped during OS boot. This is the reason, why the USB is
26NOT automatically started during start-up. If someone needs the USB
27he has to start it and should therefore be aware that he had to stop
28it before booting the OS.
29
30For USB keyboards this can be done by a script which is automatically
31started after the U-Boot is up and running. To boot an OS with a an
32USB keyboard another script is necessary, which first disables the
33USB and then executes the boot command. If the boot command fails,
34the script can reenable the USB kbd.
35
36Common USB Commands:
37- usb start:
38- usb reset: (re)starts the USB. All USB devices will be
39 initialized and a device tree is build for them.
40- usb tree: shows all USB devices in a tree like display
41- usb info [dev]: shows all USB infos of the device dev, or of all
42 the devices
43- usb stop [f]: stops the USB. If f==1 the USB will also stop if
44 an USB keyboard is assigned as stdin. The stdin
45 is then switched to serial input.
46Storage USB Commands:
47- usb scan: scans the USB for storage devices.The USB must be
48 running for this command (usb start)
49- usb device [dev]: show or set current USB storage device
50- usb part [dev]: print partition table of one or all USB storage
51 devices
52- usb read addr blk# cnt:
53 read `cnt' blocks starting at block `blk#'to
54 memory address `addr'
55- usbboot addr dev:part:
56 boot from USB device
57
58Config Switches:
59----------------
60CONFIG_CMD_USB enables basic USB support and the usb command
61CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined
62 if using CONFIG_CMD_USB
63CONFIG_USB_KEYBOARD enables the USB Keyboard
64CONFIG_USB_STORAGE enables the USB storage devices
65CONFIG_USB_HOST_ETHER enables USB ethernet adapter support
66
67
68USB Host Networking
69===================
70
71If you have a supported USB Ethernet adapter you can use it in U-Boot
72to obtain an IP address and load a kernel from a network server.
73
74Note: USB Host Networking is not the same as making your board act as a USB
75client. In that case your board is pretending to be an Ethernet adapter
76and will appear as a network interface to an attached computer. In that
77case the connection is via a USB cable with the computer acting as the host.
78
79With USB Host Networking, your board is the USB host. It controls the
80Ethernet adapter to which it is directly connected and the connection to
81the outside world is your adapter's Ethernet cable. Your board becomes an
82independent network device, able to connect and perform network operations
83independently of your computer.
84
85
86Device support
87--------------
88
89Currently supported devices are listed in the drivers according to
90their vendor and product IDs. You can check your device by connecting it
91to a Linux machine and typing 'lsusb'. The drivers are in
92drivers/usb/eth.
93
94For example this lsusb output line shows a device with Vendor ID 0x0x95
95and product ID 0x7720:
96
97Bus 002 Device 010: ID 0b95:7720 ASIX Electronics Corp. AX88772
98
99If you look at drivers/usb/eth/asix.c you will see this line within the
100supported device list, so we know this adapter is supported.
101
102 { 0x0b95, 0x7720 }, /* Trendnet TU2-ET100 V3.0R */
103
104If your adapter is not listed there is a still a chance that it will
105work. Try looking up the manufacturer of the chip inside your adapter.
106or take the adapter apart and look for chip markings. Then add a line
107for your vendor/product ID into the table of the appropriate driver,
108build U-Boot and see if it works. If not then there might be differences
109between the chip in your adapter and the driver. You could try to get a
110datasheet for your device and add support for it to U-Boot. This is not
111particularly difficult - you only need to provide support for four basic
112functions: init, halt, send and recv.
113
114
115Enabling USB Host Networking
116----------------------------
117
118The normal U-Boot commands are used with USB networking, but you must
119start USB first. For example:
120
121usb start
122setenv bootfile /tftpboot/uImage
123bootp
124
125
126To enable USB Host Ethernet in U-Boot, your platform must of course
127support USB with CONFIG_CMD_USB enabled and working. You will need to
128add some config settings to your board config:
129
130CONFIG_CMD_USB=y /* the 'usb' interactive command */
131CONFIG_USB_HOST_ETHER=y /* Enable USB Ethernet adapters */
132
133and one or more of the following for individual adapter hardware:
134
135CONFIG_USB_ETHER_ASIX=y
136CONFIG_USB_ETHER_ASIX88179=y
137CONFIG_USB_ETHER_LAN75XX=y
138CONFIG_USB_ETHER_LAN78XX=y
139CONFIG_USB_ETHER_MCS7830=y
140CONFIG_USB_ETHER_RTL8152=y
141CONFIG_USB_ETHER_SMSC95XX=y
142
143As with built-in networking, you will also want to enable some network
144commands, for example:
145
146CONFIG_CMD_NET=y
147CONFIG_CMD_PING=y
148CONFIG_CMD_DHCP=y
149
150and some bootp options, which tell your board to obtain its subnet,
151gateway IP, host name and boot path from the bootp/dhcp server. These
152settings should start you off:
153
154#define CONFIG_BOOTP_SUBNETMASK
155#define CONFIG_BOOTP_GATEWAY
156#define CONFIG_BOOTP_HOSTNAME
157#define CONFIG_BOOTP_BOOTPATH
158
159You can also set the default IP address of your board and the server
160as well as the default file to load when a 'bootp' command is issued.
161However note that encoding these individual network settings into a
162common exectuable is discouraged, as it leads to potential conflicts,
163and all the parameters can either get stored in the board's external
164environment, or get obtained from the bootp server if not set.
165
166#define CONFIG_IPADDR 10.0.0.2 (replace with your value)
167#define CONFIG_SERVERIP 10.0.0.1 (replace with your value)
168#define CONFIG_BOOTFILE "uImage"
169
170
171The 'usb start' command should identify the adapter something like this:
172
173CrOS> usb start
174(Re)start USB...
175USB EHCI 1.00
176scanning bus for devices... 3 USB Device(s) found
177 scanning bus for storage devices... 0 Storage Device(s) found
178 scanning bus for ethernet devices... 1 Ethernet Device(s) found
179CrOS> print ethact
180ethact=asx0
181
182You can see that it found an ethernet device and we can print out the
183device name (asx0 in this case).
184
185Then 'bootp' or 'dhcp' should use it to obtain an IP address from DHCP,
186perhaps something like this:
187
188CrOS> bootp
189Waiting for Ethernet connection... done.
190BOOTP broadcast 1
191BOOTP broadcast 2
192DHCP client bound to address 172.22.73.81
193Using asx0 device
194TFTP from server 172.22.72.144; our IP address is 172.22.73.81
195Filename '/tftpboot/uImage-sjg-seaboard-261347'.
196Load address: 0x40c000
197Loading: #################################################################
198 #################################################################
199 #################################################################
200 ################################################
201done
202Bytes transferred = 3557464 (364858 hex)
203CrOS>
204
205
206Another way of doing this is to issue a tftp command, which will cause the
207bootp to happen automatically.
208
209
210MAC Addresses
211-------------
212
213Most Ethernet dongles have a built-in MAC address which is unique in the
214world. This is important so that devices on the network can be
215distinguised from each other. MAC address conflicts are evil and
216generally result in strange and eratic behaviour.
217
218Some boards have USB Ethernet chips on-board, and these sometimes do not
219have an assigned MAC address. In this case it is up to you to assign
220one which is unique. You should obtain a valid MAC address from a range
221assigned to you before you ship the product.
222
223Built-in Ethernet adapters support setting the MAC address by means of
224an ethaddr environment variable for each interface (ethaddr, eth1addr,
225eth2addr). There is similar support on the USB network side, using the
226names usbethaddr, usbeth1addr, etc. They are kept separate since we
227don't want a USB device taking the MAC address of a built-in device or
228vice versa.
229
230So if your USB Ethernet chip doesn't have a MAC address available then
231you must set usbethaddr to a suitable MAC address. At the time of
232writing this functionality is only supported by the SMSC driver.
233
README.vf610
1U-Boot for Freescale Vybrid VF610
2
3This file contains information for the port of U-Boot to the Freescale Vybrid
4VF610 SoC.
5
61. CONVENTIONS FOR FUSE ASSIGNMENTS
7-----------------------------------
8
91.1 MAC Address: It is stored in fuse bank 4, with the 16 msbs in word 2 and the
10 32 lsbs in word 3.
11
README.video
1/*
2 * (C) Copyright 2000
3 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8"video-mode" environment variable
9=================================
10
11The 'video-mode' environment variable can be used to enable and configure
12some video drivers. The format matches the video= command-line option used
13for Linux:
14
15 video-mode=<driver>:<xres>x<yres>-<depth>@<freq><,option=string>
16
17 <driver> The video driver name, ignored by U-Boot
18 <xres> The X resolution (in pixels) to use.
19 <yres> The Y resolution (in pixels) to use.
20 <depth> The color depth (in bits) to use.
21 <freq> The frequency (in Hz) to use.
22 <options> A comma-separated list of device-specific options
23
24
25U-Boot MPC8xx video controller driver
26=====================================
27
28The driver has been tested with the following configurations:
29
30- MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it
31
32Example: video-mode=fslfb:1280x1024-32@60,monitor=dvi
33
34
35U-Boot sunxi video controller driver
36====================================
37
38U-Boot supports hdmi and lcd output on Allwinner sunxi SoCs, lcd output
39requires the CONFIG_VIDEO_LCD_MODE Kconfig value to be set.
40
41The sunxi U-Boot driver supports the following video-mode options:
42
43- monitor=[none|dvi|hdmi|lcd|vga|composite-*] - Select the video output to use
44 none: Disable video output.
45 dvi/hdmi: Selects output over the hdmi connector with dvi resp. hdmi output
46 format, if edid is used the format is automatically selected.
47 lcd: Selects video output to a LCD screen.
48 vga: Selects video output over the VGA connector.
49 composite-pal/composite-ntsc/composite-pal-m/composite-pal-nc:
50 Selects composite video output, note the specified resolution is
51 ignored with composite video output.
52 Defaults to monitor=dvi.
53
54- hpd=[0|1] - Enable use of the hdmi HotPlug Detect feature
55 0: Disabled. Configure dvi/hdmi output even if no cable is detected
56 1: Enabled. Fallback to the lcd / vga / none in that order (if available)
57 Defaults to hpd=1.
58
59- hpd_delay=<int> - How long to wait for the hdmi HPD signal in milliseconds
60 When the monitor and the board power up at the same time, it may take some
61 time for the monitor to assert the HPD signal. This configures how long to
62 wait for the HPD signal before assuming no cable is connected.
63 Defaults to hpd_delay=500.
64
65- edid=[0|1] - Enable use of DDC + EDID to get monitor info
66 0: Disabled.
67 1: Enabled. If valid EDID info was read from the monitor the EDID info will
68 overrides the xres, yres and refresh from the video-mode env. variable.
69 Defaults to edid=1.
70
71- overscan_x/overscan_y=<int> - Set x/y overscan value
72 This configures a black border on the left and right resp. top and bottom
73 to deal with overscanning displays. Defaults to overscan_x=32 and
74 overscan_y=20 for composite monitors, 0 for other monitors.
75
76For example to always use the hdmi connector, even if no cable is inserted,
77using edid info when available and otherwise initalizing it at 1024x768@60Hz,
78use: "setenv video-mode sunxi:1024x768-24@60,monitor=dvi,hpd=0,edid=1".
79
README.vxworks
1#
2# Copyright (C) 2013, Miao Yan <miao.yan@windriver.com>
3# Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
4#
5# SPDX-License-Identifier: GPL-2.0+
6#
7
8VxWorks Support
9===============
10
11This document describes the information about U-Boot loading VxWorks kernel.
12
13Status
14------
15U-Boot supports loading VxWorks kernels via 'bootvx' and 'bootm' commands.
16For booting old kernels (6.9.x) on PowerPC and ARM, and all kernel versions
17on other architectures, 'bootvx' shall be used. For booting VxWorks 7 kernels
18on PowerPC and ARM, 'bootm' shall be used.
19
2064-bit x86 kernel cannot be loaded as of today.
21
22VxWork 7 on PowerPC and ARM
23---------------------------
24From VxWorks 7, VxWorks starts adopting device tree as its hardware decription
25mechansim (for PowerPC and ARM), thus requiring boot interface changes.
26This section will describe the new interface.
27
28For PowerPC, the calling convention of the new VxWorks entry point conforms to
29the ePAPR standard, which is shown below (see ePAPR for more details):
30
31 void (*kernel_entry)(fdt_addr, 0, 0, EPAPR_MAGIC, boot_IMA, 0, 0)
32
33For ARM, the calling convention is show below:
34
35 void (*kernel_entry)(void *fdt_addr)
36
37When booting new VxWorks kernel (uImage format), the parameters passed to bootm
38is like below:
39
40 bootm <kernel image address> - <device tree address>
41
42VxWorks bootline
43----------------
44When using 'bootvx', the kernel bootline must be prepared by U-Boot at a
45board-specific address before loading VxWorks. U-Boot supplies its address
46via "bootaddr" environment variable. To check where the bootline should be
47for a specific board, go to the VxWorks BSP for that board, and look for a
48parameter called BOOT_LINE_ADRS. Assign its value to "bootaddr". A typical
49value for "bootaddr" is 0x101200.
50
51If a "bootargs" variable is defined, its content will be copied to the memory
52location pointed by "bootaddr" as the kernel bootline. If "bootargs" is not
53there, command 'bootvx' can construct a valid bootline using the following
54environments variables: bootdev, bootfile, ipaddr, netmask, serverip,
55gatewayip, hostname, othbootargs.
56
57When using 'bootm', just define "bootargs" in the environment and U-Boot will
58handle bootline fix up for the kernel dtb automatically.
59
60Serial console
61--------------
62It's very common that VxWorks BSPs configure a different baud rate for the
63serial console from what is being used by U-Boot. For example, VxWorks tends
64to use 9600 as the default baud rate on all x86 BSPs while U-Boot uses 115200.
65Please configure both U-Boot and VxWorks to use the same baud rate, or it may
66look like VxWorks hangs somewhere as nothing outputs on the serial console.
67
68x86-specific information
69------------------------
70Before loading an x86 kernel, two additional environment variables need to be
71provided. They are "e820data" and "e820info", which represent the address of
72E820 table and E820 information (defined by VxWorks) in system memory.
73
74Check VxWorks kernel configuration to look for BIOS_E820_DATA_START and
75BIOS_E820_INFO_START, and assign their values to "e820data" and "e820info"
76accordingly. If neither of these two are supplied, U-Boot assumes a default
77location at 0x4000 for "e820data" and 0x4a00 for "e820info". Typical values
78for "e820data" and "e820info" are 0x104000 and 0x104a00. But there is one
79exception on Intel Galileo, where "e820data" and "e820info" should be left
80unset, which assume the default location for VxWorks.
81
82Note since currently U-Boot does not support ACPI yet, VxWorks kernel must
83be configured to use MP table and virtual wire interrupt mode. This requires
84INCLUDE_MPTABLE_BOOT_OP and INCLUDE_VIRTUAL_WIRE_MODE to be included in a
85VxWorks kernel configuration.
86
README.watchdog
1Watchdog driver general info
2
3CONFIG_HW_WATCHDOG
4 This enables hw_watchdog_reset to be called during various loops,
5 including waiting for a character on a serial port. But it
6 does not also call hw_watchdog_init. Boards which want this
7 enabled must call this function in their board file. This split
8 is useful because some rom's enable the watchdog when downloading
9 new code, so it must be serviced, but the board would rather it
10 was off. And, it cannot always be turned off once on.
11
12CONFIG_WATCHDOG_TIMEOUT_MSECS
13 Can be used to change the timeout for i.mx31/35/5x/6x.
14 If not given, will default to maximum timeout. This would
15 be 128000 msec for i.mx31/35/5x/6x.
16
17CONFIG_AT91SAM9_WATCHDOG
18 Available for AT91SAM9 to service the watchdog.
19
20CONFIG_FTWDT010_WATCHDOG
21 Available for FTWDT010 to service the watchdog.
22
23CONFIG_FTWDT010_HW_TIMEOUT
24 Can be used to change the timeout for FTWDT010.
25
26CONFIG_IMX_WATCHDOG
27 Available for i.mx31/35/5x/6x to service the watchdog. This is not
28 automatically set because some boards (vision2) still need to define
29 their own hw_watchdog_reset routine.
30 TODO: vision2 is removed now, so perhaps this can be changed.
31
32CONFIG_XILINX_TB_WATCHDOG
33 Available for Xilinx Axi platforms to service timebase watchdog timer.
34
35CONFIG_BFIN_WATCHDOG
36 Available for bf5xx and bf6xx to service the watchdog.
37
README.x86
1#
2# Copyright (C) 2014, Simon Glass <sjg@chromium.org>
3# Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4#
5# SPDX-License-Identifier: GPL-2.0+
6#
7
8U-Boot on x86
9=============
10
11This document describes the information about U-Boot running on x86 targets,
12including supported boards, build instructions, todo list, etc.
13
14Status
15------
16U-Boot supports running as a coreboot [1] payload on x86. So far only Link
17(Chromebook Pixel) and QEMU [2] x86 targets have been tested, but it should
18work with minimal adjustments on other x86 boards since coreboot deals with
19most of the low-level details.
20
21U-Boot is a main bootloader on Intel Edison board.
22
23U-Boot also supports booting directly from x86 reset vector, without coreboot.
24In this case, known as bare mode, from the fact that it runs on the
25'bare metal', U-Boot acts like a BIOS replacement. The following platforms
26are supported:
27
28 - Bayley Bay CRB
29 - Congatec QEVAL 2.0 & conga-QA3/E3845
30 - Cougar Canyon 2 CRB
31 - Crown Bay CRB
32 - Galileo
33 - Link (Chromebook Pixel)
34 - Minnowboard MAX
35 - Samus (Chromebook Pixel 2015)
36 - QEMU x86
37
38As for loading an OS, U-Boot supports directly booting a 32-bit or 64-bit
39Linux kernel as part of a FIT image. It also supports a compressed zImage.
40U-Boot supports loading an x86 VxWorks kernel. Please check README.vxworks
41for more details.
42
43Build Instructions for U-Boot as coreboot payload
44-------------------------------------------------
45Building U-Boot as a coreboot payload is just like building U-Boot for targets
46on other architectures, like below:
47
48$ make coreboot-x86_defconfig
49$ make all
50
51Note this default configuration will build a U-Boot payload for the QEMU board.
52To build a coreboot payload against another board, you can change the build
53configuration during the 'make menuconfig' process.
54
55x86 architecture --->
56 ...
57 (qemu-x86) Board configuration file
58 (qemu-x86_i440fx) Board Device Tree Source (dts) file
59 (0x01920000) Board specific Cache-As-RAM (CAR) address
60 (0x4000) Board specific Cache-As-RAM (CAR) size
61
62Change the 'Board configuration file' and 'Board Device Tree Source (dts) file'
63to point to a new board. You can also change the Cache-As-RAM (CAR) related
64settings here if the default values do not fit your new board.
65
66Build Instructions for U-Boot as main bootloader
67------------------------------------------------
68
69Intel Edison instructions:
70
71Simple you can build U-Boot and obtain u-boot.bin
72
73$ make edison_defconfig
74$ make all
75
76Build Instructions for U-Boot as BIOS replacement (bare mode)
77-------------------------------------------------------------
78Building a ROM version of U-Boot (hereafter referred to as u-boot.rom) is a
79little bit tricky, as generally it requires several binary blobs which are not
80shipped in the U-Boot source tree. Due to this reason, the u-boot.rom build is
81not turned on by default in the U-Boot source tree. Firstly, you need turn it
82on by enabling the ROM build:
83
84$ export BUILD_ROM=y
85
86This tells the Makefile to build u-boot.rom as a target.
87
88---
89
90Chromebook Link specific instructions for bare mode:
91
92First, you need the following binary blobs:
93
94* descriptor.bin - Intel flash descriptor
95* me.bin - Intel Management Engine
96* mrc.bin - Memory Reference Code, which sets up SDRAM
97* video ROM - sets up the display
98
99You can get these binary blobs by:
100
101$ git clone http://review.coreboot.org/p/blobs.git
102$ cd blobs
103
104Find the following files:
105
106* ./mainboard/google/link/descriptor.bin
107* ./mainboard/google/link/me.bin
108* ./northbridge/intel/sandybridge/systemagent-r6.bin
109
110The 3rd one should be renamed to mrc.bin.
111As for the video ROM, you can get it here [3] and rename it to vga.bin.
112Make sure all these binary blobs are put in the board directory.
113
114Now you can build U-Boot and obtain u-boot.rom:
115
116$ make chromebook_link_defconfig
117$ make all
118
119---
120
121Chromebook Samus (2015 Pixel) instructions for bare mode:
122
123First, you need the following binary blobs:
124
125* descriptor.bin - Intel flash descriptor
126* me.bin - Intel Management Engine
127* mrc.bin - Memory Reference Code, which sets up SDRAM
128* refcode.elf - Additional Reference code
129* vga.bin - video ROM, which sets up the display
130
131If you have a samus you can obtain them from your flash, for example, in
132developer mode on the Chromebook (use Ctrl-Alt-F2 to obtain a terminal and
133log in as 'root'):
134
135 cd /tmp
136 flashrom -w samus.bin
137 scp samus.bin username@ip_address:/path/to/somewhere
138
139If not see the coreboot tree [4] where you can use:
140
141 bash crosfirmware.sh samus
142
143to get the image. There is also an 'extract_blobs.sh' scripts that you can use
144on the 'coreboot-Google_Samus.*' file to short-circuit some of the below.
145
146Then 'ifdtool -x samus.bin' on your development machine will produce:
147
148 flashregion_0_flashdescriptor.bin
149 flashregion_1_bios.bin
150 flashregion_2_intel_me.bin
151
152Rename flashregion_0_flashdescriptor.bin to descriptor.bin
153Rename flashregion_2_intel_me.bin to me.bin
154You can ignore flashregion_1_bios.bin - it is not used.
155
156To get the rest, use 'cbfstool samus.bin print':
157
158samus.bin: 8192 kB, bootblocksize 2864, romsize 8388608, offset 0x700000
159alignment: 64 bytes, architecture: x86
160
161Name Offset Type Size
162cmos_layout.bin 0x700000 cmos_layout 1164
163pci8086,0406.rom 0x7004c0 optionrom 65536
164spd.bin 0x710500 (unknown) 4096
165cpu_microcode_blob.bin 0x711540 microcode 70720
166fallback/romstage 0x722a00 stage 54210
167fallback/ramstage 0x72fe00 stage 96382
168config 0x7476c0 raw 6075
169fallback/vboot 0x748ec0 stage 15980
170fallback/refcode 0x74cd80 stage 75578
171fallback/payload 0x75f500 payload 62878
172u-boot.dtb 0x76eb00 (unknown) 5318
173(empty) 0x770000 null 196504
174mrc.bin 0x79ffc0 (unknown) 222876
175(empty) 0x7d66c0 null 167320
176
177You can extract what you need:
178
179 cbfstool samus.bin extract -n pci8086,0406.rom -f vga.bin
180 cbfstool samus.bin extract -n fallback/refcode -f refcode.rmod
181 cbfstool samus.bin extract -n mrc.bin -f mrc.bin
182 cbfstool samus.bin extract -n fallback/refcode -f refcode.bin -U
183
184Note that the -U flag is only supported by the latest cbfstool. It unpacks
185and decompresses the stage to produce a coreboot rmodule. This is a simple
186representation of an ELF file. You need the patch "Support decoding a stage
187with compression".
188
189Put all 5 files into board/google/chromebook_samus.
190
191Now you can build U-Boot and obtain u-boot.rom:
192
193$ make chromebook_link_defconfig
194$ make all
195
196If you are using em100, then this command will flash write -Boot:
197
198 em100 -s -d filename.rom -c W25Q64CV -r
199
200---
201
202Intel Crown Bay specific instructions for bare mode:
203
204U-Boot support of Intel Crown Bay board [4] relies on a binary blob called
205Firmware Support Package [5] to perform all the necessary initialization steps
206as documented in the BIOS Writer Guide, including initialization of the CPU,
207memory controller, chipset and certain bus interfaces.
208
209Download the Intel FSP for Atom E6xx series and Platform Controller Hub EG20T,
210install it on your host and locate the FSP binary blob. Note this platform
211also requires a Chipset Micro Code (CMC) state machine binary to be present in
212the SPI flash where u-boot.rom resides, and this CMC binary blob can be found
213in this FSP package too.
214
215* ./FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd
216* ./Microcode/C0_22211.BIN
217
218Rename the first one to fsp.bin and second one to cmc.bin and put them in the
219board directory.
220
221Note the FSP release version 001 has a bug which could cause random endless
222loop during the FspInit call. This bug was published by Intel although Intel
223did not describe any details. We need manually apply the patch to the FSP
224binary using any hex editor (eg: bvi). Go to the offset 0x1fcd8 of the FSP
225binary, change the following five bytes values from orginally E8 42 FF FF FF
226to B8 00 80 0B 00.
227
228As for the video ROM, you need manually extract it from the Intel provided
229BIOS for Crown Bay here [6], using the AMI MMTool [7]. Check PCI option ROM
230ID 8086:4108, extract and save it as vga.bin in the board directory.
231
232Now you can build U-Boot and obtain u-boot.rom
233
234$ make crownbay_defconfig
235$ make all
236
237---
238
239Intel Cougar Canyon 2 specific instructions for bare mode:
240
241This uses Intel FSP for 3rd generation Intel Core and Intel Celeron processors
242with mobile Intel HM76 and QM77 chipsets platform. Download it from Intel FSP
243website and put the .fd file (CHIEFRIVER_FSP_GOLD_001_09-OCTOBER-2013.fd at the
244time of writing) in the board directory and rename it to fsp.bin.
245
246Now build U-Boot and obtain u-boot.rom
247
248$ make cougarcanyon2_defconfig
249$ make all
250
251The board has two 8MB SPI flashes mounted, which are called SPI-0 and SPI-1 in
252the board manual. The SPI-0 flash should have flash descriptor plus ME firmware
253and SPI-1 flash is used to store U-Boot. For convenience, the complete 8MB SPI-0
254flash image is included in the FSP package (named Rom00_8M_MB_PPT.bin). Program
255this image to the SPI-0 flash according to the board manual just once and we are
256all set. For programming U-Boot we just need to program SPI-1 flash.
257
258---
259
260Intel Bay Trail based board instructions for bare mode:
261
262This uses as FSP as with Crown Bay, except it is for the Atom E3800 series.
263Two boards that use this configuration are Bayley Bay and Minnowboard MAX.
264Download this and get the .fd file (BAYTRAIL_FSP_GOLD_003_16-SEP-2014.fd at
265the time of writing). Put it in the corresponding board directory and rename
266it to fsp.bin.
267
268Obtain the VGA RAM (Vga.dat at the time of writing) and put it into the same
269board directory as vga.bin.
270
271You still need two more binary blobs. For Bayley Bay, they can be extracted
272from the sample SPI image provided in the FSP (SPI.bin at the time of writing).
273
274 $ ./tools/ifdtool -x BayleyBay/SPI.bin
275 $ cp flashregion_0_flashdescriptor.bin board/intel/bayleybay/descriptor.bin
276 $ cp flashregion_2_intel_me.bin board/intel/bayleybay/me.bin
277
278For Minnowboard MAX, we can reuse the same ME firmware above, but for flash
279descriptor, we need get that somewhere else, as the one above does not seem to
280work, probably because it is not designed for the Minnowboard MAX. Now download
281the original firmware image for this board from:
282
283http://firmware.intel.com/sites/default/files/2014-WW42.4-MinnowBoardMax.73-64-bit.bin_Release.zip
284
285Unzip it:
286
287 $ unzip 2014-WW42.4-MinnowBoardMax.73-64-bit.bin_Release.zip
288
289Use ifdtool in the U-Boot tools directory to extract the images from that
290file, for example:
291
292 $ ./tools/ifdtool -x MNW2MAX1.X64.0073.R02.1409160934.bin
293
294This will provide the descriptor file - copy this into the correct place:
295
296 $ cp flashregion_0_flashdescriptor.bin board/intel/minnowmax/descriptor.bin
297
298Now you can build U-Boot and obtain u-boot.rom
299Note: below are examples/information for Minnowboard MAX.
300
301$ make minnowmax_defconfig
302$ make all
303
304Checksums are as follows (but note that newer versions will invalidate this):
305
306$ md5sum -b board/intel/minnowmax/*.bin
307ffda9a3b94df5b74323afb328d51e6b4 board/intel/minnowmax/descriptor.bin
30869f65b9a580246291d20d08cbef9d7c5 board/intel/minnowmax/fsp.bin
309894a97d371544ec21de9c3e8e1716c4b board/intel/minnowmax/me.bin
310a2588537da387da592a27219d56e9962 board/intel/minnowmax/vga.bin
311
312The ROM image is broken up into these parts:
313
314Offset Description Controlling config
315------------------------------------------------------------
316000000 descriptor.bin Hard-coded to 0 in ifdtool
317001000 me.bin Set by the descriptor
318500000 <spare>
3196ef000 Environment CONFIG_ENV_OFFSET
3206f0000 MRC cache CONFIG_ENABLE_MRC_CACHE
321700000 u-boot-dtb.bin CONFIG_SYS_TEXT_BASE
322790000 vga.bin CONFIG_VGA_BIOS_ADDR
3237c0000 fsp.bin CONFIG_FSP_ADDR
3247f8000 <spare> (depends on size of fsp.bin)
3257ff800 U-Boot 16-bit boot CONFIG_SYS_X86_START16
326
327Overall ROM image size is controlled by CONFIG_ROM_SIZE.
328
329Note that the debug version of the FSP is bigger in size. If this version
330is used, CONFIG_FSP_ADDR needs to be configured to 0xfffb0000 instead of
331the default value 0xfffc0000.
332
333---
334
335Intel Galileo instructions for bare mode:
336
337Only one binary blob is needed for Remote Management Unit (RMU) within Intel
338Quark SoC. Not like FSP, U-Boot does not call into the binary. The binary is
339needed by the Quark SoC itself.
340
341You can get the binary blob from Quark Board Support Package from Intel website:
342
343* ./QuarkSocPkg/QuarkNorthCluster/Binary/QuarkMicrocode/RMU.bin
344
345Rename the file and put it to the board directory by:
346
347 $ cp RMU.bin board/intel/galileo/rmu.bin
348
349Now you can build U-Boot and obtain u-boot.rom
350
351$ make galileo_defconfig
352$ make all
353
354---
355
356QEMU x86 target instructions for bare mode:
357
358To build u-boot.rom for QEMU x86 targets, just simply run
359
360$ make qemu-x86_defconfig
361$ make all
362
363Note this default configuration will build a U-Boot for the QEMU x86 i440FX
364board. To build a U-Boot against QEMU x86 Q35 board, you can change the build
365configuration during the 'make menuconfig' process like below:
366
367Device Tree Control --->
368 ...
369 (qemu-x86_q35) Default Device Tree for DT control
370
371Test with coreboot
372------------------
373For testing U-Boot as the coreboot payload, there are things that need be paid
374attention to. coreboot supports loading an ELF executable and a 32-bit plain
375binary, as well as other supported payloads. With the default configuration,
376U-Boot is set up to use a separate Device Tree Blob (dtb). As of today, the
377generated u-boot-dtb.bin needs to be packaged by the cbfstool utility (a tool
378provided by coreboot) manually as coreboot's 'make menuconfig' does not provide
379this capability yet. The command is as follows:
380
381# in the coreboot root directory
382$ ./build/util/cbfstool/cbfstool build/coreboot.rom add-flat-binary \
383 -f u-boot-dtb.bin -n fallback/payload -c lzma -l 0x1110000 -e 0x1110000
384
385Make sure 0x1110000 matches CONFIG_SYS_TEXT_BASE, which is the symbol address
386of _x86boot_start (in arch/x86/cpu/start.S).
387
388If you want to use ELF as the coreboot payload, change U-Boot configuration to
389use CONFIG_OF_EMBED instead of CONFIG_OF_SEPARATE.
390
391To enable video you must enable these options in coreboot:
392
393 - Set framebuffer graphics resolution (1280x1024 32k-color (1:5:5))
394 - Keep VESA framebuffer
395
396And include coreboot_fb.dtsi in your board's device tree source file, like:
397
398 /include/ "coreboot_fb.dtsi"
399
400At present it seems that for Minnowboard Max, coreboot does not pass through
401the video information correctly (it always says the resolution is 0x0). This
402works correctly for link though.
403
404Note: coreboot framebuffer driver does not work on QEMU. The reason is unknown
405at this point. Patches are welcome if you figure out anything wrong.
406
407Test with QEMU for bare mode
408----------------------------
409QEMU is a fancy emulator that can enable us to test U-Boot without access to
410a real x86 board. Please make sure your QEMU version is 2.3.0 or above test
411U-Boot. To launch QEMU with u-boot.rom, call QEMU as follows:
412
413$ qemu-system-i386 -nographic -bios path/to/u-boot.rom
414
415This will instantiate an emulated x86 board with i440FX and PIIX chipset. QEMU
416also supports emulating an x86 board with Q35 and ICH9 based chipset, which is
417also supported by U-Boot. To instantiate such a machine, call QEMU with:
418
419$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -M q35
420
421Note by default QEMU instantiated boards only have 128 MiB system memory. But
422it is enough to have U-Boot boot and function correctly. You can increase the
423system memory by pass '-m' parameter to QEMU if you want more memory:
424
425$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -m 1024
426
427This creates a board with 1 GiB system memory. Currently U-Boot for QEMU only
428supports 3 GiB maximum system memory and reserves the last 1 GiB address space
429for PCI device memory-mapped I/O and other stuff, so the maximum value of '-m'
430would be 3072.
431
432QEMU emulates a graphic card which U-Boot supports. Removing '-nographic' will
433show QEMU's VGA console window. Note this will disable QEMU's serial output.
434If you want to check both consoles, use '-serial stdio'.
435
436Multicore is also supported by QEMU via '-smp n' where n is the number of cores
437to instantiate. Note, the maximum supported CPU number in QEMU is 255.
438
439The fw_cfg interface in QEMU also provides information about kernel data,
440initrd, command-line arguments and more. U-Boot supports directly accessing
441these informtion from fw_cfg interface, which saves the time of loading them
442from hard disk or network again, through emulated devices. To use it , simply
443providing them in QEMU command line:
444
445$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -m 1024 -kernel /path/to/bzImage
446 -append 'root=/dev/ram console=ttyS0' -initrd /path/to/initrd -smp 8
447
448Note: -initrd and -smp are both optional
449
450Then start QEMU, in U-Boot command line use the following U-Boot command to
451setup kernel:
452
453 => qfw
454qfw - QEMU firmware interface
455
456Usage:
457qfw <command>
458 - list : print firmware(s) currently loaded
459 - cpus : print online cpu number
460 - load <kernel addr> <initrd addr> : load kernel and initrd (if any) and setup for zboot
461
462=> qfw load
463loading kernel to address 01000000 size 5d9d30 initrd 04000000 size 1b1ab50
464
465Here the kernel (bzImage) is loaded to 01000000 and initrd is to 04000000. Then,
466'zboot' can be used to boot the kernel:
467
468=> zboot 01000000 - 04000000 1b1ab50
469
470Updating U-Boot on Edison
471-------------------------
472By default Intel Edison boards are shipped with preinstalled heavily
473patched U-Boot v2014.04. Though it supports DFU which we may be able to
474use.
475
4761. Prepare u-boot.bin as described in chapter above. You still need one
477more step (if and only if you have original U-Boot), i.e. run the
478following command:
479
480$ truncate -s %4096 u-boot.bin
481
4822. Run your board and interrupt booting to U-Boot console. In the console
483call:
484
485 => run do_force_flash_os
486
4873. Wait for few seconds, it will prepare environment variable and runs
488DFU. Run DFU command from the host system:
489
490$ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin
491
4924. Return to U-Boot console and following hint. i.e. push Ctrl+C, and
493reset the board:
494
495 => reset
496
497CPU Microcode
498-------------
499Modern CPUs usually require a special bit stream called microcode [8] to be
500loaded on the processor after power up in order to function properly. U-Boot
501has already integrated these as hex dumps in the source tree.
502
503SMP Support
504-----------
505On a multicore system, U-Boot is executed on the bootstrap processor (BSP).
506Additional application processors (AP) can be brought up by U-Boot. In order to
507have an SMP kernel to discover all of the available processors, U-Boot needs to
508prepare configuration tables which contain the multi-CPUs information before
509loading the OS kernel. Currently U-Boot supports generating two types of tables
510for SMP, called Simple Firmware Interface (SFI) [9] and Multi-Processor (MP)
511[10] tables. The writing of these two tables are controlled by two Kconfig
512options GENERATE_SFI_TABLE and GENERATE_MP_TABLE.
513
514Driver Model
515------------
516x86 has been converted to use driver model for serial, GPIO, SPI, SPI flash,
517keyboard, real-time clock, USB. Video is in progress.
518
519Device Tree
520-----------
521x86 uses device tree to configure the board thus requires CONFIG_OF_CONTROL to
522be turned on. Not every device on the board is configured via device tree, but
523more and more devices will be added as time goes by. Check out the directory
524arch/x86/dts/ for these device tree source files.
525
526Useful Commands
527---------------
528In keeping with the U-Boot philosophy of providing functions to check and
529adjust internal settings, there are several x86-specific commands that may be
530useful:
531
532fsp - Display information about Intel Firmware Support Package (FSP).
533 This is only available on platforms which use FSP, mostly Atom.
534iod - Display I/O memory
535iow - Write I/O memory
536mtrr - List and set the Memory Type Range Registers (MTRR). These are used to
537 tell the CPU whether memory is cacheable and if so the cache write
538 mode to use. U-Boot sets up some reasonable values but you can
539 adjust then with this command.
540
541Booting Ubuntu
542--------------
543As an example of how to set up your boot flow with U-Boot, here are
544instructions for starting Ubuntu from U-Boot. These instructions have been
545tested on Minnowboard MAX with a SATA drive but are equally applicable on
546other platforms and other media. There are really only four steps and it's a
547very simple script, but a more detailed explanation is provided here for
548completeness.
549
550Note: It is possible to set up U-Boot to boot automatically using syslinux.
551It could also use the grub.cfg file (/efi/ubuntu/grub.cfg) to obtain the
552GUID. If you figure these out, please post patches to this README.
553
554Firstly, you will need Ubuntu installed on an available disk. It should be
555possible to make U-Boot start a USB start-up disk but for now let's assume
556that you used another boot loader to install Ubuntu.
557
558Use the U-Boot command line to find the UUID of the partition you want to
559boot. For example our disk is SCSI device 0:
560
561=> part list scsi 0
562
563Partition Map for SCSI device 0 -- Partition Type: EFI
564
565 Part Start LBA End LBA Name
566 Attributes
567 Type GUID
568 Partition GUID
569 1 0x00000800 0x001007ff ""
570 attrs: 0x0000000000000000
571 type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
572 guid: 9d02e8e4-4d59-408f-a9b0-fd497bc9291c
573 2 0x00100800 0x037d8fff ""
574 attrs: 0x0000000000000000
575 type: 0fc63daf-8483-4772-8e79-3d69d8477de4
576 guid: 965c59ee-1822-4326-90d2-b02446050059
577 3 0x037d9000 0x03ba27ff ""
578 attrs: 0x0000000000000000
579 type: 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
580 guid: 2c4282bd-1e82-4bcf-a5ff-51dedbf39f17
581 =>
582
583This shows that your SCSI disk has three partitions. The really long hex
584strings are called Globally Unique Identifiers (GUIDs). You can look up the
585'type' ones here [11]. On this disk the first partition is for EFI and is in
586VFAT format (DOS/Windows):
587
588 => fatls scsi 0:1
589 efi/
590
591 0 file(s), 1 dir(s)
592
593
594Partition 2 is 'Linux filesystem data' so that will be our root disk. It is
595in ext2 format:
596
597 => ext2ls scsi 0:2
598 <DIR> 4096 .
599 <DIR> 4096 ..
600 <DIR> 16384 lost+found
601 <DIR> 4096 boot
602 <DIR> 12288 etc
603 <DIR> 4096 media
604 <DIR> 4096 bin
605 <DIR> 4096 dev
606 <DIR> 4096 home
607 <DIR> 4096 lib
608 <DIR> 4096 lib64
609 <DIR> 4096 mnt
610 <DIR> 4096 opt
611 <DIR> 4096 proc
612 <DIR> 4096 root
613 <DIR> 4096 run
614 <DIR> 12288 sbin
615 <DIR> 4096 srv
616 <DIR> 4096 sys
617 <DIR> 4096 tmp
618 <DIR> 4096 usr
619 <DIR> 4096 var
620 <SYM> 33 initrd.img
621 <SYM> 30 vmlinuz
622 <DIR> 4096 cdrom
623 <SYM> 33 initrd.img.old
624 =>
625
626and if you look in the /boot directory you will see the kernel:
627
628 => ext2ls scsi 0:2 /boot
629 <DIR> 4096 .
630 <DIR> 4096 ..
631 <DIR> 4096 efi
632 <DIR> 4096 grub
633 3381262 System.map-3.13.0-32-generic
634 1162712 abi-3.13.0-32-generic
635 165611 config-3.13.0-32-generic
636 176500 memtest86+.bin
637 178176 memtest86+.elf
638 178680 memtest86+_multiboot.bin
639 5798112 vmlinuz-3.13.0-32-generic
640 165762 config-3.13.0-58-generic
641 1165129 abi-3.13.0-58-generic
642 5823136 vmlinuz-3.13.0-58-generic
643 19215259 initrd.img-3.13.0-58-generic
644 3391763 System.map-3.13.0-58-generic
645 5825048 vmlinuz-3.13.0-58-generic.efi.signed
646 28304443 initrd.img-3.13.0-32-generic
647 =>
648
649The 'vmlinuz' files contain a packaged Linux kernel. The format is a kind of
650self-extracting compressed file mixed with some 'setup' configuration data.
651Despite its size (uncompressed it is >10MB) this only includes a basic set of
652device drivers, enough to boot on most hardware types.
653
654The 'initrd' files contain a RAM disk. This is something that can be loaded
655into RAM and will appear to Linux like a disk. Ubuntu uses this to hold lots
656of drivers for whatever hardware you might have. It is loaded before the
657real root disk is accessed.
658
659The numbers after the end of each file are the version. Here it is Linux
660version 3.13. You can find the source code for this in the Linux tree with
661the tag v3.13. The '.0' allows for additional Linux releases to fix problems,
662but normally this is not needed. The '-58' is used by Ubuntu. Each time they
663release a new kernel they increment this number. New Ubuntu versions might
664include kernel patches to fix reported bugs. Stable kernels can exist for
665some years so this number can get quite high.
666
667The '.efi.signed' kernel is signed for EFI's secure boot. U-Boot has its own
668secure boot mechanism - see [12] [13] and cannot read .efi files at present.
669
670To boot Ubuntu from U-Boot the steps are as follows:
671
6721. Set up the boot arguments. Use the GUID for the partition you want to
673boot:
674
675 => setenv bootargs root=/dev/disk/by-partuuid/965c59ee-1822-4326-90d2-b02446050059 ro
676
677Here root= tells Linux the location of its root disk. The disk is specified
678by its GUID, using '/dev/disk/by-partuuid/', a Linux path to a 'directory'
679containing all the GUIDs Linux has found. When it starts up, there will be a
680file in that directory with this name in it. It is also possible to use a
681device name here, see later.
682
6832. Load the kernel. Since it is an ext2/4 filesystem we can do:
684
685 => ext2load scsi 0:2 03000000 /boot/vmlinuz-3.13.0-58-generic
686
687The address 30000000 is arbitrary, but there seem to be problems with using
688small addresses (sometimes Linux cannot find the ramdisk). This is 48MB into
689the start of RAM (which is at 0 on x86).
690
6913. Load the ramdisk (to 64MB):
692
693 => ext2load scsi 0:2 04000000 /boot/initrd.img-3.13.0-58-generic
694
6954. Start up the kernel. We need to know the size of the ramdisk, but can use
696a variable for that. U-Boot sets 'filesize' to the size of the last file it
697loaded.
698
699 => zboot 03000000 0 04000000 ${filesize}
700
701Type 'help zboot' if you want to see what the arguments are. U-Boot on x86 is
702quite verbose when it boots a kernel. You should see these messages from
703U-Boot:
704
705 Valid Boot Flag
706 Setup Size = 0x00004400
707 Magic signature found
708 Using boot protocol version 2.0c
709 Linux kernel version 3.13.0-58-generic (buildd@allspice) #97-Ubuntu SMP Wed Jul 8 02:56:15 UTC 2015
710 Building boot_params at 0x00090000
711 Loading bzImage at address 100000 (5805728 bytes)
712 Magic signature found
713 Initial RAM disk at linear address 0x04000000, size 19215259 bytes
714 Kernel command line: "root=/dev/disk/by-partuuid/965c59ee-1822-4326-90d2-b02446050059 ro"
715
716 Starting kernel ...
717
718U-Boot prints out some bootstage timing. This is more useful if you put the
719above commands into a script since then it will be faster.
720
721 Timer summary in microseconds:
722 Mark Elapsed Stage
723 0 0 reset
724 241,535 241,535 board_init_r
725 2,421,611 2,180,076 id=64
726 2,421,790 179 id=65
727 2,428,215 6,425 main_loop
728 48,860,584 46,432,369 start_kernel
729
730 Accumulated time:
731 240,329 ahci
732 1,422,704 vesa display
733
734Now the kernel actually starts: (if you want to examine kernel boot up message
735on the serial console, append "console=ttyS0,115200" to the kernel command line)
736
737 [ 0.000000] Initializing cgroup subsys cpuset
738 [ 0.000000] Initializing cgroup subsys cpu
739 [ 0.000000] Initializing cgroup subsys cpuacct
740 [ 0.000000] Linux version 3.13.0-58-generic (buildd@allspice) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #97-Ubuntu SMP Wed Jul 8 02:56:15 UTC 2015 (Ubuntu 3.13.0-58.97-generic 3.13.11-ckt22)
741 [ 0.000000] Command line: root=/dev/disk/by-partuuid/965c59ee-1822-4326-90d2-b02446050059 ro console=ttyS0,115200
742
743It continues for a long time. Along the way you will see it pick up your
744ramdisk:
745
746 [ 0.000000] RAMDISK: [mem 0x04000000-0x05253fff]
747...
748 [ 0.788540] Trying to unpack rootfs image as initramfs...
749 [ 1.540111] Freeing initrd memory: 18768K (ffff880004000000 - ffff880005254000)
750...
751
752Later it actually starts using it:
753
754 Begin: Running /scripts/local-premount ... done.
755
756You should also see your boot disk turn up:
757
758 [ 4.357243] scsi 1:0:0:0: Direct-Access ATA ADATA SP310 5.2 PQ: 0 ANSI: 5
759 [ 4.366860] sd 1:0:0:0: [sda] 62533296 512-byte logical blocks: (32.0 GB/29.8 GiB)
760 [ 4.375677] sd 1:0:0:0: Attached scsi generic sg0 type 0
761 [ 4.381859] sd 1:0:0:0: [sda] Write Protect is off
762 [ 4.387452] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
763 [ 4.399535] sda: sda1 sda2 sda3
764
765Linux has found the three partitions (sda1-3). Mercifully it doesn't print out
766the GUIDs. In step 1 above we could have used:
767
768 setenv bootargs root=/dev/sda2 ro
769
770instead of the GUID. However if you add another drive to your board the
771numbering may change whereas the GUIDs will not. So if your boot partition
772becomes sdb2, it will still boot. For embedded systems where you just want to
773boot the first disk, you have that option.
774
775The last thing you will see on the console is mention of plymouth (which
776displays the Ubuntu start-up screen) and a lot of 'Starting' messages:
777
778 * Starting Mount filesystems on boot [ OK ]
779
780After a pause you should see a login screen on your display and you are done.
781
782If you want to put this in a script you can use something like this:
783
784 setenv bootargs root=UUID=b2aaf743-0418-4d90-94cc-3e6108d7d968 ro
785 setenv boot zboot 03000000 0 04000000 \${filesize}
786 setenv bootcmd "ext2load scsi 0:2 03000000 /boot/vmlinuz-3.13.0-58-generic; ext2load scsi 0:2 04000000 /boot/initrd.img-3.13.0-58-generic; run boot"
787 saveenv
788
789The \ is to tell the shell not to evaluate ${filesize} as part of the setenv
790command.
791
792You can also bake this behaviour into your build by hard-coding the
793environment variables if you add this to minnowmax.h:
794
795#undef CONFIG_BOOTCOMMAND
796#define CONFIG_BOOTCOMMAND \
797 "ext2load scsi 0:2 03000000 /boot/vmlinuz-3.13.0-58-generic; " \
798 "ext2load scsi 0:2 04000000 /boot/initrd.img-3.13.0-58-generic; " \
799 "run boot"
800
801#undef CONFIG_EXTRA_ENV_SETTINGS
802#define CONFIG_EXTRA_ENV_SETTINGS "boot=zboot 03000000 0 04000000 ${filesize}"
803
804and change CONFIG_BOOTARGS value in configs/minnowmax_defconfig to:
805
806CONFIG_BOOTARGS="root=/dev/sda2 ro"
807
808Test with SeaBIOS
809-----------------
810SeaBIOS [14] is an open source implementation of a 16-bit x86 BIOS. It can run
811in an emulator or natively on x86 hardware with the use of U-Boot. With its
812help, we can boot some OSes that require 16-bit BIOS services like Windows/DOS.
813
814As U-Boot, we have to manually create a table where SeaBIOS gets various system
815information (eg: E820) from. The table unfortunately has to follow the coreboot
816table format as SeaBIOS currently supports booting as a coreboot payload.
817
818To support loading SeaBIOS, U-Boot should be built with CONFIG_SEABIOS on.
819Booting SeaBIOS is done via U-Boot's bootelf command, like below:
820
821 => tftp bios.bin.elf;bootelf
822 Using e1000#0 device
823 TFTP from server 10.10.0.100; our IP address is 10.10.0.108
824 ...
825 Bytes transferred = 122124 (1dd0c hex)
826 ## Starting application at 0x000ff06e ...
827 SeaBIOS (version rel-1.9.0)
828 ...
829
830bios.bin.elf is the SeaBIOS image built from SeaBIOS source tree.
831Make sure it is built as follows:
832
833 $ make menuconfig
834
835Inside the "General Features" menu, select "Build for coreboot" as the
836"Build Target". Inside the "Debugging" menu, turn on "Serial port debugging"
837so that we can see something as soon as SeaBIOS boots. Leave other options
838as in their default state. Then,
839
840 $ make
841 ...
842 Total size: 121888 Fixed: 66496 Free: 9184 (used 93.0% of 128KiB rom)
843 Creating out/bios.bin.elf
844
845Currently this is tested on QEMU x86 target with U-Boot chain-loading SeaBIOS
846to install/boot a Windows XP OS (below for example command to install Windows).
847
848 # Create a 10G disk.img as the virtual hard disk
849 $ qemu-img create -f qcow2 disk.img 10G
850
851 # Install a Windows XP OS from an ISO image 'winxp.iso'
852 $ qemu-system-i386 -serial stdio -bios u-boot.rom -hda disk.img -cdrom winxp.iso -smp 2 -m 512
853
854 # Boot a Windows XP OS installed on the virutal hard disk
855 $ qemu-system-i386 -serial stdio -bios u-boot.rom -hda disk.img -smp 2 -m 512
856
857This is also tested on Intel Crown Bay board with a PCIe graphics card, booting
858SeaBIOS then chain-loading a GRUB on a USB drive, then Linux kernel finally.
859
860If you are using Intel Integrated Graphics Device (IGD) as the primary display
861device on your board, SeaBIOS needs to be patched manually to get its VGA ROM
862loaded and run by SeaBIOS. SeaBIOS locates VGA ROM via the PCI expansion ROM
863register, but IGD device does not have its VGA ROM mapped by this register.
864Its VGA ROM is packaged as part of u-boot.rom at a configurable flash address
865which is unknown to SeaBIOS. An example patch is needed for SeaBIOS below:
866
867diff --git a/src/optionroms.c b/src/optionroms.c
868index 65f7fe0..c7b6f5e 100644
869--- a/src/optionroms.c
870+++ b/src/optionroms.c
871@@ -324,6 +324,8 @@ init_pcirom(struct pci_device *pci, int isvga, u64 *sources)
872 rom = deploy_romfile(file);
873 else if (RunPCIroms > 1 || (RunPCIroms == 1 && isvga))
874 rom = map_pcirom(pci);
875+ if (pci->bdf == pci_to_bdf(0, 2, 0))
876+ rom = (struct rom_header *)0xfff90000;
877 if (! rom)
878 // No ROM present.
879 return;
880
881Note: the patch above expects IGD device is at PCI b.d.f 0.2.0 and its VGA ROM
882is at 0xfff90000 which corresponds to CONFIG_VGA_BIOS_ADDR on Minnowboard MAX.
883Change these two accordingly if this is not the case on your board.
884
885Development Flow
886----------------
887These notes are for those who want to port U-Boot to a new x86 platform.
888
889Since x86 CPUs boot from SPI flash, a SPI flash emulator is a good investment.
890The Dediprog em100 can be used on Linux. The em100 tool is available here:
891
892 http://review.coreboot.org/p/em100.git
893
894On Minnowboard Max the following command line can be used:
895
896 sudo em100 -s -p LOW -d u-boot.rom -c W25Q64DW -r
897
898A suitable clip for connecting over the SPI flash chip is here:
899
900 http://www.dediprog.com/pd/programmer-accessories/EM-TC-8
901
902This allows you to override the SPI flash contents for development purposes.
903Typically you can write to the em100 in around 1200ms, considerably faster
904than programming the real flash device each time. The only important
905limitation of the em100 is that it only supports SPI bus speeds up to 20MHz.
906This means that images must be set to boot with that speed. This is an
907Intel-specific feature - e.g. tools/ifttool has an option to set the SPI
908speed in the SPI descriptor region.
909
910If your chip/board uses an Intel Firmware Support Package (FSP) it is fairly
911easy to fit it in. You can follow the Minnowboard Max implementation, for
912example. Hopefully you will just need to create new files similar to those
913in arch/x86/cpu/baytrail which provide Bay Trail support.
914
915If you are not using an FSP you have more freedom and more responsibility.
916The ivybridge support works this way, although it still uses a ROM for
917graphics and still has binary blobs containing Intel code. You should aim to
918support all important peripherals on your platform including video and storage.
919Use the device tree for configuration where possible.
920
921For the microcode you can create a suitable device tree file using the
922microcode tool:
923
924 ./tools/microcode-tool -d microcode.dat -m <model> create
925
926or if you only have header files and not the full Intel microcode.dat database:
927
928 ./tools/microcode-tool -H BAY_TRAIL_FSP_KIT/Microcode/M0130673322.h \
929 -H BAY_TRAIL_FSP_KIT/Microcode/M0130679901.h \
930 -m all create
931
932These are written to arch/x86/dts/microcode/ by default.
933
934Note that it is possible to just add the micrcode for your CPU if you know its
935model. U-Boot prints this information when it starts
936
937 CPU: x86_64, vendor Intel, device 30673h
938
939so here we can use the M0130673322 file.
940
941If you platform can display POST codes on two little 7-segment displays on
942the board, then you can use post_code() calls from C or assembler to monitor
943boot progress. This can be good for debugging.
944
945If not, you can try to get serial working as early as possible. The early
946debug serial port may be useful here. See setup_internal_uart() for an example.
947
948During the U-Boot porting, one of the important steps is to write correct PIRQ
949routing information in the board device tree. Without it, device drivers in the
950Linux kernel won't function correctly due to interrupt is not working. Please
951refer to U-Boot doc [15] for the device tree bindings of Intel interrupt router.
952Here we have more details on the intel,pirq-routing property below.
953
954 intel,pirq-routing = <
955 PCI_BDF(0, 2, 0) INTA PIRQA
956 ...
957 >;
958
959As you see each entry has 3 cells. For the first one, we need describe all pci
960devices mounted on the board. For SoC devices, normally there is a chapter on
961the chipset datasheet which lists all the available PCI devices. For example on
962Bay Trail, this is chapter 4.3 (PCI configuration space). For the second one, we
963can get the interrupt pin either from datasheet or hardware via U-Boot shell.
964The reliable source is the hardware as sometimes chipset datasheet is not 100%
965up-to-date. Type 'pci header' plus the device's pci bus/device/function number
966from U-Boot shell below.
967
968 => pci header 0.1e.1
969 vendor ID = 0x8086
970 device ID = 0x0f08
971 ...
972 interrupt line = 0x09
973 interrupt pin = 0x04
974 ...
975
976It shows this PCI device is using INTD pin as it reports 4 in the interrupt pin
977register. Repeat this until you get interrupt pins for all the devices. The last
978cell is the PIRQ line which a particular interrupt pin is mapped to. On Intel
979chipset, the power-up default mapping is INTA/B/C/D maps to PIRQA/B/C/D. This
980can be changed by registers in LPC bridge. So far Intel FSP does not touch those
981registers so we can write down the PIRQ according to the default mapping rule.
982
983Once we get the PIRQ routing information in the device tree, the interrupt
984allocation and assignment will be done by U-Boot automatically. Now you can
985enable CONFIG_GENERATE_PIRQ_TABLE for testing Linux kernel using i8259 PIC and
986CONFIG_GENERATE_MP_TABLE for testing Linux kernel using local APIC and I/O APIC.
987
988This script might be useful. If you feed it the output of 'pci long' from
989U-Boot then it will generate a device tree fragment with the interrupt
990configuration for each device (note it needs gawk 4.0.0):
991
992 $ cat console_output |awk '/PCI/ {device=$4} /interrupt line/ {line=$4} \
993 /interrupt pin/ {pin = $4; if (pin != "0x00" && pin != "0xff") \
994 {patsplit(device, bdf, "[0-9a-f]+"); \
995 printf "PCI_BDF(%d, %d, %d) INT%c PIRQ%c\n", strtonum("0x" bdf[1]), \
996 strtonum("0x" bdf[2]), bdf[3], strtonum(pin) + 64, 64 + strtonum(pin)}}'
997
998Example output:
999 PCI_BDF(0, 2, 0) INTA PIRQA
1000 PCI_BDF(0, 3, 0) INTA PIRQA
1001...
1002
1003Porting Hints
1004-------------
1005
1006Quark-specific considerations:
1007
1008To port U-Boot to other boards based on the Intel Quark SoC, a few things need
1009to be taken care of. The first important part is the Memory Reference Code (MRC)
1010parameters. Quark MRC supports memory-down configuration only. All these MRC
1011parameters are supplied via the board device tree. To get started, first copy
1012the MRC section of arch/x86/dts/galileo.dts to your board's device tree, then
1013change these values by consulting board manuals or your hardware vendor.
1014Available MRC parameter values are listed in include/dt-bindings/mrc/quark.h.
1015The other tricky part is with PCIe. Quark SoC integrates two PCIe root ports,
1016but by default they are held in reset after power on. In U-Boot, PCIe
1017initialization is properly handled as per Quark's firmware writer guide.
1018In your board support codes, you need provide two routines to aid PCIe
1019initialization, which are board_assert_perst() and board_deassert_perst().
1020The two routines need implement a board-specific mechanism to assert/deassert
1021PCIe PERST# pin. Care must be taken that in those routines that any APIs that
1022may trigger PCI enumeration process are strictly forbidden, as any access to
1023PCIe root port's configuration registers will cause system hang while it is
1024held in reset. For more details, check how they are implemented by the Intel
1025Galileo board support codes in board/intel/galileo/galileo.c.
1026
1027coreboot:
1028
1029See scripts/coreboot.sed which can assist with porting coreboot code into
1030U-Boot drivers. It will not resolve all build errors, but will perform common
1031transformations. Remember to add attribution to coreboot for new files added
1032to U-Boot. This should go at the top of each file and list the coreboot
1033filename where the code originated.
1034
1035Debugging ACPI issues with Windows:
1036
1037Windows might cache system information and only detect ACPI changes if you
1038modify the ACPI table versions. So tweak them liberally when debugging ACPI
1039issues with Windows.
1040
1041ACPI Support Status
1042-------------------
1043Advanced Configuration and Power Interface (ACPI) [16] aims to establish
1044industry-standard interfaces enabling OS-directed configuration, power
1045management, and thermal management of mobile, desktop, and server platforms.
1046
1047Linux can boot without ACPI with "acpi=off" command line parameter, but
1048with ACPI the kernel gains the capabilities to handle power management.
1049For Windows, ACPI is a must-have firmware feature since Windows Vista.
1050CONFIG_GENERATE_ACPI_TABLE is the config option to turn on ACPI support in
1051U-Boot. This requires Intel ACPI compiler to be installed on your host to
1052compile ACPI DSDT table written in ASL format to AML format. You can get
1053the compiler via "apt-get install iasl" if you are on Ubuntu or download
1054the source from [17] to compile one by yourself.
1055
1056Current ACPI support in U-Boot is basically complete. More optional features
1057can be added in the future. The status as of today is:
1058
1059 * Support generating RSDT, XSDT, FACS, FADT, MADT, MCFG tables.
1060 * Support one static DSDT table only, compiled by Intel ACPI compiler.
1061 * Support S0/S3/S4/S5, reboot and shutdown from OS.
1062 * Support booting a pre-installed Ubuntu distribution via 'zboot' command.
1063 * Support installing and booting Ubuntu 14.04 (or above) from U-Boot with
1064 the help of SeaBIOS using legacy interface (non-UEFI mode).
1065 * Support installing and booting Windows 8.1/10 from U-Boot with the help
1066 of SeaBIOS using legacy interface (non-UEFI mode).
1067 * Support ACPI interrupts with SCI only.
1068
1069Features that are optional:
1070 * Dynamic AML bytecodes insertion at run-time. We may need this to support
1071 SSDT table generation and DSDT fix up.
1072 * SMI support. Since U-Boot is a modern bootloader, we don't want to bring
1073 those legacy stuff into U-Boot. ACPI spec allows a system that does not
1074 support SMI (a legacy-free system).
1075
1076ACPI was initially enabled on BayTrail based boards. Testing was done by booting
1077a pre-installed Ubuntu 14.04 from a SATA drive. Installing Ubuntu 14.04 and
1078Windows 8.1/10 to a SATA drive and booting from there is also tested. Most
1079devices seem to work correctly and the board can respond a reboot/shutdown
1080command from the OS.
1081
1082For other platform boards, ACPI support status can be checked by examining their
1083board defconfig files to see if CONFIG_GENERATE_ACPI_TABLE is set to y.
1084
1085The S3 sleeping state is a low wake latency sleeping state defined by ACPI
1086spec where all system context is lost except system memory. To test S3 resume
1087with a Linux kernel, simply run "echo mem > /sys/power/state" and kernel will
1088put the board to S3 state where the power is off. So when the power button is
1089pressed again, U-Boot runs as it does in cold boot and detects the sleeping
1090state via ACPI register to see if it is S3, if yes it means we are waking up.
1091U-Boot is responsible for restoring the machine state as it is before sleep.
1092When everything is done, U-Boot finds out the wakeup vector provided by OSes
1093and jump there. To determine whether ACPI S3 resume is supported, check to
1094see if CONFIG_HAVE_ACPI_RESUME is set for that specific board.
1095
1096Note for testing S3 resume with Windows, correct graphics driver must be
1097installed for your platform, otherwise you won't find "Sleep" option in
1098the "Power" submenu from the Windows start menu.
1099
1100EFI Support
1101-----------
1102U-Boot supports booting as a 32-bit or 64-bit EFI payload, e.g. with UEFI.
1103This is enabled with CONFIG_EFI_STUB. U-Boot can also run as an EFI
1104application, with CONFIG_EFI_APP. The CONFIG_EFI_LOADER option, where U-Booot
1105provides an EFI environment to the kernel (i.e. replaces UEFI completely but
1106provides the same EFI run-time services) is not currently supported on x86.
1107
1108See README.efi for details of EFI support in U-Boot.
1109
111064-bit Support
1111--------------
1112U-Boot supports booting a 64-bit kernel directly and is able to change to
111364-bit mode to do so. It also supports (with CONFIG_EFI_STUB) booting from
1114both 32-bit and 64-bit UEFI. However, U-Boot itself is currently always built
1115in 32-bit mode. Some access to the full memory range is provided with
1116arch_phys_memset().
1117
1118The development work to make U-Boot itself run in 64-bit mode has not yet
1119been attempted. The best approach would likely be to build a 32-bit SPL
1120image for U-Boot, with CONFIG_SPL_BUILD. This could then handle the early CPU
1121init in 16-bit and 32-bit mode, running the FSP and any other binaries that
1122are needed. Then it could change to 64-bit model and jump to U-Boot proper.
1123
1124Given U-Boot's extensive 64-bit support this has not been a high priority,
1125but it would be a nice addition.
1126
1127TODO List
1128---------
1129- Audio
1130- Chrome OS verified boot
1131- Building U-Boot to run in 64-bit mode
1132
1133References
1134----------
1135[1] http://www.coreboot.org
1136[2] http://www.qemu.org
1137[3] http://www.coreboot.org/~stepan/pci8086,0166.rom
1138[4] http://www.intel.com/content/www/us/en/embedded/design-tools/evaluation-platforms/atom-e660-eg20t-development-kit.html
1139[5] http://www.intel.com/fsp
1140[6] http://www.intel.com/content/www/us/en/secure/intelligent-systems/privileged/e6xx-35-b1-cmc22211.html
1141[7] http://www.ami.com/products/bios-uefi-tools-and-utilities/bios-uefi-utilities/
1142[8] http://en.wikipedia.org/wiki/Microcode
1143[9] http://simplefirmware.org
1144[10] http://www.intel.com/design/archives/processors/pro/docs/242016.htm
1145[11] https://en.wikipedia.org/wiki/GUID_Partition_Table
1146[12] http://events.linuxfoundation.org/sites/events/files/slides/chromeos_and_diy_vboot_0.pdf
1147[13] http://events.linuxfoundation.org/sites/events/files/slides/elce-2014.pdf
1148[14] http://www.seabios.org/SeaBIOS
1149[15] doc/device-tree-bindings/misc/intel,irq-router.txt
1150[16] http://www.acpi.info
1151[17] https://www.acpica.org/downloads
1152
README.xtensa
1U-Boot for the Xtensa Architecture
2==================================
3
4Xtensa Architecture and Diamond Cores
5-------------------------------------
6
7Xtensa is a configurable processor architecture from Tensilica, Inc.
8Diamond Cores are pre-configured instances available for license and
9SoC cores in the same manner as ARM, MIPS, etc.
10
11Xtensa licensees create their own Xtensa cores with selected features
12and custom instructions, registers and co-processors. The custom core
13is configured with Tensilica tools and built with Tensilica's Xtensa
14Processor Generator.
15
16There are an effectively infinite number of CPUs in the Xtensa
17architecture family. It is, however, not feasible to support individual
18Xtensa CPUs in U-Boot. Therefore, there is only a single 'xtensa' CPU
19in the cpu tree of U-Boot.
20
21In the same manner as the Linux port to Xtensa, U-Boot adapts to an
22individual Xtensa core configuration using a set of macros provided with
23the particular core. This is part of what is known as the hardware
24abstraction layer (HAL). For the purpose of U-Boot, the HAL consists only
25of a few header files. These provide CPP macros that customize sources,
26Makefiles, and the linker script.
27
28
29Adding support for an additional processor configuration
30--------------------------------------------------------
31
32The header files for one particular processor configuration are inside
33a variant-specific directory located in the arch/xtensa/include/asm
34directory. The name of that directory starts with 'arch-' followed by
35the name for the processor configuration, for example, arch-dc233c for
36the Diamond DC233 processor.
37
38 core.h Definitions for the core itself.
39
40The following files are part of the overlay but not used by U-Boot.
41
42 tie.h Co-processors and custom extensions defined
43 in the Tensilica Instruction Extension (TIE)
44 language.
45 tie-asm.h Assembly macros to access custom-defined registers
46 and states.
47
48
49Global Data Pointer, Exported Function Stubs, and the ABI
50---------------------------------------------------------
51
52To support standalone applications launched with the "go" command,
53U-Boot provides a jump table of entrypoints to exported functions
54(grep for EXPORT_FUNC). The implementation for Xtensa depends on
55which ABI (or function calling convention) is used.
56
57Windowed ABI presents unique difficulties with the approach based on
58keeping global data pointer in dedicated register. Because the register
59window rotates during a call, there is no register that is constantly
60available for the gd pointer. Therefore, on xtensa gd is a simple
61global variable. Another difficulty arises from the requirement to have
62an 'entry' at the beginning of a function, which rotates the register
63file and reserves a stack frame. This is an integral part of the
64windowed ABI implemented in hardware. It makes using a jump table to an
65arbitrary (separately compiled) function a bit tricky. Use of a simple
66wrapper is also very tedious due to the need to move all possible
67register arguments and adjust the stack to handle arguments that cannot
68be passed in registers. The most efficient approach is to have the jump
69table perform the 'entry' so as to pretend it's the start of the real
70function. This requires decoding the target function's 'entry'
71instruction to determine the stack frame size, and adjusting the stack
72pointer accordingly, then jumping into the target function just after
73the 'entry'. Decoding depends on the processor's endianness so uses the
74HAL. The implementation (12 instructions) is in examples/stubs.c.
75
76
77Access to Invalid Memory Addresses
78----------------------------------
79
80U-Boot does not check if memory addresses given as arguments to commands
81such as "md" are valid. There are two possible types of invalid
82addresses: an area of physical address space may not be mapped to RAM
83or peripherals, or in the presence of MMU an area of virtual address
84space may not be mapped to physical addresses.
85
86Accessing first type of invalid addresses may result in hardware lockup,
87reading of meaningless data, written data being ignored or an exception,
88depending on the CPU wiring to the system. Accessing second type of
89invalid addresses always ends with an exception.
90
91U-Boot for Xtensa provides a special memory exception handler that
92reports such access attempts and resets the board.
93
94
95------------------------------------------------------------------------------
96Chris Zankel
97Ross Morley
98
README.zfs
1This patch series adds support for ZFS listing and load to u-boot.
2
3To Enable zfs ls and load commands, modify the board specific config file with
4#define CONFIG_CMD_ZFS
5
6Steps to test:
7
81. After applying the patch, zfs specific commands can be seen
9 in the boot loader prompt using
10 UBOOT #help
11
12 zfsload- load binary file from a ZFS file system
13 zfsls - list files in a directory (default /)
14
152. To list the files in zfs pool, device or partition, execute
16 zfsls <interface> <dev[:part]> [POOL/@/dir/file]
17 For example:
18 UBOOT #zfsls mmc 0:5 /rpool/@/usr/bin/
19
203. To read and load a file from an ZFS formatted partition to RAM, execute
21 zfsload <interface> <dev[:part]> [addr] [filename] [bytes]
22 For example:
23 UBOOT #zfsload mmc 2:2 0x30007fc0 /rpool/@/boot/uImage
24
25References :
26 -- ZFS GRUB sources from Solaris GRUB-0.97
27 -- GRUB Bazaar repository
28
29Jorgen Lundman <lundman at lundman.net> 2012.
30
README.zynq
1#
2# Xilinx ZYNQ U-Boot
3#
4# (C) Copyright 2013 Xilinx, Inc.
5#
6# SPDX-License-Identifier: GPL-2.0+
7#
8
91. About this
10
11This document describes the information about Xilinx Zynq U-Boot -
12like supported boards, ML status and TODO list.
13
142. Zynq boards
15
16Xilinx Zynq-7000 All Programmable SoCs enable extensive system level
17differentiation, integration, and flexibility through hardware, software,
18and I/O programmability.
19
20* zc702 (single qspi, gem0, mmc) [1]
21* zc706 (dual parallel qspi, gem0, mmc) [2]
22* zed (single qspi, gem0, mmc) [3]
23* microzed (single qspi, gem0, mmc) [4]
24* zc770
25 - zc770-xm010 (single qspi, gem0, mmc)
26 - zc770-xm011 (8 or 16 bit nand)
27 - zc770-xm012 (nor)
28 - zc770-xm013 (dual parallel qspi, gem1)
29
303. Building
31
32 ex. configure and build for zc702 board
33 $ make zynq_zc702_config
34 $ make
35
364. Bootmode
37
38Zynq has a facility to read the bootmode from the slcr bootmode register
39once user is setting through jumpers on the board - see page no:1546 on [5]
40
41All possible bootmode values are defined in Table 6-2:Boot_Mode MIO Pins
42on [5].
43
44board_late_init() will read the bootmode values using slcr bootmode register
45at runtime and assign the modeboot variable to specific bootmode string which
46is intern used in autoboot.
47
48SLCR bootmode register Bit[3:0] values
49#define ZYNQ_BM_NOR 0x02
50#define ZYNQ_BM_SD 0x05
51#define ZYNQ_BM_JTAG 0x0
52
53"modeboot" variable can assign any of "norboot", "sdboot" or "jtagboot"
54bootmode strings at runtime.
55
565. Mainline status
57
58- Added basic board configurations support.
59- Added zynq u-boot bsp code - arch/arm/cpu/armv7/zynq
60- Added zynq boards named - zc70x, zed, microzed, zc770_xm010, zc770_xm012, zc770_xm013
61- Added zynq drivers:
62 serial - drivers/serial/serial_zynq.c
63 net - drivers/net/zynq_gem.c
64 mmc - drivers/mmc/zynq_sdhci.c
65 mmc - drivers/mmc/zynq_sdhci.c
66 spi- drivers/spi/zynq_spi.c
67 i2c - drivers/i2c/zynq_i2c.c
68 nand - drivers/mtd/nand/raw/zynq_nand.c
69- Done proper cleanups on board configurations
70- Added basic FDT support for zynq boards
71- d-cache support for zynq_gem.c
72
736. TODO
74
75- Add zynq boards support - zc770_xm011
76- Add zynq qspi controller driver
77- Add zynq nand controller driver
78- Add FDT support on individual drivers
79
80[1] http://www.xilinx.com/products/boards-and-kits/EK-Z7-ZC702-G.htm
81[2] http://www.xilinx.com/products/boards-and-kits/EK-Z7-ZC706-G.htm
82[3] http://zedboard.org/product/zedboard
83[4] http://zedboard.org/product/microzed
84[5] http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf
85
86--
87Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
88Sun Dec 15 14:52:41 IST 2013
89