bootstrap bionic are moved to ./bootstrap subdir

Bootstrap bionic (the bionic in the system partition that is for the
early processes before the runtime APEX is ready) is now located under
./bootstrap subdirectory. i.e.,
* /system/lib[64]/bootstrap/lib{c|dl|m}.so

Before this change, the bootstrap bionic were self bind-mounted. This is
causing problem with `adb sync` because the path which is a mount point
couldn't be unlinked and thus rewriting is not done.

Now, the mount points and mount sources are clearly separated.

Bug: 120266448
Test: m libc.bootstrap libm.bootstrap libdl.bootstrap
Following files are found under system and recovery/root/system
./lib[64]/bootstrap/libc.so, libdl.so, libm.so

Change-Id: I90399b3181988814ce07875df8c1a36599f3337f
This commit is contained in:
Jiyong Park
2019-01-16 22:31:11 +09:00
parent 4c20135b19
commit 429660f3c8

View File

@@ -883,6 +883,18 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
library.baseInstaller.subDir += "-" + vndkVersion library.baseInstaller.subDir += "-" + vndkVersion
} }
} }
} else if len(library.Properties.Stubs.Versions) > 0 && android.DirectlyInAnyApex(ctx, ctx.ModuleName()) {
// If a library in an APEX has stable versioned APIs, we basically don't need
// to have the platform variant of the library in /system partition because
// platform components can just use the lib from the APEX without fearing about
// compatibility. However, if the library is required for some early processes
// before the APEX is activated, the platform variant may also be required.
// In that case, it is installed to the subdirectory 'bootstrap' in order to
// be distinguished/isolated from other non-bootstrap libraries in /system/lib
// so that the bootstrap libraries are used only when the APEX isn't ready.
if !library.buildStubs() && ctx.Arch().Native {
library.baseInstaller.subDir = "bootstrap"
}
} }
library.baseInstaller.install(ctx, file) library.baseInstaller.install(ctx, file)
} }