From 3886686b833c16eb869554f99009bb419e79effe Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 2 Jan 2017 15:29:21 +0100 Subject: [PATCH] hw: get rid of global makefiles specific to hw This commit mostly removes the globally visible NR_OF_CPUS define from the global makefile specifiers defined in the base-hw repository. Whereever necessary it adds platform specific makefiles to the base repository when they were missing. Ref #2190 --- repos/base-hw/doc/hw.txt | 82 ------------------- repos/base-hw/doc/x86_64_muen.txt | 4 +- repos/base-hw/etc/specs.conf | 10 +++ repos/base-hw/lib/mk/core-hw.inc | 3 + repos/base-hw/lib/mk/spec/arndale/core-hw.mk | 2 + .../base-hw/lib/mk/spec/cortex_a8/core-hw.inc | 2 + repos/base-hw/lib/mk/spec/imx6/core-hw.mk | 2 + .../base-hw/lib/mk/spec/odroid_xu/core-hw.mk | 2 + repos/base-hw/lib/mk/spec/panda/core-hw.mk | 2 + repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk | 2 + repos/base-hw/lib/mk/spec/riscv/core-hw.mk | 1 + repos/base-hw/lib/mk/spec/rpi/core-hw.mk | 2 + repos/base-hw/lib/mk/spec/x86_64/core-hw.inc | 2 + .../base-hw/lib/mk/spec/zynq_qemu/core-hw.mk | 2 + repos/base-hw/mk/spec/hw.mk | 8 -- repos/base-hw/mk/spec/hw_arndale.mk | 18 ---- repos/base-hw/mk/spec/hw_imx53_qsb_tz.mk | 11 --- repos/base-hw/mk/spec/hw_odroid_xu.mk | 18 ---- repos/base-hw/mk/spec/hw_panda.mk | 15 ---- repos/base-hw/mk/spec/hw_pbxa9.mk | 15 ---- repos/base-hw/mk/spec/hw_riscv.mk | 6 -- repos/base-hw/mk/spec/hw_rpi.mk | 15 ---- repos/base-hw/mk/spec/hw_usb_armory.mk | 18 ---- repos/base-hw/mk/spec/hw_wand_quad.mk | 17 ---- repos/base-hw/mk/spec/hw_x86_64.mk | 16 ---- repos/base-hw/mk/spec/hw_x86_64_muen.mk | 11 --- repos/base-hw/mk/spec/hw_zynq.mk | 14 ---- repos/base-hw/run/nested_init.run | 73 ----------------- .../mk/spec/imx53_qsb.mk} | 10 +-- repos/base/mk/spec/imx6.mk | 2 +- repos/base/mk/spec/riscv.mk | 5 ++ repos/base/mk/spec/usb_armory.mk | 14 ++++ repos/base/mk/spec/wand_quad.mk | 14 ++++ tool/create_builddir | 48 +++++------ tool/run/boot_dir/hw | 24 +++--- tool/run/power_on/spike | 2 +- 36 files changed, 108 insertions(+), 384 deletions(-) delete mode 100644 repos/base-hw/doc/hw.txt create mode 100644 repos/base-hw/etc/specs.conf delete mode 100644 repos/base-hw/mk/spec/hw.mk delete mode 100644 repos/base-hw/mk/spec/hw_arndale.mk delete mode 100644 repos/base-hw/mk/spec/hw_imx53_qsb_tz.mk delete mode 100644 repos/base-hw/mk/spec/hw_odroid_xu.mk delete mode 100644 repos/base-hw/mk/spec/hw_panda.mk delete mode 100644 repos/base-hw/mk/spec/hw_pbxa9.mk delete mode 100644 repos/base-hw/mk/spec/hw_riscv.mk delete mode 100644 repos/base-hw/mk/spec/hw_rpi.mk delete mode 100644 repos/base-hw/mk/spec/hw_usb_armory.mk delete mode 100644 repos/base-hw/mk/spec/hw_wand_quad.mk delete mode 100644 repos/base-hw/mk/spec/hw_x86_64.mk delete mode 100644 repos/base-hw/mk/spec/hw_x86_64_muen.mk delete mode 100644 repos/base-hw/mk/spec/hw_zynq.mk delete mode 100644 repos/base-hw/run/nested_init.run rename repos/{base-hw/mk/spec/hw_imx53_qsb.mk => base/mk/spec/imx53_qsb.mk} (53%) create mode 100644 repos/base/mk/spec/riscv.mk create mode 100644 repos/base/mk/spec/usb_armory.mk create mode 100644 repos/base/mk/spec/wand_quad.mk diff --git a/repos/base-hw/doc/hw.txt b/repos/base-hw/doc/hw.txt deleted file mode 100644 index b75347547..000000000 --- a/repos/base-hw/doc/hw.txt +++ /dev/null @@ -1,82 +0,0 @@ - - ====================================== - How to use Genode directly on hardware - ====================================== - - Martin Stein - -Abstract -######## - -This document provides brief instructions about building and booting Genode -with the 'base-hw' repository. The 'base-hw' repository provides an -implementation of the Genode core that runs directly on hardware, without an -intermediate third-party kernel. It supports a limited range of target boards. -For further target specific informations, have a look at -'/repos/base-hw/doc/.txt' where '' -is one of the following: - -'panda' - PandaBoard A2 - - -Prerequisites -############# - -To build Genode you need to download and install the tool-chain used by Genode. -Have a look at this page: - -:[http://genode.org/download/tool-chain]: - Genode tool-chain - -If you want to use the so called run-scripts in Genode, a mechanism that -automates building, integration and testing of components, you have to install -the following, additional package: - -! apt-get install expect - -If you want to examine the examples that are given in this document, you will -need Qemu for ARM emulations to run them on your machine: - -! apt-get install qemu-kvm-extras - - -Building Genode to run directly on hardware -########################################### - -The current version of the Genode source code is available at this page: - -:http://genode.org/download/repository: - Donwloading the Genode source code - -Now, go to a directory where you want the Genode build directory to -remain. Use the helper script in the 'tool' directory of the Genode -source tree to create the initial build environment. You need to state the -build directory you want to create, and the hardware target to run Genode on. - -! /tool/create_builddir hw_ BUILD_DIR= - -Where '' is one of the following, depending on the hardware system -you aim at: - -'arndale' - Arndale (Exynos5) board -'imx53' - i.MX53 based board -'imx53_tz' - i.MX53 based board using TrustZone -'odroid_xu' - Odroid XU (Exynos5) board -'panda' - PandaBoard A2 -'pbxa9' - Realview PBXA9 -'rpi' - Raspberry PI - -Please notice that not all of these targets might be emulateable with Qemu. -To be on the safe side use 'pbxa9'. For informations about how to boot -'base-hw' images on real hardware have a look at -'/repos/base-hw/doc/.txt'. - -Now, go to the newly created build directory make a test: - -! cd -! make run/nested_init - -This will build the Genode components that are needed to run a simple test -with 3 nested init programs, and than execute it via Qemu. - - diff --git a/repos/base-hw/doc/x86_64_muen.txt b/repos/base-hw/doc/x86_64_muen.txt index fc2c1b6f2..76e74fcfc 100644 --- a/repos/base-hw/doc/x86_64_muen.txt +++ b/repos/base-hw/doc/x86_64_muen.txt @@ -34,7 +34,7 @@ the following commands: The next step is to create a build directory prepared for compiling Genode for Muen. Use the create_builddir tool for this task: -! ./tool/create_builddir hw_x86_64_muen +! ./tool/create_builddir muen You can customize Muen system by changing the --image-muen RUN_OPT parameters in the 'build.conf' file in the build directory under build/etc. @@ -66,7 +66,7 @@ generate a new configuration. You can now change to the created build directory and compile a Genode system: -! cd build/hw_x86_64_muen/ +! cd build/muen/ ! make run/printf Once the build is done, the Muen system which contains the Genode scenario is diff --git a/repos/base-hw/etc/specs.conf b/repos/base-hw/etc/specs.conf new file mode 100644 index 000000000..3943bf09f --- /dev/null +++ b/repos/base-hw/etc/specs.conf @@ -0,0 +1,10 @@ +SPECS += genode hw + +ifeq ($(filter-out $(SPECS),x86_64),) +SPECS += pci ps2 vesa framebuffer + +ifneq ($(filter-out $(SPECS),muen),) +SPECS += acpi +endif + +endif diff --git a/repos/base-hw/lib/mk/core-hw.inc b/repos/base-hw/lib/mk/core-hw.inc index d9e0eee79..dbaf093d4 100644 --- a/repos/base-hw/lib/mk/core-hw.inc +++ b/repos/base-hw/lib/mk/core-hw.inc @@ -60,6 +60,9 @@ SRC_CC += capability.cc # provide Genode version information include $(BASE_DIR)/src/core/version.inc +# configure multiprocessor mode +CC_OPT += -Wa,--defsym -Wa,NR_OF_CPUS=$(NR_OF_CPUS) -DNR_OF_CPUS=$(NR_OF_CPUS) + # declare source locations vpath % $(BASE_DIR)/../base-hw/src/core vpath % $(BASE_DIR)/src/core diff --git a/repos/base-hw/lib/mk/spec/arndale/core-hw.mk b/repos/base-hw/lib/mk/spec/arndale/core-hw.mk index f6e5e33c5..a5e83eb8b 100644 --- a/repos/base-hw/lib/mk/spec/arndale/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/arndale/core-hw.mk @@ -20,5 +20,7 @@ SRC_CC += spec/arm_v7/virtualization/vm_session_component.cc # add assembly sources SRC_S += spec/arm_v7/virtualization/mode_transition.s +NR_OF_CPUS = 2 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/exynos5/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc b/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc index 9de85ae85..db9a29c17 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc @@ -14,5 +14,7 @@ SRC_CC += spec/arm/kernel/cpu.cc SRC_CC += spec/arm/kernel/thread_update_pd.cc SRC_CC += kernel/kernel.cc +NR_OF_CPUS = 1 + # include less specific configuration include $(BASE_DIR)/../base-hw/lib/mk/spec/arm_v7/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/imx6/core-hw.mk b/repos/base-hw/lib/mk/spec/imx6/core-hw.mk index 9c965c80d..fd4386cc9 100644 --- a/repos/base-hw/lib/mk/spec/imx6/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/imx6/core-hw.mk @@ -14,5 +14,7 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/imx SRC_CC += platform_services.cc SRC_CC += spec/imx6/platform_support.cc +NR_OF_CPUS = 1 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk b/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk index ece403130..300ddc4df 100644 --- a/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk @@ -11,5 +11,7 @@ SRC_CC += spec/arm_gic/pic.cc SRC_CC += kernel/vm_thread_off.cc SRC_CC += platform_services.cc +NR_OF_CPUS = 1 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/exynos5/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/panda/core-hw.mk b/repos/base-hw/lib/mk/spec/panda/core-hw.mk index 5b2577241..9926391c0 100644 --- a/repos/base-hw/lib/mk/spec/panda/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/panda/core-hw.mk @@ -13,5 +13,7 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/tl16c750 SRC_CC += platform_services.cc SRC_CC += spec/panda/platform_support.cc +NR_OF_CPUS += 2 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk b/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk index 0bbc98b34..1e2309204 100644 --- a/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk @@ -14,5 +14,7 @@ SRC_CC += platform_services.cc SRC_CC += spec/pbxa9/platform_support.cc SRC_CC += spec/pbxa9/board.cc +NR_OF_CPUS = 1 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/riscv/core-hw.mk b/repos/base-hw/lib/mk/spec/riscv/core-hw.mk index 60583069b..e7a91118e 100644 --- a/repos/base-hw/lib/mk/spec/riscv/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/riscv/core-hw.mk @@ -18,6 +18,7 @@ SRC_S += spec/riscv/mode_transition.s SRC_S += spec/riscv/kernel/crt0.s SRC_S += spec/riscv/crt0.s +NR_OF_CPUS = 1 # include less specific configuration include $(REP_DIR)/lib/mk/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/rpi/core-hw.mk b/repos/base-hw/lib/mk/spec/rpi/core-hw.mk index aed02ed36..704aa2693 100644 --- a/repos/base-hw/lib/mk/spec/rpi/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/rpi/core-hw.mk @@ -12,5 +12,7 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/pl011 SRC_CC += platform_services.cc SRC_CC += spec/rpi/platform_support.cc +NR_OF_CPUS = 1 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/arm_v6/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw.inc b/repos/base-hw/lib/mk/spec/x86_64/core-hw.inc index fa6638b9a..3ed076393 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/x86_64/core-hw.inc @@ -29,5 +29,7 @@ SRC_CC += spec/x86_64/kernel/thread.cc SRC_CC += spec/x86_64/platform_support_common.cc SRC_CC += spec/x86_64/tss.cc +NR_OF_CPUS = 1 + # include less specific configuration include $(BASE_DIR)/../base-hw/lib/mk/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/zynq_qemu/core-hw.mk b/repos/base-hw/lib/mk/spec/zynq_qemu/core-hw.mk index 7402b8868..9c1375fa0 100644 --- a/repos/base-hw/lib/mk/spec/zynq_qemu/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/zynq_qemu/core-hw.mk @@ -8,5 +8,7 @@ INC_DIR += $(REP_DIR)/src/core/include/spec/xilinx_uartps_0 INC_DIR += $(REP_DIR)/src/core/include/spec/zynq_qemu +NR_OF_CPUS = 1 + # include less specific configuration include $(REP_DIR)/lib/mk/spec/zynq/core-hw.inc diff --git a/repos/base-hw/mk/spec/hw.mk b/repos/base-hw/mk/spec/hw.mk deleted file mode 100644 index ff59eb96f..000000000 --- a/repos/base-hw/mk/spec/hw.mk +++ /dev/null @@ -1,8 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw -# \author Martin Stein -# \date 2014-02-26 -# - -# configure multiprocessor mode -CC_OPT += -Wa,--defsym -Wa,NR_OF_CPUS=$(NR_OF_CPUS) -DNR_OF_CPUS=$(NR_OF_CPUS) diff --git a/repos/base-hw/mk/spec/hw_arndale.mk b/repos/base-hw/mk/spec/hw_arndale.mk deleted file mode 100644 index 8507e7617..000000000 --- a/repos/base-hw/mk/spec/hw_arndale.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw and Arndale -# \author Martin Stein -# \date 2013-01-09 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw arndale - -# configure multiprocessor mode -NR_OF_CPUS = 2 - -# add repository relative paths -REP_INC_DIR += include/exynos5_uart - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/arndale.mk) diff --git a/repos/base-hw/mk/spec/hw_imx53_qsb_tz.mk b/repos/base-hw/mk/spec/hw_imx53_qsb_tz.mk deleted file mode 100644 index 343b2bce4..000000000 --- a/repos/base-hw/mk/spec/hw_imx53_qsb_tz.mk +++ /dev/null @@ -1,11 +0,0 @@ -# -# \brief Build configurations for 'base-hw' on Freescale i.MX53 -# \author Stefan Kalkowski -# \date 2012-10-24 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw_imx53_qsb trustzone - -# include implied specs -include $(call select_from_repositories,mk/spec/hw_imx53_qsb.mk) diff --git a/repos/base-hw/mk/spec/hw_odroid_xu.mk b/repos/base-hw/mk/spec/hw_odroid_xu.mk deleted file mode 100644 index 77c099319..000000000 --- a/repos/base-hw/mk/spec/hw_odroid_xu.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw and Odroid XU -# \author Stefan Kalkowski -# \date 2013-11-25 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw odroid_xu - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# add repository relative paths -REP_INC_DIR += include/exynos5_uart - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/odroid_xu.mk) diff --git a/repos/base-hw/mk/spec/hw_panda.mk b/repos/base-hw/mk/spec/hw_panda.mk deleted file mode 100644 index f18ffd79b..000000000 --- a/repos/base-hw/mk/spec/hw_panda.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw and Pandaboard A2 -# \author Martin Stein -# \date 2011-12-20 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw panda - -# configure multiprocessor mode -NR_OF_CPUS = 2 - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/panda.mk) diff --git a/repos/base-hw/mk/spec/hw_pbxa9.mk b/repos/base-hw/mk/spec/hw_pbxa9.mk deleted file mode 100644 index 8d3d47aad..000000000 --- a/repos/base-hw/mk/spec/hw_pbxa9.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw and PBXA9 -# \author Martin Stein -# \date 2011-12-20 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw pbxa9 - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/pbxa9.mk) diff --git a/repos/base-hw/mk/spec/hw_riscv.mk b/repos/base-hw/mk/spec/hw_riscv.mk deleted file mode 100644 index c8a1d4e97..000000000 --- a/repos/base-hw/mk/spec/hw_riscv.mk +++ /dev/null @@ -1,6 +0,0 @@ -SPECS += hw riscv platform_riscv 64bit -NR_OF_CPUS = 1 -REP_INC_DIR += include/spec/riscv - -include $(call select_from_repositories,mk/spec/64bit.mk) -include $(call select_from_repositories,mk/spec/hw.mk) diff --git a/repos/base-hw/mk/spec/hw_rpi.mk b/repos/base-hw/mk/spec/hw_rpi.mk deleted file mode 100644 index fa0b1b328..000000000 --- a/repos/base-hw/mk/spec/hw_rpi.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# \brief Build configurations specific to base-hw and Raspberry Pi -# \author Norman Feske -# \date 2013-04-05 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw rpi - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/rpi.mk) diff --git a/repos/base-hw/mk/spec/hw_usb_armory.mk b/repos/base-hw/mk/spec/hw_usb_armory.mk deleted file mode 100644 index 018d09982..000000000 --- a/repos/base-hw/mk/spec/hw_usb_armory.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# \brief Build configurations for 'base-hw' on USB Armory -# \author Martin Stein -# \date 2015-02-24 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw usb_armory imx53 trustzone - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# add repository relative include paths -REP_INC_DIR += include/spec/usb_armory - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/imx53.mk) diff --git a/repos/base-hw/mk/spec/hw_wand_quad.mk b/repos/base-hw/mk/spec/hw_wand_quad.mk deleted file mode 100644 index 793b9d9ab..000000000 --- a/repos/base-hw/mk/spec/hw_wand_quad.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# \brief Build configurations for 'base-hw' on WandBoard Quad -# \author Nikolay Golikov -# \author Josef Soentgen -# \author Martin Stein -# \date 2014-02-25 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw imx6 - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/imx6.mk) diff --git a/repos/base-hw/mk/spec/hw_x86_64.mk b/repos/base-hw/mk/spec/hw_x86_64.mk deleted file mode 100644 index dffd8088a..000000000 --- a/repos/base-hw/mk/spec/hw_x86_64.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw and x86_64 -# \author Martin Stein -# \date 2011-12-20 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw x86_64 -SPECS += pci ps2 vesa framebuffer - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) -include $(call select_from_repositories,mk/spec/x86_64.mk) diff --git a/repos/base-hw/mk/spec/hw_x86_64_muen.mk b/repos/base-hw/mk/spec/hw_x86_64_muen.mk deleted file mode 100644 index 3ab1c0bdb..000000000 --- a/repos/base-hw/mk/spec/hw_x86_64_muen.mk +++ /dev/null @@ -1,11 +0,0 @@ -# -# \brief Build configs that are specific to base-hw/x86_64 on the Muen SK -# \author Reto Buerki -# \date 2015-04-14 -# - -# denote wich specs are also fullfilled by this spec -SPECS += hw_x86_64 muen - -# include implied specs -include $(call select_from_repositories,mk/spec/hw_x86_64.mk) diff --git a/repos/base-hw/mk/spec/hw_zynq.mk b/repos/base-hw/mk/spec/hw_zynq.mk deleted file mode 100644 index 7dfc8c205..000000000 --- a/repos/base-hw/mk/spec/hw_zynq.mk +++ /dev/null @@ -1,14 +0,0 @@ -# -# \brief Offer build configurations that are specific to base-hw and Zynq -# \author Johannes Schlatow -# \date 2014-12-15 -# - -# denote which specs are also fulfilled by this spec -SPECS += hw - -# configure multiprocessor mode -NR_OF_CPUS = 1 - -# include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) diff --git a/repos/base-hw/run/nested_init.run b/repos/base-hw/run/nested_init.run deleted file mode 100644 index 792148179..000000000 --- a/repos/base-hw/run/nested_init.run +++ /dev/null @@ -1,73 +0,0 @@ -# -# \brief Test genode basics by starting init instances in a nested manner -# \author Martin Stein -# \date 2012-05-30 -# - -# build program images -build "core init" - -# create directory where the boot files are written to -create_boot_directory - -# create XML configuration for init -install_config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -# create single boot image from the compiled program images -build_boot_image "core ld.lib.so init" - -# configure qemu to use 64 MB RAM and avoid GUI mode -append qemu_args " -m 64 -nographic" - -# execute the test in qemu if the targeted platform is supported -if {[have_spec hw_pbxa9]} { - run_genode_until "No children to start.*\n" 10 - puts "Test succeeded" -} - diff --git a/repos/base-hw/mk/spec/hw_imx53_qsb.mk b/repos/base/mk/spec/imx53_qsb.mk similarity index 53% rename from repos/base-hw/mk/spec/hw_imx53_qsb.mk rename to repos/base/mk/spec/imx53_qsb.mk index 94d681899..9088454fc 100644 --- a/repos/base-hw/mk/spec/hw_imx53_qsb.mk +++ b/repos/base/mk/spec/imx53_qsb.mk @@ -1,18 +1,14 @@ # -# \brief Build configurations for 'base-hw' on Freescale i.MX53 +# \brief Build-system configurations specific to i.MX53 Quickstart Board # \author Stefan Kalkowski -# \date 2012-10-24 +# \date 2017-01-02 # # denote wich specs are also fullfilled by this spec -SPECS += hw imx53_qsb imx53 - -# configure multiprocessor mode -NR_OF_CPUS = 1 +SPECS += imx53 # add repository relative include paths REP_INC_DIR += include/spec/imx53_qsb # include implied specs -include $(call select_from_repositories,mk/spec/hw.mk) include $(call select_from_repositories,mk/spec/imx53.mk) diff --git a/repos/base/mk/spec/imx6.mk b/repos/base/mk/spec/imx6.mk index 804d8efa6..26901ef5a 100644 --- a/repos/base/mk/spec/imx6.mk +++ b/repos/base/mk/spec/imx6.mk @@ -7,7 +7,7 @@ # # denote wich specs are also fullfilled by this spec -SPECS += cortex_a9 imx6 imx +SPECS += cortex_a9 imx # add repository relative include paths REP_INC_DIR += include/spec/imx6 diff --git a/repos/base/mk/spec/riscv.mk b/repos/base/mk/spec/riscv.mk new file mode 100644 index 000000000..7d7d7595f --- /dev/null +++ b/repos/base/mk/spec/riscv.mk @@ -0,0 +1,5 @@ +SPECS += 64bit +REP_INC_DIR += include/spec/riscv + +include $(call select_from_repositories,mk/spec/64bit.mk) + diff --git a/repos/base/mk/spec/usb_armory.mk b/repos/base/mk/spec/usb_armory.mk new file mode 100644 index 000000000..a96141b11 --- /dev/null +++ b/repos/base/mk/spec/usb_armory.mk @@ -0,0 +1,14 @@ +# +# \brief Build-system configurations specific to the USB armory +# \author Stefan Kalkowski +# \date 2017-01-02 +# + +# denote wich specs are also fullfilled by this spec +SPECS += imx53 + +# add repository relative include paths +REP_INC_DIR += include/spec/usb_armory + +# include implied specs +include $(call select_from_repositories,mk/spec/imx53.mk) diff --git a/repos/base/mk/spec/wand_quad.mk b/repos/base/mk/spec/wand_quad.mk new file mode 100644 index 000000000..3bbf10146 --- /dev/null +++ b/repos/base/mk/spec/wand_quad.mk @@ -0,0 +1,14 @@ +# +# \brief Build-system configurations for Wandboard Quad +# \author Stefan Kalkowski +# \date 2017-01-02 +# + +# denote wich specs are also fullfilled by this spec +SPECS += imx6 + +# add repository relative include paths +REP_INC_DIR += include/spec/wand_quad + +# include implied specs +include $(call select_from_repositories,mk/spec/imx6.mk) diff --git a/tool/create_builddir b/tool/create_builddir index 429924502..4ca26a321 100755 --- a/tool/create_builddir +++ b/tool/create_builddir @@ -31,7 +31,7 @@ usage: @echo " 'wand_quad'" @echo " 'odroid_xu'" @echo " 'odroid_x2'" - @echo " 'zynq'" + @echo " 'zynq_qemu'" @echo " 'muen'" @echo " 'riscv_spike'" @echo " 'linux'" @@ -62,7 +62,7 @@ usage: @echo " 'hw_usb_armory' (use 'usb_armory')" @echo " 'hw_wand_quad' (use 'wand_quad')" @echo " 'hw_odroid_xu' (use 'odroid_xu')" - @echo " 'hw_zynq' (use 'zynq')" + @echo " 'hw_zynq' (use 'zynq_qemu')" @echo " 'hw_x86_64_muen' (use 'muen')" @echo " 'hw_riscv' (use 'riscv_spike')" @echo " 'foc_odroid_x2' (use 'odroid_x2')" @@ -131,7 +131,7 @@ BUILD_CONF(usb_armory) := run_kernel_hw run_boot_dir repos BUILD_CONF(wand_quad) := run_kernel_hw run_boot_dir repos BUILD_CONF(odroid_xu) := run_kernel_hw run_boot_dir repos BUILD_CONF(odroid_x2) := run_kernel_foc run_boot_dir repos -BUILD_CONF(zynq) := run_kernel_hw run_qemu run_opt_hw run_boot_dir qemu_opt_arm repos +BUILD_CONF(zynq_qemu) := run_kernel_hw run_qemu run_opt_hw run_boot_dir qemu_opt_arm repos BUILD_CONF(muen) := run_kernel_hw run_opt_muen run_boot_dir repos BUILD_CONF(riscv_spike) := run_kernel_hw run_opt_spike run_boot_dir repos BUILD_CONF(linux) := run_kernel_linux repos @@ -162,7 +162,7 @@ BUILD_CONF(hw_imx53_qsb_tz) := ${BUILD_CONF(imx53_qsb_tz)} BUILD_CONF(hw_usb_armory) := ${BUILD_CONF(usb_armory)} BUILD_CONF(hw_wand_quad) := ${BUILD_CONF(wand_quad)} BUILD_CONF(hw_odroid_xu) := ${BUILD_CONF(odroid_xu)} -BUILD_CONF(hw_zynq) := ${BUILD_CONF(zynq)} +BUILD_CONF(hw_zynq) := ${BUILD_CONF(zynq_qemu)} BUILD_CONF(hw_x86_64_muen) := ${BUILD_CONF(muen)} BUILD_CONF(hw_riscv) := ${BUILD_CONF(riscv_spike)} BUILD_CONF(foc_odroid_x2) := ${BUILD_CONF(odroid_x2)} @@ -209,14 +209,14 @@ SPECS(panda) := panda SPECS(rpi) := rpi SPECS(arndale) := arndale SPECS(imx53_qsb) := imx53_qsb -SPECS(imx53_qsb_tz) := imx53_qsb_tz -SPECS(usb_armory) := hw_usb_armory usb_armory -SPECS(wand_quad) := hw_wand_quad wand_quad -SPECS(odroid_xu) := hw_odroid_xu odroid_xu +SPECS(imx53_qsb_tz) := imx53_qsb trustzone +SPECS(usb_armory) := usb_armory +SPECS(wand_quad) := wand_quad +SPECS(odroid_xu) := odroid_xu SPECS(odroid_x2) := foc_odroid_x2 odroid_x2 -SPECS(zynq_qemu) := hw_zynq zynq_qemu -SPECS(muen) := hw_x86_64_muen muen x86_64 -SPECS(riscv_spike) := hw_riscv riscv +SPECS(zynq_qemu) := zynq_qemu +SPECS(muen) := muen x86_64 +SPECS(riscv_spike) := riscv SPECS(linux) := $(HOST_SPEC_ARCH) # deprecated platforms @@ -227,27 +227,27 @@ SPECS(okl4_x86) := SPECS(pistachio_x86) := SPECS(nova_x86_32) := nova_x86_32 x86_32 acpi SPECS(nova_x86_64) := nova_x86_64 x86_64 acpi -SPECS(hw_x86_64) := hw_x86_64 x86_64 acpi +SPECS(hw_x86_64) := ${SPECS(x86_64)} SPECS(foc_x86_32) := foc_x86_32 x86_32 acpi SPECS(foc_x86_64) := foc_x86_64 x86_64 acpi SPECS(sel4_x86_32) := sel4_x86_32 x86_32 acpi -SPECS(hw_panda) := hw_panda panda perf_counter +SPECS(hw_panda) := ${SPECS(panda)} SPECS(foc_panda) := foc_panda panda -SPECS(hw_pbxa9) := hw_pbxa9 pbxa9 perf_counter +SPECS(hw_pbxa9) := ${SPECS(pbxa9)} SPECS(foc_pbxa9) := foc_pbxa9 pbxa9 -SPECS(hw_rpi) := hw_rpi rpi perf_counter +SPECS(hw_rpi) := ${SPECS(rpi)} SPECS(foc_rpi) := foc_rpi rpi -SPECS(hw_arndale) := hw_arndale arndale perf_counter +SPECS(hw_arndale) := ${SPECS(arndale)} SPECS(foc_arndale) := foc_arndale arndale -SPECS(hw_imx53_qsb) := hw_imx53_qsb imx53_qsb perf_counter +SPECS(hw_imx53_qsb) := ${SPECS(imx53_qsb)} SPECS(foc_imx53) := foc_imx53 imx53_qsb -SPECS(hw_imx53_qsb_tz) := hw_imx53_qsb_tz imx53_qsb_tz perf_counter -SPECS(hw_usb_armory) := hw_usb_armory usb_armory perf_counter -SPECS(hw_wand_quad) := hw_wand_quad wand_quad perf_counter -SPECS(hw_odroid_xu) := hw_odroid_xu odroid_xu perf_counter -SPECS(hw_zynq) := hw_zynq zynq perf_counter zynq_qemu -SPECS(hw_x86_64_muen) := hw_x86_64_muen x86_64 muen -SPECS(hw_riscv) := hw_riscv riscv +SPECS(hw_imx53_qsb_tz) := ${SPECS(imx53_qsb_tz)} +SPECS(hw_usb_armory) := ${SPECS(usb_armory)} +SPECS(hw_wand_quad) := ${SPECS(wand_quad)} +SPECS(hw_odroid_xu) := ${SPECS(odroid_xu)} +SPECS(hw_zynq) := ${SPECS(zynq_qemu)} +SPECS(hw_x86_64_muen) := ${SPECS(muen)} +SPECS(hw_riscv) := ${SPECS(riscv_spike)} SPECS(foc_odroid_x2) := foc_odroid_x2 odroid_x2 ifneq (${SPECS(${PLATFORM})},) diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 076bcef89..6ced9845e 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -7,17 +7,17 @@ proc run_boot_string { } { return "\nkernel initialized" } proc core_link_address { } { - if {[have_spec "hw_odroid_xu"]} { return "0x80000000" } - if {[have_spec "hw_pbxa9"]} { return "0x70000000" } - if {[have_spec "hw_usb_armory"]} { return "0x72000000" } - if {[have_spec "hw_x86_64"]} { return "0x00200000" } - if {[have_spec "hw_wand_quad"]} { return "0x10001000" } - if {[have_spec "hw_imx53_qsb"]} { return "0x70010000" } - if {[have_spec "hw_arndale"]} { return "0x80000000" } - if {[have_spec "hw_panda"]} { return "0x81000000" } - if {[have_spec "hw_zynq"]} { return "0x00100000" } - if {[have_spec "hw_riscv"]} { return "0x00000200" } - if {[have_spec "hw_rpi"]} { return "0x00800000" } + if {[have_spec "odroid_xu"]} { return "0x80000000" } + if {[have_spec "pbxa9"]} { return "0x70000000" } + if {[have_spec "usb_armory"]} { return "0x72000000" } + if {[have_spec "x86_64"]} { return "0x00200000" } + if {[have_spec "wand_quad"]} { return "0x10001000" } + if {[have_spec "imx53_qsb"]} { return "0x70010000" } + if {[have_spec "arndale"]} { return "0x80000000" } + if {[have_spec "panda"]} { return "0x81000000" } + if {[have_spec "zynq"]} { return "0x00100000" } + if {[have_spec "riscv"]} { return "0x00000200" } + if {[have_spec "rpi"]} { return "0x00800000" } puts "unknown platform no linker address known" exit -1 @@ -30,7 +30,7 @@ proc core_link_address { } { proc run_boot_dir {binaries} { # generate static ACPI report for platform driver on Muen - if {[have_spec "hw_x86_64_muen"]} { + if {[have_spec "x86_64_muen"]} { set fh [open "bin/acpi" "WRONLY CREAT TRUNC"] puts $fh "" close $fh diff --git a/tool/run/power_on/spike b/tool/run/power_on/spike index d1dfa10ae..7cf35bb79 100644 --- a/tool/run/power_on/spike +++ b/tool/run/power_on/spike @@ -5,7 +5,7 @@ source [genode_dir]/tool/run/spike.inc proc is_spike_available { } { - if {[have_spec platform_riscv]} { return true } + if {[have_spec riscv]} { return true } puts stderr "skipping execution because platform is not supported by spike" return false