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,
+8 -4
View File
@@ -85,16 +85,20 @@ python3 scripts/build-camera-userspace.py --component mesa --lax
python3 scripts/build-camera-userspace.py --component userspace --lax
```
This builds isolated Mesa/Freedreno 26.1.6 and `platina-libcamera` 0.7.1-r31.
The latter includes the camera consumer, HTTP/MQTT controller, UI, OpenRC service
This builds isolated Mesa/Freedreno 26.1.6 and `platina-libcamera` 0.7.1-r32.
The r32 source fixes authentication configuration handling: an existing invalid
or unreadable `/etc/platina-camera/auth.json` prevents startup. An absent file or
an explicit JSON `"enabled": false` retains the optional anonymous mode. The
previously tested phone uses r31; r32 still requires server build and phone testing.
The r32 package includes the camera consumer, HTTP/MQTT controller, UI, OpenRC service
and the active libcamera patches. Neither command connects to a phone. These
packages are not automatically installed by `make images`.
Before any installation, qualify a matching camera-enabled kernel and modules,
the IMX363/CCI/CAMSS media graph and DW9714 actuator on your own device. A
display-only kernel is insufficient. The source kernel candidate is 7.2.12-r12;
display-only kernel is insufficient. The source kernel candidate is 7.2.12-r13;
the tested installation instead uses the separately tested r9 boot and r11 sensor
module runtime combination. **The combined r12 kernel and a new full 0.8.1 image
module runtime combination. **The combined r13 kernel and a new full 0.8.1 image
have not passed a complete hardware installation test.** Do not replace a
working boot/modules set merely to install the camera userspace.
+1 -1
View File
@@ -2,7 +2,7 @@
**Development port.** The maintainer's existing phone runs integration0.8.1
with a separately qualified r9 boot/r11 camera-sensor runtime. The source kernel
recipe is7.2.12-r12; its combined full installation has not been hardware accepted.
recipe is7.2.12-r13; its combined full installation has not been hardware accepted.
The last new base image was built/audited for0.3.1. Current camera packages are
installed separately and are not included automatically by `make images`.
There is no supported prebuilt installer. See [BUILDING.md](BUILDING.md) and