Commit Graph

28 Commits

Author SHA1 Message Date
Justin Yun
3e78977d25 Add license_kinds to VNDK snapshot modules
The script reads the license files and list them to the license
module in the generated Android.bp files

Bug: 205641081
Test: run gen_buildfiles.py
Change-Id: I93deb04a5e7da25a2e9476b8fdd6079fc5470211
2021-11-22 16:34:16 +09:00
Justin Yun
f073b74670 Add 'license' module to the generated Android.bp of VNDK snapshots
VNDK snapshot update must include 'license' module in Android.bp
files. Use the license text files in common/NOTICE_FILES directory.

Bug: 205641081
Test: python3 gen_buildfiles.py 30
Change-Id: Ia0d667664693a00aa29164e94d2a820c6ed77e4e
2021-11-10 13:28:24 +09:00
Inseob Kim
deb5beb698 Rename soong outdir to generated-headers
vndk snapshot captures exported headers as-is, but soong intermediates
directory name is used as a result. It may confuse users, so this
changes the intermediates directory name to "generated-headers".

Bug: 200159267
Test: install snapshot and build
Change-Id: I3da7ee98f53e460c448c05ad3456022888099888
Merged-In: I3da7ee98f53e460c448c05ad3456022888099888
(cherry picked from commit 6547080f72)
2021-10-08 08:09:36 +00:00
Bill Peckham
dba5e0f214 Add support for vndk llndk libraries in Android.bp
Now that the vndk includes llndk libraries, we must also create the
modules for them in the generated Android.bp files.
llndk must not define `vndk.enabled: true` and will not be included
vndk apexes.
No changes on vndk v30 and earlier snapshot versions.

Bug: 187963715
Bug: 181815415
Test: python3 development/vndk/snapshot/update.py --use-current-branch --local <dir> <ver>
Change-Id: Ic33d169cc089199e5a742990f6ecfb08c1858288
2021-05-14 11:53:05 +09:00
Justin Yun
70e152e377 Use vndk.private: true for VNDK-private libs
Instead of using `vendor_available: false`, use `vndk.private: true`
for VNDK-private libraries.

Bug: 175768895
Test: build
Change-Id: I1ba8e25d232e839e1144bf0649981305e7f4f6ea
2021-01-05 17:10:37 +09:00
Justin Yun
1aad56ceac Auto generate prebuilt libs for vndk snapshot v28
For VNDK v28, auto generate the prebuilt_library modules of
libprotobuf-cpp-* that are required for the vendor compatibility to
build the vendor modules that are still using the old version of
libprotobuf-cpp libraries.

Bug: 142220143
Test: python3 development/vndk/snapshot/update.py \
      --local {snapshot_dir} --use-current-branch -vv 28
Change-Id: I28be3bcca31ebd078b59684eeb762809c15a7f99
2020-11-30 08:58:06 +00:00
Justin Yun
ba2a7e18f8 Add product_available to VNDK snapshots
Using vndkproduct.libraries.txt, add 'product_available' property to
the selected VNDK libraries. If the snapshot does not have
vndkproduct.libraries.txt, create an empty list file and make all
snapshot libraries available to product.

Bug: 174323911
Bug: 150902910
Test: run update.py for various snapshot versions
Change-Id: I3f680abcbf73e3f74c5dad49f57e02de4d87a148
2020-11-30 07:33:30 +00:00
Justin Yun
ef95d09076 Deprecate VNDK v27
Remove the code for old VNDK snapshot v27. The script also checks the
minimum VNDK version it supports.

Bug: 159433338
Test: python3 development/vndk/snapshot/update.py \
      --local {snapshot_dir} --use-current-branch -vv 27
Change-Id: I00587ab3e6c97df7d43e81aaa8795042f89aaf3e
2020-11-30 10:19:43 +09:00
Inseob Kim
b462b9c30d Convert vndk scripts to python3
python2 is obsolete now. Fortunately most of the codes are compatible
for python3, except for the check_output function.

Bug: 163435508
Test: run vndk/snapshot/update.py with build number
Change-Id: I0d3b463bffc97e35a21a40fdf57d5652a7bb6763
2020-08-13 09:23:01 +09:00
Inseob Kim
8f99d6ffd2 Skip not existing VNDK prebuilts
Due to a bug of some past versions of VNDK, invalid VNDK modules without
any prebuilt sources may exist. Skipping them instead of creating
useless modules.

Bug: 154777533
Test: capture snapshot, delete some .so files, and then install Android.bp
Change-Id: I5579c1ae86453d1b6c8738455ff71bf106afbda4
2020-06-15 22:35:44 +09:00
Yo Chiang
f2480f8aa5 Don't generate VNDK phony package
Clean up stale `phony { name: "vndk_v..."}` rules.
VNDK snapshots are now generated by soong as VNDK APEXes.

Clean up stale ld.config.txt rules.
ls.config.txt are now generated by linkerconfig.

Sort output of glob.glob() so that update.py outputs deterministically.

Bug: 158548427
Test: Update prebuilts/vndk
Change-Id: I4e1e32d1b20dea64c5b6502196892b293eddac2a
2020-06-10 17:26:11 +08:00
Inseob Kim
04c21ae7d8 Fix and generate vndk snapshot entirely in Soong
- VNDK snapshot now respects stem and suffix.
- ld.config.txt is removed from snapshot as linkerconfig has become default.
- Soong builds entire snapshot, and make just calls dist-for-goals.

Bug: 142589718
Test: build and install snapshot
Test: development/vndk/snapshot/update.py with past version of snapshot
Change-Id: I7185e381e0f3aad73a106b407814285d8b217173
2019-11-01 09:39:15 +09:00
Kiyoung Kim
b04fe60b64 Install vndkcore and vndkprivate library list
New linkerconfig generator requires vndkcore and vndkprivate library
list file to create ld.config.txt dynamically. However, existing vndk
snapshot does not install those two files, thus fail to be executed.
This change adds two files to system image.

Bug: 142072719
Test: VNDK snapshot generated with updated file
Change-Id: Id42e6a9acf40d8e16a3e76fd76ad84422d35d519
2019-10-07 13:46:21 +09:00
Inseob Kim
748307e2c8 Include headers and props to VNDK snapshot
For all vndk snapshot libraries, header files exported by the libraries
will be included to the snapshot. Android.bp will contain necessary
information to link against/install vndk snapshot libraires:
export_include_dirs, export_system_include_dirs, export_flags, and
relative_install_path.

Bug: 132818174
Test: 1) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true \
           development/vndk/snapshot/build.sh
Test: 2) development/vndk/snasphot/update.py
Test: 3) see contents of Android.bp and include directories
Change-Id: I884ffe8c569c1bd3b1407ff707e0f7aa061e1b01
2019-08-08 18:44:21 +09:00
Justin Yun
b59da8f618 vndk-snapshot: add version suffix for v27 files
To use ld.config.txt template, change the file names of v27 config
files to include version suffix.

Bug: 74658756
Bug: 123209911
Test: PRODUCT_EXTRA_VNDK_VERSIONS=27 m -j vndk_snapshot_package
Change-Id: Icc9f9970cf95fb4e888555ec0b080c44c81a0622
2019-01-23 19:25:05 +09:00
Jaewoong Jung
6a5aaca7bf Use Soong to build to etc modules.
This is the final piece of mk to bp conversion effort for vndk.

Bug: 122332178
Test: Locally ran the test script and built the phony targets.
Change-Id: I9988cc840c0660cc4fb47129ea16cfacb4c0a7ba
2019-01-17 15:46:50 -08:00
Jaewoong Jung
6fbb9d2a24 Use filegroup for notice files.
Update gen_buildfiles.py so that it generates filegroup-based notice
references. The previous usage that relied on the parent directory
pattern, '../', is no longer supported.

Test: Built successfully
Change-Id: Iddf334ed9c4e6139cc896a77e07b9eeb596c257e
2018-11-29 22:18:06 -08:00
Jae Shin
124ef784fa Remove ld.config.txt from prebuilts build rule
Starting from the P VNDK snapshot, the linker config file will be
built and installed from the source tree at the time the VNDK
snapshot is installed to the system.img (of Q+), rather than
installing the prebuilt from /prebuilts/vndk/v{VER}. The installed
linker config file is used for both system and vendor processes,
thus should be built from the most up-to-date ld.config.txt
template in the source tree of the system partition.

Test: python gen_buildfiles.py 28 -vv
Test: m -j vndk_v28_arm64; check /system/etc/ld.config.28.txt
Bug: 74658756
Merged-In: I86034e6bbbab6a096814389332c26920ef7d40fc
Change-Id: I86034e6bbbab6a096814389332c26920ef7d40fc
(cherry picked from commit e020f7131e)
2018-08-10 12:04:22 +09:00
Jae Shin
af0c00328a Support new binder32bit property
Starting in VNDK snapshot v28 (P), prebuilts built for 32-bit
binder interface are isolated in separate 'binder32' subdirectory
under prebuilts/vndk/v{VER}/{ARCH}/. All other prebuilts are
assumed to use 64-bit binder interface.

To differentiate prebuilts per binder bitness, the following
changes are made:
1) a new 'binder32bit' property added to the Android.bp files
autogenerated for the vndk_prebuilt_shared soong module
2) new phony modules, vndk_v{ver}_{arch}_binder32, defined for
32-bit binder prebuilts,
3) 'binder32' suffix added to the prebuilt versioned name,
e.g. libfoo.vndk.{ver}.{arch}.binder32.vendor

Test: python gen_buildfiles.py 28 -vv
Test: python gen_buildfiles.py 27 -vv
Bug: 78279738
Change-Id: I283fe25a34d3381d13097ede34c428c83dffe11e
2018-06-25 17:58:35 +09:00
Jae Shin
bd82ebbe49 Expand a leading '~' to $HOME in arg for --local
Test: python update.py --local=~/some/local/path
Bug: 78279738
Change-Id: Iabef0b10ff9ad7a5008f63a1b558351a240b4227
2018-06-25 17:45:34 +09:00
Jae Shin
940752124d Allow logging across modules
Test: confirm logging from different modules
Bug: 78279738
Change-Id: If51918fd7a4ad3ea3408109a39a293bcd56f71db
2018-06-18 14:45:54 +09:00
Jae Shin
25d3abf478 Prevent manifest file from being added to prebuilts
Change logic that handles the manifest file so that the manifest
is not added to the prebuilts/ directory but remains in a
temporary dir for GPL checking. At the end of the update.py script,
the manifest file is deleted when the temporary dir is deleted.

Also modify how check_gpl_license.py is run independently since
the manifest file has to be fetched first.

Test: python update.py -b oc-mr1-treble-dev --build 4728343 -vv 27
Bug: 77546642
Change-Id: I7749e2998cd12325b9c6275da5e697e328137b73
(cherry picked from commit a2504712de)
2018-04-24 09:50:30 +09:00
Jae Shin
2de352e93a Add newline in generated Android.bp files
Test: python update.py [options]
Change-Id: Ibfe97f4854c73c4a832cc4648a62f9e068092311
2018-01-18 02:42:20 +00:00
Jae Shin
4db81a5f93 Generate separate Android.bp per snapshot variant
VNDK snapshot now packages not only the primary abi but also the
secondary abi for each build target. To distinguish 32bit srcs
built from 64bit vs 32bit TARGET_ARCHs, each prebuilt is defined
per TARGET_ARCH and included in corresponding phony package,
vndk_v$VER_$ARCH.

Test: python update.py [options]
Bug: 71370248
Change-Id: I1be1d4421b97855a95be6ca0b8efb62e50205a7d
2018-01-09 04:37:56 +00:00
Jae Shin
9bc4fd058b Apply change in ETC file names to versioned names
ETC modules ld.config.txt, llndk.libraries.txt, and
vndksp.libraries.txt are now versioned as such:
*.$PLATFORM_VNDK_VERSION.txt

Change the logic for autogenerating Android.mk build rules
for ETC files to reflect this change in file names.

Bug: 70918357
Test: python gen_buildfiles.py
Change-Id: Ia1d062a1be7fd47a78ad338c252e556d27f308b3
2017-12-26 13:07:18 +09:00
Jae Shin
5233fe115b Add script to check GPL projects have released SHA
Checks that the source tree to which the VNDK snapshot is being
installed has the sources for all GPL prebuilts by confirming
the git projects have the SHA values recorded in manifest.xml.

Bug: 70603439
Test: python update.py [options]
Test: python check_gpl_license.py [options]
Change-Id: I5b34271cd0dab737187211f52b2fdce6dbd94e2e
2017-12-21 05:10:27 +00:00
Jae Shin
ba7456d513 Add 'notice' attribute to prebuilts in Android.bp
Test: development/vndk/snapshot/build.sh && python update.py 27
--local -vv && m -j PRODUCT_EXTRA_VNDK_VERSIONS=27, then make sure
NOTICE files for /system/lib[64]/vndk[-sp]-27 are included in
/system/etc/NOTICE.xml.gz
Bug: 70603439

Change-Id: I54dd13e1c3c46c4f690d62604544c61585807160
2017-12-18 22:52:10 +09:00
Jae Shin
ca625dd05a Add scripts to install VNDK snapshot to prebuilts/vndk
update.py does the following:
1) fetches VNDK snapshot build artifact from Android
Build server,
2) installs snapshot under prebuilts/vndk/v{VNDK_VERSION},
3) autogenerates build files Android.mk and Android.bp
(using gen_buildfiles.py)

Test: python development/vndk/snapshot/update.py [options] &&
m -j vndk_v27
Bug: 69950927
Bug: 70125075
Change-Id: I81c8bd5060601a983da0c05bd63232b5631185b6
2017-12-12 01:33:51 +00:00