Rate This Document
Findability
Accuracy
Completeness
Readability

Using ExaGear

Question

How to use ExaGear in the cloud phone solution?

Answer

The Kunpeng 920 processor supports only 64-bit instructions. To run 32-bit instructions, you need to use ExaGear for transcoding (that is, converting 32-bit instructions to 64-bit instructions).

Enabling method:

  1. Contact Huawei technical support engineers to obtain the ExaGear software package.
  2. Upload the ExaGear transcoding package (ExaGear_ARM32-ARM64_V2.5.tar.gz) to the ~/dependency directory. Properly configure the permission on the uploaded files and directories. You are not advised to configure the write permission for other user groups.
  3. Decompress the binary transcoding package and adjust the permission.
    1
    2
    3
    4
    cd ~/dependency/
    sudo tar -xzvf ExaGear_ARM32-ARM64_V2.5.tar.gz
    sudo chown -R root:root output
    sudo chmod -R 700 output
    
  4. Copy the ubt_a32a64 file to the /opt/exagear directory.
    The ubt_a32a64 file is originally stored in ~/dependency/output.
    1
    2
    cd ~/dependency/output
    sudo cp ubt_a32a64 /opt/exagear/
    
  5. Mount and register the ExaGear transcoding rule.

    The following /opt/exagear/ubt_a32a64 paths for storing and using the ubt_a32a64 binary file must be the same.

    1
    2
    sudo chmod +x /opt/exagear/ubt_a32a64
    sudo 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
    
  6. Check that the ExaGear rule is successfully registered and that the /opt/exagear/ubt_a32a64 path is used.
    1
    sudo cat /proc/sys/fs/binfmt_misc/ubt_a32a64
    

    If information similar to the following figure is displayed, the registration is successful.