dtc from OUT_DIR might not be available, so use the prebuilt one instead.
Also, clean-up a little bit and follow the same logic as prebuilt make binary.
Change-Id: I48dd57d7e69a2dbf97c7bd3b225eaf4ec8b41e23
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Kernel no longer has to track their own latest dtc with this change
Change-Id: I63229b0a070db2f201bcf4597269711655cab410
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Our build/make changes break incremenetal builds with prebuilt dtb dir
(see discussion here: https://android-review.googlesource.com/c/platform/build/+/1134337/1/core/Makefile )
Instead of using the AOSP recipe, just define our own and use it by not defining
BOARD_PREBUILT_DTBIMAGE_DIR
Change-Id: If579b1670db447557b6f76ca79ecec22661c4080
If for whatever reason we need a prebuilt DT image,
it has to end up in target files for the signing slave.
Change BOARD_KERNEL_PREBUILT_DT to hold the path of the
prebuilt DT image, if it's going to be used.
Change-Id: I8042d347d271da5c3963824777d399bbc4229aa9
* 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 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 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
*) 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
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
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>
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
Builds that use the stock CAF device/qcom/common
generate_extra_images.mk may want to ignore this kernel.mk.
Set TARGET_PROVIDES_KERNEL_MAKEFILE to true to ignore kernel.mk.
Test: make bootimage. Build succeeds.
Change-Id: Ieb2718636170f86600d44d8a99434a57826a5309
Signed-off-by: Josh Choo <dev@joshchoo.com>