xref: /openbmc/u-boot/doc/mvebu/cmd/bubt.txt (revision d024236e)
1BUBT (Burn ATF) command
2--------------------------
3Bubt command is used to burn a new ATF image to flash device.
4
5The bubt command gets the following parameters: ATF file name, destination device and source device.
6bubt [file-name] [destination [source]]
7	- file-name		Image file name to burn. default = flash-image.bin
8	- destination		Flash to burn to [spi, nand, mmc]. default = active flash
9	- source		Source to load image from [tftp, usb]. default = tftp
10
11Examples:
12	bubt				- Burn flash-image.bin from tftp to active flash
13	bubt latest-spi.bin nand	- Burn latest-spi.bin from tftp to NAND flash
14
15Notes:
16- For the TFTP interface set serverip and ipaddr.
17- To burn image to SD/eMMC device, the target is defined
18  by parameters CONFIG_SYS_MMC_ENV_DEV and CONFIG_SYS_MMC_ENV_PART.
19
20Bubt command details (burn image step by-step)
21----------------------------------------------
22This section describes bubt command flow:
23
241. Fetch the requested ATF image from an available interface (USB/SD/SATA/XDB, etc.)
25   into the DRAM, and place it at <load_address>
26   Example: when using the FAT file system on USB flash device:
27   # usb reset
28   # fatls usb 0 (see files in device)
29   # fatload usb 0 <load_address> <file_name>
30
312. Erase the target device:
32	- NAND:		# nand erase 0 100000
33	- SPI:		# sf probe 0
34			# sf erase 0 100000
35	- SD/eMMC:	# mmc dev <dev_id> <boot_partition>
36
37Notes:
38- The eMMC has 2 boot partitions (BOOT0 and BOOT1) and a user data partition (DATA).
39  The boot partitions are numbered as partition 1 and 2 in MMC driver.
40  Number 0 is used for user data partition and should not be utilized for storing
41  boot images and U-Boot environment in RAW mode since it will break file system
42  structures usually located here.
43  The default boot partition is BOOT0. It is selected by the following parameter:
44  CONFIG_SYS_MMC_ENV_PART=1
45  Valid values for this parameter are 1 for BOOT0 and 2 for BOOT1.
46  Please never use partition number 0 here!
47  The eMMC has 2 boot partitions (BOOT0 and BOOT1) and a user data partition (DATA).
48  The boot partitions are numbered as partition 1 and 2 in MMC driver.
49  Number 0 is used for user data partition and should not be utilized for storing
50  boot images and U-Boot environment in RAW mode since it will break file system
51  structures usually located here.
52  The default boot partition is BOOT0. It is selected by the following parameter:
53  CONFIG_SYS_MMC_ENV_PART=1
54  Valid values for this parameter are 1 for BOOT0 and 2 for BOOT1.
55  Please never use partition number 0 here!
56- The partition number is ignored if the target device is SD card.
57- The boot image offset starts at block 0 for eMMC and block 1 for SD devices.
58  The block 0 on SD devices is left for MBR storage.
59
603. Write the ATF image:
61	- NAND:		# nand write <load_address> 0 <ATF Size>
62	- SPI:		# sf write <load_address> 0 <ATF Size>
63	- SD/eMMC:	# mmc write <load_address> [0|1] <ATF Size>/<block_size>
64
65