[U-Boot-Users] Using FIT Multi-Images for an Auto-Updater

Grant Erickson gerickson at nuovations.com
Tue May 27 20:08:55 CEST 2008


I am attempting to craft an auto-updater image consisting of three files in
a FIT multi-image:

    * u-boot.bin (Binary 512 KiB u-boot image)

    * boot.itb (FIT Multi-image)
      - vmlinux.bin.gz (Compressed Binary Linux Kernel)
      - devices.dtb (Binary FDT Blob)

    * root.img (JFFS2 File System)

and a script that effectively does:

    # Erase and write u-boot
    protect off fff80000 ffffffff
    era fff80000 ffffffff
    cp.b u-boot at 1 fff80000 <size>
    protect on fff80000 ffffffff
    # Erase and write boot images (primary and secondary)
    nand erase 0 400000
    nand write.i boot at 1 0 <size>
    nand erase 1C00000 400000
    nand write.i boot at 1 1C00000 <size>
    # Erase and write root file system images (primary and secondary)
    nand erase 800000 1400000
    nand write.i root at 1 800000 <size>
    nand erase 2400000 1400000
    nand write.i root at 1 2400000 <size>

when the user runs:

    => tftp 800000 aupd.itb
    => autoscr 800000

Based on my experience in working with the FIT multi-image 'boot.itb' above,
this seems like it should work; however, a few questions come to mind:

    1) Can a script self-reference files within the FIT multi-image as
       indicated above (u-boot at 1, boot at 1, root at 1, etc.)?

    2) Must the <size> values for 'cp.b' and 'nand write.i' be hard-coded in
       the script or can these be extracted somehow dynamically from the FIT
       image?

    3) What is an appropriate 'type' for 'u-boot.bin' and 'boot.itb' in the
       FIT multi-image? The type "firmware" seems appropriate in terms of
       how the code treats such a type but the name slightly misleading for
       this application.

Thanks,

Grant






More information about the U-Boot mailing list