summaryrefslogtreecommitdiff
path: root/build_abi.sh
AgeCommit message (Collapse)Author
2019-08-19build_abi: add options to help maintaining the abi.xmlMatthias Maennich
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>
2019-08-16envsetup: move envsetup.sh to _setup_env.sh and deprecate envsetup.shMatthias Maennich
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>
2019-08-08envsetup.sh checks, but does not set ENVSETUP_SH_INCLUDED=1Alessio Balsini
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>
2019-07-22build_abi: add build/ to the path for error msgNick Desaulniers
Change-Id: I5328a49e8f0e6081f7436f67bdd2cd97c3d949d8 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-07-15remove dpkg usage from build_abi.shGreg Kroah-Hartman
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
2019-06-12abi: replace libabigail's --short-locs by postprocessing of the abi.xmlMatthias Maennich
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>
2019-06-03abi: build_abi.sh: compare against predefined ABIMatthias Maennich
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
2019-05-29ABI out: Use the extension .xml rather then .outMatthias Maennich
Update all relevant locations including the documentation. Bug: 133501930 Change-Id: I3cf207de381b248400c411730ac4890a3b1e3940 Signed-off-by: Matthias Maennich <maennich@google.com>
2019-05-28build.sh: add option to define abi definition locationMatthias Maennich
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>
2019-05-28build_abi.sh: pass through CC_LD_ARGS to `make olddefconfig`Matthias Maennich
Ensure we use the correct toolchain when reconfiguring for abi builds. Change-Id: I35233575ed081a10cadbfac114d13affd4908a5e Signed-off-by: Matthias Maennich <maennich@google.com>
2019-04-25build_abi.sh: also check for the existence of abidiffMatthias Maennich
Before we were only checking whether the correct version of abidiff was in PATH. In case there was no abidiff at all, we failed rather loud with a lot of noise from dpkg. Hence do a quick check for abidiff before comparing versions. Change-Id: I056a292556fb519b8ca6880746ee034528750724 Signed-off-by: Matthias Maennich <maennich@google.com>
2019-04-16build_abi.sh: Ensure valid abigail installationMatthias Maennich
As of now, build_abi.sh (indirectly) relies on libabigail while creating the abi dump. In case abigail is not installed or not in PATH, this script will do all the (time consuming) kernel building before failing at its most essential step. Avoid that by ensuring a valid abigail before building the kernel. Change-Id: I979b61de00473f4cfd6537f7151add454a02c1c9 Signed-off-by: Matthias Maennich <maennich@google.com>
2019-04-02add build_abi.sh to create ABI dumps from build.sh buildsMatthias Maennich
Add build_abi.sh as a wrapper script to build with build.sh and create an ABI dump using abi/dump_abi. Bug: 111449103 Change-Id: Iea773cf2ed6f3fdc577a99f42284992e0a871d25 Signed-off-by: Matthias Maennich <maennich@google.com>