libdevuansdk

common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log | Files | Refs | Submodules | README | LICENSE

commit 76560688fd00a1c29c2707e79d7e3ca4ad4bbe16
parent 5d2b73fe623926ba11a85bf191edabfcc0eb3274
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 15 Jun 2016 17:58:56 +0200

include qemu-wrapper.c

Diffstat:
Asrc/qemu-wrapper.c | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/qemu-wrapper.c b/src/qemu-wrapper.c @@ -0,0 +1,20 @@ +/* qemu wrapper + * wrapper for executing qemu in build chroots + * pass arguments to qemu binary + * + * ~ parazyd */ + +#include <string.h> +#include <unistd.h> + +int main(int argc, char **argv, char **envp) { + char *newargv[argc + 3]; + + newargv[0] = argv[0]; + newargv[1] = "-cpu"; + newargv[2] = "cortex-a8"; /* here you can set the cpu you are building for */ + + memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc -1)); + newargv[argc + 2] = NULL; + return execve("/usr/bin/qemu-arm", newargv, envp); +}