1. 程式人生 > >armv8 aarch64 交叉編譯 ffmpeg

armv8 aarch64 交叉編譯 ffmpeg

pre targe 視頻解碼 arm -a config arc error: 交叉

   ffmpeg 支持各種壓縮格式的視頻解碼庫,經常出現在各種播放器中,交叉編譯也是一項麻煩的事情。

1. 下載ffmpeg 源碼包 http://ffmpeg.org/releases/ffmpeg-3.4.tar.bz2

2. 進入源碼目錄 ,配置configure 文件

  ./configure --sysroot=/opt/poky/2.0.1/sysroots/aarch64-poky-linux/ --cc=aarch64-poky-linux-gcc --ar=aarch64-poky-linux-ar --enable-cross-compile --target-os=linux --arch=aarch64 --prefix=./aarch64/ --enable-shared

  

  配置過程比較關鍵 ,由於沒有加 --ar = 。。。 會導致 Error: no such instruction: `rev16 %r。。。。 表示無法調用匯編代碼

3. make make過程中會出現

  strip: Unable to recognise the format of the input file問題

  原因是 交叉工具編譯環境和本地環境 中的 strip 程序沖突 可以 用 type strip 看看

  解決辦法是 在source 的 交叉編譯腳本中 PATH 一行 ,最前面PATH = /你交叉編譯環境下的 strip 程序/ : ....

4. make install

  完成交叉編譯。

armv8 aarch64 交叉編譯 ffmpeg