bubt.txt 2.3 KB

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