tqemu-wrapper.c.in - uwu - hardware bitcoin wallet software and build system
HTML git clone https://git.parazyd.org/uwu
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
tqemu-wrapper.c.in (436B)
---
1 /* Pass arguments to qemu binary. Fetched from the Gentoo Wiki */
2
3 #include <string.h>
4 #include <unistd.h>
5
6 int main(int argc, char **argv, char **envp)
7 {
8 char *newargv[argc+3];
9
10 newargv[0] = argv[0];
11 newargv[1] = "-cpu";
12 /* Here you can set the cpu you are building for */
13 newargv[2] = "cortex-a8";
14
15 memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc-1));
16 newargv[argc+2] = NULL;
17 return execve("@QEMU_ARM@", newargv, envp);
18 }