From e02cda008591317b1625707ff8e115a4841aa889 Mon Sep 17 00:00:00 2001 From: Timos Ampelikiotis Date: Tue, 10 Oct 2023 11:40:56 +0000 Subject: Introduce Virtio-loopback epsilon release: Epsilon release introduces a new compatibility layer which make virtio-loopback design to work with QEMU and rust-vmm vhost-user backend without require any changes. Signed-off-by: Timos Ampelikiotis Change-Id: I52e57563e08a7d0bdc002f8e928ee61ba0c53dd9 --- scripts/update-mips-syscall-args.sh | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 scripts/update-mips-syscall-args.sh (limited to 'scripts/update-mips-syscall-args.sh') diff --git a/scripts/update-mips-syscall-args.sh b/scripts/update-mips-syscall-args.sh new file mode 100755 index 000000000..5a529b699 --- /dev/null +++ b/scripts/update-mips-syscall-args.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +URL=https://raw.githubusercontent.com/strace/strace/master/src +FILES="sysent.h sysent_shorthand_defs.h linux/mips/syscallent-compat.h \ + linux/mips/syscallent-o32.h linux/32/syscallent-common-32.h \ + linux/generic/syscallent-common.h" + +output="$1" +if [ "$output" = "" ] ; then + output="$PWD" +fi + +INC=linux-user/mips/syscall-args-o32.c.inc + +TMP=$(mktemp -d) +cd $TMP + +for file in $FILES; do + curl --create-dirs $URL/$file -o $TMP/$file +done + +> linux/generic/subcallent.h +> linux/32/subcallent.h + +cat > gen_mips_o32.c < + +#define LINUX_MIPSO32 +#define MAX_ARGS 7 + +#include "sysent.h" +#include "sysent_shorthand_defs.h" + +#define SEN(syscall_name) 0,0 +const struct_sysent sysent0[] = { +#include "syscallent-o32.h" +}; + +int main(void) +{ + int i; + + for (i = 4000; i < sizeof(sysent0) / sizeof(struct_sysent); i++) { + if (sysent0[i].sys_name == NULL) { + printf(" [% 4d] = MIPS_SYSCALL_NUMBER_UNUSED,\n", i - 4000); + } else { + printf(" [% 4d] = %d, /* %s */\n", i - 4000, + sysent0[i].nargs, sysent0[i].sys_name); + } + } + + return 0; +} +EOF + +cc -o gen_mips_o32 -I linux/mips -I linux/generic gen_mips_o32.c && ./gen_mips_o32 > "$output/$INC" + +rm -fr "$TMP" -- cgit