Files
MemRelay/projects/bc51a377-ed2d-4afc-a176-554fce220d45/Checkpoint 2026-12-02 04-09-03 UTC [bd0f482c2e].md
T
memrelay 48c46cd073 create: Checkpoint 2026-12-02 04:09:03 UTC [bd0f482c2e]
MemRelay-Operation: checkpoint-save:checkpoint-boot-guard-packed-2026-12-02
MemRelay-Resource: fd997c09-26dd-4739-aacf-121d3e5d8ace
2026-12-02 12:09:15 +08:00

25 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Checkpoint 2026-12-02 04:09:03 UTC [bd0f482c2e]
type: checkpoint
permalink: main/projects/bc51a377-ed2d-4afc-a176-554fce220d45/checkpoint-2026-12-02-04-09-03-utc-bd0f482c2e
stable_id: fd997c09-26dd-4739-aacf-121d3e5d8ace
scope: project
memory_type: checkpoint
project_id: bc51a377-ed2d-4afc-a176-554fce220d45
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: checkpoint-boot-guard-packed-2026-12-02
created_at: '2026-12-02T04:09:03.811217+00:00'
updated_at: '2026-12-02T04:09:03.811217+00:00'
tags:
- boot
- initramfs
- flasher
---
完成:把启动校验打进当前 UFI003 boot.img 的 initramfs。静态程序 usr/bin/boot-guard(zig aarch64-linux-musl -static -Os,52560 字节),加上 scripts/local-top 目录、ORDER 和 board-check。ORDER 在 init 进程里 source 脚本,记录对不上时用原 initramfs 找不到根分区的文案 panic。没有记录或读不到 devinfo 则放行。
产物:flasher/devices/UFI003_MB_V02/images/boot.img 和 dist/UFI003_MB_V02_Flasher 里的同名文件都已替换,19054592 字节,内核字节与原包一致,SHA1 头已重算,小于 rootfs 之前的 68157440 字节上限。原包备份在 Temp/boot.img.before-guard。镜像被 gitignore,没有提交,也没有刷板。
验证:主机 HMAC 与 mifipanel imei_tag("abc", "07e6697d") 一致;解包确认脚本是 LF、伪装文案在、程序是无动态链接器的 aarch64 ELF,/bin 仍指向 usr/bin。
问题:build-image.sh 还不会主动编译注入。用当前这份 boot.img 当底包时,重打 ramdisk 会保留这些文件;从 Release 原包重做会丢掉。
给下个会话:用户自己刷板测试。新板没有 imei_check 时应该正常启动;写上本机记录后再启动也应该正常;只有记录对不上才会在 ttyMSM0 115200 看到假的根分区报错并停在 (initramfs)。源码未提交:boot-guard/ 新目录,imei.rs 多了一个标记对照测试,flasher/src/adb.rs 和 main.rs 还有之前的 ADB 序列号监听改动。不要提交 images,不要把校验材料写进记忆。板子 093151a4 不要动。