S75 · SOURCE-BOUND GATE EVIDENCE
G8f UART10 capture aracı ve gerçek-port ön kontrolü hazırlandı
Operations komutu/kapı ailesi → gerçek repository yürütme sözleşmesi Bu sayfa yalnız S75 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S75Komut / fiziksel sözleşmeOperations id exactsource SHA exact
operation: rpi5-g8f-uart10-capture-prepared
script/Makefile/config · Operations · 2 exact excerpt
sequence-bound=true · implementation-bound=false
01 · Yürütme sözleşmesi
Gerçek script / Makefile / config kaynağı
tam dosyaL1–L240
scripts/capture-rpi5-g8f-uart10.c::capture-rpi5-g8f-uart10.c
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
static volatile sig_atomic_t stop_requested = 0;
static void request_stop(int signo) {
(void)signo;
stop_requested = 1;
}
static double monotonic_seconds(void) {
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) {
perror("clock_gettime");
exit(2);
}
return (double)ts.tv_sec + (double)ts.tv_nsec / 1000000000.0;
}
static void write_all(int fd, const uint8_t *buf, size_t len) {
while (len != 0) {
ssize_t written = write(fd, buf, len);
if (written < 0) {
if (errno == EINTR) {
continue;
}
perror("write raw capture");
exit(2);
}
buf += (size_t)written;
len -= (size_t)written;
}
}
int main(int argc, char **argv) {
if (argc != 3) {
fprintf(stderr, "usage: %s DEVICE OUTPUT\n", argv[0]);
return 2;
}
const char *device = argv[1];
const char *output = argv[2];
const char terminal_marker[] = "ASELSAN/BOOT8F ";
const size_t marker_len = sizeof(terminal_marker) - 1;
size_t marker_progress = 0;
bool terminal_seen = false;
double terminal_seen_at = 0.0;
signal(SIGINT, request_stop);
signal(SIGTERM, request_stop);
int serial_fd = open(device, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (serial_fd < 0) {
perror("open serial device");
return 2;
}
struct termios settings;
if (tcgetattr(serial_fd, &settings) != 0) {
perror("tcgetattr before configure");
close(serial_fd);
return 2;
}
cfmakeraw(&settings);
settings.c_cflag &= (tcflag_t)~(PARENB | CSTOPB | CSIZE);
settings.c_cflag |= CS8 | CLOCAL | CREAD;
#ifdef CRTSCTS
settings.c_cflag &= (tcflag_t)~CRTSCTS;
#endif
settings.c_iflag &= (tcflag_t)~(IXON | IXOFF | IXANY);
settings.c_cc[VMIN] = 0;
settings.c_cc[VTIME] = 0;
if (cfsetispeed(&settings, B115200) != 0 ||
cfsetospeed(&settings, B115200) != 0) {
perror("cfset speed");
close(serial_fd);
return 2;
}
if (tcsetattr(serial_fd, TCSANOW, &settings) != 0) {
perror("tcsetattr");
close(serial_fd);
return 2;
}
struct termios effective;
if (tcgetattr(serial_fd, &effective) != 0) {
perror("tcgetattr after configure");
close(serial_fd);
return 2;
}
bool raw_ok = (effective.c_lflag & (ICANON | ECHO | ISIG | IEXTEN)) == 0 &&
(effective.c_oflag & OPOST) == 0;
bool bits_ok = (effective.c_cflag & CSIZE) == CS8 &&
(effective.c_cflag & (PARENB | CSTOPB)) == 0;
bool flow_ok = (effective.c_iflag & (IXON | IXOFF | IXANY)) == 0;
#ifdef CRTSCTS
flow_ok = flow_ok && (effective.c_cflag & CRTSCTS) == 0;
#endif
bool speed_ok = cfgetispeed(&effective) == B115200 &&
cfgetospeed(&effective) == B115200;
if (!raw_ok || !bits_ok || !flow_ok || !speed_ok) {
fprintf(stderr,
"effective termios mismatch raw=%s bits8n1=%s flow_off=%s speed=%s\n",
raw_ok ? "true" : "false",
bits_ok ? "true" : "false",
flow_ok ? "true" : "false",
speed_ok ? "true" : "false");
close(serial_fd);
return 2;
}
if (tcflush(serial_fd, TCIFLUSH) != 0) {
perror("tcflush TCIFLUSH");
close(serial_fd);
return 2;
}
int output_fd = open(output, O_WRONLY | O_CREAT | O_EXCL, 0600);
if (output_fd < 0) {
perror("open raw output");
close(serial_fd);
return 2;
}
printf("device=%s\n", device);
printf("same_descriptor=true fd=%d\n", serial_fd);
printf("effective_baud_115200=true ispeed=%lu ospeed=%lu\n",
(unsigned long)cfgetispeed(&effective),
(unsigned long)cfgetospeed(&effective));
printf("format=8N1 raw=true flow_control=false\n");
printf("input_flushed=true method=TCIFLUSH\n");
printf("capture_path=%s\n", output);
printf("capture_armed=YES\n");
fflush(stdout);
const double started_at = monotonic_seconds();
uint64_t total_bytes = 0;
uint8_t buffer[4096];
int result = 0;
while (!stop_requested) {
double now = monotonic_seconds();
if (terminal_seen && now - terminal_seen_at >= 3.0) {
printf("terminal_grace_complete=true\n");
break;
}
if (now - started_at >= 3600.0) {
fprintf(stderr, "capture_timeout=YES elapsed_seconds=3600\n");
result = 3;
break;
}
struct pollfd pfd = {.fd = serial_fd, .events = POLLIN, .revents = 0};
int polled = poll(&pfd, 1, 250);
if (polled < 0) {
if (errno == EINTR) {
continue;
}
perror("poll serial");
result = 2;
break;
}
if (polled == 0) {
continue;
}
if ((pfd.revents & (POLLERR | POLLNVAL)) != 0) {
fprintf(stderr, "serial poll failure revents=0x%x\n", pfd.revents);
result = 2;
break;
}
for (;;) {
ssize_t got = read(serial_fd, buffer, sizeof(buffer));
if (got < 0) {
if (errno == EINTR) {
continue;
}
if (errno == EAGAIN || errno == EWOULDBLOCK) {
break;
}
perror("read serial");
result = 2;
stop_requested = 1;
break;
}
if (got == 0) {
break;
}
write_all(output_fd, buffer, (size_t)got);
total_bytes += (uint64_t)got;
for (ssize_t i = 0; i < got && !terminal_seen; ++i) {
uint8_t byte = buffer[i];
if (byte == (uint8_t)terminal_marker[marker_progress]) {
marker_progress++;
if (marker_progress == marker_len) {
terminal_seen = true;
terminal_seen_at = monotonic_seconds();
printf("terminal_marker_seen=ASELSAN/BOOT8F bytes=%llu\n",
(unsigned long long)total_bytes);
fflush(stdout);
}
} else {
marker_progress = byte == (uint8_t)terminal_marker[0] ? 1 : 0;
}
}
}
}
if (fsync(output_fd) != 0) {
perror("fsync raw output");
result = 2;
}
if (fchmod(output_fd, 0444) != 0) {
perror("fchmod raw output");
result = 2;
}
close(output_fd);
close(serial_fd);
printf("capture_closed=true terminal_seen=%s exact_bytes=%llu mode=0444\n",
terminal_seen ? "true" : "false",
(unsigned long long)total_bytes);
fflush(stdout);
return result;
}
snippet sha256: 58e8fb940ad0…file sha256: 58e8fb940ad0…
02 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL30279–L30359
website/src/lib/operations.ts::rpi5-g8f-uart10-capture-prepared
{
id: "rpi5-g8f-uart10-capture-prepared",
date: "2026-08-21",
sequence: 75,
status: "verified",
title: "G8f UART10 capture aracı ve gerçek-port ön kontrolü hazırlandı",
summary:
"Sıra 74'ün reproducible BOOT8F paketi değiştirilmeden G8f fiziksel koşusuna ait UART10 capture aracı host üzerinde donduruldu. Kaynak warning-as-error ve O2 ile temiz yeniden derlendi; sonuç mevcut binary ile byte-for-byte eşleşti. Immutable G8e capture kaynağıyla normalize edilmiş karşılaştırmada yalnız beklenen iki BOOT8E→BOOT8F satırı farklı kaldı. Aynı descriptor üzerinde çalışan PTY provası stale input flush, effective 115200/8N1/raw/flow-off ayarları, 4096 bayt sınırını 7+8 parçayla aşan marker, grace süresi ve durable salt-okunur çıktı kapanışını doğruladı. Gerçek cu/tty UART descriptor çifti ile lsof-free durumu yalnız salt-okunur incelendi; cihaz açılmadı, yapılandırılmadı veya capture için arm edilmedi. Bu capture-prepared PASS'tir; microSD yazımı, gerçek UART capture veya fiziksel BOOT8F değildir.",
evidence: [
"G8f capture kaynağı `scripts/capture-rpi5-g8f-uart10.c` exact 7.244 B / 58e8fb940ad0b17adf3b895a13b844647e8524d99136874ef2b4bedc1ff23e90.",
"Host capture binary'si `build/tools/capture-rpi5-g8f-uart10` exact 35.112 B / 5e0f78f60b2ddb7ff5cf5d1c446cf17260cbde023f9ad6270524b74463cabedc.",
"`cc -Wall -Wextra -Werror -O2` temiz rebuild PASS verdi; yeniden üretilen binary mevcut dondurulmuş binary ile byte-for-byte cmp PASS oldu.",
"Immutable G8e capture kaynağına karşı normalize edilmiş source cmp PASS; fark yalnız iki beklenen BOOT8E→BOOT8F satırıdır.",
"PTY provası input ve output'u aynı descriptor üzerinde tuttu; başlangıçtaki stale input `TCIFLUSH` ile atıldı.",
"PTY effective seri ayarları 115200 baud, 8N1, raw ve flow-control off olarak geri okundu.",
"Adversarial PTY akışında marker'ın 7+8 baytlık parçaları 4096 bayt okuma sınırını aştı; parser marker'ı kaybetmeden tamamladı.",
"PTY capture exact 4.151 B üretti; marker sonrası grace exact 3,014 saniye sürdü ve kapanış `fsync` → `fchmod 0444` → `close` sırasıyla temiz tamamlandı.",
"Gerçek `/dev/cu.usbmodem214402` ve `/dev/tty.usbmodem214402` aynı IOSerialBSD descriptor çiftine çözüldü; lsof kontrolü portun boş olduğunu gösterdi.",
"Gerçek UART cihazı bu hazırlık adımında açılmadı, termios ile yapılandırılmadı, flush edilmedi ve capture için arm edilmedi.",
],
terminalSessionsNote:
"Oturumlar gerçek host rebuild/cmp, pseudo-terminal sınır provası ve salt-okunur gerçek-port ön kontrolünün seçilmiş çıktılarıdır. PTY sonucu fiziksel UART kanıtı değildir.",
terminalSessions: [
{
id: "g8f-capture-clean-rebuild-and-baseline",
title: "Capture helper temiz rebuild ve immutable G8e karşılaştırması",
commandLines: [
"cc -Wall -Wextra -Werror -O2 scripts/capture-rpi5-g8f-uart10.c -o clean-room capture binary",
"compare clean rebuild with build/tools/capture-rpi5-g8f-uart10 byte-for-byte",
"normalize only the two BOOT8E/BOOT8F lines and compare against the immutable G8e capture source",
],
outputLines: [
"source=7244 B · 58e8fb940ad0b17adf3b895a13b844647e8524d99136874ef2b4bedc1ff23e90",
"binary=35112 B · 5e0f78f60b2ddb7ff5cf5d1c446cf17260cbde023f9ad6270524b74463cabedc",
"Werror O2 clean rebuild=PASS · binary cmp=PASS",
"normalized G8e source cmp=PASS · only two BOOT8E→BOOT8F lines differ",
],
exitCode: 0,
outputMode: "complete",
},
{
id: "g8f-capture-pty-boundary-proof",
title: "Same-descriptor PTY, 4096 sınır marker'ı ve durable close",
commandLines: [
"run the G8f UART10 capture helper against the adversarial PTY harness",
"verify effective serial settings, boundary-spanning marker and grace interval",
"verify exact output bytes and read-only close state",
],
outputLines: [
"same descriptor=YES · stale input=TCIFLUSH · effective=115200/8N1/raw/flow-off",
"marker split=7+8 across 4096-byte boundary · detected=YES",
"capture=4151 exact bytes · grace=3.014 s",
"fsync=PASS · fchmod=0444 · close=clean",
],
exitCode: 0,
outputMode: "complete",
},
{
id: "g8f-real-uart-read-only-preflight",
title: "Gerçek cu/tty descriptor çifti salt-okunur ön kontrolü",
commandLines: [
"inspect the cu/tty usbmodem214402 IOSerialBSD descriptor pair without opening it",
"lsof /dev/cu.usbmodem214402 /dev/tty.usbmodem214402",
],
outputLines: [
"cu/tty pair=present · IOSerialBSD descriptor=same",
"lsof=free",
"real device opened=NO · configured=NO · flushed=NO · capture armed=NO",
],
exitCode: 0,
outputMode: "complete",
},
],
limitations: [
"Bu host capture-tool ve PTY/preflight PASS'tir; pseudo-terminal fiziksel UART veya BOOT8F kanıtı değildir.",
"Gerçek UART cihazı açılmadı, yapılandırılmadı veya arm edilmedi; gerçek capture ve strict BOOT8F validator sonucu yoktur.",
"MicroSD yazımı/read-back yapılmadı ve RPi5 fiziksel G8F0/G8F1/BOOT8F koşusu başlatılmadı.",
"Website yayını yalnız canonical custom domain üzerinden doğrulanır; bu ortamda pages.dev direct smoke için başarı iddia edilmez.",
"Wrangler yayını dirty/untracked workspace'ten ve stale 47d22c9 source etiketiyle yapılır; canlı artifact hash'i doğrulansa da Git-provider provenance kurulmuş sayılmaz.",
],
},snippet sha256: f70daae1bb5c…file sha256: 9726dbf00f84…
Kayıtlı yürütme/kanıt komutu
cc -Wall -Wextra -Werror -O2 scripts/capture-rpi5-g8f-uart10.c -o clean-room capture binaryRegistry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06