From ff17b410ea60f6450c2ef9342a5b9e55e1929470 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) (cherry picked from commit 8f3e86b52a27948ba1be1d93dae5e5a4c8a73a0a) --- arch/arm/mach-imx/Kconfig | 94 ++++++++++++++++++++++++++++++ board/freescale/imx8mm_evk/Kconfig | 3 + drivers/fastboot/Kconfig | 2 + lib/Kconfig | 40 ------------- scripts/config_whitelist.txt | 5 -- 5 files changed, 99 insertions(+), 45 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index f1bcf299c5..33c8f9a914 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -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 diff --git a/board/freescale/imx8mm_evk/Kconfig b/board/freescale/imx8mm_evk/Kconfig index af850cd3f9..ae097ee6c5 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 588cc2aabb..9891cea2f4 100644 --- a/drivers/fastboot/Kconfig +++ b/drivers/fastboot/Kconfig @@ -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. diff --git a/lib/Kconfig b/lib/Kconfig index dad01f2941..2cde499d1f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -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" diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b40245d6c8..cb711a01e0 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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 -- 2.17.1