Rate This Document
Findability
Accuracy
Completeness
Readability

Applying Kernel Patches

Apply kernel patches into the kernel source code directory to support Kbox.

  1. Create a directory for storing the dependency packages required for environment setup and change the directory permission.
    1
    2
    mkdir ~/dependency
    chmod -R 700 ~/dependency
    
  2. Decompress Kbox-AOSP11.zip and upload the patchForKernel and patchForExagear directories in the Kbox-AOSP11 folder to the ~/dependency directory on the server. Configure appropriate permissions on the uploaded files and directories. It is not recommended to configure the write permission for other users in the owner group and other owner groups.
  3. Copy the transcoding patch to the kernel source code directory.
    cp ~/dependency/patchForExagear/hostOS/0001-exagear-kernel-module.patch /usr/src/kernels/kernel-5.10.0-136.12.0
  4. Copy the kernel patches to the kernel source code directory.
    • For kernel version 5.10.0-136.12.0, use the kernel patch in the patchForKernel/openEuler_22.03/kernel_5.10.0-136.12.0 directory.
    • For kernel version 5.10.0-182.0.0, use the kernel patch in the patchForKernel/openEuler_22.03/kernel_5.10.0-182.0.0 directory.
    1
    cp ~/dependency/patchForKernel/openEuler_22.03/kernel_5.10.0-136.12.0/*.patch /usr/src/kernels/kernel-5.10.0-136.12.0
    
  5. Apply the patches in the following sequence:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    cd /usr/src/kernels/kernel-5.10.0-136.12.0
    patch -p1 < 0001-exagear-kernel-module.patch
    patch -p1 < 0001.add_kbox_kernel_config.patch
    patch -p1 < 0002.include_exagear_kconfig.patch
    patch -p1 < 0003.enable_amdgpu_W6800.patch
    patch -p1 < 0004.enable_binderfs.patch
    patch -p1 < 0005.add_a_field_to_store_names_for_private_anonymous_mem.patch
    patch -p1 < 0006.add_android_alarm_driver.patch
    patch -p1 < 0007.hide_cgroup_dockerinfo_in_docker.patch
    patch -p1 < 0008.fix_meminfo_in_docker.patch
    patch -p1 < 0009.enable_cgroup.patch