Skip to content

Commit 7ffcaee

Browse files
TonyHan11LiBinSHA
authored andcommitted
Config.in: optimize Kconfig menu to make more obvious when using OP-TEE
Rename original LOAD_OPTEE to LOAD_OPTEE_OS, add a new item "LOAD_OPTEE" to menu "Next Software Type" and do some optimizations accordingly. Signed-off-by: Tony Han <[email protected]> Acked-by: Nicolas Ferre <[email protected]>
1 parent d78c4a6 commit 7ffcaee

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

Config.in.optee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
config LOAD_OPTEE
5+
config LOAD_OPTEE_OS
66
bool "Install and start OP-TEE Trusted OS"
7-
depends on SDCARD
7+
depends on SDCARD && LOAD_OPTEE
88
help
99
When enabled, OP-TEE will be loaded from NVM and installed in external
1010
RAM or DRAM.

Config.in.u-boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44

55
menu "U-Boot Image Storage Setup"
6-
depends on LOAD_UBOOT
6+
depends on LOAD_UBOOT || LOAD_OPTEE
77

88
config IMG_ADDRESS
99
string "Flash Offset for U-Boot"

Kconfig

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ choice
158158
depends on LOAD_SW || JUMP_TO_SW
159159
default LOAD_UBOOT
160160

161+
config LOAD_OPTEE
162+
bool "OP-TEE OS"
163+
select LOAD_OPTEE_OS
164+
---help---
165+
Boot OP-TEE OS in Secure World and U-Boot will be loaded
166+
and run in Normal World.
167+
161168
config LOAD_UBOOT
162169
bool "U-Boot"
163170
---help---
@@ -172,29 +179,25 @@ config LOAD_LINUX
172179
No further bootloader required.
173180

174181
config LOAD_ANDROID
175-
depends on !LOAD_OPTEE
176182
select LINUX_IMAGE
177183
bool "Android"
178184
---help---
179185
Boot an Android image.
180186
No further bootloader required.
181187

182188
config LOAD_1MB
183-
depends on !LOAD_OPTEE
184189
bool "Load 1 MB into start of SDRAM"
185190
---help---
186191
Use this mode to load an embedded application
187192
which can have a size of up to 1 MByte
188193

189194
config LOAD_4MB
190-
depends on !LOAD_OPTEE
191195
bool "Load 4 MB into start of SDRAM"
192196
---help---
193197
Use this mode to load an embedded application
194198
which can have a size of up to 4 MByte
195199

196200
config LOAD_64KB
197-
depends on !LOAD_OPTEE
198201
bool "Load 64 kB into the start of SDRAM"
199202
---help---
200203
Use this mode to load an embedded application
@@ -225,11 +228,18 @@ source "Config.in.app-image"
225228

226229
config IMAGE_NAME
227230
string "Next Software Image File Name"
228-
depends on LOAD_SW && FATFS
231+
depends on LOAD_SW && FATFS && !LOAD_OPTEE
229232
default "Image" if LINUX_IMAGE
230233
default "u-boot.bin" if LOAD_UBOOT
231234
default "softpack.bin" if LOAD_64KB || LOAD_4MB || LOAD_1MB
232235

236+
config IMAGE_NAME
237+
string "Software Image File Name (after OP-TEE OS)"
238+
depends on LOAD_SW && FATFS && LOAD_OPTEE
239+
default "Image" if LINUX_IMAGE
240+
default "u-boot.bin" if LOAD_UBOOT || LOAD_OPTEE
241+
default "softpack.bin" if LOAD_64KB || LOAD_4MB || LOAD_1MB
242+
233243
source "fast-boot/Config.in.fastboot"
234244

235245
source "device/Config.in.mach"

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ ifeq ($(CONFIG_LOAD_LINUX), y)
220220
TARGET_NAME:=linux-$(or $(subst I,i,$(IMAGE_NAME)),image)
221221
else ifeq ($(CONFIG_LOAD_ANDROID), y)
222222
TARGET_NAME:=android-$(or $(subst I,i,$(IMAGE_NAME)),image)
223+
else ifeq ($(CONFIG_LOAD_OPTEE), y)
224+
TARGET_NAME:=$(or $(subst -,,$(basename $(IMAGE_NAME))),uboot)
223225
else ifeq ($(CONFIG_LOAD_UBOOT), y)
224226
TARGET_NAME:=$(or $(subst -,,$(basename $(IMAGE_NAME))),uboot)
225227
else ifeq ($(CONFIG_LOAD_64KB), y)

0 commit comments

Comments
 (0)