diff --git a/repos/base-hw/doc/x86_64_muen.txt b/repos/base-hw/doc/x86_64_muen.txt index 2293d7457..100b9551a 100644 --- a/repos/base-hw/doc/x86_64_muen.txt +++ b/repos/base-hw/doc/x86_64_muen.txt @@ -44,19 +44,20 @@ are all set to their default values. Muen systems are built for a specific hardware platform and by default the system is built for the Lenovo T430s. All currently supported platforms have a corresponding hardware specification which can be found in the Muen project -directory under 'policy/platform'. Note that the Muen project directory can be +directory under 'policy/hardware'. Note that the Muen project directory can be found at '/contrib/muen-*/src/kernel/muen'. -To get a list of all currently supported platforms issue the following command: +To get a list of all currently supported hardware platforms issue the following +command: -! ls contrib/muen-*/src/kernel/muen/policy/platform/ | grep -v common +! ls contrib/muen-*/src/kernel/muen/policy/hardware/ | grep -v common -Set the '--image-muen-hardware' parameter to point to the hardware -configuration file of your intended hardware platform. Note that the specified -paths for both '--image-muen-hardware' and '--image-muen-system' must be either -relative to the Muen policy directory (e.g. 'platform/lenovo-t430s.xml' or -'xml/genode-base_hw_simple.xml') or absolute paths. Also change the -other parameters to match your environment. +Set the '--image-muen-hardware' and '--image-muen-platform' parameters to point +to the configuration files of your intended hardware platform. Note that the +specified paths for both '--image-muen-hardware', '--image-muen-platform' and +'--image-muen-system' must be either relative to the Muen policy directory +(e.g. 'platform/lenovo-t430s.xml' or 'xml/genode-base_hw_simple.xml') or +absolute paths. Also change the other parameters to match your environment. If no hardware configuration for your specific hardware is available, refer to the README of the 'mugenhwcfg' tool @@ -124,7 +125,8 @@ As a first step acquire the Muen sources by executing the following commands: ! git clone https://git.codelabs.ch/git/muen.git ! cd muen ! git submodule update --init tools/mugenschedcfg -! make SYSTEM=xml/genode-base_hw_simple.xml COMPONENTS="libdebuglog libmutime dbgserver sm time" emulate +! git submodule update --init components/libxhcidbg +! make SYSTEM=xml/genode-base_hw_simple.xml COMPONENTS="libdebuglog libmutime libxhcidbg dbgserver sm time" emulate This will build a Muen SK system and start it using the Bochs emulator. You should get the following error: diff --git a/repos/base-hw/ports/muen.hash b/repos/base-hw/ports/muen.hash index 8e960065e..8a77d3ba5 100644 --- a/repos/base-hw/ports/muen.hash +++ b/repos/base-hw/ports/muen.hash @@ -1 +1 @@ -dfbf501a757052d1a484e1379673534436dc3a6c +13c70f0751d96600723acdde3200745e93395717 diff --git a/repos/base-hw/ports/muen.port b/repos/base-hw/ports/muen.port index ce14ad5d6..9fcf6e7f6 100644 --- a/repos/base-hw/ports/muen.port +++ b/repos/base-hw/ports/muen.port @@ -3,7 +3,7 @@ VERSION := git DOWNLOADS := muen.git URL(muen) := https://git.codelabs.ch/git/muen.git -REV(muen) := 8592db3f6682387d4384120a0b13c347a84587e5 +REV(muen) := 5d3b56c261804f318fb5c91a93799315c740f1a2 DIR(muen) := src/kernel/muen $(call check_tool,git) diff --git a/repos/base-hw/src/kernel/spec/muen/target.mk b/repos/base-hw/src/kernel/spec/muen/target.mk index 13f84d332..41c4d9efe 100644 --- a/repos/base-hw/src/kernel/spec/muen/target.mk +++ b/repos/base-hw/src/kernel/spec/muen/target.mk @@ -8,12 +8,13 @@ MUEN_LOG = $(MUEN_BUILD_DIR)/build.log MUEN_SYSTEM = $(shell sed -n "/^SYSTEM/s/^.*=\\s*//p" ${MUEN_CONF_FILE}) MUEN_HARDWARE = $(shell sed -n "/^HARDWARE/s/^.*=\\s*//p" ${MUEN_CONF_FILE}) +MUEN_PLATFORM = $(shell sed -n "/^PLATFORM/s/^.*=\\s*//p" ${MUEN_CONF_FILE}) MUEN_COMPONENTS = $(shell sed -n "/^COMPONENTS/s/^.*=\\s*//p" ${MUEN_CONF_FILE}) GNAT_PATH = $(shell sed -n "/^GNAT_PATH/s/^.*=\\s*//p" ${MUEN_CONF_FILE}) SPARK_PATH = $(shell sed -n "/^SPARK_PATH/s/^.*=\\s*//p" ${MUEN_CONF_FILE}) BUILD_ENV = PATH=$(GNAT_PATH)/bin:$(SPARK_PATH)/bin:$$PATH -BUILD_OPTS = SYSTEM=$(MUEN_SYSTEM) HARDWARE=$(MUEN_HARDWARE) NO_PROOF=true +BUILD_OPTS = SYSTEM=$(MUEN_SYSTEM) HARDWARE=$(MUEN_HARDWARE) PLATFORM=$(MUEN_PLATFORM) NO_PROOF=true ifneq ($(filter muen, $(SPECS)),) $(TARGET): $(MUEN_DST_DIR) @@ -34,6 +35,7 @@ $(MUEN_DST_DIR): download_contrib download_contrib: $(MUEN_SRC_DIR) $(MSG_BUILD)Muen contrib $(VERBOSE)cd $(MUEN_SRC_DIR) && git submodule update --init tools/mugenschedcfg > $(MUEN_LOG) 2>&1 + $(VERBOSE)cd $(MUEN_SRC_DIR) && git submodule update --init components/libxhcidbg > $(MUEN_LOG) 2>&1 $(VERBOSE)$(BUILD_ENV) $(MAKE) -C $(MUEN_SRC_DIR)/contrib \ QUIET=true download >> $(MUEN_LOG) 2>&1 diff --git a/tool/builddir/build.conf/run_opt_muen b/tool/builddir/build.conf/run_opt_muen index 47f6d18ed..194e989ed 100644 --- a/tool/builddir/build.conf/run_opt_muen +++ b/tool/builddir/build.conf/run_opt_muen @@ -11,7 +11,15 @@ RUN_OPT = --include boot_dir/hw --include image/muen # The specified file must be relative to the Muen policy directory or an # absolute path. # -RUN_OPT += --image-muen-hardware platform/lenovo-t430s.xml +RUN_OPT += --image-muen-hardware hardware/lenovo-t430s.xml + +# +# Muen platform configuration +# +# The specified file must be relative to the Muen policy directory or an +# absolute path. +# +RUN_OPT += --image-muen-platform platform/lenovo-t430s.xml # # Directory, where the GNAT toolchain is installed @@ -36,7 +44,7 @@ RUN_OPT += --image-muen-system xml/genode-base_hw.xml # # Available components are located in the Muen project directory 'components/'. # -RUN_OPT += --image-muen-components 'libdebuglog libmutime dbgserver sm time' +RUN_OPT += --image-muen-components 'libdebuglog libmutime libxhcidbg dbgserver sm time' # # External Muen build diff --git a/tool/run/image/muen b/tool/run/image/muen index a109c68c8..05f1a378a 100644 --- a/tool/run/image/muen +++ b/tool/run/image/muen @@ -4,7 +4,8 @@ # \param --image-muen-external-build Muen system is built automatically or externally # \param --image-muen-system Muen system policy # \param --image-muen-components Muen system components -# \param --image-muen-hardware Muen hardware platform +# \param --image-muen-hardware Muen hardware specification +# \param --image-muen-platform Muen platform specification # \param --image-muen-gnat-path Path to GNAT toolchain # \param --image-muen-spark-path Path to SPARK toolchain # @@ -24,6 +25,10 @@ proc muen_hardware { } { return [get_cmd_arg --image-muen-hardware ""] } +proc muen_platform { } { + return [get_cmd_arg --image-muen-platform ""] +} + proc muen_gnat_path { } { return [get_cmd_arg --image-muen-gnat-path "/usr/gnat"] } @@ -58,6 +63,7 @@ proc run_image {elf_img} { puts $fh "SYSTEM = [muen_system]" puts $fh "COMPONENTS = \"[muen_components]\"" puts $fh "HARDWARE = [muen_hardware]" + puts $fh "PLATFORM = [muen_platform]" close $fh # @@ -76,6 +82,6 @@ proc run_image {elf_img} { # Package Muen system image # exec cp $bin_img "kernel/muen/policy/obj/base_hw" - exec make -C kernel/muen/pack SYSTEM=[muen_system] HARDWARE=[muen_hardware] + exec make -C kernel/muen/pack SYSTEM=[muen_system] HARDWARE=[muen_hardware] PLATFORM=[muen_platform] exec cp kernel/muen/pack/obj/muen.img "[run_dir]/image.bin" }