MA-18634-1 Android: refine config dependency
authorJi Luo <ji.luo@nxp.com>
Tue, 26 Jan 2021 07:26:36 +0000 (15:26 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:19 +0000 (09:49 +0800)
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)

arch/arm/mach-imx/Kconfig
board/freescale/imx8mm_evk/Kconfig
drivers/fastboot/Kconfig
lib/Kconfig
scripts/config_whitelist.txt

index f1bcf29..33c8f9a 100644 (file)
@@ -237,7 +237,101 @@ config IMX_DCD_ADDR
          This information is shared with the user via mkimage -l just so the
          image can be signed.
 
+config ANDROID_SUPPORT
+       bool "Standard Android features support"
+       default n
+       select FSL_FASTBOOT
+       select FASTBOOT_LOCK
+       select BCB_SUPPORT
+       select ANDROID_RECOVERY
+       select SUPPORT_RAW_INITRD
+       select LIBAVB
+       select AVB_SUPPORT
+
+config ANDROID_AUTO_SUPPORT
+       bool "Android Automotive features support"
+       default n
+       select FSL_FASTBOOT
+       select FASTBOOT_LOCK
+       select BCB_SUPPORT
+       select ANDROID_RECOVERY
+       select SUPPORT_RAW_INITRD
+       select LIBAVB
+       select AVB_SUPPORT
+
+config ANDROID_THINGS_SUPPORT
+       bool "Android Things features support"
+       default n
+       select FSL_FASTBOOT
+       select FASTBOOT_LOCK
+       select BCB_SUPPORT
+       select ANDROID_RECOVERY
+       select SUPPORT_RAW_INITRD
+       select LIBAVB
+       select AVB_SUPPORT
+
+config AT_AUTHENTICATE_UNLOCK
+       bool "Enable authenticate unlock for Android Things devices"
+       depends on ANDROID_THINGS_SUPPORT
+
+config ANDROID_AB_SUPPORT
+       bool "Android A/B slots support"
+       depends on ANDROID_SUPPORT || ANDROID_AUTO_SUPPORT || ANDROID_THINGS_SUPPORT
+       default n
+       select SYSTEM_RAMDISK_SUPPORT
+
+config SYSTEM_RAMDISK_SUPPORT
+       bool "Support build ramdisk in system image"
+       default n
+
+menu "TRUSTY OS Support"
+
 config IMX_TRUSTY_OS
        bool "Support Trusty OS related feature"
        depends on ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M
        select SYS_ARM_CACHE_WRITEALLOC
+       select CMD_MMC_RPMB
+       select SUPPORT_EMMC_RPMB
+
+config TRUSTY_UNLOCK_PERMISSION
+       bool "Support unlock permission protection in trusty"
+       default y
+       depends on IMX_TRUSTY_OS
+
+config LOAD_KEY_FROM_RPMB
+       bool "Support load AVB public key from RPMB storage"
+       default y
+       depends on IMX_TRUSTY_OS
+
+config ID_ATTESTATION
+       bool "Support device ID attestation"
+       default y
+       depends on IMX_TRUSTY_OS
+
+config ATTESTATION_ID_PRODUCT
+       string "Product name for ID attestation"
+       depends on IMX_TRUSTY_OS && ID_ATTESTATION
+       default SYS_CONFIG_NAME
+
+config SECURE_UNLOCK
+       bool "Enable secure unlock for Android devices, it can only be enabled on HAB closed board"
+       depends on IMX_TRUSTY_OS
+
+endmenu
+
+config APPEND_BOOTARGS
+       bool "Append bootargs support"
+
+config DUAL_BOOTLOADER
+       bool "Enable dual bootloader support"
+       select SPL_MMC_SUPPORT
+       select SPL_MMC_WRITE
+       help
+         Enable A/B bootloader select in SPL.
+
+config ANDROID_DYNAMIC_PARTITION
+       bool "Support to boot up Android with system image in logical partitions"
+
+config VIRTUAL_AB_SUPPORT
+       bool "Support virtual AB update"
+       select ANDROID_DYNAMIC_PARTITION
index af850cd..ae097ee 100644 (file)
@@ -9,6 +9,9 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "imx8mm_evk"
 
+config IMX8M_1G_MEMORY
+       bool "imx8m 1GB memory size"
+
 source "board/freescale/common/Kconfig"
 
 endif
index 588cc2a..9891cea 100644 (file)
@@ -102,7 +102,9 @@ config ANDROID_RECOVERY
 
 config CMD_BOOTA
        bool "Enable the boota command"
+       default y
        depends on FSL_FASTBOOT
+       depends on ANDROID_SUPPORT || ANDROID_AUTO_SUPPORT || ANDROID_THINGS_SUPPORT
        help
          This enables the boota command for booting android images.
 
index dad01f2..2cde499 100644 (file)
@@ -353,46 +353,6 @@ config AVB_ATX
        bool "Enable AVB_ATX support"
        depends on AVB_SUPPORT
 
-config APPEND_BOOTARGS
-       bool "Append bootargs support"
-
-config DUAL_BOOTLOADER
-       bool "Enable dual bootloader support"
-       help
-         Enable A/B bootloader select in SPL.
-
-config AT_AUTHENTICATE_UNLOCK
-       bool "Enable authenticate unlock for Android Things devices"
-
-config SECURE_UNLOCK
-       bool "Enable secure unlock for Android devices, it can only be enabled on HAB closed board"
-
-config TRUSTY_UNLOCK_PERMISSION
-       bool "Support unlock permission protection in trusty"
-       depends on IMX_TRUSTY_OS
-
-config ANDROID_DYNAMIC_PARTITION
-       bool "Support to boot up Android with system image in logical partitions"
-
-config VIRTUAL_AB_SUPPORT
-       bool "Support virtual AB update"
-       select ANDROID_DYNAMIC_PARTITION
-
-config LOAD_KEY_FROM_RPMB
-       bool "Support load AVB public key from RPMB storage"
-       default n
-       depends on IMX_TRUSTY_OS
-
-config ID_ATTESTATION
-       bool "Support device ID attestation"
-       default n
-       depends on IMX_TRUSTY_OS
-
-config ATTESTATION_ID_PRODUCT
-       string "Product name for ID attestation"
-       depends on IMX_TRUSTY_OS && ID_ATTESTATION
-       default SYS_CONFIG_NAME
-
 endmenu
 
 menu "Hashing Support"
index b40245d..cb711a0 100644 (file)
@@ -28,10 +28,6 @@ CONFIG_AM335X_USB1_MODE
 CONFIG_AM437X_USB2PHY2_HOST
 CONFIG_ANDES_PCU
 CONFIG_ANDES_PCU_BASE
-CONFIG_ANDROID_AB_SUPPORT
-CONFIG_ANDROID_AUTO_SUPPORT
-CONFIG_ANDROID_SUPPORT
-CONFIG_ANDROID_THINGS_SUPPORT
 CONFIG_APER_0_BASE
 CONFIG_APER_1_BASE
 CONFIG_APER_SIZE
@@ -1652,7 +1648,6 @@ CONFIG_SXNI855T
 CONFIG_SYSFLAGS_ADDR
 CONFIG_SYSFS
 CONFIG_SYSMGR_ISWGRP_HANDOFF
-CONFIG_SYSTEM_RAMDISK_SUPPORT
 CONFIG_SYS_33MHZ
 CONFIG_SYS_64BIT
 CONFIG_SYS_64BIT_LBA