Rate This Document
Findability
Accuracy
Completeness
Readability

Enabling ExaGear Transcoding

Each time the server is restarted, perform 6 and 7 in this section to manually register transcoding rules.

  1. Mount the binfmt_misc file system.
    It is mounted by default. If not, manually mount it.
    1
    # sudo mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    
  2. Create an /opt/exagear directory for storing the ubt_a32a64 file.
    1
    2
    # sudo mkdir -p /opt/exagear
    # sudo chmod -R 700 /opt/exagear
    
  3. Upload the ExaGear transcoding package Exagear-ARM32-ARM64.tar.gz to ~/dependency. 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.
  4. Decompress the patch package and adjust the permissions.
    1
    2
    3
    4
    # cd ~/dependency/
    # sudo tar -xzvf Exagear-ARM32-ARM64.tar.gz
    # sudo chown -R root:root output
    # sudo chmod -R 700 output
    
  5. Copy the ubt_a32a64 file to the /opt/exagear directory.
    The ubt_a32a64 file is stored in ~/dependency/Exagear-ARM32-ARM64/output.
    1
    2
    # cd ~/dependency/output
    # sudo cp ubt_a32a64 /opt/exagear/
    
  6. Mount and register the ExaGear transcoding rules.
    Note that the following paths (/opt/exagear/ubt_a32a64 in this example) for storing the ubt_a32a64 binary file must be the same.
    1
    2
    3
    # sudo chmod +x /opt/exagear/ubt_a32a64
    # translator_name=ubt_a32a64
    # sudo echo ":${translator_name}: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.
    1
    # sudo cat /proc/sys/fs/binfmt_misc/ubt_a32a64
    

    If the output shown in the following figure is displayed, the registration is successful.