build machinery - replace wget with curl cuz reasons

This commit is contained in:
tabris 2025-10-13 17:58:12 -04:00 committed by Igor
parent 932661f3dc
commit 76403b4d3f
12 changed files with 37 additions and 19 deletions

View File

@ -16,7 +16,11 @@ ASOUND_STATE="asound.state.tqma"
function post_family_tweaks_bsp__mba8mpxl-ras314() {
# Wifi & Bluetooth (use firmware from NXP)
wget https://github.com/nxp-imx/imx-firmware/raw/lf-6.6.3_1.0.0/nxp/FwImage_8997/pcieuart8997_combo_v4.bin
curl -fLOJ https://github.com/nxp-imx/imx-firmware/raw/lf-6.6.3_1.0.0/nxp/FwImage_8997/pcieuart8997_combo_v4.bin || {
echo "download of pcieuart8997_combo_v4.bin failed"
rm -f pcieuart8997_combo_v4.bin
exit 1
}
run_host_command_logged mkdir -pv --mode=755 "$destination/lib/firmware/" || exit_with_error "Unable to mkdir firmware"
run_host_command_logged mkdir -v --mode=775 "$destination/lib/firmware/mrvl/" || exit_with_error "Unable to mkdir mrvl"
run_host_command_logged mv -v "pcieuart8997_combo_v4.bin" "$destination/lib/firmware/mrvl/" || exit_with_error "Unable to copy mrvl firmware"

View File

@ -83,7 +83,7 @@ function pre_customize_image__orangepi5pro_add_phy_driver() {
# Create directory and download .deb (Not installing due to chroot issue with dkms and kernel headers)
chroot_sdcard mkdir -p /usr/local/share/eth-driver
chroot_sdcard wget "https://github.com/dante1613/Motorcomm-YT6801/raw/main/tuxedo-yt6801/${deb_file}" -O "/usr/local/share/eth-driver/${deb_file}"
chroot_sdcard curl -fL "https://github.com/dante1613/Motorcomm-YT6801/raw/main/tuxedo-yt6801/${deb_file}" -o "/usr/local/share/eth-driver/${deb_file}"
# Make script to Auto-Install Ethernet Driver Only on first boot
cat << 'EOF' > "${SDCARD}/usr/local/bin/install-eth-driver.sh"

View File

@ -189,7 +189,8 @@ function x13s_obtain_firmware() {
mkdir -p "${fw_target}/qcom/sc8280xp/LENOVO/21BX"
# video acceleration firmware/interconnect stuff; get it from ironrobin's repo;
wget --output-document "${fw_target}/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn" "https://raw.githubusercontent.com/ironrobin/x13s-alarm/trunk/x13s-firmware/qcvss8280.mbn"
curl -o "${fw_target}/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn" \
"https://raw.githubusercontent.com/ironrobin/x13s-alarm/trunk/x13s-firmware/qcvss8280.mbn"
# add a link to audio fw
(cd "${fw_target}/qcom/sc8280xp" && ln -s "LENOVO/21BX/audioreach-tplg.bin" "SC8280XP-LENOVO-X13S-tplg.bin")

View File

@ -32,7 +32,11 @@ esac
pre_config_uboot_target() {
# get the firmware
rm -rf ${IMX_FIRMWARE}*
wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${IMX_FIRMWARE}.bin -O ${IMX_FIRMWARE}.bin
curl -fL "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${IMX_FIRMWARE}.bin" -o "${IMX_FIRMWARE}.bin" || {
echo "download of IMX_FIRMWARE failed";
rm -f "${IMX_FIRMWARE}.bin"
exit 1
}
chmod +x ${IMX_FIRMWARE}.bin
./${IMX_FIRMWARE}.bin --auto-accept

View File

@ -65,7 +65,7 @@ function fetch_sources_tools__meson_s4t7_download_uboot_toolchain() {
mkdir -p "${tbasedir}"
if [[ ! -d "${tdir}" ]]; then
run_host_command_logged wget --progress=dot:giga -O "${tbasedir}/${tfile}" "${turl}"
run_host_command_logged curl -fL#o "${tbasedir}/${tfile}" "${turl}"
run_host_command_logged tar -C "${tbasedir}" -xf "${tbasedir}/${tfile}"
run_host_command_logged rm -fv "${tbasedir}/${tfile}"
fi
@ -87,7 +87,7 @@ function fetch_sources_tools__meson_s4t7_download_uboot_toolchain() {
mkdir -p "${tbasedir}"
if [[ ! -d "${tdir}" ]]; then
run_host_command_logged wget --progress=dot:giga -O "${tbasedir}/${tfile}" "${turl}"
run_host_command_logged curl -fL#o "${tbasedir}/${tfile}" "${turl}"
run_host_command_logged tar -C "${tbasedir}" -xzf "${tbasedir}/${tfile}"
run_host_command_logged rm -fv "${tbasedir}/${tfile}"
fi

View File

@ -111,7 +111,7 @@ InstallOpenMediaVault() {
# install OMV extras, enable folder2ram and tweak some settings
FILE=$(mktemp)
wget "$OMV_EXTRAS_URL" -qO $FILE && dpkg -i $FILE
curl "$OMV_EXTRAS_URL" -fLso "$FILE" && dpkg -i "$FILE"
/usr/sbin/omv-update
# Install flashmemory plugin and netatalk by default, use nice logo for the latter,
@ -208,8 +208,9 @@ InstallOpenMediaVault() {
# Fix little python bug upstream Debian 9 obviously ignores
if [ -f /usr/lib/python3.5/weakref.py ]; then
wget -O /usr/lib/python3.5/weakref.py \
https://raw.githubusercontent.com/python/cpython/9cd7e17640a49635d1c1f8c2989578a8fc2c1de6/Lib/weakref.py
GITREF="9cd7e17640a49635d1c1f8c2989578a8fc2c1de6"
curl -fLo /usr/lib/python3.5/weakref.py \
"https://raw.githubusercontent.com/python/cpython/${GITREF}/Lib/weakref.py"
fi
# clean up and force password change on first boot
@ -226,7 +227,7 @@ UnattendedStorageBenchmark() {
apt-get -qq install time
wget -qO /usr/local/bin/sd-card-bench.sh https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/master/sd-card-bench.sh
curl -fLso /usr/local/bin/sd-card-bench.sh "https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/master/sd-card-bench.sh"
chmod 755 /usr/local/bin/sd-card-bench.sh
sed -i '/^exit\ 0$/i \

View File

@ -29,7 +29,7 @@ function artifact_armbian-base-files_prepare_version() {
sleep_seconds="15" do_with_retries 10 apt_find_upstream_package_version_and_download_url "base-files"
# download the file, but write it to /dev/null (just for testing it is correct)
# wget --timeout=15 --output-document=/dev/null "${found_package_down_url}" || exit_with_error "Could not download '${found_package_down_url}'"
# curl -fLo /dev/null "${found_package_down_url}" || exit_with_error "Could not download '${found_package_down_url}'"
# Set readonly globals with the wanted info; will be used during the actual build of this artifact
declare -g -r base_files_wanted_upstream_version="${found_package_version}"
@ -88,7 +88,7 @@ function compile_armbian-base-files() {
# Download the deb file
declare deb_file="${destination}/${base_files_wanted_upstream_filename}"
run_host_command_logged wget --no-verbose --timeout=60 --output-document="${deb_file}" "${base_files_wanted_deb_down_url}" || exit_with_error "Could not download '${base_files_wanted_deb_down_url}'"
run_host_command_logged curl -fLo "${deb_file}" "${base_files_wanted_deb_down_url}" || exit_with_error "Could not download '${base_files_wanted_deb_down_url}'"
# Raw-Extract (with DEBIAN dir) the contents of the deb file into "${destination}"
run_host_command_logged dpkg-deb --raw-extract "${deb_file}" "${destination}" || exit_with_error "Could not raw-extract '${deb_file}'"

View File

@ -117,7 +117,7 @@ function try_download_batcat_tooling() {
display_alert "BATCAT_FN: ${BATCAT_FN}" "batcat" "debug"
display_alert "Downloading required" "batcat tooling${RETRY_FMT_MORE_THAN_ONCE}" "info"
run_host_command_logged wget --no-verbose --progress=dot:giga -O "${BATCAT_BIN}.tar.gz.tmp" "${DOWN_URL}" || {
run_host_command_logged curl -L#o "${BATCAT_BIN}.tar.gz.tmp" "${DOWN_URL}" || {
return 1
}
run_host_command_logged mv "${BATCAT_BIN}.tar.gz.tmp" "${BATCAT_BIN}.tar.gz"
@ -125,7 +125,7 @@ function try_download_batcat_tooling() {
run_host_command_logged rm -rf "${BATCAT_BIN}.tar.gz"
# EXTRA: get more syntaxes for batcat. We need Debian syntax for CONTROL files, etc.
run_host_command_logged wget --no-verbose --progress=dot:giga -O "${DIR_BATCAT}/sublime-debian.tar.gz.tmp" "${GITHUB_SOURCE:-"https://github.com"}/barnumbirr/sublime-debian/archive/refs/heads/master.tar.gz"
run_host_command_logged curl -L#o "${DIR_BATCAT}/sublime-debian.tar.gz.tmp" "${GITHUB_SOURCE:-"https://github.com"}/barnumbirr/sublime-debian/archive/refs/heads/master.tar.gz"
run_host_command_logged mkdir -p "${DIR_BATCAT}/temp-debian-syntax"
run_host_command_logged tar -xzf "${DIR_BATCAT}/sublime-debian.tar.gz.tmp" -C "${DIR_BATCAT}/temp-debian-syntax" sublime-debian-master/Syntaxes

View File

@ -109,7 +109,7 @@ function try_download_oras_tooling() {
display_alert "ORAS_BIN: ${ORAS_BIN}" "ORAS" "debug"
display_alert "Downloading required" "ORAS tooling${RETRY_FMT_MORE_THAN_ONCE}" "info"
run_host_command_logged wget --no-verbose --progress=dot:giga -O "${ORAS_BIN}.tar.gz.tmp" "${DOWN_URL}" || {
run_host_command_logged curl -fL#o "${ORAS_BIN}.tar.gz.tmp" "${DOWN_URL}" || {
return 1
}
run_host_command_logged mv "${ORAS_BIN}.tar.gz.tmp" "${ORAS_BIN}.tar.gz"

View File

@ -136,7 +136,7 @@ function try_download_shellcheck_tooling() {
display_alert "SHELLCHECK_BIN: ${SHELLCHECK_BIN}" "SHELLCHECK" "debug"
display_alert "Downloading required" "SHELLCHECK tooling${RETRY_FMT_MORE_THAN_ONCE}" "info"
run_host_command_logged wget --no-verbose --progress=dot:giga -O "${SHELLCHECK_BIN}.tar.xz.tmp" "${DOWN_URL}" || {
run_host_command_logged curl -fL#o "${SHELLCHECK_BIN}.tar.xz.tmp" "${DOWN_URL}" || {
return 1
}

View File

@ -51,7 +51,11 @@ if [[ ! -f "${SHELLCHECK_BIN}" ]]; then
echo "MACHINE: ${MACHINE}"
echo "Down URL: ${DOWN_URL}"
echo "SHELLCHECK_BIN: ${SHELLCHECK_BIN}"
wget -O "${SHELLCHECK_BIN}.tar.xz" "${DOWN_URL}"
curl -fLo "${SHELLCHECK_BIN}.tar.xz" "${DOWN_URL}" || {
echo "download of shellcheck failed from ${DOWN_URL}";
rm -f "${SHELLCHECK_BIN}.tar.xz"
exit 1;
}
tar -xf "${SHELLCHECK_BIN}.tar.xz" -C "${DIR_SHELLCHECK}" "shellcheck-v${SHELLCHECK_VERSION}/shellcheck"
mv -v "${DIR_SHELLCHECK}/shellcheck-v${SHELLCHECK_VERSION}/shellcheck" "${SHELLCHECK_BIN}"
rm -rf "${DIR_SHELLCHECK}/shellcheck-v${SHELLCHECK_VERSION}" "${SHELLCHECK_BIN}.tar.xz"

View File

@ -47,7 +47,11 @@ echo "SHELLFMT_BIN: ${SHELLFMT_BIN}"
if [[ ! -f "${SHELLFMT_BIN}" ]]; then
echo "Cache miss, downloading..."
wget -O "${SHELLFMT_BIN}" "${DOWN_URL}"
curl -fLo "${SHELLFMT_BIN}" "${DOWN_URL}" || {
echo "shellfmt download failed from ${DOWN_URL}"
rm -f "${SHELLFMT_BIN}"
exit 1;
}
chmod +x "${SHELLFMT_BIN}"
fi