[FEATURE] Stream partition payloads into GPT image files #8

Open
opened 2026-10-24 11:42:06 +02:00 by erikinkinen · 1 comment
Owner

Problem and motivation

The image recipe writes formatted partition files into an existing disk image with dd. Native image assembly needs a file-only path that streams those payloads without allocating a complete image or acquiring device and mount authority.

Proposed behavior and scope

Extend boot-tool gpt-create with explicitly indexed partition files, byte lengths and SHA-512 digests. Prepare the complete output layout before native authority binding. Stream metadata, zero gaps and selected payloads through one publication on Linux and EriX; require exact input EOF, length and digest before commit. Adopt this path in the product image recipe and remove its partition-file dd overlays.

Authority, security and reliability

Keep the initializer without payloads Publish-only. Payload operations add only their original argument-bound READ occurrences. A retained reader and publisher share the same explicit driver and finite caller buffers; data descriptions and callbacks cannot acquire authority. Keep the derived broker, output and current input receipts distinct. Retire each input positively before reusing its destination. Preserve the first failure, confirmed prefixes and separate cleanup outcomes; uncertain effects cannot be replayed. A late input refusal must preserve the previously published destination.

Acceptance criteria

  • Expose a retained allocation-free reader over the original read protocol and share it with the existing whole-file adapter.
  • Check original slots, byte extents, output length and input/output selections before effects, with no fixed disk, partition or payload-size ceiling.
  • Assemble complete metadata, payload and padding bytes through one publication; require EOF, exact length, SHA-512 and positive input retirement before commit.
  • Cover short/long input, digest mismatch, partial reads/writes, uncertain replies, cancellation, cleanup and unchanged destination on refusal.
  • Replace both product partition overlays while retaining the actual owned tool, complete source provenance and deterministic media identity.
  • Update help, source-bound manuals, inline API documentation, component documents, technical manual and relevant native coverage.

Alternatives and tradeoffs

A second file driver or a callback hidden in the output description would complicate original-handle custody. A closed pump alternates reads and writes on one driver. Sequential assembly avoids a seek or raw-block interface and keeps memory proportional to metadata and caller buffers.

Tracking and rollout

Depends on GPT image initialization. Land the shared reader, Boot-tool assembly and coordinated Integration adoption. Native filesystem formatting and complete build-within-EriX acceptance remain separate requirements.

## Problem and motivation The image recipe writes formatted partition files into an existing disk image with dd. Native image assembly needs a file-only path that streams those payloads without allocating a complete image or acquiring device and mount authority. ## Proposed behavior and scope Extend boot-tool gpt-create with explicitly indexed partition files, byte lengths and SHA-512 digests. Prepare the complete output layout before native authority binding. Stream metadata, zero gaps and selected payloads through one publication on Linux and EriX; require exact input EOF, length and digest before commit. Adopt this path in the product image recipe and remove its partition-file dd overlays. ## Authority, security and reliability Keep the initializer without payloads Publish-only. Payload operations add only their original argument-bound READ occurrences. A retained reader and publisher share the same explicit driver and finite caller buffers; data descriptions and callbacks cannot acquire authority. Keep the derived broker, output and current input receipts distinct. Retire each input positively before reusing its destination. Preserve the first failure, confirmed prefixes and separate cleanup outcomes; uncertain effects cannot be replayed. A late input refusal must preserve the previously published destination. ## Acceptance criteria - [ ] Expose a retained allocation-free reader over the original read protocol and share it with the existing whole-file adapter. - [ ] Check original slots, byte extents, output length and input/output selections before effects, with no fixed disk, partition or payload-size ceiling. - [ ] Assemble complete metadata, payload and padding bytes through one publication; require EOF, exact length, SHA-512 and positive input retirement before commit. - [ ] Cover short/long input, digest mismatch, partial reads/writes, uncertain replies, cancellation, cleanup and unchanged destination on refusal. - [ ] Replace both product partition overlays while retaining the actual owned tool, complete source provenance and deterministic media identity. - [ ] Update help, source-bound manuals, inline API documentation, component documents, technical manual and relevant native coverage. ## Alternatives and tradeoffs A second file driver or a callback hidden in the output description would complicate original-handle custody. A closed pump alternates reads and writes on one driver. Sequential assembly avoids a seek or raw-block interface and keeps memory proportional to metadata and caller buffers. ## Tracking and rollout Depends on [GPT image initialization](https://git.erikinkinen.fi/erix/boot-tool/issues/7). Land the shared reader, Boot-tool assembly and coordinated Integration adoption. Native filesystem formatting and complete build-within-EriX acceptance remain separate requirements.
Author
Owner

The retained reader, Boot assembly path and product recipe are implemented and committed locally. Partition files stream through one publication with exact length, EOF and SHA-512 checks; each input retires before its receipt is reused. The recipe finishes both filesystem artifacts before assembling the image, preserves the previous destination on refusal, and removes both partition-file dd overlays.

The component and technical manuals are updated. Coordinated publication remains pending; native filesystem formatting and full self-hosting remain separate work.

The retained reader, Boot assembly path and product recipe are implemented and committed locally. Partition files stream through one publication with exact length, EOF and SHA-512 checks; each input retires before its receipt is reused. The recipe finishes both filesystem artifacts before assembling the image, preserves the previous destination on refusal, and removes both partition-file dd overlays. The component and technical manuals are updated. Coordinated publication remains pending; native filesystem formatting and full self-hosting remain separate work.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/boot-tool#8
No description provided.