Skip to content

docs: add cloud VM caveats for ESP packaging and QEMU testing#203

Draft
P4X-ng wants to merge 1 commit intomainfrom
cursor/env-setup-4c33
Draft

docs: add cloud VM caveats for ESP packaging and QEMU testing#203
P4X-ng wants to merge 1 commit intomainfrom
cursor/env-setup-4c33

Conversation

@P4X-ng
Copy link
Copy Markdown
Owner

@P4X-ng P4X-ng commented Apr 8, 2026

Summary

Adds cloud VM-specific caveats to docs/AGENTS.md discovered during environment setup:

  • Documents that vfat mount is unavailable in cloud VMs, requiring mtools (mmd/mcopy) for ESP image creation instead of the default mount-based approach in pf build-package-esp.
  • Notes uuid-runtime as a required system package for pf secure-make-auth.
  • Clarifies that PG-ATTEST=FAIL in QEMU test output is expected without SecureBoot enrollment.

Environment Setup Verification

All core development tasks were verified:

Check Status
./pf.py list (task runner) Pass
black --check . (lint) Pass (existing formatting issues in repo)
flake8 --max-line-length 100 utils/ (lint) Pass (existing issues in repo)
pytest utils/test_firmware_tools.py (37 tests) Pass
ESP image build (via mtools) Pass
QEMU boot test (PhoenixGuard marker found) Pass

QEMU boot serial log showing successful PhoenixGuard boot:

qemu_boot_serial.log

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Co-authored-by: P4x-ng <P4X-ng@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation for agents to include specific instructions for cloud VM environments, such as handling vfat mount limitations and additional system dependencies. The review feedback suggests clarifying the manual build steps using mtools, refining the description of the uuid-runtime requirement, and removing redundant information regarding QEMU test success criteria.

- `pf` (the task runner) is NOT a pip package. It is cloned from `https://github.com/P4X-ng/pf-runner` and the `pf-cli-base/pf_parser.py` file is installed as `~/.local/bin/pf` with shebang `#!/usr/bin/env python3`. It requires `fabric` and `lark` pip packages.
- `$HOME/.local/bin` must be on `PATH` for pip-installed scripts and the `pf` runner to work.
- The cloud VM does not have `/dev/kvm`, so QEMU tests must omit `-enable-kvm` and `-cpu host`.
- The cloud VM kernel does not support `vfat` mounts, so `pf build-package-esp` and `pf test-qemu` fail out-of-the-box. Build the ESP image manually using `mtools` (`mmd`, `mcopy`) instead of `mount`. See the build steps used during initial setup for the exact recipe.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The reference to 'build steps used during initial setup' is vague and not actionable for future contributors who were not part of that process. It is better to describe the approach or provide a generic example of using mtools to avoid the vfat mount requirement.

Suggested change
- The cloud VM kernel does not support `vfat` mounts, so `pf build-package-esp` and `pf test-qemu` fail out-of-the-box. Build the ESP image manually using `mtools` (`mmd`, `mcopy`) instead of `mount`. See the build steps used during initial setup for the exact recipe.
- The cloud VM kernel does not support vfat mounts, so pf build-package-esp and pf test-qemu fail out-of-the-box. In these environments, the ESP image must be created and populated using mtools (e.g., mformat, mmd, mcopy) instead of the mount command.

- `$HOME/.local/bin` must be on `PATH` for pip-installed scripts and the `pf` runner to work.
- The cloud VM does not have `/dev/kvm`, so QEMU tests must omit `-enable-kvm` and `-cpu host`.
- The cloud VM kernel does not support `vfat` mounts, so `pf build-package-esp` and `pf test-qemu` fail out-of-the-box. Build the ESP image manually using `mtools` (`mmd`, `mcopy`) instead of `mount`. See the build steps used during initial setup for the exact recipe.
- `uuid-runtime` (provides `uuidgen`) must be installed for `pf secure-make-auth` to work. Add it alongside the other system packages listed above.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is better to maintain a single source of truth for system dependencies. Instead of adding a note here to 'Add it alongside the other system packages', the main list in the 'System dependencies' section (line 25) should be updated to include uuid-runtime. Since line 25 is not in this diff, this note should at least be made more concise.

Suggested change
- `uuid-runtime` (provides `uuidgen`) must be installed for `pf secure-make-auth` to work. Add it alongside the other system packages listed above.
- uuid-runtime (provides uuidgen) is required for pf secure-make-auth to generate unique identifiers for SecureBoot variables.

- The cloud VM does not have `/dev/kvm`, so QEMU tests must omit `-enable-kvm` and `-cpu host`.
- The cloud VM kernel does not support `vfat` mounts, so `pf build-package-esp` and `pf test-qemu` fail out-of-the-box. Build the ESP image manually using `mtools` (`mmd`, `mcopy`) instead of `mount`. See the build steps used during initial setup for the exact recipe.
- `uuid-runtime` (provides `uuidgen`) must be installed for `pf secure-make-auth` to work. Add it alongside the other system packages listed above.
- The QEMU boot test passes when the `PhoenixGuard` string appears in `out/qemu/serial.log`. Attestation failures (`PG-ATTEST=FAIL`) are expected without SecureBoot enrollment.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line duplicates the success criteria already mentioned in the 'QEMU testing' section (line 15). To avoid redundancy, this bullet point should focus specifically on the attestation failure caveat.

Suggested change
- The QEMU boot test passes when the `PhoenixGuard` string appears in `out/qemu/serial.log`. Attestation failures (`PG-ATTEST=FAIL`) are expected without SecureBoot enrollment.
- Attestation failures (PG-ATTEST=FAIL) in out/qemu/serial.log are expected when running QEMU tests without prior SecureBoot enrollment.

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.

2 participants