Directfb Cross Compile
Directfb的编译要依赖于libz,libpng,freetype 等,pkgconfig虽然不是强依赖,但其提供的强大的包管理能力, 会让后续的编译容易很多,因此强烈建议编译。
1. 环境变量
Directfb及其相关的依赖的编译采用Makefile的方式,因此环境变量的设置采用通用做法
export PRFIX=/xxx/QT/install
export CROSS_COMPILE=riscv64-unknown-linux-gnu
export PATH=/xxx/toolchain/d211/bin/:$PATH
export PKG_CONFIG_PATH="${PRFIX}/lib/pkgconfig"
export ARCH=riscv
export AS=riscv64-unknown-linux-gnu-as
export LD=riscv64-unknown-linux-gnu-ld
export CC=riscv64-unknown-linux-gnu-gcc
export GCC=riscv64-unknown-linux-gnu-gcc
export CPP=riscv64-unknown-linux-gnu-cpp
export CXX=riscv64-unknown-linux-gnu-g++
export RANLIB=riscv64-unknown-linux-gnu-ranlib
export NM=riscv64-unknown-linux-gnu-nm
export STRIP=riscv64-unknown-linux-gnu-strip
export OBJCOPY=riscv64-unknown-linux-gnu-objcopy
export OBJDUMP=riscv64-unknown-linux-gnu-objdump
export CPPFLAGS="-I${PRFIX}/include"
export CFLAGS="-I${PRFIX}/include"
export LDFLAGS="-L${PRFIX}/lib"
export LIBPNG_LIBS=-lpng16
2. 编译pkg config
./configure --host=riscv64-unknown-linux-gnu --prefix=$PRFIX
make
make install