Skip to content

fix(initrd): resolve transitive kernel module deps; reorganize release artifacts by host - #1

Merged
luckyyyyy merged 2 commits into
mainfrom
fix/module-deps-and-rename
Apr 29, 2026
Merged

luckyyyyy merged 2 commits into
mainfrom
fix/module-deps-and-rename

Conversation

@luckyyyyy

Copy link
Copy Markdown
Member

Why

Two related issues with the rootfs build:

1. initrd kernel module deps were incomplete

The Debian generic kernel splits helper symbols into separate modules. The old grep regex only pulled the modules we asked for by name, not their dependencies. That left scsi_mod, hv_storvsc, sd_mod, and ext4 unable to load in the Windows HCS micro-VM, so the guest powered off with no shared filesystem available.

Specifically missing:

  • scsi_common — symbols split out of scsi_mod in 6.x kernels.
  • scsi_transport_fc — required by hv_storvsc.
  • crc16 — required by ext4.

Fix: resolve the transitive closure via modinfo -F depends and bundle every dependency module automatically.

2. Release artifact names didn't match how hosts consume them

The sandbox is fundamentally a Linux sandbox. The host platform only changes how the Linux image is launched (bwrap / VZ / HCS). Names now reflect that:

Host Artifacts
Linux x86_64 tokimo-linux-rootfs-x86_64.tar.zst
Windows x86_64 tokimo-linux-kernel-x86_64.tar.zst + tokimo-linux-rootfs-x86_64.vhdx.zip
macOS arm64 tokimo-linux-kernel-arm64.tar.zst + tokimo-linux-rootfs-arm64.tar.zst

Each artifact ships with a matching .sha256. README has the same table.

Verified locally

Reproduced and fixed on my Windows box using a local Docker minimal-build copy of this script. After the fix all 14 tokimo-package-sandbox tests/session.rs cases pass against an HCS micro-VM.

Behavior change

Existing artifact filenames (tokimo-{arch}-boot.tar.zst etc.) are removed; consumers (currently just tokimo-package-sandbox scripts/fetch-vm.ps1) will need to be updated to the new names.

luckyyyyy and others added 2 commits April 30, 2026 03:13
… by host

The previous KWANT regex missed scsi_common (split out of scsi_mod in modern
Debian kernels), scsi_transport_fc (needed by hv_storvsc), and crc16 (needed
by ext4). Switching to modinfo-based dep resolution captures all transitive
deps automatically.

Also reorganize release artifacts by host platform:
- tokimo-linux-rootfs-{x86_64,arm64}.tar.zst  (Linux/macOS)
- tokimo-linux-rootfs-x86_64.vhdx.zip          (Windows HCS)
- tokimo-linux-kernel-{x86_64,arm64}.tar.zst   (Windows/macOS)

Each with .sha256. README documents per-host download matrix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rs after

The build runs on overseas GitHub Actions runners. Switching apt/npm/pip to
TUNA/npmmirror BEFORE the install made every package fetch slow. Move the
mirror config writes to AFTER all installs are done so:
  - CI fetches from fast upstream mirrors
  - The shipped image still has China mirrors configured for end-users

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@luckyyyyy
luckyyyyy merged commit c9a6198 into main Apr 29, 2026
2 checks passed
@luckyyyyy
luckyyyyy deleted the fix/module-deps-and-rename branch April 29, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant