The existing kernel header logic has several issues:
* It does not depend on the actual kernel headers, so it does not
detect actual kernel header changes.
* It does depend on the kernel config, which should not be used to
generate (user space) kernel headers.
The end result is that kernel headers aren't properly regenerated when
needed, and spuriously regenerated when not needed. Additionally, the
kernel header rebuild mucks around with the kernel config, which is
unneccesary and fraught with danger.
Rewrite the kernel header dependency and generation logic as follows:
* Use the dependency file $(KERNEL_OUT)/.headers_install_deps to
manage dependencies on the actual kernel header files which are
exported to user space (and the top level kernel Makefile, which
is used to generate version.h). The dependency file is exactly
the same as what GCC would output for a C/C++ dependency with the
M/MM flags.
* Conditionally include the dependency file to detect when headers
should be (re)generated.
* Introduce the phony target INSTALLED_KERNEL_HEADERS for modules to
declare a dependency on kernel headers.
Additionally:
* Get rid of TARGET_KERNEL_HEADER_ARCH and KERNEL_HEADER_DEFCONFIG.
* Get rid of KERNEL_OUT_STAMP and move commands to the appropriate
places in the rules.
* Fail the build when $(KERNEL_OUT)/usr is mentioned in a dependency.
Note a separate commit to build/core/binary.mk will provide a
migration path and a suitable deprecation warning.
* Declare the kernel*config targets phony.
Change-Id: I8b46f4ea1c622d8e73cca5157be96ec09d42ebb3
taimen uses the dtbo.img as an DTB Overlay in order to use the same defconfig for both, taimen and wahoo.
The dtbo.img is built with "make dtbo.img". Allow automatically building it when setting TARGET_NEEDS_DTBOIMAGE to true, or by manually calling make dtboimage.
Thanks to luca020400 for help with the kernel.mk logic
[raymanfx] Add AVB hash footer support
Change-Id: Iaddafaa98e3e84880462a2c35b899e3fea21e161
Add support for compiling kernels with Clang as intoduced on android-4.4
In order to compile with clang, you must set TARGET_KERNEL_CLANG_COMPILE.
If you wish to specify a specific clang version, also set TARGET_KERNEL_CLANG_VERSION,
but if that is not set, the build system will default to the latest version of clang
available in prebuilts/clang
Change-Id: I79dc1dca9758a930f2f5ba1754b5d8de114af900
Signed-off-by: Joe Maples <joe@frap129.org>
Place kernel module output in the correct location.
Perform depmod steps (copied from build-image-kernel-modules function in
build/make/core/Makefile).
See: https://source.android.com/devices/architecture/kernel/modular-kernels
Change-Id: I6e70012a5c1acdb276f9bee0d57631d2805f71ea
The existing kernel module logic does not detect failed kernel module
builds. This is because the module build logic is a long shell chain
that invokes make macros which are not intended to be used in this way.
The essense of the issue is that we get a shell chain that looks like:
cmd && cmd && var=value; cmd && var=value; cmd;
The shell breaks this into three separate commands. The first builds
the modules. The other two are the macro invocations. So the result
of the command is the result of the last macro invocation, which will
always succeed even if the modules fail to build.
The issue is made worse by the existing build rule conflating the built
kernel modules and the installed kernel modules.
Fix this by reducing the built kernel module command to a single shell
command and creating a separate target INSTALLED_KERNEL_MODULES. Any
kernel module build failure will show up properly. The commands for
INSTALLED_KERNEL_MODULES do not invoke any macros and should avoid the
issue described above.
Finally, this also removes the fake target no-external-modules and
unifies the install logic for in-tree and out-of-tree modules.
Change-Id: I3d13056e217e1e937c8c3a345032682ffc394bca
* WARNING: this intentionally breaks the build on devices who
are not setting BOARD_KERNEL_IMAGE_NAME and are still setting
TARGET_USES_UNCOMPRESSED_KERNEL or TARGET_KERNEL_APPEND_DTB
* The logic here is insanity and if all of this can be done
by simply setting BOARD_KERNEL_IMAGE_NAME, why have all this
extra cruft?
* Use cases:
- Set a kernel image name without "-dtb" on the end, you get a kernel.
Nothing more.
- Set a kernel image name with "-dtb" on the end, you get an kernel
with an appended dt.
- Set a kernel image name without "-dtb" on the end, and set
BOARD_KERNEL_SEPARATED_DT. You get a kernel and a separated dt.img.
- Set a kernel image name with "-dtb" on the end, and set
BOARD_KERNEL_SEPARATED_DT. You're crazy.
Change-Id: I5c3fc6eb727255684278ff562c0ee3faa7124b6b
* Add a build target to simply regenerate the kernel
minimal defconfig and copy it to the kernel source
Change-Id: I04be945eb6dae3042c236785328c7c9995d42e49
Run 'make addonsu' to make a flashable zip to install the addon and
'make addonsu-remove' for a flashable zip that removes it.
Change-Id: I5b2fe67f98f2474b923c074dc6025b47c6db2ae0
Commit 7fb9251dfc modified
the expansion in an illegal way.
Fix the broken env variable.
Change-Id: Ib3029fa995d6a4b0416887a2ef2e4792c9e6bb27
(cherry picked from commit 90b437e784c19fc428c24891cc96705b89b786df)
The easiest and best way to get openssl on darwin is using homebrew,
however homebrew refuses to link openssl (and for good reason) in
order to prevent conflicts with Apple's homegrown version. Include
the openssl headers and dylibs from the dir that homebrew installs
openssl to let 4.4 kernels compile.
Change-Id: I06b66768fbdd4855fd57b88100d646ed6e311a59
* Gotta save that space somehow. This is in the continuing
effort to remove custom mkbootimg.mk files in device trees
Change-Id: Ie8b3cedf6e37d1d11c2383dd3590f9908ad7818c
Currently devices that have TARGET_KERNEL_APPEND_DTB set also have to set
BOARD_KERNEL_IMAGE_NAME to Image.gz-dtb (or zImage-dtb on arm32) in order
to properly build the image with an appended DT. Automatially append -dtb
if TARGET_KERNEL_APPEND_DTB is set so BOARD_KERNEL_IMAGE_NAME does not need
to be set.
Change-Id: I5464c67092a7b9f86669902e5c0e4a47836f7cbd
* BOARD_USES_UBOOT is unused.
* Same goes for BOARD_USES_UNCOMPRESSED_BOOT. Furthermore,
it is superseded by TARGET_USES_UNCOMPRESSED_KERNEL.
Change-Id: I9f0e2848fcd0cd212bccacf14df55ad03f821051
With androidkernel (androideabi) toolchains, -fpic is enabled by default.
At least on my 3.4 arm kernel, this causes an issue with kernel modules:
"Unknown symbol _GLOBAL_OFFSET_TABLE_".
On traditional armeabi toolchains, -fpic is not enabled, resulting in working
kernel modules; let's follow that here.
Change-Id: I3058b5213b34bdde9bb9d744563c7d55cd42d2a5
* checksum will be downloaded and asserted to prevent a
redownload every clean
* Archives will exist (invisibly) at vendor/cm/prebuilt/archive
Change-Id: I637e86cacd146d665044a119885900dc4660e22b
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
* androidkernel is a set of toolchain symlinks for kernel builds that
point to the regular toolchain binaries, except with ld pointing to bfd
instead of gold.
Change-Id: Id1e2d3b1c50db581bff13cfa00b5b35d5badb8ed
Since mainline devices will always identify as a latest
release api level (due to userbase volume), make sure
we check against the current api vs api -1.
Change-Id: I9e9b41a1af5d3a93f58b2e0e0545b979d1cef978
$@ already contains the full path of the output, so no need
to prepend ANDROID_BUILD_TOP to the path
Change-Id: Ieeeb9fa16352e80b878cddb89b1e7c04b82ab43c
Since cmsdk prebuilts lives in a single master branch,
previous branches that apicheck will fail since they'll
verify against an api that exists in future releases.
Change-Id: I56594d075b89cb1a3d7a606cc9c1699dfffd94cb
TICKET: CYNGNOS-2220
Add ability to `make cmsdk-test-coverage`
to generate an html page which denotes how
much the testing package from vendor/cmsdk
covers public interfaces.
Change-Id: I76556df1822934a6b7e86ebf2ff42e302acff46d
TICKET: CYNGNOS-2189