blob: 604386bb734bbac3ea9d6281a5d170569865d062 [file] [log] [blame]
Lukasz Majewski770a8012015-08-24 00:21:49 +02001menu "DFU support"
2
Marek Vasutea84f802018-02-16 16:41:17 +01003config DFU
4 bool
Marek Vasut7f8d4362018-02-16 16:41:18 +01005 imply DFU_OVER_USB if USB_GADGET
Marek Vasutea84f802018-02-16 16:41:17 +01006
Marek Vasut7f8d4362018-02-16 16:41:18 +01007config DFU_OVER_USB
Tom Rini265c7da2016-09-19 13:31:30 -04008 bool
Maxime Ripardab68b432018-01-16 09:44:13 +01009 select HASH
Jerome Forissier1d28d542024-09-10 12:27:50 +020010 depends on USB_GADGET_DOWNLOAD
Tom Rini265c7da2016-09-19 13:31:30 -040011
Marek Vasut7f8d4362018-02-16 16:41:18 +010012config DFU_OVER_TFTP
Marek Vasutea84f802018-02-16 16:41:17 +010013 bool
14 depends on NET
15
16if DFU
AKASHI Takahirofb6732f2020-10-29 13:47:41 +090017config DFU_WRITE_ALT
18 bool
AKASHI Takahirofb6732f2020-10-29 13:47:41 +090019
Lukasz Majewski770a8012015-08-24 00:21:49 +020020config DFU_TFTP
21 bool "DFU via TFTP"
Tom Rini492e8182023-10-26 14:31:12 -040022 depends on NETDEVICES
Jerome Forissiere0f95512024-10-16 12:03:59 +020023 depends on !NET_LWIP
AKASHI Takahiro768d58d2020-10-29 13:47:43 +090024 select UPDATE_COMMON
AKASHI Takahiro5cef0452020-11-17 09:27:16 +090025 select DFU_OVER_TFTP
Lukasz Majewski770a8012015-08-24 00:21:49 +020026 help
Robert P. J. Day8c60f922016-05-04 04:47:31 -040027 This option allows performing update of DFU-managed medium with data
28 sent via TFTP boot.
Lukasz Majewski770a8012015-08-24 00:21:49 +020029
Robert P. J. Day8c60f922016-05-04 04:47:31 -040030 Detailed description of this feature can be found at ./doc/README.dfutftp
Tom Rini265c7da2016-09-19 13:31:30 -040031
Andy Shevchenko1e414012019-11-27 18:12:15 +020032config DFU_TIMEOUT
33 bool "Timeout waiting for DFU"
34 help
35 This option adds an optional timeout parameter for DFU which, if set,
36 will cause DFU to only wait for that many seconds before exiting.
37
Tom Rini265c7da2016-09-19 13:31:30 -040038config DFU_MMC
39 bool "MMC back end for DFU"
Ashok Reddy Somaaaf085e2023-07-07 02:51:36 -060040 depends on MMC
Tom Rini265c7da2016-09-19 13:31:30 -040041 help
42 This option enables using DFU to read and write to MMC based storage.
43
Marek Vasutd7dc2002021-10-26 00:37:05 +020044config DFU_MTD
45 bool "MTD back end for DFU"
46 depends on DM_MTD
Marek Vasutd7dc2002021-10-26 00:37:05 +020047 help
48 This option enables using DFU to read and write to on any MTD device.
49
Tom Rini265c7da2016-09-19 13:31:30 -040050config DFU_NAND
51 bool "NAND back end for DFU"
Boris Brezillon41fc0ad2018-11-13 12:43:10 +010052 depends on CMD_MTDPARTS
Miquel Raynalaf1a8292019-10-03 19:50:22 +020053 depends on MTD_RAW_NAND
Tom Rini265c7da2016-09-19 13:31:30 -040054 help
55 This option enables using DFU to read and write to NAND based
56 storage.
57
Guillermo Rodríguez5378fb12019-12-16 16:27:57 +010058config DFU_NAND_TRIMFFS
59 bool "Skip empty pages when flashing UBI images to NAND"
60 depends on DFU_NAND
61 help
62 When flashing UBI images to NAND, enable the DROP_FFS flag to drop
63 trailing all-0xff pages.
64
Tom Rini265c7da2016-09-19 13:31:30 -040065config DFU_RAM
66 bool "RAM back end for DFU"
67 help
68 This option enables using DFU to read and write RAM on the target.
69
70config DFU_SF
71 bool "SPI flash back end for DFU"
Heinrich Schuchardt0953f9c2024-06-04 07:44:25 +020072 depends on SPI_FLASH || DM_SPI_FLASH
Tom Rini265c7da2016-09-19 13:31:30 -040073 help
74 This option enables using DFU to read and write to SPI flash based
75 storage.
76
Patrick Delaunaybdc0f122019-10-14 09:28:00 +020077config DFU_SF_PART
78 bool "MTD partition support for SPI flash back end"
79 depends on DFU_SF && CMD_MTDPARTS
80 default y
81 help
82 This option enables the support of "part" and "partubi" target in
83 SPI flash DFU back end.
84
Patrick Delaunay2111e3c2019-10-14 09:28:06 +020085config DFU_VIRT
86 bool "VIRTUAL flash back end for DFU"
87 help
88 This option enables using DFU to read and write to VIRTUAL device
89 used at board level to manage specific behavior
90 (OTP update for example).
91
Patrick Delaunaye51b1bd2020-02-26 10:28:41 +010092config SET_DFU_ALT_INFO
93 bool "Dynamic set of DFU alternate information"
94 help
95 This option allows to call the function set_dfu_alt_info to
96 dynamically build dfu_alt_info in board.
Aswath Govindrajucc13c5d2021-06-01 16:51:47 +053097
98config SYS_DFU_DATA_BUF_SIZE
99 hex "Size of buffer to be allocated for transfer to raw storage device"
100 default 0x800000
101 help
102 DFU transfer uses a buffer before writing data to the
103 raw storage device. This value can be used for setting the
104 size of this buffer. The size of the buffer is also configurable
105 through the "dfu_bufsiz" environment variable. If both are
106 given the size of the buffer is set to "dfu_bufsize".
107
108config SYS_DFU_MAX_FILE_SIZE
109 hex "Size of the buffer to be allocated for transferring files"
110 default SYS_DFU_DATA_BUF_SIZE
111 help
112 When updating files rather than the raw storage device,
113 we use a static buffer to copy the file into and then write
114 the buffer once we've been given the whole file. Define
115 this to the maximum filesize (in bytes) for the buffer.
116 If undefined it defaults to the CONFIG_SYS_DFU_DATA_BUF_SIZE.
Jaehoon Chung0efc2fe2022-06-20 20:13:54 +0900117
118config DFU_NAME_MAX_SIZE
119 int "Size of the name to be added in dfu entity"
120 default 32
121 depends on DFU
122 help
123 This value is used to maximum size. If name is longer than default size,
124 we need to change the proper maximum size.
125
Tom Rini265c7da2016-09-19 13:31:30 -0400126endif
Lukasz Majewski770a8012015-08-24 00:21:49 +0200127endmenu