Commit graph

5 commits

Author SHA1 Message Date
Dan Willemsen
9b7c1e4393 Fix pre-extracted PDKs
The PDK unzip logic does not place all the files in the same directory
it would place a zipfile, but instead inside a directory of the same
name:

  a/b/platform.zip!pdk.mk

turns into:

  a/b/platform/pdk.mk

So fix the PDK_FUISON_PLATFORM_DIR autodetection to take this into
account. Also don't create touch rules for the pre-extracted java files.

Bug: 118776469
Test: try building the PDK with PDK_FUSION_PLATFORM_ZIP set, and files extracted
Change-Id: Ib27d12aba773a5e6bd41fcbe8945a0bc31b8c281
2018-11-05 10:57:24 -08:00
Dan Willemsen
0663f685c2 Support a pre-extracted PDK zip
Pre-extracting the zip files are more sustainable for git, so that
objects can be shared if unchanged, rather than the 900MB zip file
changing on every build.

This also has the advantage that we could put an Android.bp file inside
the PDK, and Soong would just pick it up.

Bug: 68767391
Test: Build mini_arm64 PDK with platform.zip
Test: Build mini_arm64 PDK with extracted zip file
Change-Id: I16db030a731aea55b69c1d6e2260dbd70b167544
2018-03-08 13:50:21 -08:00
Dan Willemsen
05a2b931e9 Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE
The vendor image will have more than just proprietary modules in it
under Treble, so let's stop marking open source code as proprietary just
to move it to vendor.

Bug: 36452052
Test: compare build-aosp_arm.ninja before/after, no changes.
Test: Try defining LOCAL_VENDOR_MODULE / LOCAL_PROPRIETARY_MODULE in the
same and different ways, ensure it works.
Change-Id: I0ab046bcb7563a20d44ed00667e18497ef0873a8
2017-03-20 20:57:04 -07:00
Ying Wang
efaf5efd06 Use $(BUILD_SYSTEM) as the LOCAL_PATH of auto-generated modules.
So that we don't mess up with the vendor path check by accident.

Bug: 27543283
Change-Id: I6c34caefe3ff4abfdd8349a32c68fcca524cfd8e
2016-03-24 17:24:38 -07:00
Ying Wang
3a61eeb6cb Rebuild odex files in PDK fusion build.
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).

In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.

We generate prebuilt module only if it's not already defined in the
source tree.

Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
2016-03-14 21:01:46 -07:00