NVIDIA GPIO Status Handler
| OS | Build Tool Package | Code Support Package |
|---|---|---|
| Ubuntu 20.04 | g++ autoconf autoconf-archive pkg-config libtool-bin doxygen graphviz |
OpenBMC SDK |
| Cygwin | g++ autoconf autoconf-archive pkg-config libtool-bin doxygen graphviz |
OpenBMC SDK |
|
OpenBMC SDK Installation Instructions: link
Instead of setting up those manually, run following script inside source code folder will help,
$ sudo scripts/setup_bldenvNOTE: Cygwin packages need to be installed manually with Cygwin setup utility!
The general build steps are as below, inside source code folder and run,
$ meson builddir # configure
$ ninja -C builddir # build
$ ninja -C builddir install # Optional
Project Options are defined as below, any combinations of them are valid,
| Mode | Project options |
Possible Values | Description |
|---|---|---|---|
| API Stubs | api_stubs |
[enabled, disabled, auto] | Build this modeule using stub APIs included in directory, |
| src/stubs | |||
| Sandbox | sandbox_mode |
[enabled, disabled, auto] | Build this module for the host CPU architecture, so as to develop & debug & verify without burning code into BMC with real hardware. |
To clean build cache,
$ ninja -C builddir clean
$ ninja -C builddir uninstall #optionalTo completely clean the workspace,
$ rm -rf builddirThese commands would work for clean projects. If already configured, refer section
$ meson builddir -Dapi_stubs=enabled
$ ninja -C builddir
$ ninja -C builddir install # Optional$ meson builddir -Dsandbox_mode=enabled
$ ninja -C builddir
$ ninja -C builddir install # Optional$ meson builddir -Ddebug_log={0,1,2,3,4}
$ ninja -C builddir
$ ninja -C builddir install # OptionalIf the project is already configured using,
$ meson builddir, user can use meson configure to view/edit project options.
The complete list of project options can be accessed,
$ cd builddir
$ meson configure
Project options Current Value Possible Values Description
--------------- ------------- --------------- -----------
api_stubs auto [enabled, disabled, auto] Manager API stubs enablement
sandbox_mode enabled [enabled, disabled, auto] Sandbox mode enablementOptions can be edited,
$ cd builddir # If not already
$ meson configure -Dapi_stubs=enabledDebug Log Level supports to be configured on both build time and runtime.
There are 5 logging levels supported,
| Level | Index |
|---|---|
| disabled | 0 |
| error | 1 (default) |
| warning | 2 |
| debug | 3 |
| info | 4 |
|
By default, the logging level is 1 - error. To change the default log level before building, e.g. to 3 - debug, in openbmc repo, modify the recipe by changing the following line,
EXTRA_OEMESON += "-Ddebug_log=1"To change the logging level during runtime, e.g. to 3 - debug, we need to pass following command line argument.
-l <level> 0 - None; 1 - +Error; 2 - +Warning; 3 - +InfoTo change the target for log output during runtime, e.g. to /tmp/gsh_debug.log, we need to pass following command line argument.
-L <log_file> where to output the log. Output to screen if the arg not present.