ASELSANMicrokernel
S69 · SOURCE-BOUND GATE EVIDENCE

Exact G8e kartı güçsüz Pi'de; aynı-descriptor UART10 capture arm edildi

S69 UART capture kapısı → kendi G8E same-descriptor helper kodu Bu sayfa yalnız S69 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.

S69Komut / fiziksel sözleşmeOperations id exactsource SHA exact

operation: rpi5-g8e-uart10-capture-armed

script/Makefile/config · Operations · 2 exact excerpt

sequence-bound=true · implementation-bound=false
01 · Yürütme / doğrulama kodu

Kapının gerçek repository sözleşmesi

tam C fonksiyonuL47–L239
scripts/capture-rpi5-g8e-uart10.c::main
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/BOOT8E ";
    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/BOOT8E 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: 890043a25d06file sha256: 1c2abec9497f
02 · Kapı kimlik kaydı

Operations sıra, kimlik ve başlık bağı

tam Operations kaydıL30808–L30855
website/src/lib/operations.ts::rpi5-g8e-uart10-capture-armed
  {
    id: "rpi5-g8e-uart10-capture-armed",
    date: "2026-08-21",
    sequence: 69,
    status: "partial",
    title:
      "Exact G8e kartı güçsüz Pi'de; aynı-descriptor UART10 capture arm edildi",
    summary:
      "Kullanıcı exact G8e kartını güçsüz Pi'ye taktı. Mac'te disk6/ASELSANBOOT yokluğu, G8e helper source/binary hashleri ve boş UART descriptor yeniden doğrulandı. Helper `/dev/cu.usbmodem214402` aygıtını yalnız bir kez açtı; aynı fd üzerinde effective 115200/8N1 raw, flow-control off değerlerini okudu ve TCIFLUSH uyguladıktan sonra immutable raw dosyasını oluşturup `capture_armed=YES` yayımladı. Capture session açık kalıyor ve Pi hâlâ güçsüzdür. Güç ancak bu kayıt canlıya çıktıktan sonra kullanıcı kontrollü verilecektir; henüz gerçek G8e marker'ı veya fiziksel PASS yoktur.",
    evidence: [
      "G8e helper source 1c2abec9497f5507f9ddc5900b9e568b9a1de9cd57515d863f0172d0f6733214 ve binary 638b1fec90352bca9df027cf889d2631206be166cf6ba9f4c70c4ea710ae9e8f hash kapıları yeniden PASS verdi.",
      "/dev/cu.usbmodem214402 ve /dev/tty.usbmodem214402 aynı pair olarak mevcut, arm öncesi lsof holder-free; Mac'te /dev/disk6 ile /Volumes/ASELSANBOOT absent PASS verdi.",
      "Helper gerçek `/dev/cu.usbmodem214402` descriptor'ını tek kez açtı: `same_descriptor=true fd=3`.",
      "Effective read-back exact `ispeed=115200 ospeed=115200`, `format=8N1 raw=true flow_control=false` verdi.",
      "Aynı açık descriptor üzerinde `input_flushed=true method=TCIFLUSH` ve ardından `capture_armed=YES` yayımlandı.",
      "Raw path `/var/folders/lm/x3tmtzs943x9tbzkpv7gf8hr0000gn/T/aselsanos-g8e-uart10.iHoKYNthpP/uart10.raw`; arm anında mode 0600 ve yalnız bir leading 0x00 baytı içeriyordu.",
      "Capture process PID 55391 descriptor fd=3'ü açık tutuyor; terminal marker `ASELSAN/BOOT8E ` görülene kadar veya fail-closed timeout/signal gelene kadar session devam ediyor.",
    ],
    terminalSessionsNote:
      "Bu oturum gerçek UART arm çıktısıdır, boot transkripti değildir. Raw henüz açık/mutable olduğu için hash veya fiziksel kabul iddia edilmez.",
    terminalSessions: [
      {
        id: "g8e-uart10-real-arm",
        title: "Güç verilmeden önce gerçek same-descriptor capture arm",
        commandLines: [
          "verify helper hashes, usbmodem pair free, and SD absent from Mac",
          "build/tools/capture-rpi5-g8e-uart10 /dev/cu.usbmodem214402 <fresh-exclusive-raw>",
          "lsof descriptor and inspect open raw prefix",
        ],
        outputLines: [
          "helper source/binary hash=PASS · UART free=PASS · SD absent from Mac=PASS",
          "same_descriptor=true fd=3",
          "effective_baud_115200=true · format=8N1 raw=true flow_control=false",
          "input_flushed=true method=TCIFLUSH",
          "capture_armed=YES · raw mode=0600 · current prefix=00",
        ],
        exitCode: 0,
        outputMode: "complete",
      },
    ],
    limitations: [
      "Pi'ye henüz güç verilmedi; raw açık ve mutable olduğu için immutable capture hash'i yoktur.",
      "G8E0/G8E1/G8E2/BOOT8E marker'ları görülmedi ve strict validator çalıştırılmadı; capture arm fiziksel PASS değildir.",
      "UART descriptor capture process tarafından bilinçli olarak tutuluyor; başka serial program açılmamalıdır.",
      "Website yayını canonical custom domain üzerinden doğrulanır; bu ortamda reset veren 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: b7511151cc5efile sha256: 9726dbf00f84
Kayıtlı yürütme/kanıt komutu
verify helper hashes, usbmodem pair free, and SD absent from Mac
Registry schema v5 · generator website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06