Lines Matching refs:f
109 func (f *filesystem) DepsMutator(ctx android.BottomUpMutatorContext) {
110 f.AddDeps(ctx, dependencyTag)
122 func (f *filesystem) fsType(ctx android.ModuleContext) fsType {
123 typeStr := proptools.StringDefault(f.properties.Type, "ext4")
137 func (f *filesystem) installFileName() string {
138 return f.BaseModuleName() + ".img"
143 func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) {
144 switch f.fsType(ctx) {
146 f.output = f.buildImageUsingBuildImage(ctx)
148 f.output = f.buildCpioImage(ctx, true)
150 f.output = f.buildCpioImage(ctx, false)
155 f.installDir = android.PathForModuleInstall(ctx, "etc")
156 ctx.InstallFile(f.installDir, f.installFileName(), f.output)
160 func (f *filesystem) buildRootZip(ctx android.ModuleContext) android.OutputPath {
167 for _, dir := range f.properties.Dirs {
172 for _, symlink := range f.properties.Symlinks {
196 if f.buildExtraFiles != nil {
197 extraFiles = f.buildExtraFiles(ctx, rootForExtraFiles)
198 for _, f := range extraFiles {
199 rel, _ := filepath.Rel(rootForExtraFiles.String(), f.String())
201 panic(fmt.Errorf("%q is not under %q\n", f, rootForExtraFiles))
216 for _, f := range extraFiles {
217 zipCommand.FlagWithInput("-f ", f)
227 func (f *filesystem) buildImageUsingBuildImage(ctx android.ModuleContext) android.OutputPath {
229 f.CopyDepsToZip(ctx, depsZipFile)
232 depsBase := proptools.StringDefault(f.properties.Base_dir, ".")
241 rootZip := f.buildRootZip(ctx)
248 propFile, toolDeps := f.buildPropFile(ctx)
249 output := android.PathForModuleOut(ctx, f.installFileName()).OutputPath
258 builder.Build("build_filesystem_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
263 func (f *filesystem) buildFileContexts(ctx android.ModuleContext) android.OutputPath {
268 Input(android.PathForModuleSrc(ctx, proptools.String(f.properties.File_contexts)))
269 …system_file_contexts", fmt.Sprintf("Creating filesystem file contexts for %s", f.BaseModuleName()))
273 func (f *filesystem) buildPropFile(ctx android.ModuleContext) (propFile android.OutputPath, toolDep…
299 addStr("fs_type", fsTypeStr(f.fsType(ctx)))
308 if proptools.Bool(f.properties.Use_avb) {
311 algorithm := proptools.StringDefault(f.properties.Avb_algorithm, "SHA256_RSA4096")
313 key := android.PathForModuleSrc(ctx, proptools.String(f.properties.Avb_private_key))
316 partitionName := proptools.StringDefault(f.properties.Partition_name, f.Name())
320 if proptools.String(f.properties.File_contexts) != "" {
321 addPath("selinux_fc", f.buildFileContexts(ctx))
333 …builder.Build("build_filesystem_prop", fmt.Sprintf("Creating filesystem props for %s", f.BaseModul…
337 func (f *filesystem) buildCpioImage(ctx android.ModuleContext, compressed bool) android.OutputPath {
338 if proptools.Bool(f.properties.Use_avb) {
343 if proptools.String(f.properties.File_contexts) != "" {
348 f.CopyDepsToZip(ctx, depsZipFile)
351 depsBase := proptools.StringDefault(f.properties.Base_dir, ".")
360 rootZip := f.buildRootZip(ctx)
367 output := android.PathForModuleOut(ctx, f.installFileName()).OutputPath
383 builder.Build("build_cpio_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
391 func (f *filesystem) AndroidMkEntries() []android.AndroidMkEntries {
394 OutputFile: android.OptionalPathForPath(f.output),
397 entries.SetString("LOCAL_MODULE_PATH", f.installDir.ToMakePath().String())
398 entries.SetString("LOCAL_INSTALLED_MODULE_STEM", f.installFileName())
407 func (f *filesystem) OutputFiles(tag string) (android.Paths, error) {
409 return []android.Path{f.output}, nil
427 func (f *filesystem) OutputPath() android.Path {
428 return f.output
431 func (f *filesystem) SignedOutputPath() android.Path {
432 if proptools.Bool(f.properties.Use_avb) {
433 return f.OutputPath()