Skip to content

SEMA BMC Installation Guide for Linux

Kothandaraman Kannadansan edited this page Jul 12, 2024 · 7 revisions

1. Installing build-essential packages

Install build-essential packages and download and compile SEMA-BMC source code by executing the following commands in the terminal.

sudo apt-get update && sudo apt upgrade

sudo apt-get install build-essential git hexer i2c-tools

Note: For Ubuntu kernel versions greater than 6.5.0-18-generic (like Ubuntu 22.04.04), gcc-12 needs to be manually installed. To install gcc-12, execute the following command.

sudo apt-get install gcc-12

2. Cloning and compiling the SEMA BMC

Clone the SEMA source code from the ADLINK GitHub.

git clone https://github.com/ADLINK/sema-linux.git -b sema-bmc

Go to the cloned source code directory.

cd sema-linux

3. Load the i2c_i801 driver

To access SEMA in BMC boards, ADLINK’s i2c_i801 driver must be installed before installing SEMA driver modules.

Unload the i2c_i801 driver, which was loaded during boot.

sudo rmmod i2c_i801

Enter the path of the ‘i2c-smbus-drivers’ directory. This i2c-smbus-drivers directory contains i2c_i801 drivers supported for specific kernels.

cd i2c-smbus-drivers 

Go to the i2c-smbus-X.XX file corresponding to the Linux kernel version used. In this case, navigate to i2c-smbus-5.4 if your Linux kernel is version 5.4

cd i2c-smbus-5.4

Execute the make command to compile the driver.

sudo make

Load the i2c-i801 driver now.

sudo insmod i2c-i801.ko

4. Compiling SEMA BMC

Leave the i2c_smbus_drivers directory. Navigate to the sema-linux directory

cd ../..

Run the command to compile and install the SEMA BMC. There may be some warning messages during compilation, so ignore them.

sudo make

Stay in the same directory, and you can install the SEMA BMC.

sudo make install

5. Probing the kernel modules

After installing the SEMA, you need to probe the required kernel modules.

sudo modprobe -a adl-bmc adl-bmc-boardinfo adl-bmc-vm adl-bmc-wdt adl-bmc-hwmon adl-bmc-nvmem adl-bmc-bklight adl-bmc-i2c

5. Installation path

The installation will be on your board in the following path.

File Description
libsema.so EAPI library is located under /usr/lib/
semautil SEMA command line utility is located under /usr/bin/
SEMA modules SEMA driver modules are located under /usr/bin/