* ./../../xiaomi/sm6150-common/../../../vendor/lineage/build/tools/extract_utils.sh: line 1: /#!/bin/bash: No such file or directory.
Signed-off-by: PIPIPIG233666 <2212848813@qq.com>
Change-Id: I178f745d4ecb818c38706ff100611df19221065d
* Camera, gps and sensors are device specific most of the time
so we do not sync the generic repositories for these projects
Change-Id: Ibb5d0066e362d285a862ea0c0f2a2c824f84f73d
Previously, this would be a full compile prefix
(e.g. prebuilts/gcc/.../bin/aarch64-linux-gnu-). Since we're adding
this to PATH, it only needs to be prebuilts/gcc/.../bin.
Also remove the extra /bin/ added by kernel.mk.
Change-Id: If2490729128c0243c61de646f6c8e19a15c8dc1c
* This prevents from seeing stuff like
"b'frameworks: Add unlinked ringtone and notification volumes'"
when using python3 as default.
Change-Id: Ie1fa85681b648edcee65680d784da4dff1779616
that way we can split the shim list logically into multiple lines like
TARGET_LD_SHIM_LIBS := /system/bin/gpsd|/vendor/lib/libshim_gpsd.so \
/system/lib/libexynoscamera.so|/vendor/lib/libexynoscamera_shim.so \
/system/lib/libstagefright.so|/system/lib/libstagefright_shim.so
to not have one single huge line
[lineage-17.0]
this got lost in:
soong: rework soong_config for Pie
Change-Id: I3c5001f02975e5487ba66a02217f1d24d2021272
Change-Id: Ice1411ee22b78da1dbf22eac412b9e4978acebdf
* Fold module installation into kernel image recipe.
* Specify make argument to strip modules on installation instead of
explicitly invoking the strip tool.
* Remove support of TARGET_KERNEL_MODULES, it's a phony target thus
we're not allowed to depend on it per Android 10 restriction. It
has been useless for years anyway.
* Apply minor clean-ups.
Change-Id: I288af1b2f741f524c2ef49554e15cb91c3115209
This allows us to get rid of the following warning when running
`breakfast` command:
add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
Change-Id: I5b05515465d40b9b77f74c69293a1431c5325f5d
* For use with LINEAGE_FIXUP_COMMON_OUT=1, update
symlink handling to work with relative OUT_DIR.
* Fixes error:
FAILED: ninja: error: mkdir(out/target/common/obj): No such file or directory
Change-Id: I958be470b4d9ff2074442f210b1a73541e4981c8
The kernel make command is executed in the build root. Without absolute
out paths, kernel out start with "out/" meaning it would be created in
the kernel source. Add BUILD_ROOT to the argument to ensure it's always
made in the actual out/ dir.
Change-Id: I425134a893d4d5c9f31efccaf75e153b5462b76c
Required for new commits on frameworks/native
* Fix lag during screen recording on some platforms
* Fix screen flickering after disconnecting from Android Auto on some platforms
Change-Id: Ia0ed0bbfda44fb5ccb184ace854ec1bf9a7d819a
* Note: msmnile is treated like msmnile because unlike other Qualcomm
codenames msmnile does not expand to 8150.
Change-Id: If246c0ec06de22097d369c17ce48aa1270bab19c
* This fixes dirty boot image rebuilding on devices
with CONFIG_LOCALVERSION_AUTO=y and any driver
set to =m.
* Basically appending `cat include/config/kernel.release`
to modules path makes sure that our find does not
return old modules which would make cp fail with
'cp: will not overwrite just-created' message.
Change-Id: Ifb79d33b95d7671d8b2d6633644c8b8290d1f442
* The macros used in the file formerly called "qcom_utils.mk" are
actually generic and not QCOM-specific. Move the QCOM_BOARD definitions
to a QCOM-specific location, and name the remaning macros something more
generic.
Change-Id: I6747bc9201e56b456caf251122057d7dbc233f1c
* There's actually not a whole lot QC-specific about these macros,
make them available at definition.mk inclusion time rather than
relying on BoardConfig to include them.
* Don't create a dependency on QCOM macros from a makefile
that is included very early in the build process.
Change-Id: I3dcaf0e068ca44732cfe58f69384621781ddda67
Currently we handle the DTBO images from start to finish, including
AVB footers, and just drop them in $(PRODUCT_OUT)/dtbo.img when done.
While this works for the most part, we are limited in what we can do
with the DTBO images. For example non-A/B device recovery images must
have a copy of the DTBO image appended to recovery (see AOSP docs:
https://source.android.com/devices/bootloader/recovery-image ). This
means that we need to pass the pre-AVB dtbo image into
BOARD_PREBUILT_DTBOIMAGE in order to let the AOSP build system handle it.
This commit reworks the way the DTBO images are built, placing them at
$(PRODUCT_OUT)/dtbo-pre.img instead and setting BOARD_PREBUILT_DTBOIMAGE
to that path so the AOSP build system can pick the images up and sign
them and append to recovery (for applicable devices).
Change-Id: I8819d7cd92ba298de67dbc7f6b321917ba8524f1
* Call the build system's build-image-kernel-modules function instead of
redefining all of it inline ourselves.
Change-Id: Ifc4bd3c452393389a14174f4cc29a8f7ef064b93
* Check for any actual kernel modules, rather than just the presence of
kernel modules being enabled as a kernel feature.
Change-Id: I6b7e82d5c59dd57621d9f9e2d1fd606997790d1c
* The directories used by the kernel module install rules are performed
as part of the rules in the kernel build itself. This is likely a
leftover from before kernel module install was separated.
Change-Id: Iee2f73a0f8e0f274b1c2931ba57277ff14d7f5cc
* Traditionally, the task of hex-editing blobs has been approached in 2 ways:
(1) Do it out-of-band, commit the modified blob, and record its edited
sha1sum in proprietary-files.txt (aka pin it).
(2) Do it in-band, by adding code to the device-level extract-files.sh
(usually this performs patchelf or sed). This code runs after the
extract_utils functions were invoked.
* Problems of approach (1):
- It relies on verbal (basically commit message) documentation of
the hex-editing that was done. Makes it more difficult to reproduce.
- Each time blobs are updated, pinning needs to be temporarily removed,
hex-editing done again manually and new hash put back.
* Problems of approach (2):
- It is incompatible with the concept of pinning, which is useful
for kanging blobs from another device. A pinned blob would either:
- Match the hash, get hex-edited, then it won't match the hash
next time around.
- Not match the hash (because of, say, hex-editing), then the
extraction script would use an unwanted blob version instead of the
pinned one (either that, or say "!! file not found in source").
* In summary, this patch adds system-wide support for approach (2) in order
to address the aforementioned shortcomings.
* At device level, users of extract_utils who wish to perform blob
fixups can override a blob_fixup() Bash function in their
extract-files.sh immediately after running "source ${HELPER}". The
blob_fixup() function will be called by the common extract() function
after extracting every individual blob, giving the user the
opportunity to hook custom code after this operation takes place.
* In proprietary-files.txt, the line corresponding to this blob which
needs fixups can look in one of 2 ways:
(a) vendor/lib64/vendor.qti.gnss@1.0_vendor.so
Do this if you are taking the blob from the stock ROM. The fixup
script will always run after the blob is extracted.
(b) vendor/lib64/vendor.qti.gnss@1.0_vendor.so|249c76153f8de014bf2dd2ab623ee3d87741fbc8|f7e9ee8e3804887a2f3939128e860767e6f27258
Do this if you are kanging the blob from somebody else. The pinning
logic now applies for both the pre- and the post-fixup hashes. The
fixup script will only run if the blob doesn't match the hex-edited blob,
although the fixup script should really be idempotent.
Change-Id: Ifdd73c885d995c645f6210597537693d1a2f903f
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* This makes sure that multi-word arguments are passed correctly from
extract-files.sh towards the common extract_utils helper. An example
would be extract-files --section "Hello World".
* IMPORTANT: device repositories that use a device/common split
typically do something like this to invoke the common script from the
device one:
${MY_DIR}/../common/extract-files.sh $@
This is incorrect because the quotation marks are missing, and will
lead to incorrect parameter parsing. The correct way is:
${MY_DIR}/../common/extract-files.sh "$@"
* The curly braces are only for cosmetic consistency.
Change-Id: Idf0885546379f47e675ec5e9dfb304706e512129
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* The use case is easier updating of pinned blobs. When --kang is set,
pinning is automatically ignored, and the script will print lines at
its output that can be directly copied back into the
proprietary-files.txt.
* Best served together with --section ${SECTION}, and proper grouping
of the proprietary-files.txt.
Change-Id: I648fbcbd4580a4a002b00828bcfee18d1e265d7b
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* This also makes the --section argument non-positional, since otherwise
it is not possible to easily support more than one optional positional
argument. This is in preparation of one more optional argument to come
in a follow-up patch: --kang.
Change-Id: Ieb142e0854319defb9a278ab68cd4aeefd0fbdd5
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* The use case is that if you have the following layout:
$TOP --- system.img
|
+-- vendor.img
you should be able (from $TOP) to:
mkdir system; mount -o ro,loop system.img system
mkdir vendor; mount -o ro,loop vendor.img vendor
and then (from device tree)
./extract-files.sh $TOP
But this doesn't work if system.img is SAR and contains another
"system" dir inside. This patch makes sure it searches for a "system"
dir in the provided path as well, if it couldn't find the blob
anywhere else.
Change-Id: Ib49cd5b587b3a57478a66ff69cf840270c2b1403
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* This makes the printed output closer to the proprietary-files.txt syntax
Change-Id: I81b844bb6bb1d1a2f91a39151a892fbfc0bed20b
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* If an apk/jar doesn't exist, the script would still try to deodex it.
* If an xml doesn't exist, the script would still try to "fix" it.
* Take it easier, man, it's not your fault.
Change-Id: I3061fb48b403da5121e3c17dd9ecdb6cd148bf97
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Google added support for LTO + CFI in the Pixel 3 kernel, which requires
not only Clang but a couple of additional binaries, namely llvm-ar and
llvm-dis for IR generation. Google expects these binaries to be in PATH
according to their definitions and the build.config.common file:
https://android.googlesource.com/kernel/msm/+/android-9.0.0_r0.31/Makefile#637https://android.googlesource.com/kernel/msm/+/android-9.0.0_r0.31/build.config.common
However, kernel.mk does not add the LLVM bin directory to PATH so the
build fails because the binaries can't be found. We could add LLVM_AR
and LLVM_DIS to the make commands like CC and CROSS_COMPILE; however,
adding the bin directory to PATH is a more sustainable solution as
Google might require new binaries in the future.
Additionally, LTO needs access to the LLVMgold library so it needs to be
available in LD_LIBRARY_PATH.
Add a PATH_OVERRIDE variable that will set up PATH and LD_LIBRARY_PATH
with the bin and lib64 folders from the requested LLVM toolchain
respectively when building with Clang. This won't affect kernels that
don't use LTO like Wahoo.
Change-Id: Ib16fa0d3180de2f96accb2f7648b07a017f8f98b
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
*) This has been deprecated by the bp mobule
generated_kernel_headers.
*) To build with kernel headers, do this:
LOCAL_HEADER_LIBRARIES += generated_kernel_headers
Or for soong targets:
header_libs: [ "generated_kernel_headers" ],
Change-Id: Idad445709f0ee0ec11b41b40123b14976a0052ad
*) Similar to genrule but can be used to generate content
when the output directory and file structure are not
known ahead of time.
*) An example use case is to build kernel headers.
Change-Id: I10deb7ba8825393b0b5fdbf2d96b12ad37257e12
Kernel source settings should always come at BoardConfig population
time so things that use the variable later don't end up pointing to
an empty or wrong variable.
The following is also squashed in:
Author: Christopher N. Hesse <raymanfx@gmail.com>
Date: Fri Aug 10 00:23:54 2018 +0200
tasks: kernel: Honor prebuilt kernel flag
For devices that want to use a prebuilt kernel, TARGET_KERNEL_SOURCE
would still be set to TARGET_AUTO_KDIR, meaning the build system would
still try to build the kernel if TARGET_AUTO_KDIR was present.
Setting TARGET_PREBUILT_KERNEL indicates this is not wanted, so don't
attempt to do it.
Change-Id: Ic79b3ac1b9c946fd258ada43dce2b08bb74ea0d9
Change-Id: If046b86ff0d18c76898e90295be873a8379f678a
*) Set JAVA_SOURCE_OVERLAYS in a device makefile as follows:
# Java sourcefile overlays (for Android.bp built modules only)
# Format is a whitespace separated set of rules, each of which
# structured as follows:
# modulename|overlay directory|glob pattern within overlay dir
JAVA_SOURCE_OVERLAYS := \
org.lineageos.hardware|$(LOCAL_PATH)/lineagehw|**/*.java
*) As of this commit, java sources overlays are only allowed for
module org.lineageos.hardware.
Change-Id: I6be1c12567081357f5231a84df98ac002c0563b4
* fw/native change I7f4174581e24e361577640b9263514a168ed482d
implemented validation of the buffer description info prior to
creating the descriptor. Some of our legacy devices need to
whitelist additional usage bits to support various functionality.
* The TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS variable can contain
a singular roll-up value (e.g., 0x02000000U), a left-shifted bit
(e.g., (1 << 25)), a bitwise OR of these things, or essentially
anything that the compiler can choke down.
Change-Id: I2127d33b03426b5e0f981aae837e07d82163fa17
* The default AOSP hardware/qcom/wlan path is listed in
PRODUCT_CFI_INCLUDE_PATHS since wpa_supplicant is compiled with
control flow integrity checks. Add the Qualcomm WLAN variant to
PRODUCT_CFI_INCLUDE_PATHS as well so wpa_supplicant can safely link
it without exploding.
Change-Id: Id5577846e1e1ea11f8a665d62847c80803e285f7
* If a cherry-pick results in an empty commit
(hints about git commit --allow-empty),
we should warn instead of failing all repopicks
Change-Id: I8410d7d02c4118c8072de609cf3c291e2d8523e6
These variables are usually set in a device's BoardConfig, setting them
in qcom_target is at the very end of the "configuration process" which
results in them being unavailable to plenty of other configuration
"things" (ex. soong namespaces or soong config). Move them to right
after a device's BoardConfig has been found and loaded.
Change-Id: Iddd731202d22ed3f8eb010197ce20d3c75a1f40a
* This function wraps add_json_str so that it does not add the soong
variable key:value pair to json structure if the second argument
(value) is empty/unset, preventing the need for more complex
conditional logic in the middle the code that builds the struct
* This concept allows us to make use of the omitempty field option
for purposes like single variables controlling ifdef blocks as well
as carrying the desired value
Change-Id: I99c8c162069c2aa8ff3d0bab2636b01181e74a9d