build: Add Lineage build support

Squashed also with the following changes:

  Author: Luca Stefani <luca020400@lineageos.org>
  Date:   Thu Aug 17 22:22:13 2017 +0200

    core: Include Lineage pathmap

  Change-Id: Ie25dee383cc5bc9bb6390cff2cb2460d526d80b6

  Author: Simon Shields <simon@lineageos.org>
  Date:   Fri Mar 2 12:55:47 2018 +1100

    build: unconditionally use lineage pathmap

    even if we're not building a lineage target, we need to
    use the lineage pathmap to make things like recovery and ril
    happy

  Change-Id: I974c30ad10d4ff5b7805c3df9c22010f1e002bf1

  Author: Luca Stefani <luca.stefani.ge1@gmail.com>
  Date:   Tue Jan 22 15:50:52 2019 +0100

    Don't export BUILD_NUMBER in envsetup

    * The value is meant to be set only before running an /official/ build
    * This allows us to execute consecutive make commands without
      running kati for every invocation

  Change-Id: Ifa94b839f30c7260009c8a3c91c202b50e28022e

  Author: Luca Stefani <luca020400@lineageos.org>
  Date:   Fri Aug 18 10:17:00 2017 +0200

    envsetup: Call fixup_common_out_dir

  Change-Id: I84e16b0df5822cfd8514c46d709109a13c20f86e

  Author: Adrian DC <radian.dc@gmail.com>
  Date:   Sat May 12 11:24:33 2018 +0200

    build: Include LineageOS specific properties in build.prop

     * Our properties were supposed to go to /system/etc/prop.default
        after the following commit:
        "lineage: Move to Google's method of defining system default props"
        Change-Id: I6cb0e28a7599b010b389cc541015a37010a00f4b

     * However if BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED is not true,
        only /default.prop will retain the properties contents of
        ADDITIONAL_DEFAULT_PROPERTIES and PRODUCT_SYSTEM_DEFAULT_PROPERTIES,
        and none of our versioning identification was held in the system

     * Enabling BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED globally would
        break all properties on devices that handle partitions usually
        at the device level rather than the kernel due to mounting races

     * Include the vendor/lineage/config/main.mk entrypoint to be allowed
        to extend ADDITION_BUILD_PROPERTIES as we need to define our releases

  Change-Id: I19918eece0f0dd3ee967db0339b4d09c9a6d540e
  Signed-off-by: Adrian DC <radian.dc@gmail.com>

  Author: Simon Shields <simon@lineageos.org>
  Date:   Fri Aug 10 14:39:32 2018 +1000

    soong: include Lineage soong_config

    Change-Id: Ic7b8993f4a201f8a9d24c6ba32617fa34843afc2

  Author: Rashed Abdel-Tawab <rashed@linux.com>
  Date:   Thu Sep 5 21:35:38 2019 -0700

    core: Only include Lineage SE policy if repo exists

  Change-Id: If799106d2da6d8c303430e316edff365a22f7c99

  Author: dianlujitao <dianlujitao@lineageos.org>
  Date:   Thu Sep 5 21:56:36 2019 +0800

    product: Exclude AOSP apn list on Lineage build

    Change-Id: I1fd10089421a2e4b57ef565d87ad1f6036bd1898

  Author: Michael Bestas <mkbestas@lineageos.org>
  Date:   Fri Apr 12 02:10:12 2019 +0300

    build: Conditionally include AudioPackage14.mk instead of AllAudio.mk

    * AllAudio.mk doesn't contain latest material files and also
      contains multiple duplicate files. Just copy the latest
      material ones and we'll include the older files in vendor/lineage

    Change-Id: Ic7353216a3f3dc3c51006d951ac932cfd6e5f3b5

  Author: dhacker29 <dhackerdvm@gmail.com>
  Date:   Sat Jun 6 22:22:05 2015 -0400

    Remove LatinIME as it is included per target in vendor/lineage

    Change-Id: Ibce4a244ec0653a7c7798d864047ac667866a1dc

  Author: Arne Coucheron <arco68@gmail.com>
  Date:   Sat Mar 3 22:53:06 2012 +0100

    Fix inheritance of PRODUCT_PROPERTY_OVERRIDES for Lineage audio files

    Otherwise the ones set in Lineage vendor will be overridden by these.

    Change-Id: I3f87dfd009d8ddfd48972c15770599742b12c4af

    Author: Abhisek Devkota <ciwrl@cyanogenmod.com>
    Remove extra product property overrides

    This appears to clash with vendor/lineage/common mk's for overrides; causes
    a broken default alarm (and OnTheHunt is so bleh).

    Change-Id: I5ec990d3c5ad56b573c45f1a3b20169c989851a0

  Author: Pawit Pornkitprasan <p.pawit@gmail.com>
  Date:   Sat Jan 28 09:05:16 2012 +0700

    Disable dataroaming by default

    The property is removed so that the property in vendor/lineage
    can take effect.

    Change-Id: Iefadc1a6e71cbf92ecb7363c953f4b5a82064446

  Author: razorloves <razorloves@gmail.com>
  Date:   Mon Oct 7 05:10:56 2019 -0500

    build: Remove su inclusion

    This stops including su in all lineage userdebug/eng builds.
    Inclusion of su is conditionally handled in /vendor/lineage.

    Change-Id: Ia3ad978146f170a2b260d77afe9eb580d4b4f823

Change-Id: Iab8b2ef8b644a7bea10bfd28b99d9e69539b1357
gugelfrei-debug
Luca Stefani 7 years ago committed by Michael Bestas
parent de925c04c9
commit 261741115e

@ -436,6 +436,7 @@ endif
$(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \
TARGET_BUILD_FLAVOR="$(TARGET_BUILD_FLAVOR)" \
TARGET_DEVICE="$(TARGET_DEVICE)" \
LINEAGE_DEVICE="$(TARGET_DEVICE)" \
PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \
PRODUCT_DEFAULT_WIFI_CHANNELS="$(PRODUCT_DEFAULT_WIFI_CHANNELS)" \
PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \

@ -493,6 +493,9 @@ LOCAL_IS_AUX_MODULE :=
full_android_manifest :=
non_system_module :=
# Include any vendor specific clear_vars.mk file
-include vendor/*/build/core/clear_vars.mk
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.
# Leave the current makefile to make sure we don't break anything

@ -295,6 +295,9 @@ include $(BUILD_SYSTEM)/envsetup.mk
FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(SCAN_EXCLUDE_DIRS) .repo .git)
-include vendor/extra/BoardConfigExtra.mk
ifneq ($(LINEAGE_BUILD),)
include vendor/lineage/config/BoardConfigLineage.mk
endif
# The build system exposes several variables for where to find the kernel
# headers:
@ -1230,6 +1233,14 @@ dont_bother_goals := out \
vbmetaimage-nodeps \
product-graph dump-products
ifneq ($(LINEAGE_BUILD),)
ifneq ($(wildcard device/lineage/sepolicy/common/sepolicy.mk),)
## We need to be sure the global selinux policies are included
## last, to avoid accidental resetting by device configs
$(eval include device/lineage/sepolicy/common/sepolicy.mk)
endif
endif
ifeq ($(CALLED_FROM_SETUP),true)
include $(BUILD_SYSTEM)/ninja_config.mk
include $(BUILD_SYSTEM)/soong_config.mk
@ -1240,4 +1251,7 @@ endif
DEFAULT_DATA_OUT_MODULES := ltp $(ltp_packages) $(kselftest_modules)
.KATI_READONLY := DEFAULT_DATA_OUT_MODULES
# Include any vendor specific config.mk file
-include vendor/*/build/core/config.mk
include $(BUILD_SYSTEM)/dumpvar.mk

@ -361,6 +361,10 @@ BUILD_WITHOUT_PV := true
ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
# ------------------------------------------------------------
# Include vendor specific additions to build properties
-include vendor/lineage/build/core/main.mk
# ------------------------------------------------------------
# Define a function that, given a list of module tags, returns
# non-empty if that module should be installed in /system.

@ -93,3 +93,5 @@ FRAMEWORKS_BASE_SUBDIRS := \
#
FRAMEWORKS_BASE_JAVA_SRC_DIRS := \
$(addprefix frameworks/base/,$(FRAMEWORKS_BASE_SUBDIRS))
-include vendor/lineage/build/core/pathmap.mk

@ -216,6 +216,8 @@ $(call add_json_bool, InstallExtraFlattenedApexes, $(PRODUCT_INSTALL_EXTRA_FLATT
$(call add_json_bool, BoardUsesRecoveryAsBoot, $(BOARD_USES_RECOVERY_AS_BOOT))
include vendor/lineage/build/soong/soong_config.mk
$(call json_end)
$(file >$(SOONG_VARIABLES).tmp,$(json_contents))

@ -144,6 +144,13 @@ function check_product()
echo "Couldn't locate the top of the tree. Try setting TOP." >&2
return
fi
if (echo -n $1 | grep -q -e "^lineage_") ; then
LINEAGE_BUILD=$(echo -n $1 | sed -e 's/^lineage_//g')
else
LINEAGE_BUILD=
fi
export LINEAGE_BUILD
TARGET_PRODUCT=$1 \
TARGET_BUILD_VARIANT= \
TARGET_BUILD_TYPE= \
@ -654,6 +661,8 @@ function lunch()
return 1
fi
check_product $product
TARGET_PRODUCT=$product \
TARGET_BUILD_VARIANT=$variant \
TARGET_PLATFORM_VERSION=$version \
@ -674,6 +683,8 @@ function lunch()
echo
fixup_common_out_dir
set_stuff_for_environment
printconfig
destroy_build_var_cache

@ -19,6 +19,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_product.mk)
# Default AOSP sounds
ifeq ($(LINEAGE_BUILD),)
$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
# Additional settings used in all AOSP builds
@ -27,6 +28,10 @@ PRODUCT_PRODUCT_PROPERTIES += \
ro.config.notification_sound=pixiedust.ogg \
ro.com.android.dataroaming=true \
else
$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage14.mk)
endif
# More AOSP packages
PRODUCT_PACKAGES += \
messaging \
@ -36,8 +41,10 @@ PRODUCT_PACKAGES += \
# Telephony:
# Provide a APN configuration to GSI product
ifeq ($(LINEAGE_BUILD),)
PRODUCT_COPY_FILES += \
device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
endif
# NFC:
# Provide a libnfc-nci.conf to GSI product

@ -378,7 +378,6 @@ PRODUCT_PACKAGES_DEBUG := \
ss \
start_with_lockagent \
strace \
su \
sanitizer-status \
tracepath \
tracepath6 \
@ -387,6 +386,11 @@ PRODUCT_PACKAGES_DEBUG := \
unwind_reg_info \
unwind_symbols \
ifeq ($(LINEAGE_BUILD),)
PRODUCT_PACKAGES_DEBUG += \
su
endif
# The set of packages whose code can be loaded by the system server.
PRODUCT_SYSTEM_SERVER_APPS += \
SettingsProvider \

@ -42,16 +42,22 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
netutils-wrapper-1.0
ifeq ($(LINEAGE_BUILD),)
# Additional settings used in all AOSP builds
PRODUCT_PROPERTY_OVERRIDES := \
ro.config.ringtone=Ring_Synth_04.ogg \
ro.config.notification_sound=pixiedust.ogg
endif
# Put en_US first in the list, so make it default.
PRODUCT_LOCALES := en_US
# Get some sounds
ifeq ($(LINEAGE_BUILD),)
$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
else
$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage14.mk)
endif
# Get a list of languages.
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)

@ -21,11 +21,19 @@
PRODUCT_PROPERTY_OVERRIDES := \
keyguard.no_require_sim=true \
ifeq ($(LINEAGE_BUILD),)
PRODUCT_PROPERTY_OVERRIDES := \
ro.com.android.dataroaming=true
endif
PRODUCT_COPY_FILES := \
device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
ifeq ($(LINEAGE_BUILD),)
PRODUCT_COPY_FILES += \
device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
endif
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)

@ -28,7 +28,6 @@ PRODUCT_PACKAGES += \
Contacts \
DeskClock \
Gallery2 \
LatinIME \
Music \
OneTimeInitializer \
preinstalled-packages-platform-handheld-product.xml \
@ -36,5 +35,10 @@ PRODUCT_PACKAGES += \
SettingsIntelligence \
frameworks-base-overlays
ifeq ($(LINEAGE_BUILD),)
PRODUCT_PACKAGES += \
LatinIME
endif
PRODUCT_PACKAGES_DEBUG += \
frameworks-base-overlays-debug

@ -85,5 +85,9 @@ PRODUCT_COPY_FILES += \
PRODUCT_PROPERTY_OVERRIDES += \
ro.carrier=unknown \
ifeq ($(LINEAGE_BUILD),)
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.notification_sound=OnTheHunt.ogg \
ro.config.alarm_alert=Alarm_Classic.ogg
endif

@ -26,14 +26,21 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_product.mk)
ifeq ($(LINEAGE_BUILD),)
$(call inherit-product, frameworks/base/data/sounds/AllAudio.mk)
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.ringtone=Ring_Synth_04.ogg \
ro.com.android.dataroaming=true \
else
$(call inherit-product, frameworks/base/data/sounds/AudioPackage14.mk)
endif
PRODUCT_PACKAGES += \
PhotoTable \
WallpaperPicker \
ifeq ($(LINEAGE_BUILD),)
PRODUCT_COPY_FILES += device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
endif

@ -53,4 +53,6 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
echo "ro.build.thumbprint=$BUILD_THUMBPRINT"
fi
echo "ro.lineage.device=$LINEAGE_DEVICE"
echo "# end build properties"

Loading…
Cancel
Save