diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-07-23 20:56:54 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-07-23 21:27:51 +0200 |
commit | 4c7e914580ff3014a015d4f1eb0cd4e108e87f68 (patch) | |
tree | 2a6395f48d76d1f62115c2cf8900871e65fee6b1 | |
parent | f9c3a55a887ed486670b62f62d6e136ac14a9ed0 (diff) |
add qemu support for ppc virtex ml507
-rw-r--r-- | target/config/Config.in.cpu | 4 | ||||
-rw-r--r-- | target/config/Config.in.kernel | 3 | ||||
-rw-r--r-- | target/config/Config.in.qemu | 14 | ||||
-rw-r--r-- | target/config/Config.in.target | 4 | ||||
-rw-r--r-- | target/linux/config/Config.in.ethernet | 14 | ||||
-rw-r--r-- | target/ppc/Makefile | 27 | ||||
-rw-r--r-- | target/ppc/kernel/qemu-ppc | 30 | ||||
-rw-r--r-- | target/ppc/systems/qemu-ppc | 1 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 9 |
9 files changed, 61 insertions, 45 deletions
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu index 3e47b5a58..3ab984484 100644 --- a/target/config/Config.in.cpu +++ b/target/config/Config.in.cpu @@ -64,6 +64,9 @@ config ADK_CPU_GEODE config ADK_CPU_PPC boolean +config ADK_CPU_PPC_440 + boolean + config ADK_CPU_PPC64 boolean @@ -127,6 +130,7 @@ config ADK_TARGET_CPU_ARCH default "mips" if ADK_LINUX_MIPS && ADK_big default "mipsel" if ADK_LINUX_MIPS && ADK_little default "ppc" if ADK_CPU_PPC + default "ppc" if ADK_CPU_PPC_440 default "ppc64" if ADK_CPU_PPC64 default "sh4" if ADK_LINUX_SH && ADK_little default "sh4eb" if ADK_LINUX_SH && ADK_big diff --git a/target/config/Config.in.kernel b/target/config/Config.in.kernel index b69455e59..5711eb051 100644 --- a/target/config/Config.in.kernel +++ b/target/config/Config.in.kernel @@ -40,7 +40,8 @@ config ADK_TARGET_KERNEL_MINICONFIG default "qemu-arm-terrier" if ADK_TARGET_QEMU_ARM_MODEL_TERRIER default "qemu-mips" if ADK_TARGET_SYSTEM_QEMU_MIPS default "qemu-mips64" if ADK_TARGET_SYSTEM_QEMU_MIPS64 - default "qemu-ppc" if ADK_TARGET_SYSTEM_QEMU_PPC + default "qemu-ppc-mac99" if ADK_TARGET_QEMU_PPC_MACPPC + default "qemu-virtex-ml507" if ADK_TARGET_QEMU_PPC_VIRTEX_ML507 default "qemu-ppc64" if ADK_TARGET_SYSTEM_QEMU_PPC64 default "qemu-sh" if ADK_TARGET_SYSTEM_QEMU_SH default "qemu-sh" if ADK_TARGET_SYSTEM_QEMU_SHEB diff --git a/target/config/Config.in.qemu b/target/config/Config.in.qemu index ae4a02a05..eff8c0520 100644 --- a/target/config/Config.in.qemu +++ b/target/config/Config.in.qemu @@ -2,6 +2,20 @@ # material, please see the LICENCE file in the top-level directory. choice +prompt "Qemu PPC Emulation" +depends on ADK_TARGET_SYSTEM_QEMU_PPC + +config ADK_TARGET_QEMU_PPC_VIRTEX_ML507 + boolean "Xilinx Virtex ML507" + select ADK_CPU_PPC_440 + +config ADK_TARGET_QEMU_PPC_MACPPC + boolean "Mac99 PPC" + select ADK_CPU_PPC + +endchoice + +choice prompt "Qemu MICROBLAZE Emulation" depends on ADK_TARGET_SYSTEM_QEMU_MICROBLAZE diff --git a/target/config/Config.in.target b/target/config/Config.in.target index b90f0c8c0..6f1c0cec4 100644 --- a/target/config/Config.in.target +++ b/target/config/Config.in.target @@ -7,6 +7,7 @@ config ADK_TARGET_CFLAGS default "-m4 -ml" if ADK_CPU_SH4 && ADK_little default "-m4 -mb" if ADK_CPU_SH4 && ADK_big default "-mcpu=powerpc" if ADK_CPU_PPC + default "-mcpu=440" if ADK_CPU_PPC_440 default "-mcpu=powerpc64" if ADK_CPU_PPC64 default "-march=geode" if ADK_CPU_GEODE default "-march=i486" if ADK_CPU_I486 @@ -58,7 +59,8 @@ config ADK_TARGET_CMDLINE default "console=ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800 default "console=ttyS0,115200" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 default "console=hvc0" if ADK_TARGET_SYSTEM_QEMU_PPC64 - default "console=ttyS0,9600" if ADK_TARGET_SYSTEM_QEMU_PPC + default "console=ttyS0,9600" if ADK_TARGET_QEMU_PPC_MACPPC + default "console=ttyS0" if ADK_TARGET_QEMU_PPC_VIRTEX_ML507 default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_SPARC64 default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_X86 || ADK_TARGET_SYSTEM_QEMU_X86_64 diff --git a/target/linux/config/Config.in.ethernet b/target/linux/config/Config.in.ethernet index faa63206b..825c15f17 100644 --- a/target/linux/config/Config.in.ethernet +++ b/target/linux/config/Config.in.ethernet @@ -125,6 +125,16 @@ config ADK_KERNEL_XILINX_AXI_EMAC help Xilinx AXI ethernet driver +config ADK_KERNEL_XILINX_LL_TEMAC + prompt "Xilinx Temac ethernet driver" + tristate + select ADK_KERNEL_NET_VENDOR_XILINX + depends on ADK_TARGET_QEMU_PPC_VIRTEX_ML507 + default y if ADK_TARGET_QEMU_PPC_VIRTEX_ML507 + default n + help + Xilinx Temac ethernet driver + config ADK_KERNEL_XILINX_EMACLITE prompt "Xilinx Emaclite ethernet driver" tristate @@ -201,7 +211,7 @@ config ADK_KERNEL_E1000 ADK_TARGET_SYSTEM_QEMU_X86_64 || \ ADK_TARGET_SYSTEM_QEMU_MIPS || \ ADK_TARGET_SYSTEM_QEMU_MIPS64 || \ - ADK_TARGET_SYSTEM_QEMU_PPC || \ + ADK_TARGET_QEMU_PPC_MACPPC || \ ADK_TARGET_SYSTEM_QEMU_ALPHA || \ ADK_TARGET_VBOX default y if ADK_TARGET_SYSTEM_IBM_X40 @@ -209,7 +219,7 @@ config ADK_KERNEL_E1000 default y if ADK_TARGET_SYSTEM_QEMU_X86_64 default y if ADK_TARGET_SYSTEM_QEMU_MIPS default y if ADK_TARGET_SYSTEM_QEMU_MIPS64 - default y if ADK_TARGET_SYSTEM_QEMU_PPC + default y if ADK_TARGET_QEMU_PPC_MACPPC default y if ADK_TARGET_SYSTEM_QEMU_ALPHA default y if ADK_TARGET_VBOX default n diff --git a/target/ppc/Makefile b/target/ppc/Makefile index 3268dbc6e..60e7f1fc5 100644 --- a/target/ppc/Makefile +++ b/target/ppc/Makefile @@ -10,9 +10,14 @@ include $(ADK_TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/vmlinux OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id -QEMU_ARGS:=-M mac99 -QEMU_ARGS+=${ADK_QEMU_ARGS} +QEMU_ARGS:=${ADK_QEMU_ARGS} +ifeq ($(ADK_TARGET_QEMU_PPC_MACPPC),y) +QEMU_ARGS+=-M macppc QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0 +endif +ifeq ($(ADK_TARGET_QEMU_PPC_VIRTEX_ML507),y) +QEMU_ARGS+=-M virtex-ml507 -m 256 -dtb $(FW_DIR)/ppc.dtb +endif # target helper text ifeq ($(ADK_TARGET_FS),archive) @@ -56,16 +61,34 @@ kernel-strip: kernel-install: kernel-strip @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL} +dtb-install: + env $(KERNEL_MAKE_ENV) $(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKE_OPTS) \ + -j${ADK_MAKE_JOBS} virtex440-ml507.dtb $(MAKE_TRACE) + $(CP) $(LINUX_DIR)/arch/powerpc/boot/virtex440-ml507.dtb \ + $(FW_DIR)/ppc.dtb + # filesystem specific targets ifeq ($(ADK_TARGET_FS),archive) +ifeq ($(ADK_TARGET_QEMU_PPC_VIRTEX_ML507),y) +imageinstall: dtb-install $(FW_DIR)/$(ROOTFSTARBALL) targethelp +else imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp endif +endif ifeq ($(ADK_TARGET_FS),initramfs) +ifeq ($(ADK_TARGET_QEMU_PPC_VIRTEX_ML507),y) +imageinstall: dtb-install kernel-install $(FW_DIR)/$(INITRAMFS) targethelp +else imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp endif +endif ifeq ($(ADK_TARGET_FS),initramfsarchive) imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp endif ifeq ($(ADK_TARGET_FS),initramfspiggyback) +ifeq ($(ADK_TARGET_QEMU_PPC_VIRTEX_ML507),y) +imageinstall: dtb-install createinitramfs targethelp +else imageinstall: createinitramfs targethelp endif +endif diff --git a/target/ppc/kernel/qemu-ppc b/target/ppc/kernel/qemu-ppc deleted file mode 100644 index b18e0e2d4..000000000 --- a/target/ppc/kernel/qemu-ppc +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_PPC=y -CONFIG_PPC32=y -CONFIG_32BIT=y -CONFIG_PPC_BOOK3S_32=y -CONFIG_PPC_BOOK3S=y -CONFIG_6xx=y -CONFIG_PPC_FPU=y -CONFIG_ALTIVEC=y -CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_32=y -CONFIG_WORD_SIZE=32 -CONFIG_GENERIC_NVRAM=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -CONFIG_PPC_CHRP=y -CONFIG_PPC_PMAC=y -CONFIG_PPC_NATIVE=y -CONFIG_PPC_OF_BOOT_TRAMPOLINE=y -CONFIG_MPIC=y -CONFIG_PPC_I8259=y -CONFIG_PPC_RTAS=y -CONFIG_PPC_MPC106=y -CONFIG_PPC_4K_PAGES=y -CONFIG_MACINTOSH_DRIVERS=y -CONFIG_ADB=y -CONFIG_ADB_CUDA=y -CONFIG_INPUT_ADBHID=y -CONFIG_SERIAL_PMACZILOG=y -CONFIG_SERIAL_PMACZILOG_TTYS=y -CONFIG_SERIAL_PMACZILOG_CONSOLE=y diff --git a/target/ppc/systems/qemu-ppc b/target/ppc/systems/qemu-ppc index 835741934..9d7217bbc 100644 --- a/target/ppc/systems/qemu-ppc +++ b/target/ppc/systems/qemu-ppc @@ -2,7 +2,6 @@ config ADK_TARGET_SYSTEM_QEMU_PPC bool "Qemu Emulator" select ADK_ppc select ADK_qemu_ppc - select ADK_CPU_PPC select ADK_TARGET_QEMU help Support for Qemu Emulator PPC architecture. diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 188c5c899..abc938ffb 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -98,13 +98,7 @@ GCC_CONFOPTS+= --disable-lto endif ifeq ($(ADK_LINUX_PPC),y) -ifeq ($(ADK_TARGET_LIBC),musl) -GCC_CONFOPTS+= --disable-target-optspace --with-long-double-64 --enable-secureplt -else -GCC_CONFOPTS+= --disable-target-optspace --with-long-double-128 --enable-secureplt -endif -else -GCC_CONFOPTS+= --enable-target-optspace +GCC_CONFOPTS+= --with-long-double-64 --enable-secureplt endif ifeq ($(ADK_TARGET_ARCH),arm) @@ -142,7 +136,6 @@ ifeq ($(ADK_CPU_SPARC_V9),y) GCC_CONFOPTS+= --with-cpu=ultrasparc endif - ifneq ($(ADK_TARGET_MIPS_ABI),) GCC_CONFOPTS+= --with-abi=${ADK_TARGET_MIPS_ABI} endif |