| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/icu/config.gni") # icu_git_info |
| |
| platform_aibs_dir = get_label_info("//bundles/assembly", "target_out_dir") |
| |
| # LINT.IfChange |
| |
| # These are the user-buildtype-safe platform AIBs that are used by bootstrap |
| # feature-set-level assemblies. This is a subset of the overall platform AIBs |
| # so that these systems (e.g. bringup) don't need to build the entire platform. |
| bootstrap_user_platform_aib_names = [ |
| # The kernel itself |
| "zircon", |
| |
| # The embeddable feature-set-level |
| "embeddable", |
| |
| # The bootstrap feature-set-level |
| "bootstrap", |
| |
| # Developer |
| "kernel_debug_broker_user", |
| |
| # Diagnostics |
| "console_user", |
| |
| # Driver Framework |
| "driver_framework", |
| |
| # Power |
| "legacy_power_framework", |
| |
| # Graphics |
| "virtcon", |
| "virtcon_disable", |
| "sysmem_no_allocate", |
| |
| # Kernel args |
| "kernel_args_user", |
| "kernel_contiguous_physical_pages", |
| |
| # RCS live usb support |
| "live_usb", |
| |
| # Static resource files. |
| "resources", |
| |
| # Emulator Support |
| "emulator_support", |
| "paravirtualization_support", |
| |
| # Storage |
| "fshost_common", |
| "fshost_fxfs", |
| "fshost_fvm", |
| "fshost_fvm_f2fs", |
| "fshost_fvm_fxfs", |
| "fshost_fvm_minfs", |
| "fshost_fvm_minfs_migration", |
| "fshost_storage", |
| "paver_legacy", |
| |
| # SWD (Software Delivery) |
| "no_update_checker", |
| |
| # Temporary AIB holds wlanphy driver |
| "wlanphy_driver", |
| ] |
| |
| # These are the userdebug platform AIBs that are used by bootstrap |
| # feature-set-level assemblies. This is a subset of the overall platform AIBs |
| # so that these systems (e.g. bringup) don't need to build the entire platform. |
| bootstrap_userdebug_platform_aib_names = [ |
| # The embeddable feature-set-level |
| "embeddable_userdebug", |
| |
| # The bootstrap feature-set-level |
| "bootstrap_userdebug", |
| |
| "clock_development_tools", |
| "console_userdebug", |
| |
| # Kernel args |
| "kernel_args_eng", |
| "kernel_args_userdebug", |
| |
| # Developer |
| "bootstrap_realm_vsock_development_access", |
| "kernel_debug_broker_userdebug", |
| "netsvc", |
| "ptysvc", |
| |
| # Emulator Support |
| "paravirtualization_support_bootstrap", |
| ] |
| |
| # These are the eng-buildtype-safe platform AIBs that are used by bootstrap |
| # feature-set-level assemblies. This is a subset of the overall platform AIBs |
| # so that these systems (e.g. bringup) don't need to build the entire platform. |
| bootstrap_eng_platform_aib_names = [ |
| # The embeddable feature-set-level |
| "embeddable_eng", |
| |
| # The bootstrap feature-set-level |
| "bootstrap_eng", |
| |
| # Kernel args |
| "kernel_pmm_checker_enabled", |
| ] |
| |
| # The names of all of the platform's 'testonly=false' Assembly Input Bundles |
| # |
| # These are used by the `utility` and the default feature-set-level assembled |
| # systems. |
| user_platform_aib_names = |
| bootstrap_user_platform_aib_names + [ |
| ### |
| # The common platform bundles |
| |
| ## The core realm bundles |
| |
| # `/core` itself |
| "core_realm", |
| "core_realm_user_and_userdebug", |
| |
| # The additional children of core we add when we have networking enabled |
| "core_realm_networking", |
| "network_realm", |
| "network_realm_packages", |
| "network_realm_packages_gub", |
| "network_tun", |
| "thread_lowpan", |
| "networking_with_virtualization", |
| "networking_basic", |
| "networking_basic_packages", |
| "networking_basic_packages_gub", |
| |
| # The minimal feature-set-level |
| "common_standard", |
| "standard_user", |
| |
| ### |
| # Feature-level / Subsystem-level bundles |
| # Keep sorted alphabetically. |
| |
| # Bluetooth |
| "bluetooth_a2dp", |
| "bluetooth_avrcp", |
| "bluetooth_core", |
| "bluetooth_hfp_ag", |
| "bluetooth_snoop_eager", |
| "bluetooth_snoop_lazy", |
| |
| # Media |
| "audio_core", |
| "audio_core_routing", |
| "audio_core_use_adc_device", |
| "audio_device_registry", |
| "soundplayer", |
| "camera", |
| |
| # Diagnostics |
| "diagnostics_triage_detect_mali", |
| |
| # Fonts |
| "fonts", |
| "fonts_hermetic", |
| |
| # SWD (Software Delivery) |
| "omaha_client", |
| "system_update_configurator", |
| |
| # Netstack |
| "netstack2", |
| "netstack3", |
| "netstack3_packages", |
| "netstack3_packages_gub", |
| "netstack_migration", |
| "netstack_migration_packages", |
| "netstack_migration_packages_gub", |
| |
| # WLAN |
| "wlan_legacy_privacy_support", |
| "wlan_contemporary_privacy_only_support", |
| "wlan_fullmac_support", |
| "wlan_policy", |
| "wlan_softmac_support", |
| "wlan_wlanix", |
| |
| # Sensors |
| "sensors_framework", |
| |
| # Session |
| "element_manager", |
| "session_manager", |
| |
| # SetUI |
| "setui", |
| "setui.icu_default_${icu_git_info.default}", |
| "setui.icu_latest_${icu_git_info.latest}", |
| "setui_with_camera", |
| "setui_with_camera.icu_default_${icu_git_info.default}", |
| "setui_with_camera.icu_latest_${icu_git_info.latest}", |
| |
| # Storage |
| "factory_data", |
| |
| # Opaque input groups. |
| "input_group_one", |
| "input_group_two", |
| |
| # ICU-specific version of intl_services |
| |
| "intl_services.icu_default_${icu_git_info.default}", |
| "intl_services.icu_latest_${icu_git_info.latest}", |
| |
| "intl_services_small.icu_default_${icu_git_info.default}", |
| "intl_services_small.icu_latest_${icu_git_info.latest}", |
| |
| "intl_services_small_with_timezone.icu_default_${icu_git_info.default}", |
| "intl_services_small_with_timezone.icu_latest_${icu_git_info.latest}", |
| |
| # UI |
| "ui", |
| "ui_user_and_userdebug", |
| "ui_user_and_userdebug.icu_default_${icu_git_info.default}", |
| "ui_user_and_userdebug.icu_latest_${icu_git_info.latest}", |
| "ui_package_user_and_userdebug", |
| "ui_package_eng_userdebug_with_synthetic_device_support", |
| "brightness_manager", |
| |
| # Drivers |
| "radar_proxy_without_injector", |
| |
| # Thermal |
| "fan", |
| |
| # Battery |
| "battery_manager", |
| |
| # Power metrics recorder |
| "power_metrics_recorder", |
| |
| # Forensics |
| "feedback_large_disk", |
| "feedback_low_memory_product_config", |
| "feedback_remote_device_id_provider", |
| "feedback_user_config", |
| "feedback_userdebug_config", |
| |
| # Kernel Reclamation |
| "kernel_anonymous_memory_compression", |
| "kernel_anonymous_memory_compression_eager_lru", |
| "kernel_evict_continuous", |
| |
| # Recovery |
| "factory_reset_trigger", |
| |
| # Starnix |
| "starnix_support", |
| |
| # Virtualization |
| "virtualization_support", |
| |
| # The tzif zoneinfo files |
| "zoneinfo", |
| ] |
| |
| # LINT.ThenChange(platform_aib_names.bzl) |
| |
| # The names of all userdebug-allowed platform Assembly Input Bundles |
| #LINT.IfChange |
| _userdebug_aib_names = bootstrap_userdebug_platform_aib_names + [ |
| # Needed by both eng and userdebug products, but contains things disallowed in |
| # user. |
| "adb_support", |
| "core_realm_development_access", |
| "core_realm_development_access_rcs_no_usb", |
| "core_realm_development_access_rcs_usb", |
| "core_realm_development_access_userdebug", |
| "standard_userdebug", |
| "standard_userdebug_and_eng", |
| "mdns_fuchsia_device_wired_service", |
| "omaha_client_empty_eager_config", |
| "power_framework", |
| "radar_proxy_with_injector", |
| "sl4f", |
| "wlan_development", |
| ] |
| |
| # LINT.ThenChange(platform_aib_names.bzl) |
| userdebug_platform_aib_names = user_platform_aib_names + _userdebug_aib_names |
| |
| # The names of all of the platform's Assembly Input Bundles. |
| # LINT.IfChange |
| eng_only_platform_aib_names = |
| bootstrap_eng_platform_aib_names + [ |
| # the core realm additions for eng build-type assemblies |
| "core_realm_eng", |
| |
| # SSH Config for eng only |
| "core_realm_development_access_eng", |
| |
| # The minimal additions for eng build-type assemblies |
| "standard_eng", |
| |
| # SWD (Software Delivery) |
| "system_update_checker", |
| "pkgfs_disable_executability_restrictions", |
| |
| # Testing Support |
| "testing_support", |
| |
| # Networking test support |
| "networking_test_collection", |
| |
| # UI |
| "ui_eng", |
| "ui_eng.icu_default_${icu_git_info.default}", |
| "ui_eng.icu_latest_${icu_git_info.latest}", |
| "ui_package_eng", |
| "ui_package_eng_userdebug_with_synthetic_device_support", |
| |
| # Example AIB |
| "example_assembly_bundle", |
| |
| # Driver development support |
| "full_package_drivers", |
| |
| # Audio development/debugging |
| "audio_development_support", |
| "video_development_support", |
| |
| # Sensor data playback support. |
| "sensors_playback", |
| |
| # Bluetooth testing support |
| "bluetooth_pandora", |
| ] |
| eng_platform_aib_names = |
| userdebug_platform_aib_names + eng_only_platform_aib_names |
| |
| # LINT.ThenChange(platform_aib_names.bzl) |
| |
| required_user_aib_names = [ |
| "embeddable", |
| "bootstrap", |
| "core_realm", |
| "core_realm_user_and_userdebug", |
| "driver_framework", |
| "legacy_power_framework", |
| "zircon", |
| ] |
| |
| required_userdebug_aib_names = required_user_aib_names + [ |
| "embeddable_userdebug", |
| "bootstrap_userdebug", |
| ] |
| |
| # If an AIB is added to this experimental list, it does not require security |
| # review, but will be banned from user builds. These AIBs may still be used |
| # on userdebug builds as long as scrutiny is not run on those builds. |
| experimental_aib_names = [ |
| "adb_support", |
| "bootstrap_realm_vsock_development_access", |
| "paravirtualization_support_bootstrap", |
| "power_framework", |
| ] |
| |
| # Ensure that we do not list any experimental AIBs as required |
| _experimental_required_aibs = required_userdebug_aib_names - |
| (required_userdebug_aib_names + |
| experimental_aib_names - experimental_aib_names) |
| if (_experimental_required_aibs != []) { |
| print( |
| "We found experimental AIBs that are marked required. This is not allowed.") |
| print(_experimental_required_aibs) |
| assert(false, "experimental AIBs cannot be marked required") |
| } |
| |
| # Ensure that we do not allow any experimental AIBs in user builds |
| _experimental_user_aibs = |
| user_platform_aib_names - |
| (user_platform_aib_names + experimental_aib_names - experimental_aib_names) |
| if (_experimental_user_aibs != []) { |
| print( |
| "We found experimental AIBs that are allowed in user builds. This is not allowed.") |
| print(_experimental_user_aibs) |
| assert(false, "experimental AIBs cannot be used in user builds") |
| } |
| |
| bringup_platform_aib_labels = [] |
| bringup_platform_aib_files = [] |
| foreach( |
| name, |
| bootstrap_user_platform_aib_names + bootstrap_userdebug_platform_aib_names + |
| bootstrap_eng_platform_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| |
| bringup_platform_aib_labels += [ label ] |
| bringup_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| |
| user_platform_aib_labels = [] |
| user_platform_aib_files = [] |
| foreach(name, user_platform_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| |
| user_platform_aib_labels += [ label ] |
| user_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| required_user_platform_aib_files = [] |
| foreach(name, required_user_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| required_user_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| |
| userdebug_platform_aib_labels = [] |
| userdebug_platform_aib_files = [] |
| foreach(name, userdebug_platform_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| |
| userdebug_platform_aib_labels += [ label ] |
| userdebug_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| required_userdebug_platform_aib_files = [] |
| foreach(name, required_userdebug_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| required_userdebug_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| |
| experimental_aib_files = [] |
| foreach(name, experimental_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| experimental_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| |
| eng_platform_aib_labels = [] |
| eng_platform_aib_files = [] |
| foreach(name, eng_platform_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| |
| eng_platform_aib_labels += [ label ] |
| eng_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |
| |
| eng_only_platform_aib_labels = [] |
| eng_only_platform_aib_files = [] |
| foreach(name, eng_only_platform_aib_names) { |
| label = "//bundles/assembly:${name}" |
| _target_out_dir = get_label_info(label, "target_out_dir") |
| |
| eng_only_platform_aib_labels += [ label ] |
| eng_only_platform_aib_files += |
| [ "${_target_out_dir}/${name}/assembly_config.json" ] |
| } |