Commit 72b675caacfc6f2fde17e6b51a668c0d5409a8f7

Authored by Edgar E. Iglesias
1 parent d74d6a99

microblaze: Hook into the build-system.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Showing 2 changed files with 41 additions and 1 deletions
Makefile.target
... ... @@ -185,6 +185,12 @@ endif
185 185 ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
186 186 LIBOBJS+=ppc-dis.o
187 187 endif
  188 +ifeq ($(findstring microblaze, $(TARGET_BASE_ARCH) $(ARCH)),microblaze)
  189 +LIBOBJS+=microblaze-dis.o
  190 +ifndef CONFIG_USER_ONLY
  191 +LIBOBJS+= mmu.o
  192 +endif
  193 +endif
188 194 ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips)
189 195 LIBOBJS+=mips-dis.o
190 196 endif
... ... @@ -608,6 +614,21 @@ OBJS+= pflash_cfi01.o
608 614 OBJS+= vmware_vga.o
609 615 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
610 616 endif
  617 +ifeq ($(TARGET_BASE_ARCH), microblaze)
  618 +OBJS+= petalogix_s3adsp1800_mmu.o
  619 +
  620 +OBJS+= microblaze_pic_cpu.o
  621 +OBJS+= xilinx_intc.o
  622 +OBJS+= xilinx_timer.o
  623 +OBJS+= xilinx_uartlite.o
  624 +OBJS+= xilinx_ethlite.o
  625 +
  626 +OBJS+= pflash_cfi02.o
  627 +ifdef FDT_LIBS
  628 +OBJS+= device_tree.o
  629 +LIBS+= $(FDT_LIBS)
  630 +endif
  631 +endif
611 632 ifeq ($(TARGET_BASE_ARCH), cris)
612 633 # Boards
613 634 OBJS+= cris_pic_cpu.o etraxfs.o axis_dev88.o
... ...
configure
... ... @@ -127,6 +127,9 @@ case &quot;$cpu&quot; in
127 127 m68k)
128 128 cpu="m68k"
129 129 ;;
  130 + microblaze)
  131 + cpu="microblaze"
  132 + ;;
130 133 mips)
131 134 cpu="mips"
132 135 ;;
... ... @@ -680,6 +683,7 @@ x86_64-softmmu \
680 683 arm-softmmu \
681 684 cris-softmmu \
682 685 m68k-softmmu \
  686 +microblaze-softmmu \
683 687 mips-softmmu \
684 688 mipsel-softmmu \
685 689 mips64-softmmu \
... ... @@ -702,6 +706,7 @@ arm-linux-user \
702 706 armeb-linux-user \
703 707 cris-linux-user \
704 708 m68k-linux-user \
  709 +microblaze-linux-user \
705 710 mips-linux-user \
706 711 mipsel-linux-user \
707 712 ppc-linux-user \
... ... @@ -1443,6 +1448,10 @@ case &quot;$cpu&quot; in
1443 1448 echo "ARCH=m68k" >> $config_mak
1444 1449 echo "#define HOST_M68K 1" >> $config_h
1445 1450 ;;
  1451 + microblaze)
  1452 + echo "ARCH=microblaze" >> $config_mak
  1453 + echo "#define HOST_MICROBLAZE 1" >> $config_h
  1454 + ;;
1446 1455 mips)
1447 1456 echo "ARCH=mips" >> $config_mak
1448 1457 echo "#define HOST_MIPS 1" >> $config_h
... ... @@ -1765,6 +1774,7 @@ target_cpu=`echo $target | cut -d &#39;-&#39; -f 1`
1765 1774 target_bigendian="no"
1766 1775 [ "$target_cpu" = "armeb" ] && target_bigendian=yes
1767 1776 [ "$target_cpu" = "m68k" ] && target_bigendian=yes
  1777 +[ "$target_cpu" = "microblaze" ] && target_bigendian=yes
1768 1778 [ "$target_cpu" = "mips" ] && target_bigendian=yes
1769 1779 [ "$target_cpu" = "mipsn32" ] && target_bigendian=yes
1770 1780 [ "$target_cpu" = "mips64" ] && target_bigendian=yes
... ... @@ -1921,7 +1931,15 @@ case &quot;$target_cpu&quot; in
1921 1931 gdb_xml_files="cf-core.xml cf-fp.xml"
1922 1932 target_phys_bits=32
1923 1933 ;;
1924   - mips|mipsel)
  1934 + microblaze)
  1935 + echo "TARGET_ARCH=microblaze" >> $config_mak
  1936 + echo "#define TARGET_ARCH \"microblaze\"" >> $config_h
  1937 + echo "#define TARGET_MICROBLAZE 1" >> $config_h
  1938 + bflt="yes"
  1939 + target_nptl="yes"
  1940 + target_phys_bits=32
  1941 + ;;
  1942 + mips|mipsel)
1925 1943 echo "TARGET_ARCH=mips" >> $config_mak
1926 1944 echo "#define TARGET_ARCH \"mips\"" >> $config_h
1927 1945 echo "#define TARGET_MIPS 1" >> $config_h
... ... @@ -2058,6 +2076,7 @@ echo &quot;TARGET_XML_FILES=$list&quot; &gt;&gt; $config_mak
2058 2076 if test "$target_cpu" = "arm" \
2059 2077 -o "$target_cpu" = "armeb" \
2060 2078 -o "$target_cpu" = "m68k" \
  2079 + -o "$target_cpu" = "microblaze" \
2061 2080 -o "$target_cpu" = "mips" \
2062 2081 -o "$target_cpu" = "mipsel" \
2063 2082 -o "$target_cpu" = "mipsn32" \
... ...