从Linux发行版生成sysroot树的实用程序

cross-sysroot的Python项目详细描述


cross-sysrootBuild Status

cross-sysroot是生成用于交叉编译的sysroot的实用程序。

该工具需要目标Linux发行版的名称、版本、目标体系结构以及包含所需主要软件包列表的文件。
该工具将解决包依赖关系并将其提取到给定的sysroot路径中。

生成的sysroot可以用作toolchain命令行参数--sysroot=

  • 安装实用程序:pip3 install cross-sysroot

  • 命令用法:

usage: cross-sysroot [-h] [--verbose] --distribution {debian,ubuntu,raspbian}
                  --distribution-version DISTRIBUTION_VERSION
                  [--distribution-url DISTRIBUTION_URL] --architecture
                  {amd64,arm64,armhf,armel} --build-root BUILD_ROOT
                  package_list_file

Build package list for Linux Distribution.

positional arguments:
  package_list_file     File containing the list of packages (and their
                        versions)

optional arguments:
  -h, --help            show this help message and exit
  --verbose             Verbose mode
  --distribution {debian,ubuntu, raspbian}
                        Linux distribution
  --distribution-version DISTRIBUTION_VERSION
                        Linux distribution
  --distribution-url DISTRIBUTION_URL
                        Linux distribution URL
  --architecture {amd64,arm64,armhf,armel}
                        CPU Architecture
  --build-root BUILD_ROOT
                        Location to store the Linux Distribution package.
  --cross-gcc CROSS_GCC
                        GCC Path used to build the cross application. When
                        set, all GCC sysroot files are copied into the
                        sysroot.
  • 例1:
cross-sysroot --distribution debian --distribution-version stable --architecture arm64 --build-root /tmp/cross-sysroot tests/requirements-debian-jessie-arm64.txt
  • 示例2:考虑CROSS_COMPILE环境变量指向交叉编译工具链:
cross-sysroot --distribution debian --distribution-version stable --architecture arm64 --build-root /tmp/cross-sysroot --cross-gcc ${CROSS_COMPILE}gcc tests/requirements-debian-jessie-arm64.txt

关于开发/ci的说明

  • 从源代码树启动python应用程序:PYTHONPATH=$PWD python3 -m cross_sysroot.cross_sysroot --help

  • 生成新的PIP包

  • 在代码上运行python linter:

    sudo apt get安装pylint3 Pylint3跨系统根

  • 在源树中运行测试:PYTHONPATH=$PWD pytest

开发信息

基于debian的发行库格式

位置Packages.gz

Packages.gz的内容:

(...)
Package: automake1.9
Priority: optional
Section: devel
Installed-Size: 1137
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Eric Dorland <eric@debian.org>
Architecture: all
Version: 1.9.6+nogfdl-4ubuntu1
Provides: automaken
Depends: autoconf (>= 2.58), autotools-dev (>= 20020320.1)
Suggests: automake1.9-doc
Conflicts: automake (<< 1:1.4-p5-1), automake1.5 (<< 1.5-2), automake1.6 (<< 1.6.1-4)
Filename: pool/main/a/automake1.9/automake1.9_1.9.6+nogfdl-4ubuntu1_all.deb
Size: 338192
MD5sum: 5bc0b73852c50927a98ac4150cf2c585
SHA1: 8dbab4e448dd095f7ab9dc6defe308823cd1b16a
SHA256: 75358908ffe09e115d3971273c967306dd931b94edd846dbd6a762448e40cb56
Description: A tool for generating GNU Standards-compliant Makefiles
Description-md5: 16f7c6a70ae85327f4522569aa2e0cc9
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 9m

Package: automoc
Priority: extra
Section: devel
Installed-Size: 122
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Architecture: amd64
Version: 1.0~version-0.9.88-5build1
Depends: libc6 (>= 2.2.5), libgcc1 (>= 1:4.1.1), libqtcore4 (>= 4:4.8.0), libstdc++6 (>= 4.1.1), libqt4-dev
Filename: pool/main/a/automoc/automoc_1.0~version-0.9.88-5build1_amd64.deb
Size: 32888
(...)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
mysql java语言非法参数异常?   java绘制控制流图   无法通过java eclipse中的ssh隧道远程连接到mysql数据库   直接在@SuppressWarnings之后出现java Eclipse错误(“未选中”)   java如何使用远程api google应用程序引擎api客户端?   工具栏中的java导航图标颜色未更改?   java返回带有映射子集的实体   java Spring重新加载属性Bean未更新   fileoutputstream正在获取java。木卫一。IOException:流关闭错误,但未显式关闭它   jsp标记显示java。时间使用jstl的LocalDateTime   java如何设置onFailure事件(Spring,Kafka)的超时?   将java元素添加到多个线程中的列表时,会跳过这些元素   JAVAutil。扫描程序Java读取空格后的整数值   java JMonkey过滤器着色器获取片段的世界位置   java从mongodb获取随机值   java如何使用Intent。标记\u活动\u清除\u顶部以清除活动堆栈?   多线程如何控制在多个端口上监听的java服务器应用程序   在具有复合键的相关实体之间插入数据时发生java Hibernate错误