mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
artifact: kernel: use C999999 for .config hash is KERNEL_CONFIGURE=yes; force ignore cache if so
This commit is contained in:
committed by
Igor Pečovnik
parent
c8412c8791
commit
6d1c5fb8b7
@@ -25,7 +25,7 @@ function artifact_kernel_prepare_version() {
|
||||
# - Get the drivers patch hash (given LINUXFAMILY and the vX.Z.Y version) - the harness can do this by hashing patches and bash code
|
||||
# - Get the kernel patches hash. (@TODO currently hashing files directly, use Python patching proper)
|
||||
# - Get the kernel .config hash, composed of
|
||||
# - KERNELCONFIG .config hash (contents)
|
||||
# - KERNELCONFIG .config hash (contents); except if KERNEL_CONFIGURE=yes, then force "999999" (six-nines)
|
||||
# - extensions mechanism, each hook has an array of hashes that is then hashed together; see the hooks docs.
|
||||
# - Hash of the relevant lib/ bash sources involved, say compilation/kernel*.sh etc
|
||||
# All those produce a version string like:
|
||||
@@ -57,6 +57,7 @@ function artifact_kernel_prepare_version() {
|
||||
debug_var LINUXFAMILY
|
||||
debug_var KERNELPATCHDIR
|
||||
debug_var KERNEL_SKIP_MAKEFILE_VERSION
|
||||
debug_var KERNEL_CONFIGURE
|
||||
|
||||
declare short_hash_size=4
|
||||
|
||||
@@ -93,6 +94,13 @@ function artifact_kernel_prepare_version() {
|
||||
config_hash="${hash_files}"
|
||||
declare config_hash_short="${config_hash:0:${short_hash_size}}"
|
||||
|
||||
# detour: if KERNEL_CONFIGURE=yes, then force "999999" (six-nines)
|
||||
if [[ "${KERNEL_CONFIGURE}" == "yes" ]]; then
|
||||
display_alert "Forcing kernel config hash to 999999" "due to KERNEL_CONFIGURE=yes" "info"
|
||||
config_hash="999999 (KERNEL_CONFIGURE=yes, unable to hash)"
|
||||
config_hash_short="999999"
|
||||
fi
|
||||
|
||||
# run the extensions. they _must_ behave, and not try to modify the .config, instead just fill kernel_config_modifying_hashes
|
||||
declare kernel_config_modifying_hashes_hash="undetermined"
|
||||
declare -a kernel_config_modifying_hashes=()
|
||||
|
||||
@@ -218,7 +218,16 @@ function obtain_complete_artifact() {
|
||||
# This is meant to be run after config, inside default build.
|
||||
function build_artifact_for_image() {
|
||||
initialize_artifact "${WHAT}"
|
||||
obtain_complete_artifact
|
||||
|
||||
# Detour: if building kernel, and KERNEL_CONFIGURE=yes, ignore artifact cache.
|
||||
if [[ "${WHAT}" == "kernel" && "${KERNEL_CONFIGURE}" == "yes" ]]; then
|
||||
display_alert "Ignoring artifact cache for kernel" "KERNEL_CONFIGURE=yes" "info"
|
||||
ARTIFACT_IGNORE_CACHE="yes" obtain_complete_artifact
|
||||
else
|
||||
obtain_complete_artifact
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function pack_artifact_to_local_cache() {
|
||||
|
||||
@@ -167,10 +167,6 @@ function config_pre_main() {
|
||||
SELECTED_CONFIGURATION="cli_minimal"
|
||||
fi
|
||||
|
||||
# @TODO: remove this?
|
||||
[[ ${KERNEL_CONFIGURE} == prebuilt ]] && [[ -z ${REPOSITORY_INSTALL} ]] &&
|
||||
REPOSITORY_INSTALL="u-boot,kernel,bsp,armbian-zsh,armbian-config,armbian-bsp-cli,armbian-firmware${BUILD_DESKTOP:+,armbian-desktop,armbian-bsp-desktop}"
|
||||
|
||||
return 0 # shortcircuit above
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user