blob: 613fe613e55a352a1b46058236116c1e443103d7 [file] [log] [blame]
# Copyright 2018-2019 Fairphone B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# For PRODUCT_COPY_FILES, the first instance takes precedence.
BLOBS_PATH = device/fairphone/fp2-proprietary
# Check the presence of proprietary blobs
ifeq ("$(wildcard $(BLOBS_PATH)/device-vendor.mk)","")
define BLOBS_INSTRUCTION
Cannot find FP2 binary blobs.
Please visit the download page
https://code.fairphone.com/projects/fp-osos/dev/fp2-blobs-download-page.html
accept the terms of agreement and follow the instructions.
endef
$(error $(BLOBS_INSTRUCTION))
endif
# Call the vendor setup
$(call inherit-product-if-exists, vendor/fairphone/fp2-common/device-vendor.mk)
# Call the proprietary setup
$(call inherit-product, $(BLOBS_PATH)/device-vendor.mk)
# This is needed for the 2016 June official Nexus 5 driver's glsub
TARGET_USE_COMPAT_GRALLOC_PERFORM := true
# Define the build number based on the product flavour and on the build manifest
# revision
ifneq (,$(strip $(PRODUCT_FLAVOR)))
_BUILD_MANIFEST_REV := $(shell (git -C $(TOPDIR).repo/manifests rev-parse --short=8 HEAD))
BUILD_NUMBER := $(PRODUCT_FLAVOR)-$(_BUILD_MANIFEST_REV)
else
$(error PRODUCT_FLAVOR must be defined)
endif
$(warning Build defined as $(BUILD_ID) ($(BUILD_NUMBER)))
# Fairphone Common framework
$(call inherit-product-if-exists, vendor/fairphone/frameworks/common/common.mk)
# camera_detect
$(call inherit-product-if-exists, device/fairphone/fp2-common/camera_detect/camera_detect.mk)
# Boot animation
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Dalvik/HWUI
$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk)
$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk)
# Display
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
PRODUCT_PACKAGES += \
copybit.msm8974 \
gralloc.msm8974 \
hwcomposer.msm8974 \
liboverlay \
memtrack.msm8974
# Ramdisk
PRODUCT_PACKAGES += \
fstab.qcom \
init.qcom.power.rc \
init.qcom.rc \
init.qcom.usb.rc \
ueventd.qcom.rc
PRODUCT_PACKAGES += \
init.qcom.bt.sh
# Power
PRODUCT_PACKAGES += \
power.msm8974
PRODUCT_PACKAGES += \
hostapd \
wcnss_service \
wpa_supplicant
# ANT stack
PRODUCT_PACKAGES += \
AntHalService \
com.dsi.ant.antradio_library \
libantradio
# Lights
PRODUCT_PACKAGES += \
lights.msm8974
# Keystore
PRODUCT_PACKAGES += \
keystore.msm8974
# flavour name, we only override the variables in the generated build.prop file.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_MODEL=FP2 PRODUCT_NAME=FP2
PRODUCT_MANUFACTURER := Fairphone
PRODUCT_BRAND := Fairphone
PRODUCT_DEVICE := FP2
$(call inherit-product, build/target/product/product_launched_with_l_mr1.mk)