Site logo
Stories around the Genode Operating System RSS feed
Josef Söntgen avatar

Manually installing wsman(1)

For convenience and to some degree also necessity most of our x86-based test machines feature AMT to power-cycle the system and also gain serial console access via SOL. On recent systems the controlling part is done via WS-MAN, for which a package is not always readily available on Linux distributions. The following post gives short instructions on how to build it manually and illustrates one or the other pitfall.

Please skim the complete post first before following the instructions.

Two ingredients are required: libwsman from openwsman that implements the protocol and wsman from wsmancli that provides the console interface.


First we build libwsman with a minimal configuration - suited for our use-case at hand - that in return requires the following dependencies:


Depending on the used Linux distribution the packages may be named differently.

Next we download the source-code, other means like using git directly work as well, and extract the archive.

 $ wget -O wsman-2.7.2.tar.gz
 $ tar xzf wsman-2.7.2.tar.gz
 $ cd wsman-2.7.2

The cmake configuration contains options, mainly for interfacing with the library, that are not necessary for our use-case and will be disabled.

Then we configure, compile and install the library to a location, /usr/local, that does not interfere with the Linux distributions own package management.

 $ cd build
 $ make -j8
 $ make install DESTDIR=`pwd`/install # optional to collect a list for later removal
 # make install

Cmake will print its results during the configuration step, pay close attention to install location

 -- […]
 -- Building for x86_64
 -- Libraries will be installed in /usr/local/lib
 -- Configuration will be installed in /usr/local/etc/openwsman
 -- Disabling PAM authentication
 -- Found OpenSSL: /usr/lib/ (found version "3.1.4")
 -- […]

as on glibc-based systems, managing the dynamic-linker cache via ldconfig (and /etc/ may be necessary.

You can further refine the install location by setting LIB:

 $ cmake -S . -B -DLIB=lib -D…


Next we install wsman, which has the following build dependencies:


Like with libwsman we download and extract the archive first.

 $ wget -O wsman-cli-v2.6.2.tar.gz
 $ tar xzf wsman-cli-v2.6.2.tar.gz
 $ cd wsmancli-2.6.2

Then we generate the usual auto-tools related files, namely the infamous configure script, use it to generate the Makefiles and compile and install wsman.

 $ ./bootstrap
 $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure
 $ make install DESTDIR=`pwd`/install # optional to collect a list for later removal
 # make install

Depending on your distribution the pkg-config files from libwsman might not be picked up by the configure script since they are not installed in a regular location. Setting the PKG_CONFIG_PATH to the location solves that problem.

If wsman cannot be executed because is not found, check the ld cache first via

 $ ldconfig -N -X -v

and update the cache if the libraries are indeed missing.

 # ldconfig

(Of course you are free to use other means, setting the rpath and so on to achieve the same goal.)


Since amtterm is required for accessing the AMT's SOL and might also not be available on any given Linux distribution, here are additional instructions to build that and install it to /usr/local as well:

 $ git clone
 $ cd amtterm
 $ make SHELL=bash -j8  # make sure to use bash if current shell is different
 $ make install DESTDIR=`pwd`/install # optional to collect a list for later removal
 # make install

By now there is one or the other post available on that illustrates how these tool are utilized by Genode's testing infrastructure, using wsman amtterm in your preferred search-engine will point you the way.