root@TinaLinux:/# MtpTools -f update -t DIR -s /mnt/UDISK
open /tmp/.mtp_fifo failed, No such file or directory
编译固件是有MtpTools 执行文件,想通过USB连接电脑显示挂载目录,现在运行出错。是要修改哪里,麻烦有知道的指点一下或者说有其他更好的方法能在PC上显示像U盘那样可读写文件传进Tina。
root@TinaLinux:/# MtpTools -f update -t DIR -s /mnt/UDISK
open /tmp/.mtp_fifo failed, No such file or directory
编译固件是有MtpTools 执行文件,想通过USB连接电脑显示挂载目录,现在运行出错。是要修改哪里,麻烦有知道的指点一下或者说有其他更好的方法能在PC上显示像U盘那样可读写文件传进Tina。
@m_xiaotao 我移植了能播放就是很卡,没法用,放弃了,可能是内存不足。
首先,我们需要安装ARM架构的交叉编译工具链:
1. **下载musl.cc的ARM交叉编译工具链**
```bash
wget https://musl.cc/arm-linux-musleabihf-cross.tgz
解压到/opt目录
sudo tar -xzf arm-linux-musleabihf-cross.tgz -C /opt/
添加工具链到PATH环境变量
echo 'export PATH=/opt/arm-linux-musleabihf-cross/bin:$PATH' >> ~/.bashrc
使环境变量生效
source ~/.bashrc
验证交叉编译器是否安装成功
arm-linux-musleabihf-gcc --version
# 克隆FFmpeg源码(或使用wget下载)
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
使用以下配置命令为ARM设备编译FFmpeg:
./configure \
--cross-prefix=arm-linux-musleabihf- \
--enable-cross-compile \
--target-os=linux \
--arch=arm \
--cc=arm-linux-musleabihf-gcc \
--prefix=../output \
--extra-cflags="-mcpu=cortex-a7 -mfpu=neon-vfpv4 -static" \
--extra-ldflags="-static" \
--enable-static \
--disable-shared \
--enable-ffmpeg \
--enable-ffprobe \
--disable-doc
# 使用4个线程并行编译
make -j4 && make install
编译完成后,所有生成的文件将位于../output
目录中。
使用ADB将编译好的FFmpeg推送到设备:
推送bin和lib目录到设备的/mnt/UDISK目录
adb push bin /mnt/UDISK
adb push lib /mnt/UDISK
为ffmpeg添加可执行权限
adb shell chmod +x /mnt/UDISK/bin/ffmpeg