Fuchsia F20 release notes

Date: June 4, 2024

Version: F20

The following changes have been implemented:

Audio

The following updates have been made for Audio:

  • Improved and deprecated elements in audio driver framework: Updated the audio driver framework to remove deprecated elements, properties, and methods, including the ENDPOINT element type, latency property, and bridge-mode API, in favor of newer alternatives that clarity and consistency of the audio API for driver developers. Added new properties, such as processing_delay and external_delay, and the element type DaiInterconnect which provides developers with more detailed information about the state of an audio device. Added improvements to validation and logging, and added SettableElementState to prevent errors.
  • Reviewed compatibility with drivers built with older SDKs: Added legacy tags to FIDL declarations that were removed in API level 20.
  • Expanded the support of AudioDeviceRegistry: This service fully detects and manages audio drivers that use the FIDL protocols fuchsia.hardware.audio/Composite and fuchsia.hardware.audio.signalprocessing. Also supports fuchsia.hardware.audio/Codec for legacy purposes.
  • Enhanced diagnostics and error handling: The audio system now logs detailed information when removing devices and errors, making it easier to diagnose problems. Additionally, a bug was fixed in the audio driver framework that could cause errors when a FIDL client reconnected to a driver after disconnecting.
  • Improved the Amlogic G12 audio driver: The Amlogic G12 audio driver is now integrated with the power framework to improve power management. Additionally, the driver has received minor cleanup and improvements.
  • Improved ffx audio commands: Added support for the ffx audio device command for devices available through the fuchsia.audio.device.Registry protocol. Additionally, the ffx audio device info command now fetches device information directly from hardware protocols and fuchsia.audio.device.Registry.
  • Renamed the driver framework node created by the virtual audio platform device: Changed the name to "virtual-audio" instead of "00:00:2f".
  • Resolved a runtime error in the audio system: The audio system now uses fuchsia.media.AudioCore in the audio_consumer.cml component.
  • Added a new audio device registry: Introduced the Registry type, a client for fuchsia.audio.device.Registry protocol, which provides real-time device information.

Bluetooth

The following updates have been made for Bluetooth:

  • Updated the Bluetooth Host Protocol to be flexible: The Bluetooth Host protocol methods and events are now flexible which improve responsiveness. Also, migrated the FIDL layer to use SDK-compatible libraries.
  • Relocated host.fidl and opened the Host protocol: Moved the host.fidl file to the SDK. Also, made the Host protocol open which enables external developers to access core Bluetooth functionality.
  • Improved service advertisement and the handling of SCO Connection: Added a Revoke event to the ConnectionReceiver which allows FIDL clients to cancel service advertisement. The ScoConnection and ScoConnectionReceiver protocols were consolidated for simplified SCO connection management.
  • Migrated the fidl-controller from HLCPP to the new C++ binding: Improved efficiency and maintainability by migrating from HLCPP to C++ bindings.
  • Implemented extended advertising PDUs with fragmentation: This change allows for larger advertising data packets.
  • Improved the logic for matching and negotiating compatible audio codecs: This change enhances audio quality.
  • Enhanced A2DP: Updated the MediaTask framework, enabling codec detection and improving the bt-a2dp component.
  • Enhanced the virtual driver: Migrated the Virtual Driver to DFv2 for improved performance and maintainability. Updated the README file to better document the improvements.
  • Implemented Pandora gRPC: Implemented Pandora gRPC capabilities for A2DP testing.
  • Renamed the driver framework node created by the bt-hci-emulator platform: Renamed the device from "00:00:30" to "bt-hci-emulator".
  • Deleted obsolete bt-intel-tool.

Developer

The following updates have been made for Developer:

ffx

  • Enhanced ffx target command: Added several enhancements to the ffx target command which includes better handling of disconnected devices, improved JSON output, enhanced target listing, and the addition of ffx target remove --all.
  • Improved ffx emu command: The ffx emu command now supports JSON output, handles SIGTERM and schema generation. The code for ffx emu was also refactored for clarity.
  • Added ffx component and other subcommands to the SDK: The ffx component, ffx debug, ffx session, and ffx repository subcommands are now available in the SDK, expanding development tooling when working with the SDK.
  • Enhanced ffx repository command: Added support for JSON output for the ffx repository command which prevents overwriting of repositories, and various improvements to its subcommands.
  • Moved ffx package, ffx-process, and ffx trace to the SDK: The ffx package, ffx-process, and ffx trace commands now run directly from the SDK, which reduced the size of the main ffx binary.
  • Enhanced ffx: Improved error handling for SSH and OvernetConnector for ffx. Added more logging during ffx daemon startup and support for a custom root of trust in ffx repository serve.
  • Added ffx power command: Introduced a new ffx power command to manage application activity level and system suspend behavior.
  • Removed ASCII art from ffx commands: Removed ASCII art from ffx commands that produce tables, making it easier to work with table output.

Component Framework

The following updates have been made for Component Framework:

  • Reduced memory usage of component environments: Component environments are no longer retained by build_component_sandbox, reducing memory usage.
  • Added support for default configuration values: Added support for default configuration values which improves the flexibility of component configurations.
  • Improved configuration capabilities: Added support for configuration capabilities to re-enable realm_builder_server in the SDK, and allowed components outside the Fuchsia tree to compile manifests with configuration capabilities.
  • Improved diagnostics and logging: Component Manager now records start and stop events in Inspect for improved diagnostics. Removed error logging for void routes, and added a test for execution scope usage.
  • Added orderly power down for passive dependencies.
  • Added support for weak for service capabilities: Added support for the weak feature for service capabilities, which is already supported by most other capability types. weak means the dependency isn't counted for shutdown order, and is useful for breaking cycles.

Connectivity Drivers

The following updates have been made for Connectivity Drivers:

  • Enhanced the e1000 driver: Migrated to use netdev and DFv2, resolving issues with locking up. Added support for link state changes and hardware resets when stopping the interface.
  • Improved brcmfmac driver: Updated to use FIDL for netdevice, which provides asynchronous interface and device management. Fixed error code handling and added crash recovery tests.

Diagnostics

The following updates have been made for Diagnostics:

  • Diagnostics library improvements:
  • Platform improvements:
    • Removed DirectoryReady: This is no longer used for publishing inspect data.
    • Component manager records start and stop durations to Inspect: Statistics are then published through Sampler’s FIRE.
    • Added support for power broker to expose an inspect graph: This graph includes levels and the topology.
    • Removed the diagnostics-kcounter component: This component’s data is now published by kernel_debug_svc.
    • Added support for component IDs and monikers to Sampler’s FIRE.
    • Updated MinFs to publish usage stats to Sampler’s FIRE.
  • Tool Improvements
    • Enhanced ffx log --tag to work on the last segment of the moniker.
    • Enhanced ffx log --filter to work on filenames.

Display

The following updates have been made for Display:

Driver Framework

The following updates have been made for Driver Framework:

  • Updated Driver Framework tests to start and stop drivers multiple times within a single test.
  • Added a function for driver unit tests to be able to call a driver's stop hook.

GPU

The following updates have been made for GPU:

  • Improved GPU power management and diagnostics: Added Inspect to see GPU power status. Also added a power element on VIM3 for power-down detection.
  • Enhanced GPU testing: Deleted an unused DRM test group, modified Lavapipe to use platform-appropriate libraries, switched to using configuration capabilities for magma conformance tests, and added a new fuchsia.gpu.test.DisabledTestPattern configuration.
  • Improved GPU logging: Enhanced some GPU logs with type prefixes for easier identification.
  • Removed legacy API checks: Removed API levels 14 and earlier, removing related checks and code.

FIDL

The following updates have been made for FIDL:

Language:

  • Added renamed argument to the @available attribute: This argument helps maintain clarity when members are renamed while preserving ABI compatibility.
  • Documented several language features: This included documenting fully qualified names, identifier resolution, the overview.fidl convention, the built-in fidl library, and method ordinals.
  • Simplified inline size constants: Updated size constants to use a single kInlineSize constant and renamed is_memcpy_compatible to kMemcpyCompatible.
  • Removed redundant buffer type field from unions and disallowed events with error syntax: This streamlines the language and removes deprecated syntax.

Compiler (fidlc):

  • Improved the support of the @discoverable syntax in the fidlgen library.
  • Simplified Name class and removed dead code: This change improved efficiency and maintainability.
  • Removed unused functions and operators from fidlc::Value and added the helper functions AsNumeric and AsString to ConstantValue.

C++ Bindings:

Tooling:

  • Implemented ABI validation for the @available removed/replaced syntax: This change enables more accurate identification of API and ABI changes. This improves compatibility checks and lets developers use removed/replaced/renamed attributes correctly.
  • Enforced ABI compatibility checks for stable API levels greater than or equal to 19.
  • Improved ABI compatibility tool: Renamed the runtime_compat library to abi_compat, including method names in error messages. Also added support for special handling of unstable protocols, box types, and the platform and external split.
  • Updated the SDK to validate the FIDL version based on the stable argument.

JSON IR Schema:

  • Added NEXT keyword to the JSON IR schema and fixed an issue with the JSON IR generator.
  • Updated FIDL tests to remove the unused json_for_test action.

API Changes:

  • Updated SDK FIDL libraries to use replacement at the narrowest scope possible and marked stable core FIDL files with stable=true.
  • Removed deprecated methods from radar FIDL, simplifying error syntax handling.

Miscellaneous:

  • Added FIDL call for Bluetooth LE local delay range and made UsbDci and UsbDciInterface more flexible and open.
  • Merged fuchsia.bluetooth.test.HciEmulator and fuchsia.hardware.bluetooth.Emulator APIs for simplification.

UI

The following updates have been made for UI:

  • Minor enhancements for developer metrics.

Kernel

The following updates have been made for Kernel:

  • Removed kernel's global thread lock which improves system performance and throughput.
  • Improved the formatting and unification of phys backtraces in exception cases.
  • Fixed formatting of BootZbi::Error messages to display the offset during read or write errors.
  • Rework arm64 mmu barriers to avoid a rare translation fault.
  • Restricted use of large pages during kernel mapping to fix a KASAN issue.
  • Fixed warning related to reserving ranges in the kernel with non-default cache flags.
  • Added 'repeat' command to the kernel shell for looping command execution.
  • Improved circular lock dependency reporting by displaying all direct dependencies in a circular set.
  • Optimized pmm checker and improved range mapping alignment for better large page utilization.

Netstack

The following updates have been made for Netstack:

Platform Drivers

The following updates have been made for Platform Drivers:

  • Enhanced SDIO functionality: Improved SDIO testing and protocol capabilities, which includes FIDL migration, driver transport options, and buffered IO for NO_DMA hosts.
  • Improved audio drivers: Updated the Amlogic audio drivers to be more flexible and robust, including using FIDL types instead of Banjo types, new signal processing properties, and support for turn on/off delays.
  • Enhanced power management: Improved power management functionality, including power configuration data for device nodes, new SuspendEnabled configuration capability, and revised the behavior of the power element during boot.
  • Rust integration: Added bindgen wrappers for driver runtime, driver symbols, and ulib async APIs to provide a starting point for Rust integration with the driver runtime.
  • Improved Fxfs and Fxblob: Fixed issues with Fxblob data flags, fsck behavior, and profile recording.
  • Fixed miscellaneous issues: Resolved various bugs related to the countof macro, bootloader serial number, ns8250 irq, and aml-g12-tdm driver.
  • Enhanced fusb302: Improved synchronization and PHY TX/RX queue flushing in the fusb302 driver.
  • Enhanced test infrastructure: Enhanced tests to be able to fetch internal product bundles. Added support for DriverTestRealm to start and stop drivers multiple times during a test case. Also, improved ffx integration for device interaction for host target testing.

Rust

The following updates have been made for Rust:

  • Upgraded tracing ecosystem: Updated to tracing-subscriber 0.3.18, tracing-log 0.2.0, and added necessary dependencies nu-ansi-term 0.46.0 and overload 0.1.1.
  • Improved Rust toolchain and linting: Implemented a workaround for dropped RISC-V target features in LTO, removed the deprecated static_mut_ref lint reference, and addressed clippy::legacy-numeric-constants lints.
  • Enhanced component panicking: A component can now customize the string displayed during a panic hook.
  • Optimized Rust builds: Rustc now emits .rmeta files for most compilations, which allows for potentially faster builds by bypassing rlib downloads. Replaced a custom implementation with u64::[checked_]next_multiple_of for code clarity and performance improvements.
  • Library updates: Updated smallvec to 1.13.1, regex-syntax to 0.8.3, integrated google3 audits, updated num-traits to 0.2.18, updated bit-set to 0.5.3 (removing bit-vec 0.5.0), and updated fuchsia-zircon-types for release.

Software delivery

The following updates have been made for Software Delivery:

  • Removed delivery_blob_fallback metric: Removed the metric as the corresponding fallback code has been removed.
  • Simplified and improved software delivery tests: Optimized software delivery end-to-end tests for faster execution and improved handling of images.json.

Starnix

The following updates have been made for Starnix:

  • Improved memory reporting and stability: Enhanced reporting for memory attribution in starnix_runner. Fixed a bug where the break address was incorrectly handled, which ensures that BRK pages are zeroed correctly.
  • Added new features and enhancements: Added basic support for TUN, introduced the framebuffer2 feature that associates views with containers, implemented support for taskstats, implemented timerfd alarms, added a remote block device backed by a VMO, and avoided dynamic dispatch in vmsplice.
  • Improved the stability and feedback of the kernel: Replaced kill_job_on_panic with a mechanism that only terminates the kernel on process error exits which improves feedback collection.
  • Added support for Linux features: Added support for LINUX_REBOOT_CMD_{HALT, POWER_OFF}. Also quoted values in mount options parsing which is essential for SELinux.
  • Optimized performance: Use caching to reduce the cost of reading /proc/<pid>/status which speeds up ps calls.
  • Enhanced test coverage and accuracy: Enabled firehose tracing in Starnix by default, added a VmMapping::PageFault optimization test, improved SSH port determination in software delivery tests.

Testing

The following updates have been made for Testing:

  • Improved test reliability and stability: Fixed flakiness in a socket test, updated the RTC conformance test to reset the chip value. Migrated goldfish_test from sysmem(1) to sysmem2.
  • Simplified and optimized tests: Removed dm reboot-bootloader from OTA testing, promoted diagnostics_test to the stable group, temporarily removed gtest_fixture from SDK, and updated the SDIO unit test to use FIDL instead of a private controller interface.
  • Improved the output and logging of tests: Updated fxtest to be quieter with improved log path instructions. Added debugging logs in test_manager.
  • Updated the mock-mmio-reg-zxtest library: Migrated users to the new mock-mmio-reg-zxtest library and removed the old library.
  • Modernized the fonts integration tests: Updated tests to be less flaky, logged, and they longer test the ephemeral fonts feature. Additionally, some tests have been parallelized.

Thread

The following updates have been made for Thread:

  • Improved link Metrics and resource management: Enabled link metrics manager and re-enabled the platform heap feature. Removed unused NCP platform code and cleaned up OpenThread platform code.
  • Enhanced the OpenTread-radio: This change ensures that smart displays do not lose Thread capability.
  • Improved DHCPv6 PD.
  • Fixed an issue with MeshCoP.
  • Fixed an issue with SRP (Service Registration Protocol).
  • Enhanced NAT64 for compatibility purposes.
  • Fixed an issue with a memory leak.
  • Fixed an issue with OpenThread.

Timekeeping

The following updates have been made for Timekeeping:

  • Enhanced timekeeper testing and configuration: Added experimental API for manipulating Timekeeper, which allows tests to change the behavior of Timekeeper at runtime. The RTC conformance test now resets the chip's value to walltime upon test termination. Added options for read-only RTC configuration and exposed structured config in Inspect for the time component.
  • Improved the hrtimer driver: Improved power management and re-enabled unit tests. Implemented alarms for timerfd and added a software max ticks extender, which addresses CPU regressions. Reverted a change that caused power regression in Starnix timerfd alarm implementation.

Bazel SDK

The following updates have been made for the Fuchsia Bazel SDK:

  • Improved Bazel SDK toolchain: Added configc and fidl-format.

Tools

The following updates have been made for Tools:

Video

The following updates have been made for Video:

  • Improved video decoder support and stability: Added devicetree support in Amlogic video decoder and resolved compatibility issues with the codec driver. Disabled a flaky test on NUC platforms to enhance reliability.

WLAN

The following updates have been made for WLAN:

  • Enhanced network selection and diagnostics: Improved network preference for 5GHZ and added logging for RSSI metrics.
  • Improved interface recovery and logging: Corrected the start AP recovery threshold and enhanced recording of defects for WLAN interfaces.