blob: 52bd3e66c51e0d761186e4fc4335b75725ec7c22 [file] [log] [blame]
Konstantin Porotchkinfa61ef62016-12-08 12:22:28 +02001BUBT (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
Pali Rohárc8f50092023-01-22 01:25:12 +01008 - destination Flash to burn to [spi, nand, mmc, sata]. default = active flash
Pali Rohár4bf91e22023-01-21 23:29:36 +01009 - source Source to load image from [tftp, usb, mmc, sata]. default = tftp
Konstantin Porotchkinfa61ef62016-12-08 12:22:28 +020010
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.
Pali Rohárfc10a922023-01-21 22:58:28 +010017- To burn image to SD/eMMC device, the target is defined by HW partition.
Konstantin Porotchkinfa61ef62016-12-08 12:22:28 +020018
19Bubt command details (burn image step by-step)
20----------------------------------------------
21This section describes bubt command flow:
22
231. Fetch the requested ATF image from an available interface (USB/SD/SATA/XDB, etc.)
24 into the DRAM, and place it at <load_address>
25 Example: when using the FAT file system on USB flash device:
26 # usb reset
27 # fatls usb 0 (see files in device)
28 # fatload usb 0 <load_address> <file_name>
29
302. Erase the target device:
31 - NAND: # nand erase 0 100000
32 - SPI: # sf probe 0
33 # sf erase 0 100000
34 - SD/eMMC: # mmc dev <dev_id> <boot_partition>
35
36Notes:
37- The eMMC has 2 boot partitions (BOOT0 and BOOT1) and a user data partition (DATA).
38 The boot partitions are numbered as partition 1 and 2 in MMC driver.
39 Number 0 is used for user data partition and should not be utilized for storing
40 boot images and U-Boot environment in RAW mode since it will break file system
41 structures usually located here.
Pali Rohárfc10a922023-01-21 22:58:28 +010042
43 Currently configured boot partition can be printed by command:
44 # mmc partconf 0
45 (search for BOOT_PARTITION_ACCESS output, number 7 is user data)
46
47 Change it to BOOT0:
48 # mmc partconf 0 0 1 1
49
50 Change it to BOOT1:
51 # mmc partconf 0 0 2 2
52
53 Change it to user data:
54 # mmc partconf 0 0 7 0
55
Konstantin Porotchkinfa61ef62016-12-08 12:22:28 +020056- 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>