Skip to content

Commit

Permalink
make: Fix usage of USER variant macro
Browse files Browse the repository at this point in the history
User variant macro defined from AndroidBoot are not directly
accessbile in lk. Pass the macro define through make command to
LK makefile and add define in LK makefile to make sure them macros
are defined correctly.

Change-Id: I88e6dc8a4794cd5d426b38e813e094dcd5f57c33
  • Loading branch information
Channagoud Kadabi committed Mar 13, 2015
1 parent 8d60466 commit 9071af3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions AndroidBoot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ endif

ifneq ($(TARGET_BUILD_VARIANT),user)
DEVICE_STATUS := DEFAULT_UNLOCK=true
USER_BUILD_VARIANT=true
endif

ifeq ($(TARGET_BUILD_VARIANT),user)
BUILD_VARIANT := USER_BUILD_VARIANT=true
endif

ifeq ($(TARGET_BOARD_PLATFORM),msm8660)
Expand All @@ -42,7 +45,7 @@ ABOOT_CLEAN:
# ELF binary for ABOOT
TARGET_ABOOT_ELF := $(PRODUCT_OUT)/aboot.elf
$(TARGET_ABOOT_ELF): ABOOT_CLEAN | $(ABOOT_OUT)
$(MAKE) -C bootable/bootloader/lk TOOLCHAIN_PREFIX=$(CROSS_COMPILE) BOOTLOADER_OUT=../../../$(ABOOT_OUT) $(BOOTLOADER_PLATFORM) $(EMMC_BOOT) $(SIGNED_KERNEL) $(VERIFIED_BOOT) $(DEVICE_STATUS)
$(MAKE) -C bootable/bootloader/lk TOOLCHAIN_PREFIX=$(CROSS_COMPILE) BOOTLOADER_OUT=../../../$(ABOOT_OUT) $(BOOTLOADER_PLATFORM) $(EMMC_BOOT) $(SIGNED_KERNEL) $(VERIFIED_BOOT) $(DEVICE_STATUS) $(BUILD_VARIANT)

# NAND variant output
TARGET_NAND_BOOTLOADER := $(PRODUCT_OUT)/appsboot.mbn
Expand Down Expand Up @@ -71,7 +74,7 @@ $(TARGET_NAND_BOOTLOADER): appsbootldr_clean | $(NAND_BOOTLOADER_OUT)

# Top level for eMMC variant targets
$(TARGET_EMMC_BOOTLOADER): emmc_appsbootldr_clean | $(EMMC_BOOTLOADER_OUT) $(INSTALLED_KEYSTOREIMAGE_TARGET)
$(MAKE) -C bootable/bootloader/lk TOOLCHAIN_PREFIX=$(CROSS_COMPILE) BOOTLOADER_OUT=../../../$(EMMC_BOOTLOADER_OUT) $(BOOTLOADER_PLATFORM) EMMC_BOOT=1 $(SIGNED_KERNEL) $(VERIFIED_BOOT) $(DEVICE_STATUS)
$(MAKE) -C bootable/bootloader/lk TOOLCHAIN_PREFIX=$(CROSS_COMPILE) BOOTLOADER_OUT=../../../$(EMMC_BOOTLOADER_OUT) $(BOOTLOADER_PLATFORM) EMMC_BOOT=1 $(SIGNED_KERNEL) $(VERIFIED_BOOT) $(DEVICE_STATUS) $(BUILD_VARIANT)

# Keep build NAND & eMMC as default for targets still using TARGET_BOOTLOADER
TARGET_BOOTLOADER := $(PRODUCT_OUT)/EMMCBOOT.MBN
Expand Down
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ ifeq ($(VERIFIED_BOOT),1)
endif
endif

ifeq ($(USER_BUILD_VARIANT),true)
DEFINES += USER_BUILD_VARIANT=1
endif

# these need to be filled out by the project/target/platform rules.mk files
TARGET :=
PLATFORM :=
Expand Down

0 comments on commit 9071af3

Please sign in to comment.