blob: 2b354fa808b72ba1bdbaf98b77a0f9546b296c46 [file] [log] [blame]
mosys - The more open system tool
Mosys is designed to aid in obtaining obscure system-specific information
and present it in a uniform, human-friendly manner that is also parseable. It
is intended to complement other systems software and may overlap in some areas.
Configuration & Building
Mosys uses meson to build. To setup the build, use:
meson output_dir
Flags of interest:
-Duse_cros_config=true/false: whether to enable linking to cros_config for
Chrome OS. See Chrome OS example in Mosys ebuild.
To build with use_cros_config=true, you need one file that is dynamically
provided as inputs to the build process from other ebuilds in the Chrome OS
build system:
You can use -Dcros_config_data_src to override the config file that will be used
by the build system.
If you just want to compile something quickly, you can do:
cp lib/cros_config/dummy_cros_config_data.c lib/cros_config/cros_config_data.c
Then, to compile mosys, run:
ninja -C output_dir
The mosys executable will be placed at `output_dir/mains/mosys`.
Mosys uses a natural language syntax to navigate thru a command hierarchy for
a given platform. Each supported platform will have a specific set of commands
Mosys returns EXIT_SUCCESS upon successful completion of a command, or
EXIT_FAILURE if a command is not supported on a given platform. These values
are defined in the system's stdlib.h. In case of failure, Mosys will also print
a message to stderr to let the user know.
Use "mosys -t" to display the command tree for the host platform.
Mosys uses a minijail to restrict behavior. This can sometimes restrict desired
behavior, especially system calls not whitelisted by the seccomp filter.
If a subcommand is returning with an error that should be passing, this might
be why. In order to debug this, run with the failing command.
This will print out the system calls that caused the run to fail.
For example, to debug `mosys ec info`, copy over `` to
the DUT and run:
./ mosys ec info