qemu-wrapper.c (449B)
1 /* 2 * parazyd - (c) wtfpl 2016 3 * pass arguments to qemu binary 4 */ 5 6 #include <string.h> 7 #include <unistd.h> 8 9 int main(int argc, char **argv, char **envp) { 10 char *newargv[argc + 3]; 11 12 newargv[0] = argv[0]; 13 newargv[1] = "-cpu"; 14 newargv[2] = "cortex-a8"; /* here you can set the cpu you are building for */ 15 16 memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc -1)); 17 newargv[argc + 2] = NULL; 18 return execve("/usr/bin/qemu-arm", newargv, envp); 19 }