• 交叉编译gstreamer1.20.2


    #!/bin/bash
    if [ -d arm_build ];then
    rm -r arm_build
    fi
    mkdir arm_build
    arch='arm-cortex_a9-linux-gnueabi-' #根据实际情况
    sys_root=/opt/arm-cortex_a9/arm-cortex_a9-linux-gnueabi/sysroot/ #根据实际情况
    echo "[constants]" > cross_file.txt
    echo "arch = '${arch}'" >> cross_file.txt
    echo "[binaries]" >> cross_file.txt
    echo "c = arch + 'gcc'" >> cross_file.txt
    echo "cpp = arch + 'g++'" >> cross_file.txt
    echo "ar = arch + 'ar'" >> cross_file.txt
    echo "ld = arch + 'ld'" >> cross_file.txt
    echo "strip = arch + 'strip'" >> cross_file.txt
    echo "sys_root = '${sys_root}'" >> cross_file.txt
    echo "pkg_config_libdir = '${sys_root}/usr/lib/pkgconfig'" >> cross_file.txt
    echo "pkgconfig = 'pkg-config'" >> cross_file.txt
    echo "[host_machine]" >> cross_file.txt
    echo "system = 'linux'" >> cross_file.txt
    echo "cpu_family = 'arm'" >> cross_file.txt
    echo "cpu = 'armv7a'" >> cross_file.txt #根据实际情况
    echo "endian = 'little'" >> cross_file.txt

    #类似于configure功能 meson configure 获取到可配置项
    echo "[project options]" >> cross_file.txt
    echo "prefix = '/usr'" >> cross_file.txt 
    echo "pkg_config_libdir='/opt/rootfs/xpylib/glib2.72.1/usr:/opt/rootfs/xpylib/ffi/lib/pkgconfig'"#其中这一项加了好像没起作用/usr:/opt/rootfs/xpylib/ffi/lib/pkgconfig,还是报错 undefined reference to `ffi_type_sint32@LIBFFI_BASE_8.0,把libffi的库问价拷贝到glib目录中中,编译成功。还没测试效果
    #类似于执行configure
    meson setup arm_build --cross-file cross_file.txt
    cd arm_build
    #编译 类似于make
    ninja -C arm_build
    DESTDIR=/opt/rootfs/xpylib/gstreamer1.20.2 meson install #根据实际情

  • 相关阅读:
    lsb_release -a 查询Linux系统版本
    html常用标签
    js判断对象是否为空
    springBoot2.x 支持跨域请求配置
    httpclient 上传附件实例
    js 使用sessionStorage总结与实例
    性能测试需求调研分析方法
    jmeter压测实践
    页面加载时调用js函数方法
    IntelliJ IDEA 界面介绍及常用配置
  • 原文地址:https://www.cnblogs.com/xpylovely/p/16244752.html
Copyright © 2020-2023  润新知