我要评分
获取效率
正确性
完整性
易理解

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. You are not advised to configure the write permission for other owner groups.
  3. Copy the transcoding patch to the kernel source code directory.
    1
    cp ~/dependency/patchForExagear/hostOS/openEuler_22.03/0001-exagear-adapt-kernel-5.10.0-136.12.0.patch /usr/src/kernels/kernel-5.10.0-136.12.0
    
  4. Copy the kernel patches to the kernel source code 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-adapt-kernel-5.10.0-136.12.0.patch
    patch -p1 < 0001.pid_max_limit.patch
    patch -p1 < 0002.mmap.patch
    patch -p1 < 0003.enable_amdgpu_W6800.patch
    patch -p1 < 0004.disableSECCOMP.patch
    patch -p1 < 0005.enable_binderfs.patch
    patch -p1 < 0006.add_a_field_to_store_names_for_private_anonymous_mem.patch
    patch -p1 < 0007.add_android_alarm_driver.patch
    patch -p1 < 0008.fix_cgroup_in_docker.patch
    patch -p1 < 0009.fix_meminfo_in_docker.patch