Skip to content

Commit

Permalink
Merge pull request #149 from mer-hybris/jb42816
Browse files Browse the repository at this point in the history
[hybris-boot] Be more flexible with HYBRIS_BOOT_PART and fstabs. JB#42816
  • Loading branch information
krnlyng authored Sep 13, 2018
2 parents bd4134f + cbc678e commit 44c20cb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ ifeq "$(HYBRIS_FSTABS)" ""
TARGET_VENDOR := "$(shell echo $(PRODUCT_BRAND) | tr '[:upper:]' '[:lower:]')"
HYBRIS_FSTABS := $(shell find device/$(TARGET_VENDOR) -name *fstab* | grep -v goldfish)
endif
# Some devices are inside subfolders
ifeq "$(HYBRIS_FSTABS)" ""
HYBRIS_FSTABS := $(shell find device/*/*/$(TARGET_DEVICE) -name *fstab* | grep -v goldfish)
endif

# Get the unique /dev field(s) from the line(s) containing the fs mount point
# Note the perl one-liner uses double-$ as per Makefile syntax
Expand All @@ -67,8 +71,8 @@ HYBRIS_DATA_PART := $(shell /usr/bin/perl -w -e '$$fs=shift; if ($$ARGV[0]) { wh
$(warning ********************* /boot appears to live on $(HYBRIS_BOOT_PART))
$(warning ********************* /data appears to live on $(HYBRIS_DATA_PART))

ifneq ($(words $(HYBRIS_BOOT_PART))$(words $(HYBRIS_DATA_PART)),11)
$(error There should be a one and only one device entry for HYBRIS_BOOT_PART and HYBRIS_DATA_PART)
ifneq ($(words $(HYBRIS_DATA_PART)),1)
$(error There should be a one and only one device entry for HYBRIS_DATA_PART)
endif

# Command used to make the image
Expand Down Expand Up @@ -265,7 +269,13 @@ HYBRIS_UPDATER_UNPACK := $(LOCAL_BUILD_MODULE)

.PHONY: hybris-hal hybris-common

HYBRIS_COMMON_TARGETS := bootimage hybris-updater-unpack hybris-updater-script hybris-recovery hybris-boot servicemanager logcat updater init adb adbd linker libc libEGL libGLESv1_CM libGLESv2
HYBRIS_COMMON_TARGETS := bootimage hybris-updater-unpack hybris-recovery hybris-boot servicemanager logcat updater init adb adbd linker libc libEGL libGLESv1_CM libGLESv2
ifneq ($(HYBRIS_BOOT_PART),)
HYBRIS_COMMON_TARGETS += hybris-updater-script
else
$(warning Skipping build of hybris-updater-script since HYBRIS_BOOT_PART is not specified)
endif

HYBRIS_COMMON_ANDROID8_TARGETS := verity_signer boot_signer e2fsdroid vendorimage ramdisk libselinux_stubs libsurfaceflinger libsf_compat_layer bootctl

ifeq ($(shell test $(ANDROID_VERSION_MAJOR) -ge 8 && echo true),true)
Expand Down

0 comments on commit 44c20cb

Please sign in to comment.