Bootstrap

Ubuntu x64下交叉编译ffmpeg、sdl2到目标架构为aarch64架构的系统(生成ffmpeg、ffprobe、ffplay)

一、编译SDL2-2.0.9

(1),
./configure --prefix=/home/z/Desktop/sdl2 --enable-shared=yes --enable-nasm=no --enable-audio=no --enable-oss=no --enable-alsa=no --enable-alsa-shared=no --enable-pulseaudio=no --enable-pulseaudio-shared=no --enable-arts=no --enable-arts-shared=no --enable-joystick=no --enable-cdrom=no --enable-threads=yes --enable-timers=yes --enable-endian=yes --enable-file=yes --enable-esd=no --enable-arts=no --enable-nas=no --enable-diskaudio=no --enable-mintaudio=no --enable-dummyaudio=no --enable-altivec=no --enable-video-x11=no --enable-dga=no --enable-video-x11-vm=no --enable-video-x11-xme=no --enable-video-dga=no --enable-video-photon=no --enable-video-directfb=no --enable-video-ps2gs=no --enable-video-xbios=no --enable-video-gem=no --enable-video-opengl=no --enable-pth=no --enable-pthreads=yes --enable-pthread-sem=no --enable-input-events=no --build=i386-linux --host=aarch64-linux-gnu CC=/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc AR=/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc-ar --enable-input-tslib=yes CPPFLASS="-I/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/include" LDFAGS="-L/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/lib"

(2),
make -j4

(3),
make install

二、编译ffmpeg 4.2.1

(1),
./configure --enable-cross-compile --target-os=linux --arch=aarch64 --cross-prefix=/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- --cc=/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc --cxx=/home/z/Desktop/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ --prefix=/home/z/Desktop/ffmpeg4.2.1_linux_arm64 --disable-asm --enable-parsers --disable-decoders --enable-decoder=h264 --enable-decoder=aac --disable-debug --enable-ffmpeg --enable-shared --disable-static --disable-stripping --disable-doc --enable-ffplay    --extra-cflags=-I/home/z/Desktop/sdl2/include/SDL2 --extra-ldflags=-L/home/z/Desktop/sdl2/lib/ --extra-libs=-ldl --extra-libs=-lSDL2

(2),
执行configure后编辑ffbuild目录下的config.mak, 
将!CONFIG_FFPLAY=yes改为CONFIG_FFPLAY=yes

(3),
make -j4

(4),
make install

执行以上步骤后,生成aarch64版的ffmpeg、ffprobe、ffplay
 

;