Fix candidate build metadata and runtime safeguards
Offline project checks / check (push) Canceled after 0s

Repair kernel patch formatting and refresh kernel/camera package revisions and checksums. Integrate battery guard into generated images, correct charging controls and emergency shutdown handling, and reject invalid camera authentication configuration.

Extend recipe validation and regression coverage, and update build and installation documentation. Kernel, camera and image compilation remain pending on the build server.
This commit is contained in:
shenlei
2026-11-09 10:49:22 +09:00
parent 23989f4a18
commit 4f3fe1f94b
19 changed files with 298 additions and 100 deletions
+16 -3
View File
@@ -2,9 +2,9 @@
This is a source-only development port. Integration **0.8.1**, signed camera
userspace **0.7.1-r31** and the existing r9-boot/r11-sensor runtime combination
were checked on one Tianma Mi 8 Lite. The public kernel recipe is **7.2.12-r12**,
were checked on one Tianma Mi 8 Lite. The public kernel recipe is **7.2.12-r13**,
a development candidate, not the exact tested boot/modules combination.
A combined r12 kernel and a new full 0.8.1 installation image are not hardware
A combined r13 kernel and a new full 0.8.1 installation image are not hardware
qualified. The last full base image was built/audited for 0.3.1.
Camera packages are separate; see [CAMERA.md](CAMERA.md).
@@ -95,6 +95,19 @@ inert without a separately supplied `/etc/platina/usb-power.json` policy; no hos
identity or increased-current allowance is cloned from the development phone.
Wi-Fi credentials and monitoring credentials also remain per-installation inputs.
New images also install and enable `platina-battery-guard`. It requests charging
between 50% and 65%, pauses charging at 45°C until the battery cools to 42°C, and
requests orderly shutdown at 5% while discharging. An active thermal cutoff stays
latched if a temperature read fails. Emergency shutdown uses init directly and
keeps retrying if shutdown fails; it does not depend on the display helper.
Charging control requires a writable `charging_enabled` switch or a
`charge_behaviour` interface supporting `auto` and `inhibit-charge`. The guard
never changes `current_max` or `charge_control_limit_max`. If neither switch is
available it logs `Charging control unavailable`; the charge/temperature policy
then cannot be enforced, while low-battery shutdown remains active. Qualify the
actual switch and charge/discharge behavior on the phone before relying on it.
The mkinitfs version used by this port can copy full-rootfs module indexes into
an initramfs containing only some modules. The builder automatically regenerates
indexes for the modules actually included in the exported boot image. The final
@@ -125,7 +138,7 @@ screens. See [display setup](DISPLAY.md) and [shutdown behavior](SHUTDOWN.md).
After preparing the candidate environment, build the isolated Mesa and camera
packages locally with `scripts/build-camera-userspace.py`; see the complete
[camera guide](CAMERA.md#source-build-and-installation-boundary). The camera
package pins libcamera 0.7.1-r31 and the active control/GPU patches. Inactive DMA,
package pins libcamera 0.7.1-r32 and the active control/GPU patches. Inactive DMA,
LUT and other rejected experiment patches are not part of this source release.
No camera credentials, host-specific deployment helpers or prebuilt APKs are
included. `make images` currently integrates the base display/shutdown runtime,