Skip to content

Conversation

@ryanbreen
Copy link
Owner

Summary

  • Rename coreutil binaries from *_cmd to standard names (ls, echo, mkdir, etc.)
  • Update ext2 disk creation script to install coreutils in /bin/
  • Regenerate testdata/ext2.img with coreutils binaries

Changes

  • Rename 7 source files: ls_cmd.rsls.rs, etc.
  • Update Cargo.toml binary definitions
  • Update build.sh BINARIES array
  • Update init_shell.rs PROGRAM_REGISTRY mappings
  • Enhance create_ext2_disk.sh to copy ELF binaries to /bin/

ext2 /bin/ Contents

/bin/cat      - Concatenate and print files
/bin/ls       - List directory contents
/bin/echo     - Print arguments
/bin/mkdir    - Create directories
/bin/rmdir    - Remove empty directories
/bin/rm       - Remove files
/bin/cp       - Copy files
/bin/mv       - Move/rename files
/bin/hello_world - Exec test binary (exit 42)

Test plan

  • All 217 boot stages pass
  • Coreutils load from ext2 /bin/ via exec syscall
  • Fallback to test disk still works for test-specific binaries

🤖 Generated with Claude Code

Rename coreutil binaries from *_cmd to standard names:
- ls_cmd -> ls, echo_cmd -> echo, mkdir_cmd -> mkdir, etc.

Update ext2 disk creation to populate /bin/ with:
- cat, ls, echo, mkdir, rmdir, rm, cp, mv (coreutils)
- hello_world (exec test binary)

Changes:
- Rename 7 source files in userspace/tests/
- Update Cargo.toml [[bin]] entries
- Update build.sh BINARIES array
- Update init_shell.rs PROGRAM_REGISTRY
- Enhance create_ext2_disk.sh to copy ELF binaries
- Regenerate testdata/ext2.img with coreutils

The exec syscall fallback logic remains: ext2 /bin/ is tried first,
then falls back to test disk for test-specific binaries.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ryanbreen ryanbreen merged commit d9b53cb into main Jan 14, 2026
1 of 2 checks passed
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