android_build/target/product/gsi/Android.bp
Inseob Kim 6a04b1f9a2 Add fsverity/compos only for 64-bit images
Because AVF is shipped only on 64-bit devices.

Bug: 381019944
Test: TH
Change-Id: Icbf4656f9b830e6254024558e96fc3c5dae6113c
2025-03-30 15:46:39 +02:00

161 lines
4.5 KiB
Text

// Copyright 2020 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
// See: http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
filegroup {
name: "vndk_lib_lists",
srcs: [
"*.txt",
],
}
prebuilt_etc {
name: "gsi_skip_mount.cfg",
filename: "skip_mount.cfg",
src: "gsi_skip_mount.cfg",
system_ext_specific: true,
relative_install_path: "init/config",
required: ["gsi_skip_mount_compat_symlink"],
}
// Adds a symlink under /system/etc/init/config pointing to /system/system_ext/etc/init/config
// because first-stage init in Android 10.0 will read the skip_mount.cfg from /system/etc/* after
// chroot /system.
// TODO: remove this symlink when no need to support new GSI on Android 10.
// The actual file needs to be under /system/system_ext because it's GSI-specific and does not
// belong to core CSI.
install_symlink {
name: "gsi_skip_mount_compat_symlink",
installed_location: "etc/init/config",
symlink_target: "/system/system_ext/etc/init/config",
}
// init.gsi.rc, GSI-specific init script.
prebuilt_etc {
name: "init.gsi.rc",
src: "init.gsi.rc",
system_ext_specific: true,
relative_install_path: "init",
}
prebuilt_etc {
name: "init.vndk-nodef.rc",
src: "init.vndk-nodef.rc",
system_ext_specific: true,
relative_install_path: "gsi",
}
gsi_symlinks = [
{
target: "/system/system_ext",
name: "system_ext",
},
{
target: "/system/product",
name: "product",
},
{
target: "/odm/odm_dlkm/etc",
name: "odm_dlkm/etc",
},
{
target: "/vendor/vendor_dlkm/etc",
name: "vendor_dlkm/etc",
},
]
android_system_image {
name: "android_gsi",
defaults: [
"system_image_defaults",
"system_ext_image_defaults",
"product_image_defaults",
],
symlinks: gsi_symlinks,
dirs: ["cache"],
deps: [
///////////////////////////////////////////
// gsi_system_ext
///////////////////////////////////////////
// handheld packages
"Launcher3QuickStep",
"Provision",
"Settings",
"StorageManager",
"SystemUI",
// telephony packages
"CarrierConfig",
// Install a copy of the debug policy to the system_ext partition, and allow
// init-second-stage to load debug policy from system_ext.
// This option is only meant to be set by compliance GSI targets.
"system_ext_userdebug_plat_sepolicy.cil",
///////////////////////////////////////////
// gsi_release
///////////////////////////////////////////
"gsi_skip_mount.cfg",
"init.gsi.rc",
"init.vndk-nodef.rc",
// Overlay the GSI specific setting for framework and SystemUI
"gsi_overlay_framework",
"gsi_overlay_systemui",
///////////////////////////////////////////
// VNDK
///////////////////////////////////////////
"com.android.vndk.v30",
"com.android.vndk.v31",
"com.android.vndk.v32",
"com.android.vndk.v33",
"com.android.vndk.v34",
///////////////////////////////////////////
// gsi_product
///////////////////////////////////////////
"Browser2",
"Camera2",
"Dialer",
"LatinIME",
"apns-full-conf.xml",
],
multilib: {
lib64: {
deps: [
///////////////////////////////////////////
// AVF
///////////////////////////////////////////
"com.android.compos",
"features_com.android.virt.xml",
],
},
both: {
// PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34
deps: ["android.hidl.memory@1.0-impl"],
},
},
enabled: select(soong_config_variable("ANDROID", "PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT"), {
"true": true,
default: false,
}),
type: "ext4",
}