commit | aefed58629cbd0576a48fc55cb9f8416ebc12c47 | [log] [tgz] |
---|---|---|
author | Craig Hesling <hesling@chromium.org> | Mon Jul 27 02:03:25 2020 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 30 04:43:20 2020 +0000 |
tree | b801bb49f786ec06af55dd2612ad50f47e948f60 | |
parent | 0ecdfb3b8e145f49aea797fa55723cf99da42b0e [diff] |
chromeos-config-tools: cros_configfs block boot-services Change cros_configfs to block boot-services, until cros_configfs is ready. By extension, this ensure that the cros config mechanism is ready for use as soon as "boot-services" transitions to "started". Problem: The cros config mechanism is globally dead until cros_configfs is mounted. The mounting is accomplished by the cros_configfs upstart pre-start section. Although this is done in the pre-start section, the script is triggered from the "started boot-services" signal, which gives assurances about completion, with respect to other service start time. This means that cros_configfs can complete mounting at any point, after boot-services starts. See b/161421508 for an example of the errors this causes. Explanation of Solution: Cros config is assumed to be a core feature, similar to dbus or metrics, that is used by many services. It would incur unnecessary complexity and additional room for error if all services had to form an explicit startup dependencies for cros_configfs (which is what cros config indirectly uses). See b/161421508 for more analysis. cros_configfs should block boot-services itself, similar to what metrics_library currently does. Assumptions (which might change in the future): * No service before boot-services shall use cros config. * No service that blocks boot-services ("start on starting boot-services") shall use cros config. * Services that "start on started boot-services" or start on later events may use cros config (eg. powerd, ui, or system-services). BUG=b:157095325, b:161421508 TEST=# The following test occurred on both Nocturne and Dratini # Flash R86-13376.0.0 /usr/share/vboot/bin/make_dev_ssd.sh --partitions '2 4' --default_rw_root --remove_rootfs_verification sync reboot # Edit /etc/init/cros_configfs.conf # - Do NOT apply fix # - Add a "sleep 10" to the top of the pre-start section cat >/etc/init/before.conf <<-EOF start on starting boot-services task script echo "name = '$(cros_config / name)'" >/var/log/${UPSTART_JOB}.log end script EOF cat >/etc/init/after.conf <<-EOF start on started boot-services task script echo "name = '$(cros_config / name)'" >/var/log/${UPSTART_JOB}.log end script EOF sync reboot # Check that /var/log/before.log shows "name = ''" # Check that /var/log/after.log shows "name = ''" # # Edit /etc/init/cros_configfs.conf # - Apply fix sync reboot # Check that /var/log/before.log shows "name = ''" # Check that /var/log/after.log shows "name = '<BOARD>'" TEST=# Thanks to @yichengli for the following test: # On a nami device without /dev/cros_fp: # (1) without this change, boot many times, observe that 1 in ~3 # boots bio_fw_updater fails to query cros_configfs, and # decided to do legacy update, and failed to query FPMCU # version (there's no FPMCU at all). # (2) with this change, boot >10 times, observe that every time # bio_fw_updater learns from cros_configfs that there's no # FPMCU. Change-Id: I4b1bc6d5599f81089434dca65bb335e5af6aa58a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2320013 Tested-by: Craig Hesling <hesling@chromium.org> Auto-Submit: Craig Hesling <hesling@chromium.org> Commit-Queue: Yicheng Li <yichengli@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Matthew Blecker <matthewb@chromium.org> Reviewed-by: Yicheng Li <yichengli@chromium.org>
This repo holds (most) of the custom code that makes up the Chromium OS platform. That largely covers daemons, programs, and libraries that were written specifically for Chromium OS.
We moved from multiple separate repos in platform/ to a single repo in platform2/ for a number of reasons:
While most projects were merged, not all of them were. Some projects were standalone already (such as vboot), or never got around to being folded in (such as imageloader). Some day those extra projects might get merged in.
Similarly, some projects that were merged in, were then merged back out. This was due to the evolution of the Brillo project and collaboration with Android. That means the AOSP repos are the upstream and Chromium OS carries copies.
Project | Description |
---|---|
arc | Tools/deamons/init-scripts to run ARC |
attestation | Daemon and client for managing remote attestation |
authpolicy | Daemon for integrating with Microsoft Active Directory (AD) domains |
avtest_label_detect | Test tool for OCRing device labels |
biod | Biometrics daemon |
bluetooth | Bluetooth Service and tools |
bootstat | Tools for tracking points in the overall boot process (for metrics) |
buffet | Daemon for reacting to cloud messages |
camera | Chrome OS Camera daemon |
cfm-dfu-notification | CFM specific library for DFU notifications |
chaps | PKCS #11 implementation for TPM 1 devices |
chromeos-common-script | Shared scripts for partitions and basic disk information |
chromeos-config | CrOS unified build runtime config manager |
chromeos-dbus-bindings | Simplifies the implementation of D-Bus daemons and proxies |
chromeos-nvt-tcon-updater | Library for integrating the Novatek TCON firmware updater into a CrOS device |
codelab | Codelab exercise |
common-mk | Common build & test logic for platform2 projects |
crash-reporter | The system crash handler & reporter |
cros-disks | Daemon for mounting removable media (e.g. USB sticks and SD cards) |
cros-fuzz | Support crate for fuzzing rust code |
crosdns | Hostname resolution service for Chrome OS |
crosh | The Chromium OS shell |
croslog | The log manipulation command |
cryptohome | Daemon and tools for managing encrypted /home and /var directories |
cups_proxy | Daemon for proxying CUPS printing request |
debugd | Centralized debug daemon for random tools |
dev-install | Tools & settings for managing the developer environment on the device |
diagnostics | Device telemetry and diagnostics daemons |
disk_updater | Utility for updating root disk firmware (e.g. SSDs and eMMC) |
dlcservice | Downloadable Content (DLC) Service daemon |
easy-unlock | Daemon for handling Easy Unlock requests (e.g. unlocking Chromebooks with an Android device) |
feedback | Daemon for headless systems that want to gather feedback (normally Chrome manages it) |
fitpicker | |
foomatic_shell | Simple shell used by the foomatic-rip package |
glib-bridge | library for libchrome-glib message loop interoperation |
goldfishd | Android Emulator Daemon |
hammerd | Firmware updater utility for hammer hardware |
hardware_verifier | Hardware verifier tool |
hermes | Chrome OS LPA implementation for eSIM hardware support |
hwsec-test-utils | Hwsec-related test-only features |
iioservice | Daemon and libraries that provide sensor data to all processes |
image-burner | Daemon for writing disk images (e.g. recovery) to USB sticks & SD cards |
imageloader | Daemon for mounting signed disk images |
init | CrOS common startup init scripts and boot time helpers |
installer | CrOS installer utility (for AU/recovery/etc...) |
ippusb_bridge | HTTP proxy to IPP-enabled printers |
ippusb_manager | “Service” for ipp-over-usb printing |
kerberos | Daemon for managing Kerberos tickets |
libbrillo | Common platform utility library |
libchromeos-rs | Common platform utility library for Rust |
libchromeos-ui | |
libcontainer | |
libhwsec | Library for the utility functions of all TPM related daemons |
libipp | Library for building and parsing IPP (Internet Printing Protocol) frames |
libmems | Utility library to configure, manage and retrieve events from IIO sensors |
libpasswordprovider | Password Provider library for securely managing credentials with system services |
libtpmcrypto | Library for AES256-GCM encryption with TPM sealed keys |
login_manager | Session manager for handling the life cycle of the main session (e.g. Chrome) |
lorgnette | Daemon for managing attached USB scanners via SANE |
media_perception | Media perception service for select platforms |
memd | Daemon that logs memory-related data and events |
mems_setup | Boot-time initializer tool for sensors |
metrics | Client side user metrics collection |
midis | MIDI service |
mist | Modem USB Interface Switching Tool |
ml | Machine learning service |
ml_benchmark | ML performance benchmark for Chrome OS |
modem-utilities | |
modemfwd | Daemon for managing modem firmware updaters |
mtpd | Daemon for handling Media Transfer Protocol (MTP) with devices (e.g. phones) |
nnapi | Implementation of the Android Neural Networks API |
ocr | Optical Character Recognition (OCR) service for Chrome OS |
oobe_config | Utilities for saving and restoring OOBE config state |
p2p | Service for sharing files between CrOS devices (e.g. updates) |
patchpanel | Platform networking daemons |
permission_broker | |
policy_proto | Build file to compile policy proto file |
policy_utils | Tools and related library to set or override device policies |
power_manager | Userspace power management daemon and associated tools |
print_tools | Various tools related to the native printing system |
regions | |
run_oci | Minimalistic container runtime |
runtime_probe | Runtime probe tool for ChromeOS |
salsa | Touchpad experimentation framework |
screenshot | Tiny command to take a screenshot |
sealed_storage | Library for sealing data to device identity and state |
secure-wipe | Secure disk wipe |
secure_erase_file | Helper tools for securely erasing files from storage (e.g. keys and PII data) |
sepolicy | SELinux policy for Chrome OS |
shill | Chrome OS Connection Manager |
smbfs | FUSE-based filesystem for accessing Samba / Windows networking shares |
smbprovider | Daemon for connecting Samba / Windows networking shares to the Files.app |
smogcheck | Developer library for working with raw I2C devices |
st_flash | |
storage_info | Helper shell functions for retrieving disk information) |
system-proxy | Daemon for web proxy authentication support on Chrome OS |
system_api | Headers and .proto files etc. to be shared with chromium |
thd | Thermal daemon to help keep systems running cool |
timberslide | Tool for working with EC crashes for reporting purposes |
touch_firmware_calibration | |
touch_keyboard | Utilities for a touch based virtual keyboard |
tpm2-simulator | A software TPM 2.0 implementation (for testing/debugging) |
tpm_manager | Daemon and client for managing TPM setup and operations |
tpm_softclear_utils | Utilities that soft-clear TPM (for testing only) |
trace_events | A framework for adding trace events to your Rust code. |
trim | Service to manage filesystem trim operations in the background |
trunks | Middleware and resource manager for interfacing with TPM 2.0 hardware |
typecd | System daemon to keep track of USB Type C state |
u2fd | U2FHID emulation daemon for systems with secure elements (not TPMs) |
ureadahead-diff | Tool to calculate difference between 2 ureadahead packs |
usb_bouncer | Tools for managing USBGuard white-lists and configuration on Chrome OS |
userfeedback | Various utilities to gather extended data for user feedback reports |
userspace_touchpad | |
virtual_file_provider | |
vm_tools | Utilities for Virtual Machine (VM) orchestration |
vpn-manager | Chrome OS Native L2TP/IPSec VPN Daemon |
webserver | Small web server with D-Bus client backends |
wifi-testbed | Tools for creating a WiFi testbed image |
These projects can be found here: https://chromium.googlesource.com/aosp/platform/