This variable was accidentally changed to refer to the
shorthand PRODUCT_XYZ instead of PRODUCTS.<mk>.PRODUCT_XYZ
in a previous mass-migration, but that shorthand didn't
exist for these variables. Add it in.
Also whitelist the offender introduced since it was broken.
Test: lunch generic; m nothing
Change-Id: I29dd73c29796743e770afa0c2ceb4f8583dc6e1e
- `--block` has been a no-op since Oreo [1] -- ota_from_target_files
will always build block-based OTAs or A/B OTAs.
- MKBOOTIMG is no longer needed when calling ota_from_target_files, at
least for the callsite in Makefile. Because target_files.zip has been
including boot/recovery images since Lollipop [2].
This CL also switches to long options to improve readability.
[1] commit 457cbf6a8a
[2] commit 3c84f56948
Test: TreeHugger
Change-Id: I801bd0525d2529156bbf783698661d90ba24017a
In order to get a Python 2 and 3 compatible re-raise behavior, this CL
removes the stack traceback for the lines within apex_util module (i.e.
sys.exc_info()[2]). It's not a big loss in practice, since we only have
one line within the try-except block (`common.RunAndCheckOutput()`)
that's no longer reported in the traceback.
Using `six` module could better solve this, but only after building
releasetools as python_binary_host modules where we can properly handle
the module dependency.
Bug: 131631303
Test: TreeHugger
Test: `python -m unittest test_apex_utils`
Test: `python3 -m unittest test_apex_utils`
Change-Id: I0c5a72ec9fad5ff9d8c9c94d29e813e433ec2921
-p only applies to tar invocations that cause extraction, but -rf is
just appending to a tar file.
toybox tar doesn't have -p, and it doesn't seem worth implementing if
this is our only "user".
Test: treehugger
Change-Id: I025c496b04cb57cb31ba81fd516fd40b158bc06b
lpunpack is needed to repackage super.img for mixed-image virtual devices.
For Cuttlefish, it's included in host package. We need to include it in
otatools.zip so Goldfish or other devices can use it to mix their super images.
Necessary SOs are the same as lpmake and have been included in otatools.zip.
Bug: 134461288
Test: $ lunch aosp_x86-userdebug
$ m otatools-package
$ unzip -l $OUT/ota* | grep lpunpack
467824 2008-01-01 00:00 bin/lpunpack
Change-Id: Ie2092f18afb88721b29b1738847a0b781dbcd431
The dependency on MAKE_EXT4FS (mke2fs) has been covered by the rule for
MKEXTUSERIMG (mkuserimg_mke2fs):
https://android.googlesource.com/platform/system/extras/+/refs/heads/master/ext4_utils/Android.bp
The dependency on mksquashfs and img2simg comes from mksquashfsimage.sh,
which has been moved into mksquashfsimage's building rule.
This CL also fixes the ordering of INTERNAL_USERIMAGES_BINARY_PATHS,
which should come after adding all the binaries to
INTERNAL_USERIMAGES_DEPS.
Test: TreeHugger
Change-Id: I8b30bf87860d9711e88eecca4b76db72f5cd8241
* Read/write warning messages as utf-8 strings.
* No more embedded raw utf-8 code in file.
Test: ./warn.py --csvpath warnings.csv build.log > warnings.html
Change-Id: Ie51700721a32bede1d3b250f4a42fd8facd6af75
`PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH` will
produce a space separated string due to `foreach`, if
$(INTERNAL_USERIMAGES_BINARY_PATHS) has more than one string. We didn't
hit the issue in the past because $(INTERNAL_USERIMAGES_BINARY_PATHS)
had contained only one path in practice.
Test: TreeHugger
Change-Id: I74ef4356668af63d871a81f6bfd4c9324aa1d956
BOARD_PREBUILT_BOOTIMAGE is set.
Based on current Makefile INSTALLED_BOOTIMAGE_TARGET always kept as
empty if TARGET_NO_KERNEL is true, so build fails with empty out path.
This change is to set up INSTALLED_BOOTIMAGE_TARGET with
$(PRODUCT_OUT)/boot.img in case of TARGET_NO_KERNEL is true and
BOARD_PREBUILT_BOOTIMAGE is defined.
Bug: 135648566
Test: m -j passed
Change-Id: I9658f215c2e2cc5d87040d5085521ef44722c4ef
Don't pass --legacy by default, it is rarely necessary and converts
some errors into warnings that crash at runtime. The modules that
need it have had --legacy added to LOCAL_AAPT_FLAGS.
Bug: 135597368
Test: m java
Change-Id: I0cb213599d6612746d988b8966cbd529b5328db0
--legacy will soon no longer be passed by default to all aapt2
compiles. Allow it to be specified in LOCAL_AAPT_FLAGS by passing
it to aapt2 compile when it is present and filtering it out from
the flags passed to aapt2 link.
Bug: 135597368
Test: m java
Change-Id: I92792cf6a0d4c6ecf5e0971523bd0ab76c81345f
sign_target_files_apks.py only needs to take care of the current
release. The legacy paths of ODM/build.prop, VENDOR/odm/build.prop, and
BOOT/RAMDISK/default.prop no longer exist in the target_files.zip from
master.
The other two cases of ROOT/default.prop and
RECOVERY/RAMDISK/default.prop are still kept in the code, as they will
still exist (as symlink or conditionally).
Test: Run sign_target_files_apks.py against
aosp_taimen-target_files.zip. Check the rewritten prop files.
Test: `python -m unittest test_sign_target_files_apks`
Change-Id: I5e70bc2ccc0f3dcf0eace0718c59a3b0f89a9ff4
This reverts commit 610b6302cf.
Reason for revert: m mlibc from root dir works. Create a tmp dir and then cd in to tmp. Run the same command and it fails.
Change-Id: I0f0c056d7e668da621ae99d347a055ecdf2dec07
This change creates following build artifacts that are currently part of
device-tests.zip and general-tests.zip. The smaller build artifacts are
used to reduce the download size required to run TradeFed suite.
Detailed design can be found in the bug.
From device-tests
device-tests_configs: include all test config files in device-tests, zip
file is less than 1MB.
From general-tests
general-tests_configs: include all test config files in general-tests,
zip file is less than 1MB.
general-tests_host-shared-libs: include tools and shared libraries
required to run host side test, zip file is about 60MB
Bug: 73786521
Test: make device-tests and general-tests, verify output.
Change-Id: I34c9aa3c1c672d5d58eab6de92198a7b8e4a681c
The functionality of m* envsetup.sh commands has been implemented in
soong_ui. The bash functionality of m* commands can be replaced by
soong's modules-in* build commands.
Fixes: b/130049705
Test: * Loaded the envsetup.sh on a new environment
* Executed each m* command.
* Verified with "type <build command>" to make sure
the function generation is correct.
* Ran on Darwin environment.
Change-Id: I8792e4f1f1727aba2ca6ee4bdfe657f6ac42302a
Python 2 and 3 behave differently when calling ZipFile.writestr() with
zinfo.external_attr being 0. Python 3 uses `0o600 << 16` as the value
for such a case (since
18ee29d0b8),
which seems to make more sense. Otherwise the entry will end up with
0o000 as the permission bits. This CL updates common.ZipWriteStr to
follow the logic in Python 3, in order to get consistent behavior
between using the two versions.
Bug: 131631303
Test: `python -m unittest test_common.CommonZipTest`
Test: `python3 -m unittest test_common.CommonZipTest`
Change-Id: If8429855d922ef1ad76591f703215a0ce5089f0f
Previously it was using regular dict.
Test: python -m unittest test_common.DynamicPartitionsDifferenceTest
Change-Id: If108a4512aeaf9d3c8775c030cad6e44342b9d3d
Pure GSI build targets has no vendor partition, such as
aosp_$arch_ab and gsi_$arch. The system properties defined by
PRODUCT_PROPERTY_OVERRIDES will be in /system/build.prop.
The patch defined a fake BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE to
let these system properties flow to vendor and won't pollute the
system.img.
The bug also move some properties to /product/build.prop.
Bug: 135508595
Bug: 131162245
Bug: 134781120
Test: check the /system/build.prop do not have "ro.carrier=unknown"
Test: adb remount on GSI Q on P
Change-Id: Ib200d66cf98fea572c26338e058bce29eb5e0cd7
Currently, GSI does not include apex support and TARGET_FLATTEN_APEX is true.
This will cause issues for vendors with apex support (e.g. Cuttlefish).
This change set ro.apex.updatable to false in product to override that sets
in vendor.
Bug: 135411972
Bug: 134673003
Test: $ lunch aosp_x86-userdebug; m -j; emulator
$ lunch aosp_cf_x86_phone-userdebug
# Replace system.img in super.img with GSI
# The resulted CF could boot and browse the web successfully.
Change-Id: I08fd7a1b254aac276926329e064c35b714764936
Instead of just depending on the single image file, depend on the entire
image that gets loaded -- the .oat / .vdex files, and the modules that
are part of the image that have their own files.
This is necessary for RBE, where the rule only gets the files that it
depends upon.
Test: treehugger
Test: build a system image with RBE
Change-Id: I93a580b42cf4ef1824ee1397e551c065f083348a