Add ramdisk image.

It is similar to recovery image.
Test: m nothing -j

Change-Id: I11389777c6bfb0c0d73bbb4c70091c1e70f44077
This commit is contained in:
Yifan Hong
2020-01-21 15:53:22 -08:00
parent 0c9c0f045f
commit 1b3348d50a
16 changed files with 145 additions and 20 deletions

View File

@@ -264,7 +264,7 @@ func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags
} else {
switch ctx.Os() {
case android.Android:
if ctx.bootstrap() && !ctx.inRecovery() {
if ctx.bootstrap() && !ctx.inRecovery() && !ctx.inRamdisk() {
flags.DynamicLinker = "/system/bin/bootstrap/linker"
} else {
flags.DynamicLinker = "/system/bin/linker"
@@ -458,7 +458,7 @@ func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
// The original path becomes a symlink to the corresponding file in the
// runtime APEX.
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !translatedArch && ctx.apexName() == "" && !ctx.inRecovery() {
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !translatedArch && ctx.apexName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() {
if ctx.Device() && isBionic(ctx.baseModuleName()) {
binary.installSymlinkToRuntimeApex(ctx, file)
}