fixing release pipeline again

This commit is contained in:
2026-07-15 19:36:45 +00:00
parent 208b49b512
commit 04ef40be4f
3 changed files with 48 additions and 1 deletions
+29
View File
@@ -38,6 +38,35 @@ sdk_dir=$(find "$work_dir" -mindepth 1 -maxdepth 1 -type d -name 'openwrt-sdk-*'
[[ -n $sdk_dir ]] || { echo "SDK directory was not extracted" >&2; exit 1; }
cd "$sdk_dir"
# OpenWrt publishes relocatable SDKs whose host tools are x86-64 binaries.
# On ARM runners, invoke the SDK's bundled x86-64 loader explicitly through
# QEMU. This works without privileged binfmt_misc registration on the host.
case $(uname -m) in
x86_64|amd64)
;;
aarch64|arm64|armv7l|armv8l)
qemu_x86_64=$(command -v qemu-x86_64-static || command -v qemu-x86_64 || true)
[[ -n $qemu_x86_64 ]] || {
echo "ARM build host requires qemu-x86_64-static (install qemu-user-static)" >&2
exit 1
}
mapfile -d '' sdk_wrappers < <(
find staging_dir -type f -exec grep -IlZ 'ld-linux-x86-64\.so\.2' {} +
)
[[ ${#sdk_wrappers[@]} -gt 0 ]] || {
echo "no relocatable x86-64 SDK wrappers found" >&2
exit 1
}
sed -i -E "s|^exec (\"\\\$dir/.*ld-linux-x86-64\\.so\\.2\")|exec ${qemu_x86_64} \\1|" "${sdk_wrappers[@]}"
staging_dir/host/bin/sed --version >/dev/null
;;
*)
echo "unsupported build host architecture: $(uname -m)" >&2
exit 1
;;
esac
./scripts/feeds update base packages
./scripts/feeds install mbedtls uci usteer
mkdir -p package/openuf