From d7594443cdb55efee7f0888cd2ddefc1bb608547 Mon Sep 17 00:00:00 2001 From: Dmitry Muhomor Date: Fri, 25 Aug 2023 18:44:22 +0300 Subject: [PATCH] make file system type of OS partitions part of device config --- config/device/common/pixel.yml | 2 ++ src/blobs/build.ts | 9 +++++++-- src/build/make.ts | 11 +++++++---- src/config/device.ts | 7 +++++++ src/frontend/generate.ts | 2 +- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/config/device/common/pixel.yml b/config/device/common/pixel.yml index 2894755..87f1318 100644 --- a/config/device/common/pixel.yml +++ b/config/device/common/pixel.yml @@ -5,6 +5,8 @@ includes: device: vendor: google_devices + system_fs_type: ext4 + build_id: TQ3A.230805.001 prev_build_id: TQ3A.230705.001 diff --git a/src/blobs/build.ts b/src/blobs/build.ts index c6eba37..420f086 100644 --- a/src/blobs/build.ts +++ b/src/blobs/build.ts @@ -25,6 +25,7 @@ import { SPECIAL_FILE_EXTENSIONS, TYPE_SHARED_LIBRARY, } from '../build/soong' +import { DeviceConfig } from '../config/device' import { BlobEntry, blobNeedsSoong } from './entry' export interface BuildFiles { @@ -206,7 +207,11 @@ export async function createVendorDirs(vendor: string, device: string) { } as VendorDirectories } -export async function writeBuildFiles(build: BuildFiles, dirs: VendorDirectories) { +export async function writeBuildFiles( + build: BuildFiles, + dirs: VendorDirectories, + config?: DeviceConfig +) { if (build.rootBlueprint != undefined) { let bp = serializeBlueprint(build.rootBlueprint) await fs.writeFile(`${dirs.out}/Android.bp`, bp) @@ -228,7 +233,7 @@ export async function writeBuildFiles(build: BuildFiles, dirs: VendorDirectories } if (build.boardMakefile != undefined) { - let mk = serializeBoardMakefile(build.boardMakefile) + let mk = serializeBoardMakefile(build.boardMakefile, config) await fs.writeFile(`${dirs.proprietary}/BoardConfigVendor.mk`, mk) } diff --git a/src/build/make.ts b/src/build/make.ts index 9d32fbf..f50ae1b 100644 --- a/src/build/make.ts +++ b/src/build/make.ts @@ -1,6 +1,7 @@ import { basename, dirname } from 'path' import { BlobEntry } from '../blobs/entry' import { PartitionProps } from '../blobs/props' +import { DeviceConfig } from '../config/device' import { SelinuxPartResolutions } from '../selinux/contexts' import { MAKEFILE_HEADER } from '../util/headers' @@ -137,26 +138,28 @@ function addContBlock(blocks: Array, variable: string, items: Array