diff options
author | Shikha Panwar <shikhapanwar@google.com> | 2022-12-09 20:01:01 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-01-31 23:43:04 -0500 |
commit | 810f73f2e58d36f60f11bcb80f03d94efa752a31 (patch) | |
tree | fdf5902e24743a1493ad5545120b7114e96062e3 | |
parent | 1f8c70161734a245dc151e2e8c45d2378d6f8a70 (diff) | |
download | e2fsprogs-810f73f2e58d36f60f11bcb80f03d94efa752a31.tar.gz |
AOSP: mke2fs.microdroid: Allow non-APEX version of libs
Microdroid uses mke2fs to format encryptedstore partition. This happens
in parallel to apex activation by apexd. Hence, sometime, mke2fs would
fail if some linker libraries are not available.
Create a target (mke2fs.microdroid) with bootstrap: true
Bug: 238179332
Test: Build succeeds & atest MicrodroidTests#encryptedStorageAvailable
Change-Id: I1aa493bfc188bb78e21efe98423f4a79215f7d95
From AOSP commit: 54818f635e4249db903dd17fca22ae11b3c0f3a0
-rw-r--r-- | misc/Android.bp | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/misc/Android.bp b/misc/Android.bp index 97f04d37..3e761ad8 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -43,9 +43,8 @@ cc_library { //######################################################################## // Build mke2fs -cc_binary { - name: "mke2fs", - host_supported: true, +cc_defaults { + name: "mke2fs_defaults", recovery_available: true, defaults: ["e2fsprogs-defaults"], @@ -60,6 +59,15 @@ cc_binary { "-Wno-error=type-limits", "-Wno-format-extra-args", ], + + stl: "libc++_static", + include_dirs: ["external/e2fsprogs/e2fsck"], +} + +cc_binary { + name: "mke2fs", + host_supported: true, + defaults: ["mke2fs_defaults"], target: { host: { static_libs: [ @@ -107,8 +115,32 @@ cc_binary { symlinks: ["mkfs.ext2", "mkfs.ext3", "mkfs.ext4"], }, }, - stl: "libc++_static", - include_dirs: ["external/e2fsprogs/e2fsck"], +} + +cc_binary { + name: "mke2fs.microdroid", + defaults: ["mke2fs_defaults"], + bootstrap: true, + target: { + android: { + required: [ + "mke2fs.conf", + ], + shared_libs: [ + "libext2fs", + "libext2_blkid", + "libext2_misc", + "libext2_uuid", + "libext2_quota", + "libext2_com_err", + "libext2_e2p", + ], + symlinks: ["mkfs.ext4.microdroid"], + }, + }, + installable: false, + stem: "mke2fs", + visibility: ["//packages/modules/Virtualization/microdroid"], } //########################################################################## |