xref: /OK3568_Linux_fs/u-boot/board/sandbox/README.sandbox (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Copyright (c) 2014 The Chromium OS Authors.
3*4882a593Smuzhiyun *
4*4882a593Smuzhiyun * SPDX-License-Identifier:	GPL-2.0+
5*4882a593Smuzhiyun */
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunNative Execution of U-Boot
8*4882a593Smuzhiyun==========================
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunThe 'sandbox' architecture is designed to allow U-Boot to run under Linux on
11*4882a593Smuzhiyunalmost any hardware. To achieve this it builds U-Boot (so far as possible)
12*4882a593Smuzhiyunas a normal C application with a main() and normal C libraries.
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunAll of U-Boot's architecture-specific code therefore cannot be built as part
15*4882a593Smuzhiyunof the sandbox U-Boot. The purpose of running U-Boot under Linux is to test
16*4882a593Smuzhiyunall the generic code, not specific to any one architecture. The idea is to
17*4882a593Smuzhiyuncreate unit tests which we can run to test this upper level code.
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunCONFIG_SANDBOX is defined when building a native board.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunThe board name is 'sandbox' but the vendor name is unset, so there is a
22*4882a593Smuzhiyunsingle board in board/sandbox.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunCONFIG_SANDBOX_BIG_ENDIAN should be defined when running on big-endian
25*4882a593Smuzhiyunmachines.
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunNote that standalone/API support is not available at present.
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunBasic Operation
31*4882a593Smuzhiyun---------------
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunTo run sandbox U-Boot use something like:
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun   make sandbox_defconfig all
36*4882a593Smuzhiyun   ./u-boot
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunNote:
39*4882a593Smuzhiyun   If you get errors about 'sdl-config: Command not found' you may need to
40*4882a593Smuzhiyun   install libsdl1.2-dev or similar to get SDL support. Alternatively you can
41*4882a593Smuzhiyun   build sandbox without SDL (i.e. no display/keyboard support) by removing
42*4882a593Smuzhiyun   the CONFIG_SANDBOX_SDL line in include/configs/sandbox.h or using:
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun      make sandbox_defconfig all NO_SDL=1
45*4882a593Smuzhiyun      ./u-boot
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun   If you are building on a 32-bit machine you may get errors from __ffs.h
48*4882a593Smuzhiyun   about shifting more than the machine word size. Edit the config file
49*4882a593Smuzhiyun   include/configs/sandbox.h and change CONFIG_SANDBOX_BITS_PER_LONG to 32.
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunU-Boot will start on your computer, showing a sandbox emulation of the serial
52*4882a593Smuzhiyunconsole:
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunU-Boot 2014.04 (Mar 20 2014 - 19:06:00)
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunDRAM:  128 MiB
58*4882a593SmuzhiyunUsing default environment
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunIn:    serial
61*4882a593SmuzhiyunOut:   lcd
62*4882a593SmuzhiyunErr:   lcd
63*4882a593Smuzhiyun=>
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunYou can issue commands as your would normally. If the command you want is
66*4882a593Smuzhiyunnot supported you can add it to include/configs/sandbox.h.
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunTo exit, type 'reset' or press Ctrl-C.
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunConsole / LCD support
72*4882a593Smuzhiyun---------------------
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunAssuming that CONFIG_SANDBOX_SDL is defined when building, you can run the
75*4882a593Smuzhiyunsandbox with LCD and keyboard emulation, using something like:
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun   ./u-boot -d u-boot.dtb -l
78*4882a593Smuzhiyun
79*4882a593SmuzhiyunThis will start U-Boot with a window showing the contents of the LCD. If
80*4882a593Smuzhiyunthat window has the focus then you will be able to type commands as you
81*4882a593Smuzhiyunwould on the console. You can adjust the display settings in the device
82*4882a593Smuzhiyuntree file - see arch/sandbox/dts/sandbox.dts.
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunCommand-line Options
86*4882a593Smuzhiyun--------------------
87*4882a593Smuzhiyun
88*4882a593SmuzhiyunVarious options are available, mostly for test purposes. Use -h to see
89*4882a593Smuzhiyunavailable options. Some of these are described below.
90*4882a593Smuzhiyun
91*4882a593SmuzhiyunThe terminal is normally in what is called 'raw-with-sigs' mode. This means
92*4882a593Smuzhiyunthat you can use arrow keys for command editing and history, but if you
93*4882a593Smuzhiyunpress Ctrl-C, U-Boot will exit instead of handling this as a keypress.
94*4882a593Smuzhiyun
95*4882a593SmuzhiyunOther options are 'raw' (so Ctrl-C is handled within U-Boot) and 'cooked'
96*4882a593Smuzhiyun(where the terminal is in cooked mode and cursor keys will not work, Ctrl-C
97*4882a593Smuzhiyunwill exit).
98*4882a593Smuzhiyun
99*4882a593SmuzhiyunAs mentioned above, -l causes the LCD emulation window to be shown.
100*4882a593Smuzhiyun
101*4882a593SmuzhiyunA device tree binary file can be provided with -d. If you edit the source
102*4882a593Smuzhiyun(it is stored at arch/sandbox/dts/sandbox.dts) you must rebuild U-Boot to
103*4882a593Smuzhiyunrecreate the binary file.
104*4882a593Smuzhiyun
105*4882a593SmuzhiyunTo execute commands directly, use the -c option. You can specify a single
106*4882a593Smuzhiyuncommand, or multiple commands separated by a semicolon, as is normal in
107*4882a593SmuzhiyunU-Boot. Be careful with quoting as the shall will normally process and
108*4882a593Smuzhiyunswallow quotes. When -c is used, U-Boot exists after the command is complete,
109*4882a593Smuzhiyunbut you can force it to go to interactive mode instead with -i.
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun
112*4882a593SmuzhiyunMemory Emulation
113*4882a593Smuzhiyun----------------
114*4882a593Smuzhiyun
115*4882a593SmuzhiyunMemory emulation is supported, with the size set by CONFIG_SYS_SDRAM_SIZE.
116*4882a593SmuzhiyunThe -m option can be used to read memory from a file on start-up and write
117*4882a593Smuzhiyunit when shutting down. This allows preserving of memory contents across
118*4882a593Smuzhiyuntest runs. You can tell U-Boot to remove the memory file after it is read
119*4882a593Smuzhiyun(on start-up) with the --rm_memory option.
120*4882a593Smuzhiyun
121*4882a593SmuzhiyunTo access U-Boot's emulated memory within the code, use map_sysmem(). This
122*4882a593Smuzhiyunfunction is used throughout U-Boot to ensure that emulated memory is used
123*4882a593Smuzhiyunrather than the U-Boot application memory. This provides memory starting
124*4882a593Smuzhiyunat 0 and extending to the size of the emulation.
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun
127*4882a593SmuzhiyunStoring State
128*4882a593Smuzhiyun-------------
129*4882a593Smuzhiyun
130*4882a593SmuzhiyunWith sandbox you can write drivers which emulate the operation of drivers on
131*4882a593Smuzhiyunreal devices. Some of these drivers may want to record state which is
132*4882a593Smuzhiyunpreserved across U-Boot runs. This is particularly useful for testing. For
133*4882a593Smuzhiyunexample, the contents of a SPI flash chip should not disappear just because
134*4882a593SmuzhiyunU-Boot exits.
135*4882a593Smuzhiyun
136*4882a593SmuzhiyunState is stored in a device tree file in a simple format which is driver-
137*4882a593Smuzhiyunspecific. You then use the -s option to specify the state file. Use -r to
138*4882a593Smuzhiyunmake U-Boot read the state on start-up (otherwise it starts empty) and -w
139*4882a593Smuzhiyunto write it on exit (otherwise the stored state is left unchanged and any
140*4882a593Smuzhiyunchanges U-Boot made will be lost). You can also use -n to tell U-Boot to
141*4882a593Smuzhiyunignore any problems with missing state. This is useful when first running
142*4882a593Smuzhiyunsince the state file will be empty.
143*4882a593Smuzhiyun
144*4882a593SmuzhiyunThe device tree file has one node for each driver - the driver can store
145*4882a593Smuzhiyunwhatever properties it likes in there. See 'Writing Sandbox Drivers' below
146*4882a593Smuzhiyunfor more details on how to get drivers to read and write their state.
147*4882a593Smuzhiyun
148*4882a593Smuzhiyun
149*4882a593SmuzhiyunRunning and Booting
150*4882a593Smuzhiyun-------------------
151*4882a593Smuzhiyun
152*4882a593SmuzhiyunSince there is no machine architecture, sandbox U-Boot cannot actually boot
153*4882a593Smuzhiyuna kernel, but it does support the bootm command. Filesystems, memory
154*4882a593Smuzhiyuncommands, hashing, FIT images, verified boot and many other features are
155*4882a593Smuzhiyunsupported.
156*4882a593Smuzhiyun
157*4882a593SmuzhiyunWhen 'bootm' runs a kernel, sandbox will exit, as U-Boot does on a real
158*4882a593Smuzhiyunmachine. Of course in this case, no kernel is run.
159*4882a593Smuzhiyun
160*4882a593SmuzhiyunIt is also possible to tell U-Boot that it has jumped from a temporary
161*4882a593Smuzhiyunprevious U-Boot binary, with the -j option. That binary is automatically
162*4882a593Smuzhiyunremoved by the U-Boot that gets the -j option. This allows you to write
163*4882a593Smuzhiyuntests which emulate the action of chain-loading U-Boot, typically used in
164*4882a593Smuzhiyuna situation where a second 'updatable' U-Boot is stored on your board. It
165*4882a593Smuzhiyunis very risky to overwrite or upgrade the only U-Boot on a board, since a
166*4882a593Smuzhiyunpower or other failure will brick the board and require return to the
167*4882a593Smuzhiyunmanufacturer in the case of a consumer device.
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun
170*4882a593SmuzhiyunSupported Drivers
171*4882a593Smuzhiyun-----------------
172*4882a593Smuzhiyun
173*4882a593SmuzhiyunU-Boot sandbox supports these emulations:
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun- Block devices
176*4882a593Smuzhiyun- Chrome OS EC
177*4882a593Smuzhiyun- GPIO
178*4882a593Smuzhiyun- Host filesystem (access files on the host from within U-Boot)
179*4882a593Smuzhiyun- I2C
180*4882a593Smuzhiyun- Keyboard (Chrome OS)
181*4882a593Smuzhiyun- LCD
182*4882a593Smuzhiyun- Network
183*4882a593Smuzhiyun- Serial (for console only)
184*4882a593Smuzhiyun- Sound (incomplete - see sandbox_sdl_sound_init() for details)
185*4882a593Smuzhiyun- SPI
186*4882a593Smuzhiyun- SPI flash
187*4882a593Smuzhiyun- TPM (Trusted Platform Module)
188*4882a593Smuzhiyun
189*4882a593SmuzhiyunA wide range of commands is implemented. Filesystems which use a block
190*4882a593Smuzhiyundevice are supported.
191*4882a593Smuzhiyun
192*4882a593SmuzhiyunAlso sandbox supports driver model (CONFIG_DM) and associated commands.
193*4882a593Smuzhiyun
194*4882a593Smuzhiyun
195*4882a593SmuzhiyunLinux RAW Networking Bridge
196*4882a593Smuzhiyun---------------------------
197*4882a593Smuzhiyun
198*4882a593SmuzhiyunThe sandbox_eth_raw driver bridges traffic between the bottom of the network
199*4882a593Smuzhiyunstack and the RAW sockets API in Linux. This allows much of the U-Boot network
200*4882a593Smuzhiyunfunctionality to be tested in sandbox against real network traffic.
201*4882a593Smuzhiyun
202*4882a593SmuzhiyunFor Ethernet network adapters, the bridge utilizes the RAW AF_PACKET API.  This
203*4882a593Smuzhiyunis needed to get access to the lowest level of the network stack in Linux. This
204*4882a593Smuzhiyunmeans that all of the Ethernet frame is included. This allows the U-Boot network
205*4882a593Smuzhiyunstack to be fully used. In other words, nothing about the Linux network stack is
206*4882a593Smuzhiyuninvolved in forming the packets that end up on the wire. To receive the
207*4882a593Smuzhiyunresponses to packets sent from U-Boot the network interface has to be set to
208*4882a593Smuzhiyunpromiscuous mode so that the network card won't filter out packets not destined
209*4882a593Smuzhiyunfor its configured (on Linux) MAC address.
210*4882a593Smuzhiyun
211*4882a593SmuzhiyunThe RAW sockets Ethernet API requires elevated privileges in Linux. You can
212*4882a593Smuzhiyuneither run as root, or you can add the capability needed like so:
213*4882a593Smuzhiyun
214*4882a593Smuzhiyunsudo /sbin/setcap "CAP_NET_RAW+ep" /path/to/u-boot
215*4882a593Smuzhiyun
216*4882a593SmuzhiyunThe default device tree for sandbox includes an entry for eth0 on the sandbox
217*4882a593Smuzhiyunhost machine whose alias is "eth1". The following are a few examples of network
218*4882a593Smuzhiyunoperations being tested on the eth0 interface.
219*4882a593Smuzhiyun
220*4882a593Smuzhiyunsudo /path/to/u-boot -D
221*4882a593Smuzhiyun
222*4882a593SmuzhiyunDHCP
223*4882a593Smuzhiyun....
224*4882a593Smuzhiyun
225*4882a593Smuzhiyunset autoload no
226*4882a593Smuzhiyunset ethact eth1
227*4882a593Smuzhiyundhcp
228*4882a593Smuzhiyun
229*4882a593SmuzhiyunPING
230*4882a593Smuzhiyun....
231*4882a593Smuzhiyun
232*4882a593Smuzhiyunset autoload no
233*4882a593Smuzhiyunset ethact eth1
234*4882a593Smuzhiyundhcp
235*4882a593Smuzhiyunping $gatewayip
236*4882a593Smuzhiyun
237*4882a593SmuzhiyunTFTP
238*4882a593Smuzhiyun....
239*4882a593Smuzhiyun
240*4882a593Smuzhiyunset autoload no
241*4882a593Smuzhiyunset ethact eth1
242*4882a593Smuzhiyundhcp
243*4882a593Smuzhiyunset serverip WWW.XXX.YYY.ZZZ
244*4882a593Smuzhiyuntftpboot u-boot.bin
245*4882a593Smuzhiyun
246*4882a593SmuzhiyunThe bridge also support (to a lesser extent) the localhost inderface, 'lo'.
247*4882a593Smuzhiyun
248*4882a593SmuzhiyunThe 'lo' interface cannot use the RAW AF_PACKET API because the lo interface
249*4882a593Smuzhiyundoesn't support Ethernet-level traffic. It is a higher-level interface that is
250*4882a593Smuzhiyunexpected only to be used at the AF_INET level of the API. As such, the most raw
251*4882a593Smuzhiyunwe can get on that interface is the RAW AF_INET API on UDP. This allows us to
252*4882a593Smuzhiyunset the IP_HDRINCL option to include everything except the Ethernet header in
253*4882a593Smuzhiyunthe packets we send and receive.
254*4882a593Smuzhiyun
255*4882a593SmuzhiyunBecause only UDP is supported, ICMP traffic will not work, so expect that ping
256*4882a593Smuzhiyuncommands will time out.
257*4882a593Smuzhiyun
258*4882a593SmuzhiyunThe default device tree for sandbox includes an entry for lo on the sandbox
259*4882a593Smuzhiyunhost machine whose alias is "eth5". The following is an example of a network
260*4882a593Smuzhiyunoperation being tested on the lo interface.
261*4882a593Smuzhiyun
262*4882a593SmuzhiyunTFTP
263*4882a593Smuzhiyun....
264*4882a593Smuzhiyun
265*4882a593Smuzhiyunset ethact eth5
266*4882a593Smuzhiyuntftpboot u-boot.bin
267*4882a593Smuzhiyun
268*4882a593Smuzhiyun
269*4882a593SmuzhiyunSPI Emulation
270*4882a593Smuzhiyun-------------
271*4882a593Smuzhiyun
272*4882a593SmuzhiyunSandbox supports SPI and SPI flash emulation.
273*4882a593Smuzhiyun
274*4882a593SmuzhiyunThis is controlled by the spi_sf argument, the format of which is:
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun   bus:cs:device:file
277*4882a593Smuzhiyun
278*4882a593Smuzhiyun   bus    - SPI bus number
279*4882a593Smuzhiyun   cs     - SPI chip select number
280*4882a593Smuzhiyun   device - SPI device emulation name
281*4882a593Smuzhiyun   file   - File on disk containing the data
282*4882a593Smuzhiyun
283*4882a593SmuzhiyunFor example:
284*4882a593Smuzhiyun
285*4882a593Smuzhiyun dd if=/dev/zero of=spi.bin bs=1M count=4
286*4882a593Smuzhiyun ./u-boot --spi_sf 0:0:M25P16:spi.bin
287*4882a593Smuzhiyun
288*4882a593SmuzhiyunWith this setup you can issue SPI flash commands as normal:
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun=>sf probe
291*4882a593SmuzhiyunSF: Detected M25P16 with page size 64 KiB, total 2 MiB
292*4882a593Smuzhiyun=>sf read 0 0 10000
293*4882a593SmuzhiyunSF: 65536 bytes @ 0x0 Read: OK
294*4882a593Smuzhiyun=>
295*4882a593Smuzhiyun
296*4882a593SmuzhiyunSince this is a full SPI emulation (rather than just flash), you can
297*4882a593Smuzhiyunalso use low-level SPI commands:
298*4882a593Smuzhiyun
299*4882a593Smuzhiyun=>sspi 0:0 32 9f
300*4882a593SmuzhiyunFF202015
301*4882a593Smuzhiyun
302*4882a593SmuzhiyunThis is issuing a READ_ID command and getting back 20 (ST Micro) part
303*4882a593Smuzhiyun0x2015 (the M25P16).
304*4882a593Smuzhiyun
305*4882a593SmuzhiyunDrivers are connected to a particular bus/cs using sandbox's state
306*4882a593Smuzhiyunstructure (see the 'spi' member). A set of operations must be provided
307*4882a593Smuzhiyunfor each driver.
308*4882a593Smuzhiyun
309*4882a593Smuzhiyun
310*4882a593SmuzhiyunConfiguration settings for the curious are:
311*4882a593Smuzhiyun
312*4882a593SmuzhiyunCONFIG_SANDBOX_SPI_MAX_BUS
313*4882a593Smuzhiyun	The maximum number of SPI buses supported by the driver (default 1).
314*4882a593Smuzhiyun
315*4882a593SmuzhiyunCONFIG_SANDBOX_SPI_MAX_CS
316*4882a593Smuzhiyun	The maximum number of chip selects supported by the driver
317*4882a593Smuzhiyun	(default 10).
318*4882a593Smuzhiyun
319*4882a593SmuzhiyunCONFIG_SPI_IDLE_VAL
320*4882a593Smuzhiyun	The idle value on the SPI bus
321*4882a593Smuzhiyun
322*4882a593Smuzhiyun
323*4882a593SmuzhiyunBlock Device Emulation
324*4882a593Smuzhiyun----------------------
325*4882a593Smuzhiyun
326*4882a593SmuzhiyunU-Boot can use raw disk images for block device emulation. To e.g. list
327*4882a593Smuzhiyunthe contents of the root directory on the second partion of the image
328*4882a593Smuzhiyun"disk.raw", you can use the following commands:
329*4882a593Smuzhiyun
330*4882a593Smuzhiyun=>host bind 0 ./disk.raw
331*4882a593Smuzhiyun=>ls host 0:2
332*4882a593Smuzhiyun
333*4882a593SmuzhiyunA disk image can be created using the following commands:
334*4882a593Smuzhiyun
335*4882a593Smuzhiyun$> truncate -s 1200M ./disk.raw
336*4882a593Smuzhiyun$> echo -e "label: gpt\n,64M,U\n,,L" | /usr/sbin/sgdisk  ./disk.raw
337*4882a593Smuzhiyun$> lodev=`sudo losetup -P -f --show ./disk.raw`
338*4882a593Smuzhiyun$> sudo mkfs.vfat -n EFI -v ${lodev}p1
339*4882a593Smuzhiyun$> sudo mkfs.ext4 -L ROOT -v ${lodev}p2
340*4882a593Smuzhiyun
341*4882a593Smuzhiyunor utilize the device described in test/py/make_test_disk.py:
342*4882a593Smuzhiyun
343*4882a593Smuzhiyun   #!/usr/bin/python
344*4882a593Smuzhiyun   import make_test_disk
345*4882a593Smuzhiyun   make_test_disk.makeDisk()
346*4882a593Smuzhiyun
347*4882a593SmuzhiyunWriting Sandbox Drivers
348*4882a593Smuzhiyun-----------------------
349*4882a593Smuzhiyun
350*4882a593SmuzhiyunGenerally you should put your driver in a file containing the word 'sandbox'
351*4882a593Smuzhiyunand put it in the same directory as other drivers of its type. You can then
352*4882a593Smuzhiyunimplement the same hooks as the other drivers.
353*4882a593Smuzhiyun
354*4882a593SmuzhiyunTo access U-Boot's emulated memory, use map_sysmem() as mentioned above.
355*4882a593Smuzhiyun
356*4882a593SmuzhiyunIf your driver needs to store configuration or state (such as SPI flash
357*4882a593Smuzhiyuncontents or emulated chip registers), you can use the device tree as
358*4882a593Smuzhiyundescribed above. Define handlers for this with the SANDBOX_STATE_IO macro.
359*4882a593SmuzhiyunSee arch/sandbox/include/asm/state.h for documentation. In short you provide
360*4882a593Smuzhiyuna node name, compatible string and functions to read and write the state.
361*4882a593SmuzhiyunSince writing the state can expand the device tree, you may need to use
362*4882a593Smuzhiyunstate_setprop() which does this automatically and avoids running out of
363*4882a593Smuzhiyunspace. See existing code for examples.
364*4882a593Smuzhiyun
365*4882a593Smuzhiyun
366*4882a593SmuzhiyunTesting
367*4882a593Smuzhiyun-------
368*4882a593Smuzhiyun
369*4882a593SmuzhiyunU-Boot sandbox can be used to run various tests, mostly in the test/
370*4882a593Smuzhiyundirectory. These include:
371*4882a593Smuzhiyun
372*4882a593Smuzhiyun  command_ut
373*4882a593Smuzhiyun     - Unit tests for command parsing and handling
374*4882a593Smuzhiyun  compression
375*4882a593Smuzhiyun     - Unit tests for U-Boot's compression algorithms, useful for
376*4882a593Smuzhiyun       security checking. It supports gzip, bzip2, lzma and lzo.
377*4882a593Smuzhiyun  driver model
378*4882a593Smuzhiyun     - Run this pytest
379*4882a593Smuzhiyun	  ./test/py/test.py --bd sandbox --build -k ut_dm -v
380*4882a593Smuzhiyun  image
381*4882a593Smuzhiyun     - Unit tests for images:
382*4882a593Smuzhiyun          test/image/test-imagetools.sh - multi-file images
383*4882a593Smuzhiyun          test/image/test-fit.py        - FIT images
384*4882a593Smuzhiyun  tracing
385*4882a593Smuzhiyun     - test/trace/test-trace.sh tests the tracing system (see README.trace)
386*4882a593Smuzhiyun  verified boot
387*4882a593Smuzhiyun      - See test/vboot/vboot_test.sh for this
388*4882a593Smuzhiyun
389*4882a593SmuzhiyunIf you change or enhance any of the above subsystems, you shold write or
390*4882a593Smuzhiyunexpand a test and include it with your patch series submission. Test
391*4882a593Smuzhiyuncoverage in U-Boot is limited, as we need to work to improve it.
392*4882a593Smuzhiyun
393*4882a593SmuzhiyunNote that many of these tests are implemented as commands which you can
394*4882a593Smuzhiyunrun natively on your board if desired (and enabled).
395*4882a593Smuzhiyun
396*4882a593SmuzhiyunIt would be useful to have a central script to run all of these.
397*4882a593Smuzhiyun
398*4882a593Smuzhiyun--
399*4882a593SmuzhiyunSimon Glass <sjg@chromium.org>
400*4882a593SmuzhiyunUpdated 22-Mar-14
401