Skip to content

feat: Centos Stream 9 support for the kmod. #164

feat: Centos Stream 9 support for the kmod.

feat: Centos Stream 9 support for the kmod. #164

Workflow file for this run

name: Linux kernel module
on:
push:
paths:
- "mrmShared/linux/**"
- ".github/workflows/linux-build.yml"
pull_request:
paths:
- "mrmShared/linux/**"
- ".github/workflows/linux-build.yml"
workflow_dispatch:
jobs:
specific:
name: With ${{ matrix.version }}
runs-on: ${{ matrix.os }}
env:
KSER: ${{ matrix.series }}
KVER: ${{ matrix.version }}
CC: ${{ matrix.cc }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 22.04 - Series 4.x
os: ubuntu-22.04
series: 4.x
version: 4.9.1
- name: Ubuntu 22.04 - Series 5.x
os: ubuntu-22.04
series: 5.x
version: 5.9.6
- name: Ubuntu 22.04 - Series 6.x
os: ubuntu-22.04
series: 6.x
version: 6.5.9
- name: Ubuntu 22.04 - Centos Stream 9 Linux kernel
os: ubuntu-22.04
series: 6.x
version: Centos Stream 9 Linux kernel
alt_kernel: true
url: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9
steps:
- uses: actions/checkout@v2
- name: Info
run: |
gcc --version
- name: Deps
run: |
sudo apt-get update
# linux-headers-* only to pull in kbuild deps
sudo apt-get -y install linux-headers-`uname -r` kmod libelf-dev
[ "${{ matrix.cc }}" != "gcc-4.8" ] || sudo apt-get -y install gcc-4.8
- name: Setup Linux
if: ${{ ! matrix.alt_kernel }}
run: |
install -d kernel
if [ "$KSER" == "latest" ]; then
KSER=$(curl -s https://cdn.kernel.org/pub/linux/kernel/ | grep -o 'v[0-9]\+\.[0-9a-zA-Z]\+/' | sed 's/\/\s*//' | sort -t. -k2,2V -k3,3V -k4,4V | tail -n 1 | sed 's/v//')
fi
if [ "$KVER" == "latest" ]; then
KVER=$(curl -s https://cdn.kernel.org/pub/linux/kernel/v$KSER/ | grep -o 'linux-[0-9]\+\.[0-9]\+\.[0-9]\+\.tar\.xz' | sort -t- -k2,2n -k3,3n -k4,4n | tail -n 1 | sed 's/linux-\(.*\)\.tar\.xz/\1/')
fi
echo "https://cdn.kernel.org/pub/linux/kernel/v$KSER/linux-$KVER.tar.xz"
curl -s https://cdn.kernel.org/pub/linux/kernel/v$KSER/linux-$KVER.tar.xz | tar -C kernel --strip-components=1 -xJ
make -C kernel CC=${CC:=gcc} defconfig
make -C kernel CC=${CC:=gcc} modules_prepare
- name: Setup Centos Stream 9 kernel source
if: ${{ matrix.alt_kernel }}
run: |
install -d kernel
git clone --depth 1 ${{ matrix.url }} kernel
make -C kernel CC=${CC:=gcc} defconfig
make -C kernel CC=${CC:=gcc} modules_prepare
- name: Build
run: |
KBUILD_MODPOST_WARN=1 make -C mrmShared/linux CC=${CC:=gcc} KERNELDIR="$PWD/kernel"
host:
name: With VM host
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Info
run: |
uname -a
gcc --version
- name: Deps
run: |
sudo apt-get update
sudo apt-get -y install linux-headers-`uname -r`
- name: Build
run: make -C mrmShared/linux
- name: Install/Load
run: |
sudo make -C mrmShared/linux modules_install
sudo depmod -a
sudo modprobe mrf
sudo dmesg | tail -n 100