8000 GitHub - zhaofengli/rosetta-spice: RosettaLinux augmentation tool
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zhaofengli/rosetta-spice

Repository files navigation

rosetta-spice (WIP)

rosetta-spice patches RosettaLinux to enable features and fix issues:

  • Enables AOT caching without involvement of the virtualization app
    • This requires the RosettaLinux version from Sonoma
  • Fixes segfaults when running patched binaries (NixOS/nixpkgs#209242)
    • No longer needed since Sonoma Beta 5 (23A5312d)!
  • Allows the use of another RosettaLinux version than what's supplied by the host

Usage

Enable the NixOS module on the guest VM. The host macOS machine does not need modification.

Example System Flake

The NixOS module can be enabled on an aarch64-linux NixOS virtual machine via a configuration similar to the following:

{
  description = "System Configuration";

  inputs = {
     (...other inputs here...)
     rosetta-spice.url = "github:zhaofengli/rosetta-spice";
  };

  outputs = {rosetta-spice, ...}: {
    nixosConfiguration = {
      myHost = lib.nixosSystem {
        modules =
          [
            rosetta-spice.nixosModules.rosetta-spice
            (...other modules here...)
          ];
      };
    };
  };
}  

Notes

You must either mount the Rosetta share at /run/rosetta or use this patchset for this to work. In both cases, a 4K kernel is required.

As of 24C5079e, RosettaLinux attempts to enable per-thread TSO with the following:

  • prctl(0x4d4d444c /* PR_SET_MEM_MODEL */, 0x1, 0, 0, 0), defined in this proposed patchset shipped with Asahi Linux
  • ioctl(fd, _IOC(_IOC_NONE, 0x61, 0x24, 0), 0) on the virtfs-mounted rosetta binary

About

RosettaLinux augmentation tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0