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
@@ -7,6 +7,7 @@ version 0.6.2: | @@ -7,6 +7,7 @@ version 0.6.2: | ||
7 | - 'pidfile' option | 7 | - 'pidfile' option |
8 | - .dmg disk image format support (Johannes Schindelin) | 8 | - .dmg disk image format support (Johannes Schindelin) |
9 | - keymaps support (initial patch by Johannes Schindelin) | 9 | - keymaps support (initial patch by Johannes Schindelin) |
10 | + - big endian ARM support (Lennert Buytenhek) | ||
10 | 11 | ||
11 | version 0.6.1: | 12 | version 0.6.1: |
12 | 13 |
Makefile.target
@@ -13,7 +13,15 @@ LIBS= | @@ -13,7 +13,15 @@ LIBS= | ||
13 | HELPER_CFLAGS=$(CFLAGS) | 13 | HELPER_CFLAGS=$(CFLAGS) |
14 | DYNGEN=../dyngen$(EXESUF) | 14 | DYNGEN=../dyngen$(EXESUF) |
15 | # user emulator name | 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 | # system emulator name | 25 | # system emulator name |
18 | ifdef CONFIG_SOFTMMU | 26 | ifdef CONFIG_SOFTMMU |
19 | ifeq ($(TARGET_ARCH), i386) | 27 | ifeq ($(TARGET_ARCH), i386) |
configure
@@ -27,11 +27,14 @@ ar="ar" | @@ -27,11 +27,14 @@ ar="ar" | ||
27 | make="make" | 27 | make="make" |
28 | strip="strip" | 28 | strip="strip" |
29 | cpu=`uname -m` | 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 | case "$cpu" in | 31 | case "$cpu" in |
32 | i386|i486|i586|i686|i86pc|BePC) | 32 | i386|i486|i586|i686|i86pc|BePC) |
33 | cpu="i386" | 33 | cpu="i386" |
34 | ;; | 34 | ;; |
35 | + armv4b) | ||
36 | + cpu="armv4b" | ||
37 | + ;; | ||
35 | armv4l) | 38 | armv4l) |
36 | cpu="armv4l" | 39 | cpu="armv4l" |
37 | ;; | 40 | ;; |
@@ -205,7 +208,7 @@ fi | @@ -205,7 +208,7 @@ fi | ||
205 | else | 208 | else |
206 | 209 | ||
207 | # if cross compiling, cannot launch a program, so make a static guess | 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 | bigendian="yes" | 212 | bigendian="yes" |
210 | fi | 213 | fi |
211 | 214 | ||
@@ -383,6 +386,9 @@ if test "$cpu" = "i386" ; then | @@ -383,6 +386,9 @@ if test "$cpu" = "i386" ; then | ||
383 | elif test "$cpu" = "amd64" ; then | 386 | elif test "$cpu" = "amd64" ; then |
384 | echo "ARCH=amd64" >> $config_mak | 387 | echo "ARCH=amd64" >> $config_mak |
385 | echo "#define HOST_AMD64 1" >> $config_h | 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 | elif test "$cpu" = "armv4l" ; then | 392 | elif test "$cpu" = "armv4l" ; then |
387 | echo "ARCH=arm" >> $config_mak | 393 | echo "ARCH=arm" >> $config_mak |
388 | echo "#define HOST_ARM 1" >> $config_h | 394 | echo "#define HOST_ARM 1" >> $config_h |
@@ -482,6 +488,7 @@ config_mak=$target_dir/config.mak | @@ -482,6 +488,7 @@ config_mak=$target_dir/config.mak | ||
482 | config_h=$target_dir/config.h | 488 | config_h=$target_dir/config.h |
483 | target_cpu=`echo $target | cut -d '-' -f 1` | 489 | target_cpu=`echo $target | cut -d '-' -f 1` |
484 | target_bigendian="no" | 490 | target_bigendian="no" |
491 | +[ "$target_cpu" = "armeb" ] && target_bigendian=yes | ||
485 | [ "$target_cpu" = "sparc" ] && target_bigendian=yes | 492 | [ "$target_cpu" = "sparc" ] && target_bigendian=yes |
486 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes | 493 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
487 | target_softmmu="no" | 494 | target_softmmu="no" |
@@ -496,7 +503,7 @@ fi | @@ -496,7 +503,7 @@ fi | ||
496 | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" | 503 | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" |
497 | 504 | ||
498 | mkdir -p $target_dir | 505 | mkdir -p $target_dir |
499 | -if test "$target" = "arm-user" ; then | 506 | +if test "$target" = "arm-user" -o "$target" = "armeb-user" ; then |
500 | mkdir -p $target_dir/nwfpe | 507 | mkdir -p $target_dir/nwfpe |
501 | fi | 508 | fi |
502 | if test "$target_user_only" = "no" ; then | 509 | if test "$target_user_only" = "no" ; then |
@@ -519,7 +526,7 @@ if test "$target_cpu" = "i386" ; then | @@ -519,7 +526,7 @@ if test "$target_cpu" = "i386" ; then | ||
519 | echo "TARGET_ARCH=i386" >> $config_mak | 526 | echo "TARGET_ARCH=i386" >> $config_mak |
520 | echo "#define TARGET_ARCH \"i386\"" >> $config_h | 527 | echo "#define TARGET_ARCH \"i386\"" >> $config_h |
521 | echo "#define TARGET_I386 1" >> $config_h | 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 | echo "TARGET_ARCH=arm" >> $config_mak | 530 | echo "TARGET_ARCH=arm" >> $config_mak |
524 | echo "#define TARGET_ARCH \"arm\"" >> $config_h | 531 | echo "#define TARGET_ARCH \"arm\"" >> $config_h |
525 | echo "#define TARGET_ARM 1" >> $config_h | 532 | echo "#define TARGET_ARM 1" >> $config_h |
qemu-binfmt-conf.sh
@@ -25,6 +25,7 @@ if [ $cpu != "i386" ] ; then | @@ -25,6 +25,7 @@ if [ $cpu != "i386" ] ; then | ||
25 | fi | 25 | fi |
26 | if [ $cpu != "arm" ] ; then | 26 | if [ $cpu != "arm" ] ; then |
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 | 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 | fi | 29 | fi |
29 | if [ $cpu != "sparc" ] ; then | 30 | if [ $cpu != "sparc" ] ; then |
30 | 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 | 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 |