%global debug_package %{nil} Name: uke-el2-observation-check Version: 0.1.1 Release: 1%{?dist} Summary: ARM64 source and object checks for Uke boot observations License: GPL-2.0-only URL: https://github.com/MCC45TR/senemos-uke-kernel-mainline ExclusiveArch: aarch64 Source0: baseline-observation.config Source1: qcom-scm-parent-7.3.6-31.patch Source2: uke-rtc-policy.h Patch1: 0001-arm64-record-uke-cpu-entry.patch Patch2: 0002-qcom-scm-observe-uke-el2-advertisement.patch BuildRequires: bc, bison, clang, curl, elfutils-libelf-devel, flex BuildRequires: gcc, git-core, lld, llvm, make, openssl-devel, perl, xz %description Builds ARM64 kernel objects in three observation profiles. The RPM contains only a verification receipt. %prep set -eu curl --fail --silent --show-error --location --retry 2 --max-time 180 \ https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-7.3.6.tar.xz \ --output linux-7.3.6.tar.xz printf '%%s %%s\n' 8183d475a76a0faffa92d6cd500af421f589dfd0300a0f1060bb875e11d45723 \ linux-7.3.6.tar.xz | sha256sum --strict -c - tar -xf linux-7.3.6.tar.xz rm linux-7.3.6.tar.xz cd linux-7.3.6 git apply --check --whitespace=error %{SOURCE1} git apply --whitespace=error %{SOURCE1} printf '%%s %%s\n' 26b5c72394018b35c81cdd70af592f52030c8de2e4664722103751c1c73a6d45 \ drivers/firmware/qcom/qcom_scm.c | sha256sum --strict -c - printf '%%s %%s\n' 55ae25d1b7c8e561a546f5ff774c98b437d3e118052204236165a0a2faabaa72 \ %{SOURCE2} | sha256sum --strict -c - install -m0644 %{SOURCE2} include/linux/uke-rtc-policy.h git apply --check --whitespace=error %{PATCH1} %{PATCH2} git apply --whitespace=error %{PATCH1} %{PATCH2} git apply --reverse --check --whitespace=error %{PATCH2} %{PATCH1} %build set -euo pipefail cd linux-7.3.6 { printf 'upstream_linux=7.3.6\nbaseline_runtime=7.3.6-31-unstable\n' sha256sum %{SOURCE0} %{SOURCE1} %{SOURCE2} %{PATCH1} %{PATCH2} | awk '{sub(/^.*\//,"",$2); print}' clang --version | head -n 1 } > ../validation.txt for profile in normal no-call query-only; do out="$PWD/.check-$profile" mkdir -p "$out" cp %{SOURCE0} "$out/.config" if [[ $profile == no-call ]]; then scripts/config --file "$out/.config" --enable ARM64_UKE_EL_ENTRY_TRACE elif [[ $profile == query-only ]]; then scripts/config --file "$out/.config" --enable QCOM_SCM_UKE_EL2_QUERY fi make ARCH=arm64 LLVM=1 O="$out" olddefconfig grep -Fx 'CONFIG_KVM=y' "$out/.config" grep -Fx 'CONFIG_QCOM_SCM=y' "$out/.config" make -j2 ARCH=arm64 LLVM=1 O="$out" \ arch/arm64/kernel/head.o arch/arm64/kernel/smp.o \ drivers/firmware/qcom/qcom_scm.o llvm-objdump -D --section=.idmap.text "$out/arch/arm64/kernel/head.o" > "$out/head.asm" strings "$out/arch/arm64/kernel/smp.o" > "$out/smp.strings" strings "$out/drivers/firmware/qcom/qcom_scm.o" > "$out/scm.strings" if [[ $profile == no-call ]]; then grep -Fx 'CONFIG_ARM64_UKE_EL_ENTRY_TRACE=y' "$out/.config" test "$(grep -Eic 'mrs[[:space:]]+x25, (currentel|s3_0_c4_c2_2)' "$out/head.asm")" = 3 test "$(grep -Eic 'mrs[[:space:]]+x26, (mpidr_el1|s3_0_c0_c0_5)' "$out/head.asm")" = 3 grep -F 'UKE_EL_ENTRY version=1' "$out/smp.strings" else grep -Fx '# CONFIG_ARM64_UKE_EL_ENTRY_TRACE is not set' "$out/.config" ! grep -F 'UKE_EL_ENTRY version=1' "$out/smp.strings" fi if [[ $profile == query-only ]]; then grep -Fx 'CONFIG_QCOM_SCM_UKE_EL2_QUERY=y' "$out/.config" grep -F 'UKE_EL2_QUERY:' "$out/scm.strings" grep -Fx 'result0=null' "$out/scm.strings" else grep -Fx '# CONFIG_QCOM_SCM_UKE_EL2_QUERY is not set' "$out/.config" ! grep -F 'UKE_EL2_QUERY:' "$out/scm.strings" fi printf 'profile=%%s source_and_objects=pass\n' "$profile" >> ../validation.txt (cd "$out" && sha256sum .config arch/arm64/kernel/{head,smp}.o \ drivers/firmware/qcom/qcom_scm.o) >> ../validation.txt done %install install -Dm0644 validation.txt %{buildroot}%{_docdir}/%{name}/validation.txt %files %doc %{_docdir}/%{name}/validation.txt %changelog * Sat Nov 28 2026 Senemos Maintainers <75160848+MCC45TR@users.noreply.github.com> - 0.1.1-1 - Check SCM objects after replaying the accepted RTC and Keymaster layers. * Sat Nov 28 2026 Senemos Maintainers <75160848+MCC45TR@users.noreply.github.com> - 0.1.0-1 - Verify ARM64 boot entry capture and SCM INFO query objects.