Commit 04d62202b5693233e08738496600019fc5195b8c

Authored by Ji Luo
1 parent d6c2305cf6
Exists in emb_lf_v2022.04

MA-18634-1 Android: refine config dependency

Refine the dependency of some configs to make it
easier to add/modify android config files.

Test: builds.

Change-Id: Iccb044dadc7ce1e0b839bf83e2e9157e718f286c
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 86f4f99a367bbc0ef99d4ab2a0b4078babfbfbd2)
(cherry picked from commit 8f3e86b52a27948ba1be1d93dae5e5a4c8a73a0a)
(cherry picked from commit ff17b410ea60f6450c2ef9342a5b9e55e1929470)

Showing 5 changed files with 104 additions and 50 deletions Side-by-side Diff

arch/arm/mach-imx/Kconfig
... ... @@ -255,11 +255,6 @@
255 255 This is to specific the cfg file for generating container
256 256 image which will be loaded by SPL.
257 257  
258   -config IMX_TRUSTY_OS
259   - bool "Support Trusty OS related feature"
260   - depends on ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M
261   - select SYS_ARM_CACHE_WRITEALLOC
262   -
263 258 config CMD_PROVISION_KEY
264 259 bool "Support to provision a encrypted key as black blob"
265 260 depends on IMX8MM || IMX8MN
... ... @@ -269,4 +264,103 @@
269 264 derive PKEK = sha256(MPPUBK).
270 265 read encrypted key and decrypt it using PKEK.
271 266 generate black blob of decrypted key, add 20 bytes TAG to black blob.
  267 +
  268 +config ANDROID_SUPPORT
  269 + bool "Standard Android features support"
  270 + default n
  271 + select FSL_FASTBOOT
  272 + select FASTBOOT_LOCK
  273 + select BCB_SUPPORT
  274 + select ANDROID_RECOVERY
  275 + select SUPPORT_RAW_INITRD
  276 + select LIBAVB
  277 + select AVB_SUPPORT
  278 +
  279 +config ANDROID_AUTO_SUPPORT
  280 + bool "Android Automotive features support"
  281 + default n
  282 + select FSL_FASTBOOT
  283 + select FASTBOOT_LOCK
  284 + select BCB_SUPPORT
  285 + select ANDROID_RECOVERY
  286 + select SUPPORT_RAW_INITRD
  287 + select LIBAVB
  288 + select AVB_SUPPORT
  289 +
  290 +config ANDROID_THINGS_SUPPORT
  291 + bool "Android Things features support"
  292 + default n
  293 + select FSL_FASTBOOT
  294 + select FASTBOOT_LOCK
  295 + select BCB_SUPPORT
  296 + select ANDROID_RECOVERY
  297 + select SUPPORT_RAW_INITRD
  298 + select LIBAVB
  299 + select AVB_SUPPORT
  300 +
  301 +config AT_AUTHENTICATE_UNLOCK
  302 + bool "Enable authenticate unlock for Android Things devices"
  303 + depends on ANDROID_THINGS_SUPPORT
  304 +
  305 +config ANDROID_AB_SUPPORT
  306 + bool "Android A/B slots support"
  307 + depends on ANDROID_SUPPORT || ANDROID_AUTO_SUPPORT || ANDROID_THINGS_SUPPORT
  308 + default n
  309 + select SYSTEM_RAMDISK_SUPPORT
  310 +
  311 +config SYSTEM_RAMDISK_SUPPORT
  312 + bool "Support build ramdisk in system image"
  313 + default n
  314 +
  315 +menu "TRUSTY OS Support"
  316 +
  317 +config IMX_TRUSTY_OS
  318 + bool "Support Trusty OS related feature"
  319 + depends on ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M
  320 + select SYS_ARM_CACHE_WRITEALLOC
  321 + select CMD_MMC_RPMB
  322 + select SUPPORT_EMMC_RPMB
  323 +
  324 +config TRUSTY_UNLOCK_PERMISSION
  325 + bool "Support unlock permission protection in trusty"
  326 + default y
  327 + depends on IMX_TRUSTY_OS
  328 +
  329 +config LOAD_KEY_FROM_RPMB
  330 + bool "Support load AVB public key from RPMB storage"
  331 + default y
  332 + depends on IMX_TRUSTY_OS
  333 +
  334 +config ID_ATTESTATION
  335 + bool "Support device ID attestation"
  336 + default y
  337 + depends on IMX_TRUSTY_OS
  338 +
  339 +config ATTESTATION_ID_PRODUCT
  340 + string "Product name for ID attestation"
  341 + depends on IMX_TRUSTY_OS && ID_ATTESTATION
  342 + default SYS_CONFIG_NAME
  343 +
  344 +config SECURE_UNLOCK
  345 + bool "Enable secure unlock for Android devices, it can only be enabled on HAB closed board"
  346 + depends on IMX_TRUSTY_OS
  347 +
  348 +endmenu
  349 +
  350 +config APPEND_BOOTARGS
  351 + bool "Append bootargs support"
  352 +
  353 +config DUAL_BOOTLOADER
  354 + bool "Enable dual bootloader support"
  355 + select SPL_MMC
  356 + select SPL_MMC_WRITE
  357 + help
  358 + Enable A/B bootloader select in SPL.
  359 +
  360 +config ANDROID_DYNAMIC_PARTITION
  361 + bool "Support to boot up Android with system image in logical partitions"
  362 +
  363 +config VIRTUAL_AB_SUPPORT
  364 + bool "Support virtual AB update"
  365 + select ANDROID_DYNAMIC_PARTITION
board/freescale/imx8mm_evk/Kconfig
... ... @@ -12,6 +12,9 @@
12 12 config IMX_CONFIG
13 13 default "board/freescale/imx8mm_evk/imximage-8mm.cfg"
14 14  
  15 +config IMX8M_1G_MEMORY
  16 + bool "imx8m 1GB memory size"
  17 +
15 18 source "board/freescale/common/Kconfig"
16 19  
17 20 endif
drivers/fastboot/Kconfig
... ... @@ -110,7 +110,9 @@
110 110  
111 111 config CMD_BOOTA
112 112 bool "Enable the boota command"
  113 + default y
113 114 depends on FSL_FASTBOOT
  115 + depends on ANDROID_SUPPORT || ANDROID_AUTO_SUPPORT || ANDROID_THINGS_SUPPORT
114 116 help
115 117 This enables the boota command for booting android images.
116 118  
... ... @@ -392,46 +392,6 @@
392 392 bool "Enable AVB_ATX support"
393 393 depends on AVB_SUPPORT
394 394  
395   -config APPEND_BOOTARGS
396   - bool "Append bootargs support"
397   -
398   -config DUAL_BOOTLOADER
399   - bool "Enable dual bootloader support"
400   - help
401   - Enable A/B bootloader select in SPL.
402   -
403   -config AT_AUTHENTICATE_UNLOCK
404   - bool "Enable authenticate unlock for Android Things devices"
405   -
406   -config SECURE_UNLOCK
407   - bool "Enable secure unlock for Android devices, it can only be enabled on HAB closed board"
408   -
409   -config TRUSTY_UNLOCK_PERMISSION
410   - bool "Support unlock permission protection in trusty"
411   - depends on IMX_TRUSTY_OS
412   -
413   -config ANDROID_DYNAMIC_PARTITION
414   - bool "Support to boot up Android with system image in logical partitions"
415   -
416   -config VIRTUAL_AB_SUPPORT
417   - bool "Support virtual AB update"
418   - select ANDROID_DYNAMIC_PARTITION
419   -
420   -config LOAD_KEY_FROM_RPMB
421   - bool "Support load AVB public key from RPMB storage"
422   - default n
423   - depends on IMX_TRUSTY_OS
424   -
425   -config ID_ATTESTATION
426   - bool "Support device ID attestation"
427   - default n
428   - depends on IMX_TRUSTY_OS
429   -
430   -config ATTESTATION_ID_PRODUCT
431   - string "Product name for ID attestation"
432   - depends on IMX_TRUSTY_OS && ID_ATTESTATION
433   - default SYS_CONFIG_NAME
434   -
435 395 endmenu
436 396  
437 397 menu "Hashing Support"
scripts/config_whitelist.txt
... ... @@ -4,10 +4,6 @@
4 4 CONFIG_AM335X_USB0_MODE
5 5 CONFIG_AM335X_USB1
6 6 CONFIG_AM335X_USB1_MODE
7   -CONFIG_ANDROID_AB_SUPPORT
8   -CONFIG_ANDROID_AUTO_SUPPORT
9   -CONFIG_ANDROID_SUPPORT
10   -CONFIG_ANDROID_THINGS_SUPPORT
11 7 CONFIG_ARMV7_SECURE_BASE
12 8 CONFIG_ARMV7_SECURE_MAX_SIZE
13 9 CONFIG_ARMV7_SECURE_RESERVE_SIZE
... ... @@ -842,7 +838,6 @@
842 838 CONFIG_STACKBASE
843 839 CONFIG_STANDALONE_LOAD_ADDR
844 840 CONFIG_STD_DEVICES_SETTINGS
845   -CONFIG_SYSTEM_RAMDISK_SUPPORT
846 841 CONFIG_SYS_64BIT
847 842 CONFIG_SYS_64BIT_LBA
848 843 CONFIG_SYS_83XX_DDR_USES_CS0