From 2e43e34d535ad9030885be9f5942d0c29f569c2e Mon Sep 17 00:00:00 2001 From: Devin Moore Date: Tue, 9 Mar 2021 16:59:33 -0800 Subject: [PATCH] Throw an error if androidboot.hardware is used for bootconfig Bootconfig does not allow the keys to have values and subkeys at the same time. "androidboot.hardware" and "androidboot.hardware.*" subkeys have existed as kernel cmdline parameters. We want to throw an error at build time when "androidboot.hardware" is use in bootconfig because it may be a common occurence while migrating to bootconfig. "hardware" should be used instead, without the "androidboot" prefix. Test: build with and without "androidboot.hardware=test" in BOARD_BOOTCONFIG Bug: 173815685 Change-Id: Ic62a86cb23c9d79dbdbacd18eed3449210566ce7 --- core/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/Makefile b/core/Makefile index a67d02a165..38ce2fafe6 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1022,6 +1022,11 @@ ifdef INTERNAL_KERNEL_CMDLINE endif ifdef INTERNAL_BOOTCONFIG +ifneq (,$(findstring androidboot.hardware=, $(INTERNAL_BOOTCONFIG))) +$(error "androidboot.hardware" BOOTCONFIG parameter is not supported due to \ + bootconfig limitations. Use "hardware" instead. INTERNAL_BOOTCONFIG: \ + $(INTERNAL_BOOTCONFIG)) +endif INTERNAL_VENDOR_BOOTCONFIG_TARGET := $(PRODUCT_OUT)/vendor-bootconfig.img $(INTERNAL_VENDOR_BOOTCONFIG_TARGET): rm -f $@