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

Uploading the ExaGear Transcoding Package

When a script is used to start the Kbox container, ExaGear transcoding is required. This function is automatically enabled if the ExaGear transcoding package exists in the ~/dependency directory. Therefore, upload the ExaGear transcoding package to this directory in advance. If the automatic enabling fails, manually enable the ExaGear transcoding function.

  1. Upload the ExaGear transcoding package ExaGear_ARM32-ARM64_V2.5.tar.gz to ~/dependency. Assign appropriate permissions on the uploaded files and directories. You are not advised to assign the write permission for other user groups.
  2. Decompress the transcoding package and adjust the permissions.
    1
    2
    3
    cd ~/dependency/
    tar -xzvf ExaGear_ARM32-ARM64_V2.5.tar.gz
    chown -R root:root ExaGear_ARM32-ARM64
    

    Only one ExaGear transcoding package can be retained in the ~/dependency directory. If an earlier ExaGear transcoding package exists, delete it. Otherwise, the error message "Many ubt_a32a64 files exist!" is displayed when the Kbox container is started.

Generally, you do not need to perform the following steps.

If ExaGear transcoding fails to be automatically enabled, perform the following steps to manually enable this function after decompressing the transcoding package (that is, after step 2 is performed).

  1. Mount the binfmt_misc file system.

    It is mounted by default. If not, manually mount it.

    1
    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    
  2. Create an /opt/exagear directory for storing the ubt_a32a64 file.
    1
    2
    mkdir -p /opt/exagear 
    chmod -R 700 /opt/exagear
    
  3. Copy the ubt_a32a64 file to the /opt/exagear directory.
    1
    cp ~/dependency/ExaGear_ARM32-ARM64/ubt_a32a64 /opt/exagear/
    
  4. Mount and register the ExaGear transcoding rules.
    1
    echo ":ubt_a32a64:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/opt/exagear/ubt_a32a64:POCF" > /proc/sys/fs/binfmt_misc/register
    
  5. Check whether the ExaGear rules are successfully registered and ensure that the directories for storing the ubt_a32a64 file are consistent with /opt/exagear/ubt_a32a64.
    1
    cat /proc/sys/fs/binfmt_misc/ubt_a32a64
    

    If the following information is displayed, the registration is successful:

    1
    2
    3
    4
    5
    6
    enabled 
    interpreter /opt/exagear/ubt_a32a64 
    flags: POCF 
    offset 0 
    magic 7f454c4601010100000000000000000002002800 
    mask ffffffffffffff00fffffffffffffffffeffffff