Files
build/extensions/rkbin-tools.sh
Ricardo Pardini a878f3c93d rkbin-tools: allow using custom rkbin RKBIN_GIT_BRANCH as well as RKBIN_GIT_URL
- notice: the rkbin repo or the bins themselves are not hashed or included in the u-boot version (yet)
- make sure to avoid caching when building with those custom git/branch (`ARTIFACT_IGNORE_CACHE=yes CLEAN_LEVEL=make-uboot`)
2023-07-01 14:49:49 +02:00

18 lines
807 B
Bash

#!/usr/bin/env bash
function fetch_sources_tools__rkbin_tools() {
fetch_from_repo "${RKBIN_GIT_URL:-"https://github.com/armbian/rkbin"}" "rkbin-tools" "branch:${RKBIN_GIT_BRANCH:-"master"}"
}
function build_host_tools__install_rkbin_tools() {
# install only if git commit hash changed
cd "${SRC}"/cache/sources/rkbin-tools || exit
# need to check if /usr/local/bin/loaderimage to detect new Docker containers with old cached sources
if [[ ! -f .commit_id || $(improved_git rev-parse @ 2> /dev/null) != $(< .commit_id) || ! -f /usr/local/bin/loaderimage ]]; then
display_alert "Installing" "rkbin-tools" "info"
mkdir -p /usr/local/bin/
install -m 755 tools/loaderimage /usr/local/bin/
install -m 755 tools/trust_merger /usr/local/bin/
improved_git rev-parse @ 2> /dev/null > .commit_id
fi
}