Fetch pinned third-party inputs

fetch-deps.sh downloads the Anyka SDK runtime and RTSP sample
(Link-WQS/ANYKA_130L_SDK), the matching venc kernel modules (OpenIPC) and
Bootlin toolchains, all pinned to commits and checked against
deps.sha256. Nothing vendor-owned is stored in the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 22:01:43 +01:00
co-authored by Claude Opus 5.5
parent c778b728c0
commit 5f4c960e1a
2 changed files with 127 additions and 0 deletions

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh
# Download every third-party input the build needs (nothing vendor-owned is in this repo).
# All files are pinned to upstream commits and checked against deps.sha256.
# - Anyka AK3918AV130 SDK runtime libs, RTSP sample + headers: github.com/Link-WQS/ANYKA_130L_SDK
# - venc kernel modules matching those libs: github.com/OpenIPC/firmware
# - Bootlin toolchains (musl for static tools, uClibc for the SDK-linked RTSP server)
set -e
HERE="$(cd "$(dirname "$0")" && pwd)"; cd "$HERE"
SDK=https://raw.githubusercontent.com/Link-WQS/ANYKA_130L_SDK/3480d024b682ccb2cf8bcb87dc4d2ac0af4dc49e/platform
OIPC=https://raw.githubusercontent.com/OpenIPC/firmware/9e6a05287f4fc17d914e621bcf824e89dbcb8b0c/general/package/anyka-osdrv-ak3918av130/files/kmod
TC=https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs
LIBS="libakaac.so libakamr.so libakaudiocodec.so libakaudiofilter.so libakmp3.so libapp_its.so libapp_video.so libmpi_aenc.so libmpi_venc.so libplat_ai.so libplat_audio_detect.so libplat_common.so libplat_dbg.so libplat_isp_sdk.so libplat_log.so libplat_mem.so libplat_osal.so libplat_thread.so libplat_timer.so libplat_vi.so libplat_vpss.so libplat_vqe.so librtsp_server.so "
INC="adec_aac.h adec_amr.h adec_mp3.h aenc_aac.h aenc_amr.h aenc_mp3.h ak_adec.h ak_aenc.h ak_ai.h ak_amp_msg.h ak_ao.h ak_ats.h ak_common_audio.h ak_common_graphics.h ak_common.h ak_common_video.h ak_dbg.h ak_demux.h ak_its.h ak_log.h ak_mem_ex.h ak_mem.h ak_mrd.h ak_mt_math.h ak_mux.h ak_npu.h ak_object_filter.h ak_osd_ex.h ak_osd.h ak_reg_AIcry.h ak_reg_pitch.h ak_reg_resample.h ak_reg_tw.h ak_reg_vad.h ak_svp2.h ak_thread.h ak_types.h ak_uuid.h ak_uuid_wr.h ak_venc.h ak_video.h ak_vi.h ak_vpss.h ak_vpss_struct_av130.h ak_vpss_struct.h ak_vpss_struct_km01a.h ak_vqe.h list.h "
get() { [ -s "$2" ] && return 0; mkdir -p "$(dirname "$2")"; echo " $2"; curl -fsSL -o "$2.part" "$1" && mv "$2.part" "$2"; }
echo "[fetch] Anyka SDK runtime"
for l in $LIBS; do get "$SDK/lib/$l" "blobs/anyka-rtsp/lib/$l"; done
get "$SDK/sample/rtsp/ak_rtsp_server_sample" blobs/anyka-rtsp/bin/ak_rtsp_server_sample
get "$SDK/sample/rtsp/rtsp.ini" blobs/anyka-rtsp/rtsp.ini
echo "[fetch] RTSP sample sources + headers"
for f in Makefile aas_ini_parser.c aas_ini_parser.h ak_circular_buffer.h ak_rtsp_server.h rtsp.ini \
ak_rtsp_server_sample.c ak_rtsp_stream.c; do
get "$SDK/sample/rtsp/$f" "src/rtsp_sample/$f"
done
for h in $INC; do get "$SDK/include/$h" "src/rtsp_sample/include/$h"; done
echo "[fetch] OpenIPC venc modules"
for m in ak_venc_adapter.ko ak_venc_bridge.ko; do get "$OIPC/$m" "blobs/anyka-rtsp/modules/$m"; done
chmod 0755 blobs/anyka-rtsp/bin/ak_rtsp_server_sample
echo "[fetch] verifying checksums"
# the two patched sources are checked in their pristine state (before patches/ is applied)
if [ -f src/rtsp_sample/.patched ]; then grep -v -e ak_rtsp_server_sample.c -e ak_rtsp_stream.c deps.sha256 | sha256sum -c --quiet
else sha256sum -c --quiet deps.sha256; fi
echo "[fetch] toolchains -> toolchains/"
mkdir -p toolchains
for t in armv5-eabi--musl--stable-2026.08-1 armv5-eabi--uclibc--stable-2018.11-1; do
[ -d "toolchains/$t" ] && continue
for ext in tar.xz tar.bz2; do
curl -fsSL -o "toolchains/$t.$ext" "$TC/$t.$ext" 2>/dev/null && break || rm -f "toolchains/$t.$ext"
done
tar -C toolchains -xf toolchains/$t.tar.* && rm -f toolchains/$t.tar.*
done
echo "[fetch] done. Next: ./build-deps.sh"