Age | Commit message (Collapse) | Author |
|
Use AOSP LLVM for compiling the kernel. If the latest AOSP Clang is not
present, fall back to the AOSP Clang specified in the platform toolchain.
Change-Id: Iffac9dad320dc7f7de30480b2d3ca62bf8f05713
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
|
|
By default, the build.sh provides a mechanism to compile the kernel
as a standalone component, and is not helpful to compile from within
the Android tree. As a result, add the snapshots of kernel_definitions.mk
and buildkernel.sh files to support kernel compilation from within
the Android tree. The snaphot is taken from msm-4.19 branch as of
commit <0780fd437f12d401c> (kernel/build: remove wildcard entry for
updating makefile variable).
Change-Id: I63b3859a9c7d7b5bcf19320fe62235f432f9817a
|
|
* origin/aosp/master:
build_abi: add options to help maintaining the abi.xml
checkpatch: skip analysis for merge commits on kernel/common
envsetup: move envsetup.sh to _setup_env.sh and deprecate envsetup.sh
build.sh: Set make flags and propagate make arguments
build kernel module ramdisk
Export all the BUILD_CONFIG env variables
envsetup.sh checks, but does not set ENVSETUP_SH_INCLUDED=1
[V2] build.sh: Fix the behavior of specifying CC
Fix removal of duplicate PATH entries
Fix array expansion
Revert "build.sh: Fix the behavior of specifying CC"
build.sh: Fix the behavior of specifying CC
add more common build tools to the kernel prebuilts
build: maintain a set of build-tools used during kernel builds
abi: update libabigail to latest upstream master
build_abi: add build/ to the path for error msg
config.net_test: Set compilers paths to local repo's
Wildcard expansion for generic FILES entries
remove dpkg usage from build_abi.sh
abi/bootstrap: Warn on non-debian systems what might need to be done
checkpatch_presubmit: be a bit more tolerant when parsing applied.prop
abi: update libabigail to latest upstream master
Change-Id: I2ddcf5dbc0326a0b207693fab63cf7d4893e40a7
|
|
Add the options
-u | --update Update the abi.xml in the source directory
-n | --nodiff Do not generate a ABI report with abidiff
-r | --print-report Print ABI report in case of differences
This allows the following example usages (besides others):
- Update the ABI and print the reported differences
That is useful to take the report for the commit message when
updating the abi.xml.
$ build/build_abi.sh -r -u
- Update the ABI and ignore any difference
If you are not interested in the report or any existing difference,
but just want to update the abi.xml.
$ build/build_abi.sh -u -n
Change-Id: Ifc97b7043da6e93b90e670bab2f89796aff655ac
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
|
|
|
|
These are upstream merges that likely hit issues in checkpatch.pl or
merges from other common kernel repositories where _this_ check has been
run as part of the developement process.
Change-Id: Ib489d57b74ffc128eec5f6bde253f139768e9445
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
envsetup.sh is an implementation detail of build.sh and friends and
should therefore not be sourced directly. Hence move its functionality
and just leave a warning in the original envsetup.sh along with some
documentation.
Change-Id: Ib0cfc56c7bbe4f2ce9d4cd01ea251e6982822c47
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
MAKEFLAGS are now enriched at the beginning of the script with a default
number of jobs (-j $(nproc)). This avoids specifying that option at
every make invocation.
An advantage is that also mrproper is be parallelized, and although its
operations are mostly io-bound, the total execution time can be strongly
decreased.
In addition to that, make arguments are propagated to all the make
commands.
Test: manual build
Bug: n/a
Change-Id: I717ac5ac3a92e377cee2766416825350cc4063f1
Signed-off-by: Alessio Balsini <balsini@android.com>
|
|
|
|
Bug: 137692367
Test: built locally and used to boot x86 cuttlefish
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I15d592f43bb5d2f7099de32b52f15b2f70d81d69
|
|
All the environment variables that are generated by sourcing the
BUILD_CONFIG files will be exported, so that children environments can
inherit them.
Test: manual inspection and build
Bug: 138854687
Change-Id: I8790aacc8c4867d996ccd597cc4bdf8882c2a5e5
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
envsetup.sh has a guard that prevents the file to be sourced multiple
times. This is useful if a script wants to:
1) source envsetup.sh to get the default environment;
2) change some variables
3) call another script that calls envsetup.sh again, overwriting the
modifications.
This is what happens with build_abi.sh which, after sourcing
envsetup.sh, changes the environment variables and builds the kernel
with build.sh. The ladder script sources again envsetup.sh, overwriting
the canges made by build_abi.sh. This unexpected behavior is solved by
envsetup.sh, which can either immediately return if ENVSETUP_SH_INCLUDED
is set or set ENVSETUP_SH_INCLUDED=1 and continue the execution. This
avoids envsetup.sh to be sourced multiple times, thus overriding the
environment variables. This solution causes the issue of making the
build script unusable if the user manually sources build.sh.
This patch solves the issue by removing the ENVSETUP_SH_INCLUDED=1
operation from envsetup.sh, which is instead moved to build_abi.sh.
Test: manual inspection
Bug: 138854687
Change-Id: If52b0546809d77304ed8d11c9da062e13a3c7ec5
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Update the behavior of specifying CC.
The following cases are covered:
- CC == gcc: special case in which we fall back to the default
triplet defined by CROSS_COMPILE;
- CC == XXX != gcc != "": force the use of the specified XXX compiler;
- CC defined both in env and in BUILD_CONFIG: env has higher priority
than BUILD_CONFIG.
This patch solves this unexpected behavior of having the CC value
specified in the environment overwritten by the one defined in
BUILD_CONFIG, preserving the behavior of the other cases.
In aosp/1090669 I forgot to add double quotes to the
variable expansion, causing the bug (Oops):
[ -n $CC_ARG ] --> [ -n "$CC_ARG" ]
Test: manual build
Bug: 138799604
Change-Id: Ie054cb7deb3ac7b1a4ae71fc5ae45857b3acaa39
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
An unescaped '/' was causing a misbihavior in the shell string subsitution.
Fixed.
Bug: 138854687
Change-Id: I3a1ad9e5a75d1811b7bc5b70ea1423e6d89d16ee
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
The for loop was wrongly expanded as a single multiline variable in zsh.
Fixed.
Test: manual inspection
Bug: 138854687
Change-Id: I062d11a7a3b883a6687299fe3c219f681395df08
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
|
|
This reverts commit f9394cfcf59ef8d16ebcdef50e0fe4bc45bbf99c.
Reason for revert: some builds are failing, investigating offline (b/138799604)
Change-Id: Id866ef7e0a405d15930989526c22a1d23e89279a
|
|
|
|
|
|
Update the behavior of specifying CC.
The following cases are covered:
- CC == gcc: special case in which we fall back to the default
triplet defined by CROSS_COMPILE;
- CC == XXX != gcc != "": force the use of the specified XXX compiler;
- CC defined both in env and in BUILD_CONFIG: env has higher priority
than BUILD_CONFIG.
This patch solves this unexpected behavior of having the CC value
specified in the environment overwritten by the one defined in
BUILD_CONFIG, preserving the behavior of the other cases.
Test: manual build
Change-Id: I1193d15bb810f4e7989f58381f742f7cab23c6c2
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
bc
bison
diff
expr
find
flex
grep
m4
make
nproc
realpath
Bug: 135922132
Change-Id: I3fc3c17e842160f1479f6fbe66e79fb3b0d16982
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
Start with the current set of Android build-tools.
Bug: 135922132
Change-Id: I27cebf99971290f1c3622e5789dd3e69a0d3549d
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
upstream commit d7ae619ff3360480348f7f1ab58fdb3be85aa079
- Runtime improvements (abidw, abidw)
- support for building in C++17
- support for building against libc++
- improved handling for enum types (compatible integers)
Bug: 138130708
Change-Id: Iae2c7a4e61eab6ecb7fadc8ee80501c28c80954b
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
Change-Id: I5328a49e8f0e6081f7436f67bdd2cd97c3d949d8
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
|
|
Android kernel repositories already provide prebuilt compilers that can
be used to isolate the kernel dependencies from the host which builds the
kernel.
Use the prebuilt compiler provided with the kernel repository for the
kernel test.
This solutioion also allows the use of the clang compiler:
[CC={clang,gcc}] build/build_test.sh
Change-Id: I463dabf11bd8fd46d2e4577c82f7f222ed41958f
Bug: none
Test: local "[CC={clang,gcc}] build/build_test.sh" of aosp_kernel-common-android-*
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Allow the use of wildcards in the FILES section of a build
configurations to improve the flexibility of how the files are
specified.
Skips all non-file entries (i.e., folders).
Change-Id: I549b6ee8b1eabdf1204613a46d27dd5ab5e04ba0
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
No need to rely on Debian to do a version check when sort can do it for
us already. Removing the call to dpkg allows us to run the script on
non-Debian systems, which is nice for those of us not using that
specific distro variant.
Also, break the check for a working abidiff up into two different tests,
providing two different error messages to help people understand what
specifically went wrong (either no abigail installed at all, or an old
version is installed.)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9cda3c63b2cca732deb96ae92cd542643376adf5
|
|
The scripts work on non-debian systems with a few minor changes. Warn
the user when running bootstrap that there might be some packages they
need to install on their own before continuing.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I93345bf19a6b4829a81d5b30c45538d6338bd914
|
|
Generalize the regex to parse any 40 character sha1 out of applied.prop.
The build infrastructure inconsistently creates entries like
common u'1234caffee...' and common 1234caffee...
The first ones failed to parse and hence the kernel_lint check was
silently skipped and reported as success.
Change-Id: Id06337cebaed6027cae25de5c50d7bd30194c2b0
Signed-off-by: Matthias Maennich <maennich@android.com>
|
|
- Runtime improvements (abidw)
- support for building in C++17
- support for building against libc++
- improved handling for union types
Bug: 135956213
Change-Id: Idf6b01e2db209935d486992c87ee4d4f5c43485b
Signed-off-by: Matthias Maennich <maennich@android.com>
|
|
* changes:
build: teach envsetup.sh to respect a defined buildtools location
build: also define HOSTCC if CC is set
|
|
bootstrap incorrectly missed to add the path to the libebl backends
(e.g. libebl_aarch64.so) to the printed LD_LIBRARY_PATH.
Fix that.
Bug: 135957120
Change-Id: I5ee2127bee5885101432f41533c4b7cd233c916e
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
If BUILDTOOLS_PREBUILT_BIN is defined in the build.config, put it into
PATH as for the other prebuilt locations.
Bug: 135922132
Change-Id: Ib9df33b010301c1b652dc155eba78e448aed4e17
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
To consistently use the same compiler, also set the HOSTCC to CC in all
`make` invocations. Otherwise we might even depend on a host dependency
that does not exist or would be invalid (HOSTCC=gcc is implicit).
Bug: 135922132
Change-Id: Ib1e3cb620a7446f958963fc60de2216fb9b6ca6f
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
This improves the way, libabigail deals with anonymous types and also
introduces speedups for C languague programs such as the Linux Kernel.
Change-Id: Ib9d99d69465800cde26383fe5965827f30002358
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
This improves the way, libabigail deals with anonymous types and also
introduces speedups for C languague programs such as the Linux Kernel.
Bug: 253025227
Change-Id: I38ae7b49d9fb0e95957c443883ad3a1ded554c2b
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
Shortening the file paths with --short-locs to just file names makes the
abi.xml output ambigous and the later abidiff analysis sensitive for
external influences that (still correct) change the result of the
binary. Hence, stop using --short-locs, but rather textual replace all
occurrences of the kernel source dir and - in a second step - everything
else that sneaked in (e.g. from the prebuilts or other repositories of
the checkout).
Bug: 135011693
Change-Id: I808a96e3e38365e54f5eb467587b8f5dfbc12825
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
The elfutils version used may make a difference for the produced abi
results. Hence, also build them from scratch.
Change-Id: Id96276746907d69470da00157569d455bc353c1f
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
If ABI_DEFINITION is set (usually via build.config), run an actual
analysis with build/abi/diff_abi and create a report for any detected
differences. Also return the tools error code as error code of
build_abi.sh.
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Ie744290bfd89c455d6ee966f1e5ede41050e7648
|
|
Until a release (1.7) has been published upstream, we need to build and
use a trunk version of libabigail as we make use of recent
functionality only available in master.
Hence, pin down the libabigail version to a sufficient master commit [1].
[1] https://sourceware.org/git/?p=libabigail.git;a=commit;h=fb70149cb1bacb62209180d5ee59ba7022c7ec85
Change-Id: I6f0527d2d85e5c85690d2f83fa9379ae65ee9ab2
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
Update all relevant locations including the documentation.
Bug: 133501930
Change-Id: I3cf207de381b248400c411730ac4890a3b1e3940
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
|
|
Kernel symbols have spelling mistakes, which are picked up by ABI dumps.
Silence checkpatch.pl warnings.
Change-Id: I3935e8a956ab4655435a6f9151b3b7a08c4fb12f
Signed-off-by: Tri Vo <trong@google.com>
|
|
If ABI_DEFINITION is set (usually within a build.config file), make
build.sh copy it over to the distribution. Since it is copied from the
sources it might not match the actual ABI of the binaries that are part
of the distribution. Finding this difference is subject to tests /
analysis run against the distribution for now. And making this file part
of the distribution actually enables this kind of analysis.
In case we are running build.sh as part of build_abi.sh, disable this
functionality as we are supposed to generate the abi definition in this
case.
Bug: 133501930
Change-Id: Idd49161a311b0e8995108a875f0c46d61965a2d7
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
In latest master, libabigail's abidw introduced new options to omit
absolute paths etc. This is a constant source of indeterminism. Set
these options to omit full paths and file locations.
Change-Id: I62e820b373ea4f58bd375adedf69f5a5097ed9c5
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
Ensure we use the correct toolchain when reconfiguring for abi builds.
Change-Id: I35233575ed081a10cadbfac114d13affd4908a5e
Signed-off-by: Matthias Maennich <maennich@google.com>
|
|
Seen on build.configs that enable check_defconfig(), such as cuttlefish.
If we don't do this, CONFIG_LTO_CLANG will be turned off (because GCC
will be detected) which breaks defconfigs that enable this feature.
Change-Id: I19f31318058de9d1c020e5e30168c4a678289e27
Signed-off-by: Alistair Strachan <astrachan@google.com>
|
|
In order to build a boot.img, the following build variables
need to be defined in the build.config file:
As we finalize where all the prebuilts will get delivered to,
some of the below may become unnecessary.
BUILD_BOOT_IMG=1
MKBOOTIMG_PREBUILT=<path to mkbootimg.py>
GKI_RAMDISK_PREBUILT_BINARY=<path to GKI ramdisk prebuilt>
VENDOR_RAMDISK_PREBUILT_BINARY=<path to vendor ramdisk prebuilt>
KERNEL_BINARY=<name of kernel file, eg. Image.lz4, Image.gz etc>
BOOT_IMAGE_HEADER_VERSION=<boot image header version>
Change-Id: I191c39911b53cef17c01bd4adb8dd4f5a2e17aee
|
|
am: 96a7e233ec
Change-Id: I2ae28f638bae586d6efb8cf826cd53a52e298989
|