Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c89cc1d
ci: add audited 4.14.291 source materializer
KAI-Miru Jul 31, 2026
4e42642
ci: fix unsupported 4.14.291 source identity gate
KAI-Miru Jul 31, 2026
b05b1fc
ci: force-stage audited source workflow correction
KAI-Miru Jul 31, 2026
2b9c792
ci: correct and trace 4.14.291 source identity gates
KAI-Miru Jul 31, 2026
b275e89
ci: validate FDT boundary by ancestry instead of sublevel
KAI-Miru Jul 31, 2026
2ef1e62
ci: retire failed 4.14.305-based source materializer
KAI-Miru Jul 31, 2026
ec48e0a
ci: remove obsolete source workflow fixer
KAI-Miru Jul 31, 2026
2c8db98
ci: materialize 4.14.291 from proven 4.14.283 scaffold
KAI-Miru Jul 31, 2026
544f64b
ci: route 4.14.291 source preparation through the single PR workflow
KAI-Miru Jul 31, 2026
be43671
ci: remove duplicate 4.14.291 preparation workflow path
KAI-Miru Jul 31, 2026
3d00b2a
ci: resolve exact 4.14.291 source from audited references
KAI-Miru Jul 31, 2026
12f487f
ci: remove irrelevant common merge first-parent gate
KAI-Miru Jul 31, 2026
04245ba
ci: downgrade audited Miru conflict blobs to exact 4.14.291
KAI-Miru Jul 31, 2026
5838c8c
ci: add audited 4.14.291 source resolver
KAI-Miru Jul 31, 2026
9b21cde
ci: resolve exact 4.14.291 xHCI downgrade
KAI-Miru Jul 31, 2026
5a8c9de
ci: materialize corrected 4.14.291 notifier source
KAI-Miru Jul 31, 2026
15dabe0
ci: restore 4.14.291 vendor DDR helper source
KAI-Miru Jul 31, 2026
3c16cce
ci: isolate 4.14.291 DDR helper source repair
KAI-Miru Jul 31, 2026
71787e5
diag: add guarded 4.14.287 source materializer
KAI-Miru Jul 31, 2026
6a11ab4
diag: materialize guarded Linux 4.14.287 midpoint source
KAI-Miru Jul 31, 2026
0952702
diag: resolve audited 4.14.287 vendor overlaps
KAI-Miru Jul 31, 2026
e958191
diag: admit exact upstream 4.14.287 signal whitespace
KAI-Miru Jul 31, 2026
0738c7b
diag: define exact 4.14.287 tree ownership
KAI-Miru Jul 31, 2026
f85dad1
diag: add guarded 4.14.287 candidate materializer
KAI-Miru Jul 31, 2026
d3a2c37
diag: materialize guarded 4.14.287 build candidate
KAI-Miru Jul 31, 2026
2757f1b
diag: force-stage candidate workflow path
KAI-Miru Jul 31, 2026
31d29ef
diag: correct all 4.14.287 workflow identity gates
KAI-Miru Jul 31, 2026
1992d31
diag: match escaped 4.14.287 release semantically
KAI-Miru Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
271 changes: 54 additions & 217 deletions .github/workflows/miru-h40-build.yml
Original file line number Diff line number Diff line change
@@ -1,245 +1,82 @@
name: Miru H.40 4.14.269 kernel and external modules
name: Miru H.40 Linux 4.14.287 diagnostic candidate materialization

on:
push:
branches:
- miru-h40
pull_request:
branches:
- miru-h40
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
branches: [miru-h40]
types: [opened, reopened, synchronize]

permissions:
contents: read
contents: write

concurrency:
group: miru-h40-lts287-candidate-diag26-${{ github.event.pull_request.number }}
cancel-in-progress: false

env:
PRODUCTION_BASE: 4394ccbfa3805ce392b65b3ea148ff1eb084a974
ANDROID_STABLE_TARGET: 0eec6f6001d15bb1108835a642ec4637d75eef19
VENDOR_SHA: 125ff7d0153cbb3aaa8f9fd618c33b7f728d7798
EXPECTED_RELEASE: 4.14.269-miru-h40-lts269-14d41d8-ci3+
MAKEFILE_BUILD_269_BLOB: ee3b37a3bf6a586b74fe00f9e39ca5e77f08b6d3
PRODUCTION_SHA: 61371a1024e341f434deaf61b79a05f73827260a
SOURCE_SHA: 705dd8a9d1e74a896a28d1a3efd6ff30fcc4e3b4
SOURCE_BRANCH: miru-h40-lts287-source-diag26
STABLE_287_SHA: 1048779a1d7dcf0b5c150188decafa21c19821e4
DIAG25_HEAD: eb04d54f581da4257a331a816444bd6fe88b1ae1
TARGET_BRANCH: miru-h40-lts287-full287-extconfix-diag26
FIXED_EXTCON_BLOB: 3643c82ca1532c62d5596cff8e05878a4d52543f
EARLY_RANDOM_BLOB: c498b09b1b36b6cc9d34a16b08422e9299bc4a02

jobs:
production-kernel-and-modules:
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
materialize-candidate:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
timeout-minutes: 180

timeout-minutes: 30
steps:
- name: Checkout requested 4.14.269 revision
- name: Checkout exact preparation head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0

- name: Verify 4.14.269 source, ancestry, and device fixes
shell: bash
run: |
set -Eeuo pipefail
git fetch --no-tags --depth=1 origin "${PRODUCTION_BASE}"
git fetch --no-tags --depth=1 origin "${ANDROID_STABLE_TARGET}"
git merge-base --is-ancestor "${PRODUCTION_BASE}" HEAD
git merge-base --is-ancestor "${ANDROID_STABLE_TARGET}" HEAD
git diff --check "${PRODUCTION_BASE}" HEAD
test -z "$(git ls-files -u)"
test "$(sed -n 's/^SUBLEVEL = //p' Makefile | head -n1)" = "269"
grep -Fq -- '- Semantically resolved conflicts: **22**' Documentation/miru/lts-4.14.269-conflicts.md
grep -Fq -- '- Remaining semantic conflicts: **0**' Documentation/miru/lts-4.14.269-conflicts.md
if git grep -nE '^(<<<<<<< .+|>>>>>>> .+)$' -- . \
':!Documentation/miru/lts-4.14.269-conflicts.md' \
> source-conflict-markers.txt; then
cat source-conflict-markers.txt
exit 1
else
: > source-conflict-markers.txt
fi
qrtr_fn="$(sed -n '/int qrtr_endpoint_post(/,/EXPORT_SYMBOL_GPL(qrtr_endpoint_post);/p' net/qrtr/qrtr.c)"
test "$(printf '%s\n' "${qrtr_fn}" | grep -c 'alloc_skb_with_frags(')" = 1
test "$(printf '%s\n' "${qrtr_fn}" | grep -c 'qrtr_get_backup(len)')" = 1
! printf '%s\n' "${qrtr_fn}" | grep -Fq '__netdev_alloc_skb(NULL, len'
grep -Fq 'qcom_glink_rx_advance(glink, ALIGN(msglen, 8));' drivers/rpmsg/qcom_glink_native.c
irq_fn="$(sed -n '/static irqreturn_t qcom_glink_native_intr/,/return IRQ_HANDLED;/p' drivers/rpmsg/qcom_glink_native.c)"
! printf '%s\n' "${irq_fn}" | grep -Fq 'if (ret == -ENOENT)'
{
echo "result=PASS"
echo "source_head=$(git rev-parse HEAD)"
echo "production_base=${PRODUCTION_BASE}"
echo "android_stable_target=${ANDROID_STABLE_TARGET}"
echo "expected_release=${EXPECTED_RELEASE}"
echo "qrtr_second_allocation=absent"
echo "glink_missing_channel_fifo_advance=present"
echo "glink_enoent_normalization=absent"
} | tee source-validation.txt
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
persist-credentials: true

- name: Prepare pinned 4.14.269 build driver
- name: Materialize audited 4.14.287 candidate
shell: bash
run: |
set -Eeuo pipefail
python3 scripts/miru/prepare_vendor_v6_linewise.py
python3 scripts/miru/inject_vendor_compat_v3_into_ci_build.py
sed -i 's/apply_vendor_lts190_compat_v3.py/apply_vendor_lts190_compat_v6.py/' \
scripts/miru/ci_build_4.14.190.sh
python3 scripts/miru/insert_vendor_format_fixer.py
python3 - <<'PY'
from pathlib import Path

path = Path('scripts/miru/ci_build_4.14.190.sh')
text = path.read_text()

def one(old, new):
global text
if old not in text:
raise SystemExit(f'missing expected build-driver text: {old}')
text = text.replace(old, new, 1)

one('BASE_SHA=59858c8f798778f4e6c1c4449baba631e353600e', 'BASE_SHA=4394ccbfa3805ce392b65b3ea148ff1eb084a974')
one('STABLE_SHA=d2d05bcf4b4edf8d028fa420dee3c6644aa5b4ac', 'STABLE_SHA=0eec6f6001d15bb1108835a642ec4637d75eef19')
one("':!Documentation/miru/lts-4.14.190-conflicts.md'", "':!Documentation/miru/lts-4.14.269-conflicts.md'")
one('test "$(sed -n \'s/^SUBLEVEL = //p\' Makefile | head -n1)" = "190"', 'test "$(sed -n \'s/^SUBLEVEL = //p\' Makefile | head -n1)" = "269"')
one("grep -Fq -- '- Resolved conflicts: 28' Documentation/miru/lts-4.14.190-conflicts.md", "grep -Fq -- '- Semantically resolved conflicts: **22**' Documentation/miru/lts-4.14.269-conflicts.md")
one("grep -Fq -- '- Remaining conflicts: 0' Documentation/miru/lts-4.14.190-conflicts.md", "grep -Fq -- '- Remaining semantic conflicts: **0**' Documentation/miru/lts-4.14.269-conflicts.md")
one('echo "== Miru H.40 Android 4.14.190 CI build =="', 'echo "== Miru H.40 Android 4.14.269 production candidate build =="')
one('echo "kernel_version=4.14.190"', 'echo "kernel_version=4.14.269"')
one('echo "conflicts=28/28 resolved"', 'echo "conflicts=22/22 resolved"')
one('export KERNEL_LOCALVERSION=-miru-h40-lts190-ci1', 'export KERNEL_LOCALVERSION=-miru-h40-lts269-14d41d8-ci3')
one("grep -Fq 'CONFIG_LOCALVERSION=\"-miru-h40-lts190-ci1\"' \"${OUT_DIR}/.config\"", "grep -Fq 'CONFIG_LOCALVERSION=\"-miru-h40-lts269-14d41d8-ci3\"' \"${OUT_DIR}/.config\"")
one("grep -m1 '^Linux version 4\\.14\\.190-'", "grep -m1 '^Linux version 4\\.14\\.269-'")
one('git fetch --no-tags --depth=1 origin "${SCAFFOLD_SHA}"\n', '')
one('rm -rf "${ANDROID_ROOT}" "${VENDOR_SOURCE}"', 'rm -rf "${ANDROID_ROOT}" "${VENDOR_SOURCE}"\ngit worktree prune')
old = '''git cat-file -p "${SCAFFOLD_SHA}" > "${DIAG_DIR}/merge-scaffold.txt"
test "$(grep -c '^parent ' "${DIAG_DIR}/merge-scaffold.txt")" = "2"
grep -Fq "parent ${STABLE_SHA}" "${DIAG_DIR}/merge-scaffold.txt"'''
new = '''git merge-base --is-ancestor "${BASE_SHA}" HEAD
git merge-base --is-ancestor "${STABLE_SHA}" HEAD
{
echo "integration_base=${BASE_SHA}"
echo "stable_parent=${STABLE_SHA}"
git log -1 --format='head=%H%nparents=%P%nsubject=%s' HEAD
} > "${DIAG_DIR}/merge-scaffold.txt"'''
one(old, new)
path.write_text(text)
p = Path('scripts/miru/materialize_4.14.287_diag26_candidate.sh')
s = p.read_text()

old_add = 'git -C "${wt}" add -- .github/workflows/miru-h40-build.yml drivers/extcon/extcon.c drivers/soc/qcom/early_random.c\n'
new_add = '''git -C "${wt}" add -- drivers/extcon/extcon.c drivers/soc/qcom/early_random.c
git -C "${wt}" add -f -- .github/workflows/miru-h40-build.yml
'''
if s.count(old_add) != 1:
raise SystemExit(f'unexpected candidate add marker count: {s.count(old_add)}')
s = s.replace(old_add, new_add, 1)

marker = "for stale in ('a79859d15ae0025897791a77654bcebeedc708ab',"
identity_fix = '''if s.count(' = 291') != 2:
raise SystemExit(f'unexpected bare sublevel count: {s.count(" = 291")}')
s = s.replace(' = 291', ' = 287')
if s.count(' = "291"') != 1:
raise SystemExit(f'unexpected quoted sublevel count: {s.count(chr(32) + "= \\\"291\\\"")}')
s = s.replace(' = "291"', ' = "287"')
if s.count('291-miru-h40-diag26') != 1:
raise SystemExit(f'unexpected release-token count: {s.count("291-miru-h40-diag26")}')
s = s.replace('291-miru-h40-diag26', '287-miru-h40-diag26')
'''
if s.count(marker) != 1:
raise SystemExit(f'unexpected stale-token marker count: {s.count(marker)}')
s = s.replace(marker, identity_fix + marker, 1)
p.write_text(s)
PY
grep -Fq 'kernel_version=4.14.269' scripts/miru/ci_build_4.14.190.sh
grep -Fq 'KERNEL_LOCALVERSION=-miru-h40-lts269-14d41d8-ci3' scripts/miru/ci_build_4.14.190.sh
bash scripts/miru/materialize_4.14.287_diag26_candidate.sh

- name: Build and validate the 4.14.269 kernel
shell: bash
run: |
set -Eeuo pipefail
bash scripts/miru/ci_build_4.14.190.sh
grep -Fq 'result=SUCCESS' build-diagnostics/build-summary.txt
grep -Fq "head=$(git rev-parse HEAD)" build-diagnostics/build-summary.txt
grep -Fq "banner=Linux version ${EXPECTED_RELEASE}" build-diagnostics/build-summary.txt

- name: Build and ABI-validate exactly 32 matching external modules
shell: bash
run: |
set -Eeuo pipefail
python3 scripts/miru/prepare_external_modules_toolchain.py
python3 scripts/miru/prepare_external_pinctrl_headers.py
python3 scripts/miru/prepare_wlan_response_link.py
python3 - <<'PY'
from pathlib import Path

path = Path('scripts/miru/build_external_modules_4.14.190.sh')
text = path.read_text()
old_release = '4.14.190-miru-h40-lts190-ci1+'
new_release = '4.14.269-miru-h40-lts269-14d41d8-ci3+'
old_hash = 'expected = "74ce588c69513197a354ef0032c2145e91ee0641"'
new_hash = 'expected = "ee3b37a3bf6a586b74fe00f9e39ca5e77f08b6d3"'
if old_release not in text:
raise SystemExit('missing old external-module release gate')
if old_hash not in text:
raise SystemExit('missing 4.14.190 Makefile.build integrity hash')
text = text.replace(old_release, new_release, 1)
text = text.replace(old_hash, new_hash, 1)
text = text.replace('4.14.190', '4.14.269').replace('lts190', 'lts269-14d41d8-ci3')
path.write_text(text)
PY
test "$(git -C "${RUNNER_TEMP}/android-root/kernel/msm-4.14" hash-object scripts/Makefile.build)" = "${MAKEFILE_BUILD_269_BLOB}"
bash scripts/miru/build_external_modules_4.14.190.sh
test "$(find "${RUNNER_TEMP}/miru-external-modules/dropin" -maxdepth 1 -type f -name '*.ko' | wc -l)" = 32
grep -Fq 'errors=0' external-module-diagnostics/MODULE-ABI-REPORT.txt
test "$(grep -F ": ${EXPECTED_RELEASE} SMP preempt mod_unload modversions aarch64" external-module-diagnostics/vermagic.txt | wc -l)" = 32

- name: Assemble checksums and validation summary
shell: bash
run: |
set -Eeuo pipefail
KERNEL_DIR="${RUNNER_TEMP}/android-root/kernel/msm-4.14"
OUT_DIR="${RUNNER_TEMP}/android-root/out/h40-kernel"
MODULE_DIR="${RUNNER_TEMP}/miru-external-modules/dropin"
KERNEL_RELEASE="$(tr -d '\n' < "${OUT_DIR}/include/config/kernel.release")"
test "${KERNEL_RELEASE}" = "${EXPECTED_RELEASE}"
MODULE_COUNT="$(find "${MODULE_DIR}" -maxdepth 1 -type f -name '*.ko' | wc -l)"
test "${MODULE_COUNT}" = 32
grep -Fq 'errors=0' external-module-diagnostics/MODULE-ABI-REPORT.txt
mkdir -p final-report
{
echo "result=SUCCESS"
echo "source_head=$(git rev-parse HEAD)"
echo "production_base=${PRODUCTION_BASE}"
echo "android_stable_target=${ANDROID_STABLE_TARGET}"
echo "vendor_source_commit=${VENDOR_SHA}"
echo "kernel_release=${KERNEL_RELEASE}"
echo "vermagic=${EXPECTED_RELEASE} SMP preempt mod_unload modversions aarch64"
echo "module_count=${MODULE_COUNT}"
echo "module_abi_errors=0"
echo "makefile_build_blob=${MAKEFILE_BUILD_269_BLOB}"
echo "run_id=${GITHUB_RUN_ID}"
echo "run_url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
} | tee final-report/VALIDATION-SUMMARY.txt
cp source-validation.txt final-report/
cp build-diagnostics/build-summary.txt final-report/KERNEL-BUILD-SUMMARY.txt
cp external-module-diagnostics/MODULE-ABI-REPORT.txt final-report/
cp external-module-diagnostics/BUILD-MANIFEST.txt final-report/MODULE-BUILD-MANIFEST.txt
cp external-module-diagnostics/PACKAGE-SUMMARY.txt final-report/MODULE-PACKAGE-SUMMARY.txt
find "${RUNNER_TEMP}/android-root/out/h40-artifacts" -type f -print0 | sort -z | xargs -0 sha256sum > final-report/KERNEL-FILES-SHA256.txt
find "${MODULE_DIR}" -type f -print0 | sort -z | xargs -0 sha256sum > final-report/MODULE-FILES-SHA256.txt
sha256sum \
"${RUNNER_TEMP}/android-root/out/miru-v3-modules-dropin-4.14.269.7z" \
"${RUNNER_TEMP}/android-root/out/miru-v3-modules-dropin-4.14.269-audit.zip" \
> final-report/MODULE-PACKAGES-SHA256.txt

- name: Upload kernel output
if: always()
uses: actions/upload-artifact@v4
with:
name: miru-h40-lts-4.14.269-ci3-build
path: ${{ runner.temp }}/android-root/out/h40-artifacts
if-no-files-found: warn
compression-level: 0
retention-days: 30

- name: Upload matching external-module package
- name: Upload candidate materialization evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: miru-v3-modules-dropin-4.14.269-ci3
path: |
${{ runner.temp }}/android-root/out/miru-v3-modules-dropin-4.14.269.7z
${{ runner.temp }}/android-root/out/miru-v3-modules-dropin-4.14.269-audit.zip
name: miru-h40-lts287-candidate-diag26-evidence
path: candidate-287-evidence/
if-no-files-found: warn
compression-level: 0
retention-days: 30

- name: Upload kernel, module, ABI, and checksum diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: miru-h40-lts-4.14.269-ci3-diagnostics
path: |
build-diagnostics
external-module-diagnostics
final-report
source-conflict-markers.txt
source-validation.txt
if-no-files-found: warn
retention-days: 30
Loading
Loading