From 8f3e86b52a27948ba1be1d93dae5e5a4c8a73a0a Mon Sep 17 00:00:00 2001 From: Ji Luo Date: Tue, 26 Jan 2021 15:26:36 +0800 Subject: [PATCH] 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 (cherry picked from commit 86f4f99a367bbc0ef99d4ab2a0b4078babfbfbd2) --- arch/arm/mach-imx/Kconfig | 99 ++++++++++++++++++++++++++++++++++++++ board/freescale/imx8mm_evk/Kconfig | 3 ++ drivers/fastboot/Kconfig | 2 + lib/Kconfig | 46 ------------------ scripts/config_whitelist.txt | 6 --- 5 files changed, 104 insertions(+), 52 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index d3369ea..cfe829b 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -228,10 +228,109 @@ 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 SYS_ARM_CACHE_WRITEALLOC bool "support cache write alloc" + +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 + +config BOOTLOADER_MENU + bool "Enable bootloader menu for android device" + help + bootloader menu feature for android device. diff --git a/board/freescale/imx8mm_evk/Kconfig b/board/freescale/imx8mm_evk/Kconfig index af850cd..ae097ee 100644 --- a/board/freescale/imx8mm_evk/Kconfig +++ b/board/freescale/imx8mm_evk/Kconfig @@ -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 diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig index a422fac..c72efa2 100644 --- a/drivers/fastboot/Kconfig +++ b/drivers/fastboot/Kconfig @@ -99,7 +99,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. diff --git a/lib/Kconfig b/lib/Kconfig index fc20734..c43149f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -357,52 +357,6 @@ config AVB_WARNING_TIME_LAST default 0x3 help The time of avb warning logo will last (s). - -config BOOTLOADER_MENU - bool "Enable bootloader menu for android device" - help - bootloader menu feature for android device. - -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" diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 9407ab2..1a70f50 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -30,11 +30,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_LOW_MEMORY -CONFIG_ANDROID_SUPPORT -CONFIG_ANDROID_THINGS_SUPPORT CONFIG_APER_0_BASE CONFIG_APER_1_BASE CONFIG_APER_SIZE @@ -1792,7 +1787,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 -- 1.9.1