Files
android_vendor_pawlet/config/rpi_common.mk
T
oxmc 1e4b73a66c recoveryboot: chain-load into the recovery partition on BCB request
The RPi firmware can't read the BCB in misc, so 'adb reboot recovery' /
factory reset never reached recovery: init writes boot-recovery and
reboots, the firmware ignores the reboot arg, and Android just boots
normally again.

pawlet-recoveryboot is a vendor oneshot (post-fs-data) that reads the
BCB command field (misc offset 0 — the HAL's PawletBootControl lives at
4096, no overlap) and, on boot-recovery, reboots with arg '3': the
firmware's PM_RSTS partition mechanism (same driver path as the
updater's tryboot) boots GPT partition 3 = recovery once. Stock
recovery reads its args from the untouched BCB, clears it when done,
and the next reboot is normal. A /metadata attempt counter clears the
BCB after 2 failed tries so an unbootable recovery can't wedge the
device.
2026-07-15 11:40:46 -07:00

48 lines
2.1 KiB
Makefile

#
# Copyright (C) 2025-2026 oxmc / PawletOS
#
# SPDX-License-Identifier: Apache-2.0
#
# RPi-specific product config. Include from each RPi device's device.mk
# AFTER inheriting common.mk:
# $(call inherit-product, vendor/pawlet/config/common.mk)
# $(call inherit-product, vendor/pawlet/config/rpi_common.mk)
#
# ---------------------------------------------------------------------------
# Base hardware and software feature declarations for all RPi devices
# ---------------------------------------------------------------------------
PRODUCT_COPY_FILES += \
vendor/pawlet/config/permissions/pawlet-rpi-base-hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/pawlet-rpi-base-hardware.xml
# ---------------------------------------------------------------------------
# RPi boot control HAL (A/B seamless updates via misc partition)
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
android.hardware.boot-service.pawlet_rpi
# ---------------------------------------------------------------------------
# RPi-specific framework overlay
# Disables telephony, GPS, and recents; sets Ethernet boot timeout.
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
pawlet-rpi-framework-res-overlay
# ---------------------------------------------------------------------------
# RPi updater overlay — enables tryboot-based A/B slot switching
# ---------------------------------------------------------------------------
PRODUCT_SOONG_NAMESPACES += device/pawlet/rpi
PRODUCT_PACKAGES += \
PawletUpdaterRpiOverlay \
PawletSettings \
SettingsProviderRpiCommonOverlay
# ---------------------------------------------------------------------------
# reboot-to-recovery chain-loader — RPi firmware can't read the BCB in misc,
# so a boot-time oneshot detects "boot-recovery" and reboots into the
# recovery partition (3) via the firmware's PM_RSTS partition mechanism.
# ---------------------------------------------------------------------------
PRODUCT_PACKAGES += \
pawlet-recoveryboot