From: Shikha Panwar Date: Fri, 9 Dec 2022 20:01:01 +0000 (+0000) Subject: AOSP: mke2fs.microdroid: Allow non-APEX version of libs X-Git-Tag: v1.46.6~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=810f73f2e58d36f60f11bcb80f03d94efa752a31;p=thirdparty%2Fe2fsprogs.git 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 --- diff --git a/misc/Android.bp b/misc/Android.bp index 97f04d372..3e761ad8a 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"], } //##########################################################################