Name: uke-uvdm-state-source-check Version: 0.1 Release: 1%{?dist} Summary: ARM64 source qualification for the fitted Uke UVDM state readback License: GPL-2.0-only ExclusiveArch: aarch64 Source0: qcom_battmgr-before.c Source1: 0011-uke-qcom-battmgr-observe-pd-auth-state.patch Source2: battery-coordinator-contract.sh Source3: pmic_glink.h Source4: fitted-uvdm-wire.tsv BuildRequires: bash coreutils findutils gawk grep gcc clang git-core %description Source validation of fixed charger, USB class and charging mode reads. The results package contains checked source evidence. %prep test "$(uname -m)" = aarch64 printf '%s %s\n' 6716b60c787dfb2918983bbcc6b322572805bfa7a0af6dd1cb02f9771c5c9ee0 %{SOURCE0} | sha256sum -c --strict - mkdir -p candidate/drivers/power/supply candidate/include/linux/soc/qcom cp -p %{SOURCE0} candidate/drivers/power/supply/qcom_battmgr.c cp -p %{SOURCE3} candidate/include/linux/soc/qcom/pmic_glink.h ( cd candidate git apply --check --whitespace=error %{SOURCE1} git apply --whitespace=error %{SOURCE1} ) awk -F '\t' '$1=="request_vdm_cmd_show" && $2==33 && $3==24 && $4==16 {ok++} END {exit NR!=1 || ok!=1}' %{SOURCE4} %build set -o pipefail for toolchain in gcc clang; do for oem_status in 0 1; do for control in 0 1; do CC="$toolchain" UKE_TEST_OEM_STATUS="$oem_status" UKE_TEST_CONTROL="$control" \ bash %{SOURCE2} "$PWD/candidate" done done done | tee results.txt test "$(grep -Fxc 'Fixed OEM charger and mode reads: privilege, wire identity, epoch and write refusal passed.' results.txt)" = 4 test "$(grep -Fxc 'OEM USB status: privilege, namespace, legacy adapter cache and epoch passed.' results.txt)" = 4 test "$(grep -Fc 'Actual Uke request matching, error, late reply, generation, PDR' results.txt)" = 8 ( cd candidate git apply --reverse --check --whitespace=error %{SOURCE1} git apply --reverse %{SOURCE1} cmp %{SOURCE0} drivers/power/supply/qcom_battmgr.c ) (cd %{_sourcedir}; sha256sum qcom_battmgr-before.c 0011-uke-qcom-battmgr-observe-pd-auth-state.patch battery-coordinator-contract.sh pmic_glink.h fitted-uvdm-wire.tsv) >> results.txt %install install -Dm644 results.txt %{buildroot}%{_datadir}/%{name}/qualification.txt %files %{_datadir}/%{name}/qualification.txt %changelog * Thu Nov 19 2026 Uke Linux Maintainers - 0.1-1 - Qualify fitted read-only UVDM state.