Commit 808c4954bfe48da4068c540d667ad379b55a5155
1 parent
e80cfcfc
big endian ARM support (Lennert Buytenhek)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1180 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
5 changed files
with
23 additions
and
5 deletions
.cvsignore
Changelog
Makefile.target
... | ... | @@ -13,7 +13,15 @@ LIBS= |
13 | 13 | HELPER_CFLAGS=$(CFLAGS) |
14 | 14 | DYNGEN=../dyngen$(EXESUF) |
15 | 15 | # user emulator name |
16 | -QEMU_USER=qemu-$(TARGET_ARCH) | |
16 | +ifeq ($(TARGET_ARCH),arm) | |
17 | + ifeq ($(TARGET_WORDS_BIGENDIAN),yes) | |
18 | + QEMU_USER=qemu-armeb | |
19 | + else | |
20 | + QEMU_USER=qemu-arm | |
21 | + endif | |
22 | +else | |
23 | + QEMU_USER=qemu-$(TARGET_ARCH) | |
24 | +endif | |
17 | 25 | # system emulator name |
18 | 26 | ifdef CONFIG_SOFTMMU |
19 | 27 | ifeq ($(TARGET_ARCH), i386) | ... | ... |
configure
... | ... | @@ -27,11 +27,14 @@ ar="ar" |
27 | 27 | make="make" |
28 | 28 | strip="strip" |
29 | 29 | cpu=`uname -m` |
30 | -target_list="i386-user i386 i386-softmmu arm-user sparc-user ppc-user ppc-softmmu sparc-softmmu" | |
30 | +target_list="i386-user i386 i386-softmmu arm-user armeb-user sparc-user ppc-user ppc-softmmu sparc-softmmu" | |
31 | 31 | case "$cpu" in |
32 | 32 | i386|i486|i586|i686|i86pc|BePC) |
33 | 33 | cpu="i386" |
34 | 34 | ;; |
35 | + armv4b) | |
36 | + cpu="armv4b" | |
37 | + ;; | |
35 | 38 | armv4l) |
36 | 39 | cpu="armv4l" |
37 | 40 | ;; |
... | ... | @@ -205,7 +208,7 @@ fi |
205 | 208 | else |
206 | 209 | |
207 | 210 | # if cross compiling, cannot launch a program, so make a static guess |
208 | -if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k"; then | |
211 | +if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then | |
209 | 212 | bigendian="yes" |
210 | 213 | fi |
211 | 214 | |
... | ... | @@ -383,6 +386,9 @@ if test "$cpu" = "i386" ; then |
383 | 386 | elif test "$cpu" = "amd64" ; then |
384 | 387 | echo "ARCH=amd64" >> $config_mak |
385 | 388 | echo "#define HOST_AMD64 1" >> $config_h |
389 | +elif test "$cpu" = "armv4b" ; then | |
390 | + echo "ARCH=arm" >> $config_mak | |
391 | + echo "#define HOST_ARM 1" >> $config_h | |
386 | 392 | elif test "$cpu" = "armv4l" ; then |
387 | 393 | echo "ARCH=arm" >> $config_mak |
388 | 394 | echo "#define HOST_ARM 1" >> $config_h |
... | ... | @@ -482,6 +488,7 @@ config_mak=$target_dir/config.mak |
482 | 488 | config_h=$target_dir/config.h |
483 | 489 | target_cpu=`echo $target | cut -d '-' -f 1` |
484 | 490 | target_bigendian="no" |
491 | +[ "$target_cpu" = "armeb" ] && target_bigendian=yes | |
485 | 492 | [ "$target_cpu" = "sparc" ] && target_bigendian=yes |
486 | 493 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
487 | 494 | target_softmmu="no" |
... | ... | @@ -496,7 +503,7 @@ fi |
496 | 503 | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" |
497 | 504 | |
498 | 505 | mkdir -p $target_dir |
499 | -if test "$target" = "arm-user" ; then | |
506 | +if test "$target" = "arm-user" -o "$target" = "armeb-user" ; then | |
500 | 507 | mkdir -p $target_dir/nwfpe |
501 | 508 | fi |
502 | 509 | if test "$target_user_only" = "no" ; then |
... | ... | @@ -519,7 +526,7 @@ if test "$target_cpu" = "i386" ; then |
519 | 526 | echo "TARGET_ARCH=i386" >> $config_mak |
520 | 527 | echo "#define TARGET_ARCH \"i386\"" >> $config_h |
521 | 528 | echo "#define TARGET_I386 1" >> $config_h |
522 | -elif test "$target_cpu" = "arm" ; then | |
529 | +elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then | |
523 | 530 | echo "TARGET_ARCH=arm" >> $config_mak |
524 | 531 | echo "#define TARGET_ARCH \"arm\"" >> $config_h |
525 | 532 | echo "#define TARGET_ARM 1" >> $config_h | ... | ... |
qemu-binfmt-conf.sh
... | ... | @@ -25,6 +25,7 @@ if [ $cpu != "i386" ] ; then |
25 | 25 | fi |
26 | 26 | if [ $cpu != "arm" ] ; then |
27 | 27 | echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:/usr/local/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register |
28 | + echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/usr/local/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register | |
28 | 29 | fi |
29 | 30 | if [ $cpu != "sparc" ] ; then |
30 | 31 | echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff\xff:/usr/local/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register | ... | ... |