Rate This Document
Findability
Accuracy
Completeness
Readability

Modifying the Kernel Module

In the DC1000 GPU hardware environment, the host kernel needs to be adapted for driver installation on the VM. Obtain the kernel source code in advance.

  1. Obtain the kernel source code. See Table 4.
  2. Decompress the kernel source code and go to the root directory.
    unzip 5.10.0-216.0.0.zip
    cd 5.10.0-216.0.0
  3. Obtain the kernel patch file general.patch according to Obtaining the Software Package.
  4. Apply the patch in the kernel source code directory 5.10.0-216.0.0.
    patch -p1 < general.patch
  5. Generate a .config file in the source code directory.
    cp /boot/config-5.10.0-216.0.0.115.oe2203sp4.aarch64 .config
    make menuconfig
  6. Select Load in the following page:

  7. Select Ok in the following page:

  8. On the kernel configuration interface, configure the kernel compilation options listed in Table 1.
    Table 1 Kernel compilation options

    Option

    Required Value

    LOCALVERSION

    -patched-vm

    DEBUG_INFO_BTF

    N

    Configuration methods:

    • Press / for search.
    • Press Y to compile the selected item into the kernel. The corresponding item is displayed as [*].
    • Press N to exclude the selected item. The corresponding item is displayed as [].
    • Press M to compile the selected item into a module (in KO format). The corresponding item is displayed as <M>.
    • Press Enter to edit the selected item.
    • Press the corresponding number to select a search result.
    • After the modification is complete, select <Save> to save the modification.
    • After saving the modification, select <Exit> to exit.
  9. Install dependencies and enable the LXCFS service. If you need to divide the command into multiple lines, add a backslash (\) at the end of each line.
    yum install -y dwarves dpkg dpkg-devel openssl openssl-devel ncurses ncurses-devel bison flex bc libdrm build elfutils-libelf-devel docker lxc lxcfs lxcfs-tools git tar patch make gcc
    systemctl start lxcfs
    systemctl enable lxcfs

  10. Compile the kernel code.
    make -j72
  11. Install the new kernel.
    make modules_install 
    make install