Rate This Document
Findability
Accuracy
Completeness
Readability

Uploading the ExaGear Transcoding Package

Automatically Enabling ExaGear Transcoding

When you use the startup script to start the Kbox container, the script automatically enables the ExaGear transcoding function based on the ExaGear transcoding package in the ~/dependency directory. Note that 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 during Kbox container startup.

Perform the following steps:

  1. Upload the ExaGear transcoding package Exagear-ARM32-ARM64.tar.gz to ~/dependency. Configure appropriate permissions on the uploaded files and directories. You are not advised to configure the write permission for other owner groups.
  2. Decompress the patch package and adjust the permissions.
    1
    2
    3
    cd ~/dependency/
    tar -xzvf Exagear-ARM32-ARM64.tar.gz
    chown -R root:root output
    

(Optional) Manually Enabling ExaGear Transcoding

If ExaGear transcoding fails to be automatically enabled, manually enable it after uploading the transcoding package.

  1. Upload the ExaGear transcoding package Exagear-ARM32-ARM64.tar.gz to ~/dependency. Configure appropriate permissions on the uploaded files and directories. You are not advised to configure the write permission for other owner groups.
  2. Decompress the patch package and adjust the permissions.
    1
    2
    3
    cd ~/dependency/
    tar -xzvf Exagear-ARM32-ARM64.tar.gz
    chown -R root:root output
    
  3. Mount the binfmt_misc file system.

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

    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
  4. Create an /opt/exagear directory for storing the ubt_a32a64 file.
    mkdir -p /opt/exagear 
    chmod -R 700 /opt/exagear
  5. Copy the ubt_a32a64 file to the /opt/exagear directory.
    cp ~/dependency/output/ubt_a32a64 /opt/exagear/
  6. Mount and register the ExaGear transcoding rules.
    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
  7. 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.
    cat /proc/sys/fs/binfmt_misc/ubt_a32a64

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

    enabled 
    interpreter /opt/exagear/ubt_a32a64 
    flags: POCF 
    offset 0 
    magic 7f454c4601010100000000000000000002002800 
    mask ffffffffffffff00fffffffffffffffffeffffff