diff --git a/repos/base-hw/lib/mk/spec/zynq/core.inc b/repos/base-hw/lib/mk/spec/zynq/core.inc index 76d2a62f9..f2f3779a7 100644 --- a/repos/base-hw/lib/mk/spec/zynq/core.inc +++ b/repos/base-hw/lib/mk/spec/zynq/core.inc @@ -6,7 +6,6 @@ # add include paths INC_DIR += $(REP_DIR)/src/core/include/spec/zynq -INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx # add C++ sources SRC_CC += platform_services.cc diff --git a/repos/base-hw/lib/mk/spec/zynq/core.mk b/repos/base-hw/lib/mk/spec/zynq_qemu/core.mk similarity index 57% rename from repos/base-hw/lib/mk/spec/zynq/core.mk rename to repos/base-hw/lib/mk/spec/zynq_qemu/core.mk index 7ff6205ea..247268b3f 100644 --- a/repos/base-hw/lib/mk/spec/zynq/core.mk +++ b/repos/base-hw/lib/mk/spec/zynq_qemu/core.mk @@ -4,5 +4,9 @@ # \date 2014-12-15 # +# add include paths +INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_0 +INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_qemu + # include less specific configuration include $(REP_DIR)/lib/mk/spec/zynq/core.inc diff --git a/repos/base-hw/mk/spec/hw_zynq.mk b/repos/base-hw/mk/spec/hw_zynq.mk index 9d2bf40fd..3afeb66d9 100644 --- a/repos/base-hw/mk/spec/hw_zynq.mk +++ b/repos/base-hw/mk/spec/hw_zynq.mk @@ -5,7 +5,7 @@ # # denote which specs are also fulfilled by this spec -SPECS += hw zynq_qemu +SPECS += hw # configure multiprocessor mode NR_OF_CPUS = 1 @@ -15,4 +15,3 @@ LD_TEXT_ADDR ?= 0x00100000 # include implied specs include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/zynq_qemu.mk) diff --git a/repos/base-hw/src/core/include/spec/xilinx/serial.h b/repos/base-hw/src/core/include/spec/xilinx_uartps_0/serial.h similarity index 100% rename from repos/base-hw/src/core/include/spec/xilinx/serial.h rename to repos/base-hw/src/core/include/spec/xilinx_uartps_0/serial.h diff --git a/repos/base-hw/src/core/include/spec/zynq/board.h b/repos/base-hw/src/core/include/spec/zynq_qemu/board.h similarity index 60% rename from repos/base-hw/src/core/include/spec/zynq/board.h rename to repos/base-hw/src/core/include/spec/zynq_qemu/board.h index 8227af014..9cafcafec 100644 --- a/repos/base-hw/src/core/include/spec/zynq/board.h +++ b/repos/base-hw/src/core/include/spec/zynq_qemu/board.h @@ -13,15 +13,21 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _CORE__INCLUDE__SPEC__ZYNQ__BOARD_H_ -#define _CORE__INCLUDE__SPEC__ZYNQ__BOARD_H_ +#ifndef _CORE__INCLUDE__SPEC__ZYNQ_QEMU__BOARD_H_ +#define _CORE__INCLUDE__SPEC__ZYNQ_QEMU__BOARD_H_ /* core includes */ #include namespace Genode { - using Board = Cortex_a9::Board; + struct Board : Cortex_a9::Board + { + enum { + KERNEL_UART_BASE = UART_0_MMIO_BASE, + KERNEL_UART_SIZE = UART_SIZE, + }; + }; } -#endif /* _CORE__INCLUDE__SPEC__ZYNQ__BOARD_H_ */ +#endif /* _CORE__INCLUDE__SPEC__ZYNQ_QEMU__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/zynq/platform_support.cc b/repos/base-hw/src/core/spec/zynq/platform_support.cc index daadb30e8..a8016478e 100644 --- a/repos/base-hw/src/core/spec/zynq/platform_support.cc +++ b/repos/base-hw/src/core/spec/zynq/platform_support.cc @@ -57,7 +57,7 @@ Native_region * Platform::_core_only_mmio_regions(unsigned const i) Board::CORTEX_A9_PRIVATE_MEM_SIZE }, /* core UART */ - { Board::UART_0_MMIO_BASE, Board::UART_SIZE }, + { Board::KERNEL_UART_BASE, Board::KERNEL_UART_SIZE }, /* L2 cache controller */ { Board::PL310_MMIO_BASE, Board::PL310_MMIO_SIZE } diff --git a/repos/base/mk/spec/zynq_qemu.mk b/repos/base/mk/spec/zynq_qemu.mk index b5825947c..f47d96df5 100644 --- a/repos/base/mk/spec/zynq_qemu.mk +++ b/repos/base/mk/spec/zynq_qemu.mk @@ -1,7 +1,7 @@ # # Pull in CPU specifics # -SPECS += zynq cadence_gem xilinx +SPECS += zynq cadence_gem REP_INC_DIR += include/spec/zynq_qemu REP_INC_DIR += include/spec/xilinx diff --git a/tool/builddir/etc/build.conf.hw_zynq b/tool/builddir/etc/build.conf.hw_zynq index c2f7ae958..ed5c31cf1 100644 --- a/tool/builddir/etc/build.conf.hw_zynq +++ b/tool/builddir/etc/build.conf.hw_zynq @@ -4,4 +4,10 @@ REPOSITORIES += $(GENODE_DIR)/repos/base-hw ## Kernel-specific run tool configuration ## -RUN_OPT = --include boot_dir/hw --include power_on/qemu --include log/qemu +RUN_OPT = --include boot_dir/hw + +## Set RUN_OPT to exectute this on Qemu +RUN_OPT += --include power_on/qemu --include log/qemu + +## Set RUN_OPT to execute this on actual hardware. +#RUN_OPT += --include image/uboot diff --git a/tool/create_builddir b/tool/create_builddir index 37fbfb038..b8cb23c8e 100755 --- a/tool/create_builddir +++ b/tool/create_builddir @@ -252,6 +252,9 @@ hw_rpi:: hw_zynq:: @echo "SPECS = genode hw_zynq" > $(BUILD_DIR)/etc/specs.conf + @echo "SPECS += perf_counter" >> $(BUILD_DIR)/etc/specs.conf + @echo "## By default, hw_zynq is executed on Qemu" >> $(BUILD_DIR)/etc/specs.conf + @echo "SPECS += zynq_qemu" >> $(BUILD_DIR)/etc/specs.conf hw_odroid_xu:: @echo "SPECS = genode hw_odroid_xu" > $(BUILD_DIR)/etc/specs.conf