Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de93b44b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Generate product partition filesystem module in filesystem_creator" into main

parents 41259ba6 6dd13b60
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1558,6 +1558,10 @@ func (c *deviceConfig) ProductPath() string {
	return "product"
}

func (c *deviceConfig) BuildingProductImage() bool {
	return proptools.Bool(c.config.productVariables.BuildingProductImage)
}

func (c *deviceConfig) SystemExtPath() string {
	if c.config.productVariables.SystemExtPath != nil {
		return *c.config.productVariables.SystemExtPath
+6 −5
Original line number Diff line number Diff line
@@ -341,6 +341,7 @@ type ProductVariables struct {
	BuildingVendorImage  *bool   `json:",omitempty"`
	OdmPath              *string `json:",omitempty"`
	ProductPath          *string `json:",omitempty"`
	BuildingProductImage *bool   `json:",omitempty"`
	SystemExtPath        *string `json:",omitempty"`

	ClangTidy  *bool   `json:",omitempty"`
+6 −0
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ func createFsGenState(ctx android.LoadHookContext) *FsGenState {
		if ctx.DeviceConfig().BuildingVendorImage() && ctx.DeviceConfig().VendorPath() == "vendor" {
			generatedPartitions = append(generatedPartitions, "vendor")
		}
		if ctx.DeviceConfig().BuildingProductImage() && ctx.DeviceConfig().ProductPath() == "product" {
			generatedPartitions = append(generatedPartitions, "product")
		}

		return &FsGenState{
			depCandidates: candidates,
@@ -346,6 +349,9 @@ func (f *filesystemCreator) createDeviceModule(ctx android.LoadHookContext) {
	if android.InList("vendor", f.properties.Generated_partition_types) {
		partitionProps.Vendor_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "vendor"))
	}
	if android.InList("product", f.properties.Generated_partition_types) {
		partitionProps.Product_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "product"))
	}

	ctx.CreateModule(filesystem.AndroidDeviceFactory, baseProps, partitionProps)
}