Skip to content

Add an RV64 freestanding startup contract and QEMU system smoke #371

Open

Description

@LunaStev

Roadmap context

Wave can emit and link RV64 freestanding artifacts, but it does not yet provide a complete startup and termination contract that can boot under qemu-system-riscv64.

Scope

  • Define the freestanding entry and output-image contract.
  • Provide or explicitly require _start.
  • Define stack pointer and global pointer initialization responsibilities.
  • Decide BSS zeroing and data initialization behavior.
  • Call main and handle its return value.
  • Define a deterministic success/failure signal for QEMU.
  • Decide whether Wave ships a default linker script and support an explicit override.
  • Reject implicit hosted libc/printf dependencies.
  • Add timeout-protected QEMU system execution in CI.

Completion criteria

  • A minimal image boots on a pinned QEMU virt machine.
  • The smoke program emits a deterministic success signal.
  • Stack alignment and relocation/code-model assumptions are tested.
  • A hosted dependency in a freestanding build produces a frontend/driver diagnostic.
  • CI kills a hung guest and reports useful logs.

This is a tracking implementation issue rather than a good first issue.

Activity

  1. added
    enhancement
    help wanted
    needs testing
    platform-specific feature
    on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedneeds testingplatform-specific feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions