From d61103fc7c348a4ab85310b9a08c1f05f47a8655 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Tue, 21 Nov 2023 15:18:50 +0100 Subject: pkg/mgrconfig, pkg/cover: introduce the android_split_build flag Source files for Pixel devices are split between the common AOSP kernel (path/to/kernel/aosp) and the device-specific drivers residing in a separate dir (path/to/kernel/private/google-modules for Android 14 and path/to/kernel/gs/google-modules for older Android versions). See https://source.android.com/docs/setup/build/building-pixel-kernels for details. Android build system may reference these dirs in various ways, for which syzkaller cannot always understand where it should look for the source. The newly introduced android_split_build flags handles the problem by adding a list of "delimiters" used when normalizing the kernel source paths. If the path contains any of such delimiters, then everything preceding the last delimiter in the path is replaced with the contents of "kernel_src" from the manager config. By default we only support "/aosp/" and "/private/" corresponding to modern Android systems as delimiters. --- pkg/mgrconfig/config.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/mgrconfig') diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go index e40643b0e..19ba352f7 100644 --- a/pkg/mgrconfig/config.go +++ b/pkg/mgrconfig/config.go @@ -49,6 +49,8 @@ type Config struct { KernelSrc string `json:"kernel_src,omitempty"` // Location of the driectory where the kernel was built (if not set defaults to KernelSrc) KernelBuildSrc string `json:"kernel_build_src,omitempty"` + // Is the kernel built separately from the modules? (Specific to Android builds) + AndroidSplitBuild bool `json:"android_split_build"` // Kernel subsystem with paths to each subsystem // "kernel_subsystem": [ // { "name": "sound", "path": ["sound", "techpack/audio"]}, -- cgit mrf-deployment