blob: 48e41bc2629030d3df5014f60dbecff3e8987cb9 [file] [log] [blame]
Lukasz Majewski585a6962015-08-24 00:21:49 +02001menu "DFU support"
2
Marek Vasut0f44d332018-02-16 16:41:17 +01003config DFU
4 bool
Marek Vasutbb4059a2018-02-16 16:41:18 +01005 imply DFU_OVER_USB if USB_GADGET
Marek Vasut0f44d332018-02-16 16:41:17 +01006
Marek Vasutbb4059a2018-02-16 16:41:18 +01007config DFU_OVER_USB
Tom Rini6828e602016-09-19 13:31:30 -04008 bool
Maxime Ripard70c56c12018-01-16 09:44:13 +01009 select HASH
Marek Vasut0f44d332018-02-16 16:41:17 +010010 depends on USB_GADGET
Tom Rini6828e602016-09-19 13:31:30 -040011
Marek Vasutbb4059a2018-02-16 16:41:18 +010012config DFU_OVER_TFTP
Marek Vasut0f44d332018-02-16 16:41:17 +010013 bool
14 depends on NET
15
16if DFU
AKASHI Takahiro045fd8b2020-10-29 13:47:41 +090017config DFU_WRITE_ALT
18 bool
AKASHI Takahiro045fd8b2020-10-29 13:47:41 +090019
Lukasz Majewski585a6962015-08-24 00:21:49 +020020config DFU_TFTP
21 bool "DFU via TFTP"
AKASHI Takahiro3149e522020-10-29 13:47:43 +090022 select UPDATE_COMMON
AKASHI Takahiroc32479d2020-11-17 09:27:16 +090023 select DFU_OVER_TFTP
Lukasz Majewski585a6962015-08-24 00:21:49 +020024 help
Robert P. J. Day1cc0a9f2016-05-04 04:47:31 -040025 This option allows performing update of DFU-managed medium with data
26 sent via TFTP boot.
Lukasz Majewski585a6962015-08-24 00:21:49 +020027
Robert P. J. Day1cc0a9f2016-05-04 04:47:31 -040028 Detailed description of this feature can be found at ./doc/README.dfutftp
Tom Rini6828e602016-09-19 13:31:30 -040029
Andy Shevchenko98a8f442019-11-27 18:12:15 +020030config DFU_TIMEOUT
31 bool "Timeout waiting for DFU"
32 help
33 This option adds an optional timeout parameter for DFU which, if set,
34 will cause DFU to only wait for that many seconds before exiting.
35
Tom Rini6828e602016-09-19 13:31:30 -040036config DFU_MMC
37 bool "MMC back end for DFU"
38 help
39 This option enables using DFU to read and write to MMC based storage.
40
41config DFU_NAND
42 bool "NAND back end for DFU"
Boris Brezillon96c29612018-11-13 12:43:10 +010043 depends on CMD_MTDPARTS
Miquel Raynalf3a02d22019-10-03 19:50:22 +020044 depends on MTD_RAW_NAND
Tom Rini6828e602016-09-19 13:31:30 -040045 help
46 This option enables using DFU to read and write to NAND based
47 storage.
48
Guillermo Rodríguez13cb7cc2019-12-16 16:27:57 +010049config DFU_NAND_TRIMFFS
50 bool "Skip empty pages when flashing UBI images to NAND"
51 depends on DFU_NAND
52 help
53 When flashing UBI images to NAND, enable the DROP_FFS flag to drop
54 trailing all-0xff pages.
55
Tom Rini6828e602016-09-19 13:31:30 -040056config DFU_RAM
57 bool "RAM back end for DFU"
58 help
59 This option enables using DFU to read and write RAM on the target.
60
61config DFU_SF
62 bool "SPI flash back end for DFU"
63 help
64 This option enables using DFU to read and write to SPI flash based
65 storage.
66
Patrick Delaunaycb986ba2019-10-14 09:28:00 +020067config DFU_SF_PART
68 bool "MTD partition support for SPI flash back end"
69 depends on DFU_SF && CMD_MTDPARTS
70 default y
71 help
72 This option enables the support of "part" and "partubi" target in
73 SPI flash DFU back end.
74
Patrick Delaunay6015af22019-10-14 09:28:04 +020075config DFU_MTD
76 bool "MTD back end for DFU"
Miquel Raynal1de770d2019-10-03 19:50:04 +020077 depends on DM_MTD
Heinrich Schuchardt40c79422020-07-21 20:06:31 +020078 depends on CMD_MTDPARTS
Patrick Delaunay6015af22019-10-14 09:28:04 +020079 help
80 This option enables using DFU to read and write to on any MTD device.
81
Patrick Delaunayec44cac2019-10-14 09:28:06 +020082config DFU_VIRT
83 bool "VIRTUAL flash back end for DFU"
84 help
85 This option enables using DFU to read and write to VIRTUAL device
86 used at board level to manage specific behavior
87 (OTP update for example).
88
Patrick Delaunay8cc28142020-02-26 10:28:41 +010089config SET_DFU_ALT_INFO
90 bool "Dynamic set of DFU alternate information"
91 help
92 This option allows to call the function set_dfu_alt_info to
93 dynamically build dfu_alt_info in board.
Aswath Govindraju8e3ea2d2021-06-01 16:51:47 +053094
95config SYS_DFU_DATA_BUF_SIZE
96 hex "Size of buffer to be allocated for transfer to raw storage device"
97 default 0x800000
98 help
99 DFU transfer uses a buffer before writing data to the
100 raw storage device. This value can be used for setting the
101 size of this buffer. The size of the buffer is also configurable
102 through the "dfu_bufsiz" environment variable. If both are
103 given the size of the buffer is set to "dfu_bufsize".
104
105config SYS_DFU_MAX_FILE_SIZE
106 hex "Size of the buffer to be allocated for transferring files"
107 default SYS_DFU_DATA_BUF_SIZE
108 help
109 When updating files rather than the raw storage device,
110 we use a static buffer to copy the file into and then write
111 the buffer once we've been given the whole file. Define
112 this to the maximum filesize (in bytes) for the buffer.
113 If undefined it defaults to the CONFIG_SYS_DFU_DATA_BUF_SIZE.
Tom Rini6828e602016-09-19 13:31:30 -0400114endif
Lukasz Majewski585a6962015-08-24 00:21:49 +0200115endmenu