[U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution

Marek Vasut marex at denx.de
Thu Jul 18 06:17:48 CEST 2013


Dear Heiko Schocher,

> Hello Lukasz,
> 
> Am 16.07.2013 17:35, schrieb Lukasz Majewski:
> > Dear All,
> > 
> > Since DFU usage at u-boot is spreading to different device types (MMC,
> > NAND), file systems, raw partitions, ubi, etc, I think that it is a
> > good moment to unify and structure the form of dfu_alt_info environment
> > variable.
> 
> Full Ack!
> 
> > Proposed new format for single dfu entity:
> > 
> > NAME     | Type | Device | Dev_num | Dev_part | FS   | start | size  |
> > 
> > where:
> > 
> > Name     - name of the alt setting (as seen by dfu-util -l)
> > Type     - description of the image (raw, file, img, command [*])
> > Device   - physical device on which data are stored (mmc, nand, "-")
> > Dev_num  - number of the device - it is possible to store data via DFU
> > 
> >             on several devices of the same type.
> > 
> > Dev_part - number of partitions on the device.
> 
> Should this be "number of the partition on the device"
> 
> You mean here the mtd partition for storing, right?
> 
> > FS       - information about file system on the device (fat,
> > 
> > 	   ext2/ext4, ubi).
> > 
> > start    - start offset from the beginning of the Device (byte or LBA
> > 
> >             number addressed)
> > 
> > size     - maximal number of blocks to be stored on the Device
> > 
> >   	   (expressed with Bytes of LBA number) (protection from
> >   	   overwriting the whole device)
> > 
> > Example:
> Maybe dummy questions ...
> 
> > NAME     | Type | Device | Dev_num | Dev_part | FS   | start | size  |
> > ----------------------------------------------------------------------
> > u-boot   | raw  | mmc    | 0       | "-" [**] | "-"  | 0x80  | 0x100 |
> > uImage   | file | mmc    | 0       | 2        | ext4 | "-"   | "-"   |
> 
> Is this enough information? Where to store the uImage file on the ext4
> partition?
> 
> > root.img | img  | mmc    | 0       | 5        | "-"  | "-"   | "-"   |
> 
> img means here: getting an image and storing it on the mtd partition
> "Dev_part" if start and size are marked with "-", beginning
> on start of the partition?
> 
> Wouldn't it be better to use here mtd partition names instead
> numbers for "Dev_part"?
> 
> What if "start" and "size" are filled with values for the "Type" "img"?
> Or is this forbidden for the "Type" "img"?
> 
> > root.img | raw  | mmc    | 0       | "-"      | "-"  | 0x1000| 0x4000|
> > 
> > u-boot   | raw  | nand   | 0       | "-"      | "-"  | 0x100 | 0x100 |
> > uImage   | file | nand   | 0       | 3        | ubi  | "-"   | "-"   |
> 
> s/uImage/rootfs.img ? s/file/img ?
> 
> For the FS "ubi" we need to specify, how to burn this into nand.
> I think we have no "ubi format" command.

Try "nand write.trimffs" to write UBI images produced with ubinize .

Best regards,
Marek Vasut


More information about the U-Boot mailing list