feat: 动态链接到 opus 和 alsa 基础库,完成音频录制播放和编解码

This commit is contained in:
Del Wang
2025-12-31 22:53:33 +08:00
committed by Del
parent c521e274e9
commit fba40393c2
11 changed files with 431 additions and 46 deletions
+8 -14
View File
@@ -12,25 +12,19 @@ PROXY="http://host.docker.internal:7890"
# --build-arg https_proxy=$PROXY \
# -t open-xiaoai-runtime .
# # 2. 编译 hello world demo
# 2. 编译 hello world demo
echo "Compiling hello demo..."
rm -rf ../hello/target # 先清理旧的构建产物,防止缓存干扰
docker run --rm -v $(pwd)/../hello:/app/hello open-xiaoai-runtime \
cargo build --manifest-path hello/Cargo.toml --target armv7-unknown-linux-gnueabihf --release
# # 3. 运行编译出的二进制文件 (通过 QEMU 模拟)
echo "Running compiled binary via QEMU..."
docker run --rm -v $(pwd)/../hello/target/armv7-unknown-linux-gnueabihf/release/hello:/app/hello \
-v $(pwd)/root.squashfs:/app/root.squashfs open-xiaoai-runtime \
run /app/hello
# 3. 运行编译出的二进制文件 (通过 QEMU 模拟)
# echo "Running compiled binary via QEMU..."
# docker run --rm -v $(pwd)/../hello/target/armv7-unknown-linux-gnueabihf/release/hello:/app/hello open-xiaoai-runtime \
# run /app/hello
# 4. 交互模式运行
# docker run --rm -it --privileged \
# -v $(pwd)/root.squashfs:/app/root.squashfs \
# open-xiaoai-runtime \
# run
# docker run --rm -it --privileged open-xiaoai-runtime run
# 5. 上传二进制文件到小爱音箱
# dd if=target/armv7-unknown-linux-gnueabihf/release/hello \
# | ssh -o HostKeyAlgorithms=+ssh-rsa root@192.168.31.235 "dd of=/data/hello"
# ssh -o HostKeyAlgorithms=+ssh-rsa root@192.168.31.235 "dd if=/data/hello" | hello
# dd if=apps/hello/target/armv7-unknown-linux-gnueabihf/release/hello \
# | ssh -o HostKeyAlgorithms=+ssh-rsa root@192.168.31.235 "dd of=/data/hello"