mirror of
https://github.com/jamesstringer90/appsandbox.git
synced 2026-10-22 02:52:49 -05:00
Run Windows 11 ARM64 guests on macOS over QEMU+HVF, with an ivshmem shared-memory transport carrying every guest channel (agent control, display/VDD, input, audio, clipboard, SSH, 9P) - no guest networking required. - tools/transport: one guest transport API, two backends (PC AF_HYPERV, Mac ivshmem); SPSC ring with an acquire-barrier fix for SSH integrity - tools/ivshmem: our own KMDF ivshmem BAR-mapping driver (no third party) - src/backend_mac: Mac-host ivshmem transport, QEMU VM lifecycle, IDD display consumer, agent/SSH proxies, ISO->disk patcher, Windows create - tools/agent + channel EXEs + tools/vdd: wired to asb_transport - tools/agent_win: staged guest payload (interim, pending JIT pull) - vendor/qemu-ivshmem: vendored QEMU 11.0.1 fork (ivshmem-plain) + LGPL source mirror for the self-contained app bundle - tools/sign/make-release.ps1: use the host-native ARM64 MSBuild so the WDK driver ApiValidator runs (the x86 validator fails on ARM64)
25 lines
945 B
C
25 lines
945 B
C
/* test_bcd.c -- build a BCD from BCD-Template with recognizable GUIDs. */
|
|
#include "bcd_patch.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc,char**argv){
|
|
const char *tin = argc>1?argv[1]:"/tmp/BCD-Template";
|
|
const char *tout= argc>2?argv[2]:"/tmp/BCD-out";
|
|
FILE *f=fopen(tin,"rb"); if(!f){printf("open %s fail\n",tin);return 2;}
|
|
fseek(f,0,SEEK_END); long n=ftell(f); fseek(f,0,SEEK_SET);
|
|
uint8_t *tpl=malloc(n); if(fread(tpl,1,n,f)!=(size_t)n){return 2;} fclose(f);
|
|
|
|
bcd_guids_t g; memset(&g,0,sizeof g);
|
|
for(int i=0;i<16;i++){ g.disk_guid[i]=0xD0+i; g.esp_part_guid[i]=0xE0+i; g.win_part_guid[i]=0x10+i; }
|
|
|
|
uint8_t *ob; size_t ol;
|
|
int rc=bcd_build(tpl,(size_t)n,&g,&ob,&ol);
|
|
printf("bcd_build rc=%d out_len=%zu (template=%ld)\n",rc,ol,n);
|
|
if(rc) return 1;
|
|
FILE *o=fopen(tout,"wb"); fwrite(ob,1,ol,o); fclose(o);
|
|
printf("wrote %s\n",tout);
|
|
return 0;
|
|
}
|