# TinyPiXDepends **Repository Path**: tinypixos/TinyPiXDepends ## Basic Information - **Project Name**: TinyPiXDepends - **Description**: 第三方依赖 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2025-10-17 - **Last Updated**: 2025-12-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TinyPiXDepends #### 介绍 用于生成TinyPiXOS的第三方依赖,sysroot目录为编译环境依赖,install目录为OS部署所需安装的文件 #### 软件架构 软件架构说明 #### 安装教程 1. 安装NIX,建议切换倒普通用户执行:curl -L https://nixos.org/nix/install | sh -s -- --daemon 2. 配置NIX隔离构建,打开/etc/nix/nix.conf,增加sandbox = relaxed 3. 启用实验性功能,mkdir -p ~/.config/nix \ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf 4. 重启NIX,sudo systemctl restart nix-daemon #### 使用说明 1. ./create-bundle.sh生成sysroot 2. ./create-depend.sh生成install,若不需要部署可以不执行此步骤 3. 在交叉编译时设置sysroot到此目录下 4. 交叉编译时建议使用主机的libgomp库(和编译项目的gcc一致),可以从/usr/lib/gcc/架构/libgomp复制倒sysroot下 5. 由于SDL和ffmpeg直接使用nix构造会存在依赖项太多不可控的情况,flake中取消了sdl和ffmpeg的构建,需要使用source下的sdl和ffmpeg库自主交叉编译并复制倒sysroot目录 6. nix缓存会持续存在,每次构建都会多生成一份,可以使用以下命令清理 \ 清除无效依赖:nix-collect-garbage \ 强制清理包括所有依赖:nix-store --gc #### sdl交叉编译参考 ./configure \ CC="arm-linux-gnueabihf-gcc --sysroot=/home/pix/library/arm32-sysroot" \ CXX="arm-linux-gnueabihf-g++ --sysroot=/home/pix/library/arm32-sysroot" \ --host=arm-linux-gnueabihf \ --with-sysroot=/home/pix/library/arm32-sysroot \ --prefix=$(pwd)/install \ CPPFLAGS="-I/home/pix/library/arm32-sysroot/include" \ LDFLAGS="-L/home/pix/library/arm32-sysroot/lib" \ --enable-video-kmsdrm \ --enable-video-fbcon \ --disable-video-x11 \ --disable-video-wayland \ --disable-video-vulkan \ --disable-video-opengl \ --disable-render-opengl \ --disable-render-d3d \ --disable-pulseaudio \ --disable-video-dummy \ --disable-video-offscreen \ --disable-oss \ --disable-alsa \ --disable-esd \ --disable-arts \ --disable-ibus \ --disable-joystick \ --disable-haptic \ --disable-sensor \ --disable-video-directfb \ --disable-video-opengles \ --disable-video-opengles1 \ --disable-video-opengles2 \ --disable-render-opengles \ --disable-render-opengles2 #### ffmpeg交叉编译参考 PKG_CONFIG=pkg-config ./configure --enable-cross-compile --cross-prefix=arm-linux-gnueabihf- --arch=arm --cpu=generic --target-os=linux --sysroot=/home/pix/library/arm32-sysroot --prefix=$(pwd)/install --extra-cflags="-march=armv7-a -mfpu=neon -mfloat-abi=hard -I/home/pix/library/arm32-sysroot/include" --extra-ldflags="-march=armv7-a -mfpu=neon -mfloat-abi=hard -L/home/pix/library/arm32-sysroot/lib -lpthread -lm" --enable-shared --enable-gpl --enable-libx264 --disable-libx265 --enable-avcodec --enable-avformat --enable-avutil --enable-swscale --enable-swresample --enable-avfilter --enable-avdevice --enable-network --enable-protocols --enable-demuxers --enable-decoders --enable-encoders --enable-filters --disable-programs --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --pkg-config-flags="--static --define-variable=prefix=/home/pix/library/arm32-sysroot" #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)