Revision c5937220
b/configure | ||
---|---|---|
95 | 95 |
softmmu="yes" |
96 | 96 |
user="no" |
97 | 97 |
build_docs="no" |
98 |
uname_release="" |
|
98 | 99 |
|
99 | 100 |
# OS specific |
100 | 101 |
targetos=`uname -s` |
... | ... | |
237 | 238 |
;; |
238 | 239 |
--enable-user) user="yes" |
239 | 240 |
;; |
241 |
--enable-uname-release=*) uname_release="$optarg" |
|
242 |
;; |
|
240 | 243 |
esac |
241 | 244 |
done |
242 | 245 |
|
... | ... | |
284 | 287 |
echo " --disable-user disable all linux usermode emulation targets" |
285 | 288 |
echo " --fmod-lib path to FMOD library" |
286 | 289 |
echo " --fmod-inc path to FMOD includes" |
290 |
echo " --enable-uname-release=R Return R for uname -r in usermode emulation" |
|
287 | 291 |
echo "" |
288 | 292 |
echo "NOTE: The object files are build at the place where configure is launched" |
289 | 293 |
exit 1 |
... | ... | |
553 | 557 |
echo "FMOD support $fmod $fmod_support" |
554 | 558 |
echo "kqemu support $kqemu" |
555 | 559 |
echo "Documentation $build_docs" |
560 |
[ ! -z "$uname_release" ] && \ |
|
561 |
echo "uname -r $uname_release" |
|
556 | 562 |
|
557 | 563 |
if test $sdl_too_old = "yes"; then |
558 | 564 |
echo "-> Your SDL version is too old - please upgrade to have SDL support" |
... | ... | |
711 | 717 |
echo "#define _BSD 1" >> $config_h |
712 | 718 |
fi |
713 | 719 |
|
720 |
echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h |
|
721 |
|
|
714 | 722 |
for target in $target_list; do |
715 | 723 |
target_dir="$target" |
716 | 724 |
config_mak=$target_dir/config.mak |
b/linux-user/main.c | ||
---|---|---|
34 | 34 |
#endif |
35 | 35 |
|
36 | 36 |
static const char *interp_prefix = CONFIG_QEMU_PREFIX; |
37 |
const char *qemu_uname_release = CONFIG_UNAME_RELEASE; |
|
37 | 38 |
|
38 | 39 |
#if defined(__i386__) && !defined(CONFIG_STATIC) |
39 | 40 |
/* Force usage of an ELF interpreter even if it is an ELF shared |
... | ... | |
1514 | 1515 |
} |
1515 | 1516 |
} else if (!strcmp(r, "g")) { |
1516 | 1517 |
gdbstub_port = atoi(argv[optind++]); |
1518 |
} else if (!strcmp(r, "r")) { |
|
1519 |
qemu_uname_release = argv[optind++]; |
|
1517 | 1520 |
} else |
1518 | 1521 |
#ifdef USE_CODE_COPY |
1519 | 1522 |
if (!strcmp(r, "no-code-copy")) { |
b/linux-user/qemu.h | ||
---|---|---|
80 | 80 |
} __attribute__((aligned(16))) TaskState; |
81 | 81 |
|
82 | 82 |
extern TaskState *first_task_state; |
83 |
extern const char *qemu_uname_release; |
|
83 | 84 |
|
84 | 85 |
int elf_exec(const char * filename, char ** argv, char ** envp, |
85 | 86 |
struct target_pt_regs * regs, struct image_info *infop); |
b/linux-user/syscall.c | ||
---|---|---|
2861 | 2861 |
/* Overrite the native machine name with whatever is being |
2862 | 2862 |
emulated. */ |
2863 | 2863 |
strcpy (buf->machine, UNAME_MACHINE); |
2864 |
/* Allow the user to override the reported release. */ |
|
2865 |
if (qemu_uname_release && *qemu_uname_release) |
|
2866 |
strcpy (buf->release, qemu_uname_release); |
|
2864 | 2867 |
} |
2865 | 2868 |
unlock_user_struct(buf, arg1, 1); |
2866 | 2869 |
} |
Also available in: Unified diff