mirror of
https://github.com/armbian/build.git
synced 2025-08-12 14:16:57 +02:00
- bump version to 23.05 - adjust OCI repositories, changed hash lenght to 12 and removed rootfs- prefix to shorten names (costmetic adjustement) - build configs were moved to https://github.com/armbian/os - remove CI that is not going to work anymore. This means also master is out of this CI - small changed to Readme.txt. Just adding some note, removing obvious - add propery - supported arhitectures for distribution. Needed for CI optimisation - remove README.armbian-next.md (need to be somewhere else) - shrink CODEOWNERS due to messages overload Signed-off-by: Igor <igor@armbian.com>
95 lines
3.3 KiB
Bash
95 lines
3.3 KiB
Bash
function artifact_full_firmware_prepare_version() {
|
|
artifact_version="undetermined" # outer scope
|
|
artifact_version_reason="undetermined" # outer scope
|
|
|
|
local ARMBIAN_FIRMWARE_SOURCE="${ARMBIAN_FIRMWARE_GIT_SOURCE:-"https://github.com/armbian/firmware"}"
|
|
local ARMBIAN_FIRMWARE_BRANCH="branch:${ARMBIAN_FIRMWARE_GIT_BRANCH:-"master"}"
|
|
|
|
debug_var ARMBIAN_FIRMWARE_SOURCE
|
|
debug_var ARMBIAN_FIRMWARE_BRANCH
|
|
debug_var MAINLINE_FIRMWARE_SOURCE
|
|
|
|
declare short_hash_size=4
|
|
|
|
declare -A GIT_INFO_ARMBIAN_FIRMWARE=([GIT_SOURCE]="${ARMBIAN_FIRMWARE_SOURCE}" [GIT_REF]="${ARMBIAN_FIRMWARE_BRANCH}")
|
|
run_memoized GIT_INFO_ARMBIAN_FIRMWARE "git2info" memoized_git_ref_to_info
|
|
debug_dict GIT_INFO_ARMBIAN_FIRMWARE
|
|
|
|
declare -A GIT_INFO_MAINLINE_FIRMWARE=([GIT_SOURCE]="${MAINLINE_FIRMWARE_SOURCE}" [GIT_REF]="branch:main")
|
|
run_memoized GIT_INFO_MAINLINE_FIRMWARE "git2info" memoized_git_ref_to_info
|
|
debug_dict GIT_INFO_MAINLINE_FIRMWARE
|
|
|
|
declare fake_unchanging_base_version="1"
|
|
|
|
declare short_sha1="${GIT_INFO_ARMBIAN_FIRMWARE[SHA1]:0:${short_hash_size}}"
|
|
declare short_sha1_mainline="${GIT_INFO_MAINLINE_FIRMWARE[SHA1]:0:${short_hash_size}}"
|
|
|
|
# get the hashes of the lib/ bash sources involved...
|
|
declare hash_files="undetermined"
|
|
calculate_hash_for_files "${SRC}"/lib/functions/compilation/packages/firmware-deb.sh
|
|
declare bash_hash="${hash_files}"
|
|
declare bash_hash_short="${bash_hash:0:${short_hash_size}}"
|
|
|
|
# outer scope
|
|
artifact_version="${fake_unchanging_base_version}-SA${short_sha1}-SM${short_sha1_mainline}-B${bash_hash_short}"
|
|
|
|
declare -a reasons=(
|
|
"Armbian firmware git revision \"${GIT_INFO_ARMBIAN_FIRMWARE[SHA1]}\""
|
|
"Mainline firmware git revision \"${GIT_INFO_MAINLINE_FIRMWARE[SHA1]}\""
|
|
"framework bash hash \"${bash_hash}\""
|
|
)
|
|
|
|
artifact_version_reason="${reasons[*]}" # outer scope
|
|
|
|
artifact_map_packages=(
|
|
["armbian-firmware-full"]="armbian-firmware-full"
|
|
)
|
|
|
|
artifact_map_debs=(
|
|
["armbian-firmware-full"]="armbian-firmware-full_${artifact_version}_all.deb"
|
|
)
|
|
|
|
artifact_name="armbian-firmware-full"
|
|
artifact_type="deb"
|
|
artifact_base_dir="${DEB_STORAGE}"
|
|
artifact_final_file="${DEB_STORAGE}/armbian-firmware-full_${artifact_version}_all.deb"
|
|
|
|
return 0
|
|
}
|
|
|
|
function artifact_full_firmware_build_from_sources() {
|
|
FULL="-full" REPLACE="" LOG_SECTION="compile_firmware_full" do_with_logging compile_firmware
|
|
}
|
|
|
|
function artifact_full_firmware_cli_adapter_pre_run() {
|
|
declare -g ARMBIAN_COMMAND_REQUIRE_BASIC_DEPS="yes" # Require prepare_host_basic to run before the command.
|
|
|
|
# "gimme root on a Linux machine"
|
|
cli_standard_relaunch_docker_or_sudo
|
|
}
|
|
|
|
function artifact_full_firmware_cli_adapter_config_prep() {
|
|
declare KERNEL_ONLY="yes" # @TODO: this is a hack, for the board/family code's benefit...
|
|
use_board="no" prep_conf_main_minimal_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
|
}
|
|
|
|
function artifact_full_firmware_get_default_oci_target() {
|
|
artifact_oci_target_base="ghcr.io/armbian/cache-firmware/"
|
|
}
|
|
|
|
function artifact_full_firmware_is_available_in_local_cache() {
|
|
is_artifact_available_in_local_cache
|
|
}
|
|
|
|
function artifact_full_firmware_is_available_in_remote_cache() {
|
|
is_artifact_available_in_remote_cache
|
|
}
|
|
|
|
function artifact_full_firmware_obtain_from_remote_cache() {
|
|
obtain_artifact_from_remote_cache
|
|
}
|
|
|
|
function artifact_full_firmware_deploy_to_remote_cache() {
|
|
upload_artifact_to_oci
|
|
}
|