diff options
Diffstat (limited to 'filesystem')
-rw-r--r-- | filesystem/android_device.go | 3 | ||||
-rw-r--r-- | filesystem/filesystem.go | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go index c2a571ca1..7e4beeaf8 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -442,6 +442,9 @@ func (a *androidDevice) copyMetadataToTargetZip(ctx android.ModuleContext, build } builder.Command().Textf("cp").Input(android.PathForSource(ctx, "external/zucchini/version_info.h")).Textf(" %s/META/zucchini_config.txt", targetFilesDir.String()) builder.Command().Textf("cp").Input(android.PathForSource(ctx, "system/update_engine/update_engine.conf")).Textf(" %s/META/update_engine_config.txt", targetFilesDir.String()) + if a.getFsInfos(ctx)["system"].ErofsCompressHints != nil { + builder.Command().Textf("cp").Input(a.getFsInfos(ctx)["system"].ErofsCompressHints).Textf(" %s/META/erofs_default_compress_hints.txt", targetFilesDir.String()) + } } func (a *androidDevice) getFilesystemInfo(ctx android.ModuleContext, depName string) FilesystemInfo { diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 84daab037..c3c06bd58 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -413,6 +413,10 @@ type FilesystemInfo struct { // Installed files list InstalledFiles InstalledFilesStruct + + // Path to compress hints file for erofs filesystems + // This will be nil for other fileystems like ext4 + ErofsCompressHints android.Path } // FullInstallPathInfo contains information about the "full install" paths of all the files @@ -634,6 +638,11 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { } installedFileTxt, installedFileJson := buildInstalledFiles(ctx, partitionName, rootDir, f.output) + var erofsCompressHints android.Path + if f.properties.Erofs.Compress_hints != nil { + erofsCompressHints = android.PathForModuleSrc(ctx, *f.properties.Erofs.Compress_hints) + } + fsInfo := FilesystemInfo{ Output: f.output, OutputHermetic: outputHermetic, @@ -650,6 +659,7 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { Txt: installedFileTxt, Json: installedFileJson, }, + ErofsCompressHints: erofsCompressHints, } android.SetProvider(ctx, FilesystemProvider, fsInfo) |