All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution
@ 2013-07-16 15:35 Lukasz Majewski
  2013-07-16 21:27 ` Tormod Volden
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Lukasz Majewski @ 2013-07-16 15:35 UTC (permalink / raw)
  To: u-boot

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.


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.
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:

NAME     | Type | Device | Dev_num | Dev_part | FS   | start | size  |
----------------------------------------------------------------------
u-boot   | raw  | mmc    | 0       | "-" [**] | "-"  | 0x80  | 0x100 |
uImage   | file | mmc    | 0       | 2        | ext4 | "-"   | "-"   |
root.img | img  | mmc    | 0       | 5        | "-"  | "-"   | "-"   |
root.img | raw  | mmc    | 0       | "-"      | "-"  | 0x1000| 0x4000|

u-boot   | raw  | nand   | 0       | "-"      | "-"  | 0x100 | 0x100 |
uImage   | file | nand   | 0       | 3        | ubi  | "-"   | "-"   | 

command  | cmd  | "-"    | "-"     | "-"      | "-"  | "-"   | "-"   |

[*]  - support for sending command via DFU (see below)
[**] - "-" - indicates that no value is provided for this field.
	Despite of that it is mandatory to facilitate parsing. 


Please share any possible use cases - for now and for the future. My
goal is to devise dfu_alt_info structure which would work for us for a
long time.

After setting up new format, it would be possible to replace different
dfu command variations (i.e. dfu mmc 0, dfu nand) with only one command
"dfu".


------------------------------------------------------------------------
DFU extension - Command execution. 
------------------------------------------------------------------------

As a follow up I plan to add support for sending file filled with
command[s]. This would provide interface for automated tests and
force board to reset itself after emulated reset command from dfu-util
program.

dfu_alt_info = "command cmd - - - - - -;"

and then on host:
dfu-util -aN -D file_with_commands

The end step would be to extend dfu-util to support -C switch, which
would allow to send u-boot command quoted as text:

dfu-util -aN -C "reset"


-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2013-11-04  6:52 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16 15:35 [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution Lukasz Majewski
2013-07-16 21:27 ` Tormod Volden
2013-07-16 21:46   ` Lukasz Majewski
2013-07-17 10:26 ` Heiko Schocher
2013-07-17 14:34   ` Lukasz Majewski
2013-07-17 17:32     ` Tormod Volden
2013-07-18  5:36     ` Heiko Schocher
2013-07-18  7:13       ` Lukasz Majewski
2013-07-18  4:17   ` Marek Vasut
2013-07-18  5:16     ` Heiko Schocher
2013-07-18  8:09       ` Wolfgang Denk
2013-07-18 15:10         ` Marek Vasut
2013-07-19  4:45           ` Heiko Schocher
2013-07-19 13:55             ` Marek Vasut
2013-07-18 16:39 ` Tom Rini
2013-07-18 17:30   ` Michael Cashwell
2013-07-18 20:17     ` Lukasz Majewski
2013-07-18 22:33       ` Tom Rini
2013-08-23 10:07     ` Lukasz Majewski
2013-10-31 17:25 ` Lukasz Majewski
2013-10-31 20:32   ` Wolfgang Denk
2013-10-31 21:20     ` Lukasz Majewski
2013-10-31 23:11       ` Wolfgang Denk
2013-11-04  6:52         ` Lukasz Majewski
2013-11-01  6:15   ` Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.