Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5b9c2b6e authored by Luca Stefani's avatar Luca Stefani Committed by Rashed Abdel-Tawab
Browse files

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

Change-Id: Iab8b2ef8b644a7bea10bfd28b99d9e69539b1357
parent aaf83508
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -413,6 +413,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)" \
+3 −0
Original line number Diff line number Diff line
@@ -477,6 +477,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
+12 −0
Original line number Diff line number Diff line
@@ -234,6 +234,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:
@@ -1179,4 +1182,13 @@ endif
DEFAULT_DATA_OUT_MODULES := ltp $(ltp_packages) $(kselftest_modules)
.KATI_READONLY := DEFAULT_DATA_OUT_MODULES

ifneq ($(LINEAGE_BUILD),)
## 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

# Include any vendor specific config.mk file
-include vendor/*/build/core/config.mk

include $(BUILD_SYSTEM)/dumpvar.mk
+2 −0
Original line number Diff line number Diff line
@@ -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
+11 −0
Original line number Diff line number Diff line
@@ -142,6 +142,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= \
@@ -643,6 +650,8 @@ function lunch()
        return 1
    fi

    check_product $product

    TARGET_PRODUCT=$product \
    TARGET_BUILD_VARIANT=$variant \
    TARGET_PLATFORM_VERSION=$version \
@@ -663,6 +672,8 @@ function lunch()

    echo

    fixup_common_out_dir

    set_stuff_for_environment
    printconfig
    destroy_build_var_cache
Loading