Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 12 #1

Draft
wants to merge 46 commits into
base: android-9.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7bd8f2a
make: Add soong module to import make variables.
bigbiff Jan 31, 2021
6649057
makevars: add pixel format
bigbiff Feb 14, 2021
40a477c
add AB_OTA_UPDATER
bigbiff Mar 7, 2021
07831d7
vendor: add sdk version to soong and add repopick
bigbiff Mar 27, 2021
09f02a7
vars: add TW_INCLUDE_CRYPTO_FBE
bigbiff Apr 7, 2021
1cf2bc4
add more makevars
nebrassy Apr 16, 2021
66051df
Merge "add more makevars" into android-11
bigbiff Apr 20, 2021
6e472d3
twrp: setup custom vendor for TWRP-only tree
CaptainThrowback Apr 4, 2020
a91012f
Merge "twrp: setup custom vendor for TWRP-only tree" into android-11
bigbiff May 3, 2021
56b5c49
add twrp cmdline for recovery as boot devices
nebrassy May 2, 2021
95eea67
Merge "add twrp cmdline for recovery as boot devices" into android-11
bigbiff May 3, 2021
6babc55
define twrp soong namespace
nebrassy May 8, 2021
696cda0
Merge "define twrp soong namespace" into android-11
bigbiff May 9, 2021
e65576f
fix and update roomservice
nebrassy Jun 3, 2021
014f3e1
Merge "fix and update roomservice" into android-11
bigbiff Jun 5, 2021
869a43f
add vendor_init
nebrassy Jun 7, 2021
4e5fade
Merge "add vendor_init" into android-11
bigbiff Jun 12, 2021
41cfffd
Add dummy folder to replace Android.mk dependencies
CaptainThrowback Jun 14, 2021
f9c87ef
Merge "Add dummy folder to replace Android.mk dependencies" into andr…
bigbiff Jun 14, 2021
a667d6f
Kernel: allow outputting kernel modules to recovery
nebrassy Jun 16, 2021
0fd98c3
Merge "Kernel: allow outputting kernel modules to recovery" into andr…
bigbiff Jun 26, 2021
b199e17
makevars: add TW_SUPPORT_INPUT_AIDL_HAPTICS
nebrassy Jun 18, 2021
2fd7bc7
Merge "makevars: add TW_SUPPORT_INPUT_AIDL_HAPTICS" into android-11
bigbiff Aug 1, 2021
b10c452
Empty the vts makefile so that there is no need to run 'repo sync' twice
DarthJabba9 Aug 2, 2021
015480c
Merge "Empty the vts makefile so that there is no need to run 'repo s…
bigbiff Aug 10, 2021
d06a327
makevars : Add TW_USE_SAMSUNG_HAPTICS
Yilliee Aug 15, 2021
76f6630
Merge "makevars : Add TW_USE_SAMSUNG_HAPTICS" into android-11
bigbiff Aug 28, 2021
88ffc57
Remove prebuilt kernel warning
CaptainThrowback Aug 31, 2021
9dc9ce3
Merge "Remove prebuilt kernel warning" into android-11
bigbiff Aug 31, 2021
b39b87a
also set twrp cmdline for legacy A/B
nebrassy Sep 12, 2021
67dd13f
Merge "also set twrp cmdline for legacy A/B" into android-11
bigbiff Sep 28, 2021
484390e
depmod: generate module information for prebuilt ramdisk modules
bigbiff Sep 11, 2021
94fdc77
Merge "depmod: generate module information for prebuilt ramdisk modul…
bigbiff Sep 29, 2021
1cd2f34
Disable adb auth for userdebug builds
CaptainThrowback Oct 28, 2021
4d5bf94
Merge "Disable adb auth for userdebug builds" into android-11
bigbiff Oct 28, 2021
9825489
Rework rule building in twrp_generator
SagarMakhar Sep 17, 2021
432ea20
Merge "Rework rule building in twrp_generator" into android-12
bigbiff Nov 14, 2021
e83210c
config: Update clang version to clang-r416183b1
ArianK16a Oct 5, 2021
cf5c552
Merge "config: Update clang version to clang-r416183b1" into android-12
bigbiff Nov 14, 2021
1987a27
kernel: Add 32-bit GCC to PATH for vdso32
luk1337 Oct 17, 2021
1324d83
Merge "kernel: Add 32-bit GCC to PATH for vdso32" into android-12
bigbiff Nov 14, 2021
090703a
modify logic for including cmdline for android 12
nebrassy Nov 14, 2021
5db7675
Merge "modify logic for including cmdline for android 12" into androi…
bigbiff Nov 14, 2021
56e71a1
build: Add support of generating kernel includes for prebuilt kernels
xingrz Oct 12, 2021
a4cdcd2
Update roomservice from PixelExperience
nebrassy Nov 22, 2021
dec30d7
Merge changes I400987b5,I95a1050a into android-12
nebrassy Nov 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright (C) 2011 The Android Open-Source Project
#
# 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.
#

# WARNING: Everything listed here will be built on ALL platforms,
# including x86, the emulator, and the SDK. Modules must be uniquely
# named (liblights.panda), and must build everywhere, or limit themselves
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.

LOCAL_PATH := $(call my-dir)

# if some modules are built directly from this directory (not subdirectories),
# their rules should be written here.

include $(call all-makefiles-under,$(LOCAL_PATH))
5 changes: 5 additions & 0 deletions build/core/certs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Allow custom build keys
ifneq (${ROM_KEYS_PATH},)
PRODUCT_DEFAULT_DEV_CERTIFICATE := ${ROM_KEYS_PATH}/releasekey
PRODUCT_EXTRA_RECOVERY_KEYS := $(PRODUCT_DEFAULT_DEV_CERTIFICATE)
endif
27 changes: 27 additions & 0 deletions build/core/qcom_target.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Bring in Qualcomm helper macros
include vendor/twrp/build/core/qcom_utils.mk

# Target-specific configuration
ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
qcom_flags := -DQCOM_HARDWARE
ifeq ($(TARGET_USES_QCOM_BSP),true)
qcom_flags += -DQCOM_BSP
qcom_flags += -DQTI_BSP
endif

# TARGET_GLOBAL_CFLAGS += $(qcom_flags)
# TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)
PRIVATE_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
PRIVATE_TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)

# Multiarch needs these too..
# 2ND_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
# 2ND_TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)
# 2ND_CLANG_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
# 2ND_CLANG_TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)

TARGET_COMPILE_WITH_MSM_KERNEL := true
MSM_VIDC_TARGET_LIST := msm8974 msm8610 msm8226 apq8084 msm8916 msm8937 msm8952 msm8953 msm8994 msm8909 msm8992 msm8996 msm8998 sdm660 sdm710 sdm845
endif


242 changes: 242 additions & 0 deletions build/core/qcom_utils.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
# Board platforms lists to be used for
# TARGET_BOARD_PLATFORM specific featurization
QCOM_BOARD_PLATFORMS := msm7627_surf
QCOM_BOARD_PLATFORMS += msm7627_6x
QCOM_BOARD_PLATFORMS += msm7627a
QCOM_BOARD_PLATFORMS += msm7630_surf
QCOM_BOARD_PLATFORMS += msm7630_fusion
QCOM_BOARD_PLATFORMS += msm8226
QCOM_BOARD_PLATFORMS += msm8660
QCOM_BOARD_PLATFORMS += msm8909
QCOM_BOARD_PLATFORMS += msm8916
QCOM_BOARD_PLATFORMS += msm8939
QCOM_BOARD_PLATFORMS += msm8937
QCOM_BOARD_PLATFORMS += msm8952
QCOM_BOARD_PLATFORMS += msm8953
QCOM_BOARD_PLATFORMS += msm8960
QCOM_BOARD_PLATFORMS += msm8974
QCOM_BOARD_PLATFORMS += msm8992
QCOM_BOARD_PLATFORMS += msm8994
QCOM_BOARD_PLATFORMS += msm8996
QCOM_BOARD_PLATFORMS += msm8998
QCOM_BOARD_PLATFORMS += apq8084
QCOM_BOARD_PLATFORMS += sdm660
QCOM_BOARD_PLATFORMS += sdm710
QCOM_BOARD_PLATFORMS += sdm845

MSM7K_BOARD_PLATFORMS := msm7630_surf
MSM7K_BOARD_PLATFORMS += msm7630_fusion
MSM7K_BOARD_PLATFORMS += msm7627_surf
MSM7K_BOARD_PLATFORMS += msm7627_6x
MSM7K_BOARD_PLATFORMS += msm7627a
MSM7K_BOARD_PLATFORMS += msm7k

QSD8K_BOARD_PLATFORMS := qsd8k


# vars for use by utils
empty :=
space := $(empty) $(empty)
colon := $(empty):$(empty)
underscore := $(empty)_$(empty)

# $(call match-word,w1,w2)
# checks if w1 == w2
# How it works
# if (w1-w2 not empty or w2-w1 not empty) then not_match else match
#
# returns true or empty
#$(warning :$(1): :$(2): :$(subst $(1),,$(2)):) \
#$(warning :$(2): :$(1): :$(subst $(2),,$(1)):) \
#
define match-word
$(strip \
$(if $(or $(subst $(1),$(empty),$(2)),$(subst $(2),$(empty),$(1))),,true) \
)
endef

# $(call find-word-in-list,w,wlist)
# finds an exact match of word w in word list wlist
#
# How it works
# fill wlist spaces with colon
# wrap w with colon
# search word w in list wl, if found match m, return stripped word w
#
# returns stripped word or empty
define find-word-in-list
$(strip \
$(eval wl:= $(colon)$(subst $(space),$(colon),$(strip $(2)))$(colon)) \
$(eval w:= $(colon)$(strip $(1))$(colon)) \
$(eval m:= $(findstring $(w),$(wl))) \
$(if $(m),$(1),) \
)
endef

# $(call match-word-in-list,w,wlist)
# does an exact match of word w in word list wlist
# How it works
# if the input word is not empty
# return output of an exact match of word w in wordlist wlist
# else
# return empty
# returns true or empty
define match-word-in-list
$(strip \
$(if $(strip $(1)), \
$(call match-word,$(call find-word-in-list,$(1),$(2)),$(strip $(1))), \
) \
)
endef

# $(call match-prefix,p,delim,w/wlist)
# matches prefix p in wlist using delimiter delim
#
# How it works
# trim the words in wlist w
# if find-word-in-list returns not empty
# return true
# else
# return empty
#
define match-prefix
$(strip \
$(eval w := $(strip $(1)$(strip $(2)))) \
$(eval text := $(patsubst $(w)%,$(1),$(3))) \
$(if $(call match-word-in-list,$(1),$(text)),true,) \
)
endef

# ----
# The following utilities are meant for board platform specific
# featurisation

# $(call get-vendor-board-platforms,v)
# returns list of board platforms for vendor v
define get-vendor-board-platforms
$($(1)_BOARD_PLATFORMS)
endef

# $(call is-board-platform,bp)
# returns true or empty
define is-board-platform
$(call match-word,$(1),$(TARGET_BOARD_PLATFORM))
endef

# $(call is-not-board-platform,bp)
# returns true or empty
define is-not-board-platform
$(if $(call match-word,$(1),$(TARGET_BOARD_PLATFORM)),,true)
endef

# $(call is-board-platform-in-list,bpl)
# returns true or empty
define is-board-platform-in-list
$(call match-word-in-list,$(TARGET_BOARD_PLATFORM),$(1))
endef

# $(call is-vendor-board-platform,vendor)
# returns true or empty
define is-vendor-board-platform
$(strip \
$(call match-word-in-list,$(TARGET_BOARD_PLATFORM),\
$(call get-vendor-board-platforms,$(1)) \
) \
)
endef

# $(call is-chipset-in-board-platform,chipset)
# does a prefix match of chipset in TARGET_BOARD_PLATFORM
# uses underscore as a delimiter
#
# returns true or empty
define is-chipset-in-board-platform
$(call match-prefix,$(1),$(underscore),$(TARGET_BOARD_PLATFORM))
endef

# $(call is-chipset-prefix-in-board-platform,prefix)
# does a chipset prefix match in TARGET_BOARD_PLATFORM
# assumes '_' and 'a' as the delimiter to the chipset prefix
#
# How it works
# if ($(prefix)_ or $(prefix)a match in board platform)
# return true
# else
# return empty
#
define is-chipset-prefix-in-board-platform
$(strip \
$(eval delim_a := $(empty)a$(empty)) \
$(if \
$(or \
$(call match-prefix,$(1),$(delim_a),$(TARGET_BOARD_PLATFORM)), \
$(call match-prefix,$(1),$(underscore),$(TARGET_BOARD_PLATFORM)), \
), \
true, \
) \
)
endef

#----
# The following utilities are meant for Android Code Name
# specific featurisation
#
# refer http://source.android.com/source/build-numbers.html
# for code names and associated sdk versions
CUPCAKE_SDK_VERSIONS := 3
DONUT_SDK_VERSIONS := 4
ECLAIR_SDK_VERSIONS := 5 6 7
FROYO_SDK_VERSIONS := 8
GINGERBREAD_SDK_VERSIONS := 9 10
HONEYCOMB_SDK_VERSIONS := 11 12 13
ICECREAM_SANDWICH_SDK_VERSIONS := 14 15
JELLY_BEAN_SDK_VERSIONS := 16 17 18
KITKAT_SDK_VERSIONS := 19
LOLLIPOP_SDK_VERSIONS := 21 22
MARSHMALLOW_SDK_VERSIONS := 23
NOUGAT_SDK_VERSIONS := 24 25
OREO_SDK_VERSIONS := 26

# $(call is-platform-sdk-version-at-least,version)
# version is a numeric SDK_VERSION defined above
define is-platform-sdk-version-at-least
$(strip \
$(if $(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= $(1) ))" )), \
true, \
) \
)
endef

# $(call is-android-codename,codename)
# codename is one of cupcake,donut,eclair,froyo,gingerbread,icecream
# please refer the $(codename)_SDK_VERSIONS declared above
define is-android-codename
$(strip \
$(if \
$(call match-word-in-list,$(PLATFORM_SDK_VERSION),$($(1)_SDK_VERSIONS)), \
true, \
) \
)
endef

# $(call is-android-codename-in-list,cnlist)
# cnlist is combination/list of android codenames
define is-android-codename-in-list
$(strip \
$(eval acn := $(empty)) \
$(foreach \
i,$(1),\
$(eval acn += \
$(if \
$(call \
match-word-in-list,\
$(PLATFORM_SDK_VERSION),\
$($(i)_SDK_VERSIONS)\
),\
true,\
)\
)\
) \
$(if $(strip $(acn)),true,) \
)
endef
Loading