U-Boot FIT image support


Introduction

U-Boot FIT image is a uImage format which can combine the Kernel zImage and Kernel dtbs. For more information, check the document in U-Boot source uImage.FIT/howto.txt

This page is mainly about how to make a FIT image for SAMA5D3X-EK board. This image can support rev.C motherboard and different Display modules (resist touch screen, PDA4 and PDA7).

Requirement

  • v3.10-at91 or v3.18-at91 Linux kernel are needed
  • v2014.07-at91 or v2015.01-at91 U-Boot are needed

Make a FIT image for SAMA5D3X-EK

Build a FIT image to combile kernel and dtbs

  • Install dtc, and mkimage tools in host machine, following commands is an example for Ubuntu 14.04:
    sudo apt-get install device-tree-compiler
    sudo apt-get install u-boot-tools
    
    # or if you are in Ubuntu 12.04, you need run following
    # sudo apt-get install uboot-mkimage
       
  • Download the these three files sama5d3xek_pda4.its, sama5d3xek_pda7.its and sama5d3xek.its under your_kernel_source/arch/arm/boot/dts
  • run following command to make a FIT image:
    mkimage -f sama5d3xek.its sama5d3xek.itb

If no error happened, then sama5d3xek.itb can be found in arch/arm/boot/dts folder.

Flash the FIT image to NAND flash

Make sure the U-Boot env, dtb, kernel partition is erased

Please erase the nand area (0xc0000~0x800000) before you program it:
  • using default U-Boot environment, so need to erase U-Boot environment in nandflash.
  • FIT image also includes the dtb and Linux kernel, so need to erase dtb, kernel partitions.

Launch SAM-BA tools

  • According to this section make sure that the chip can execute the SAM-BA Monitor.

  • Start SAM-BA GUI application
  • Select the board: "at91sama5d3x-ek" in the drop-down menu and choose the USB connection.
samba_board_select_sama5d3xek.png

  • Click the "Connect" button, the SAM-BA main window show up:
samba_main_window_nand_sama5d3xek.png

Configure NAND ECC

Flash the FIT image: sama5d3xek.itb

  • Modify the Address to 0x200000
  • Choose Send File Name open file dialog and select the FIT image binary file: sama5d3xek.itb and to program the binary to the NandFlash.
  • Click Send File button to program the binary to the NandFlash in address 0x200000.