@@ -67,9 +67,59 @@ if PKG_USING_QBOOT
6767 select PKG_USING_FASTLZ
6868 default n
6969
70+ config QBOOT_USING_HPATCHLITE
71+ bool "using hpatch-lite decompress"
72+ select PKG_USING_HPATCHLITE
73+ default n
74+
75+ if QBOOT_USING_HPATCHLITE
76+ choice
77+ prompt "HPatchLite In-Place Update Strategy"
78+ default QBOOT_HPATCH_USE_FLASH_SWAP
79+ help
80+ Select the buffer strategy for in-place firmware updates.
81+ - FLASH SWAP: Uses a dedicated flash partition as a buffer. Slower but saves RAM.
82+ - RAM BUFFER: Uses RAM as a buffer. Faster but consumes significant RAM.
83+
84+ config QBOOT_HPATCH_USE_FLASH_SWAP
85+ bool "Use a FLASH partition as swap buffer"
86+
87+ config QBOOT_HPATCH_USE_RAM_BUFFER
88+ bool "Use a RAM buffer (Faster, consumes RAM)"
89+ endchoice
90+
91+ if QBOOT_HPATCH_USE_FLASH_SWAP
92+ config QBOOT_HPATCH_SWAP_PART_NAME
93+ string "Swap partition name for HPatchLite"
94+ default "swap"
95+
96+ config QBOOT_HPATCH_SWAP_OFFSET
97+ int "Offset within the swap partition to use as a buffer"
98+ default 0
99+ help
100+ Specify the starting offset within the swap partition.
101+ This allows only a portion of the swap partition to be used as a buffer.
102+ Note that it is defined according to the sector erase granularity.
103+
104+ config QBOOT_HPATCH_COPY_BUFFER_SIZE
105+ int "RAM buffer size for flash-to-flash copy operations"
106+ default 4096
107+ help
108+ Size of the temporary RAM buffer used for copying data between flash partitions.
109+ A larger size may improve copy speed but consumes more RAM.
110+ endif
111+
112+ if QBOOT_HPATCH_USE_RAM_BUFFER
113+ config QBOOT_HPATCH_RAM_BUFFER_SIZE
114+ int "RAM buffer size for HPatchLite (must be >= sector size)"
115+ default 4096
116+ endif
117+ endif
118+
70119 config QBOOT_USING_SHELL
71120 bool "using shell command of qboot"
72121 default y
122+ select RT_USING_MSH
73123
74124 if QBOOT_USING_SHELL
75125 config QBOOT_SHELL_KEY_CHK_TMO
@@ -198,4 +248,3 @@ if PKG_USING_QBOOT
198248 default "v1.00" if PKG_USING_QBOOT_V100
199249
200250endif
201-
0 commit comments