main-config: arch common: check LINUXFAMILY is set before using it

This commit is contained in:
Ricardo Pardini 2023-12-28 11:57:33 +01:00 committed by Igor
parent bebf4c7ae0
commit 22e0e0fe61

View File

@ -100,6 +100,11 @@ function late_family_config__common_defaults_for_mainline_kernel() {
display_alert "LINUXCONFIG is set by board/family/hooks to '${LINUXCONFIG}'" "common_defaults_for_mainline" "debug"
fi
# If LINUFAMILY is unset... bomb
if [[ -z ${LINUXFAMILY} ]]; then
exit_with_error "LINUXFAMILY is unset after family config; KERNELSOURCE=${KERNELSOURCE}"
fi
# Generic defaultings, used for all kernels (including vendor/legacy/3rd-party and mainline).
# If KERNEL_PATCH_ARCHIVE_BASE is unset, set it to LINUXFAMILY.
if [[ -z ${KERNEL_PATCH_ARCHIVE_BASE} ]]; then # @TODO: this is a bad idea, remove
@ -113,11 +118,6 @@ function late_family_config__common_defaults_for_mainline_kernel() {
KERNELPATCHDIR="archive/${KERNEL_PATCH_ARCHIVE_BASE}-${KERNEL_MAJOR_MINOR}" # previously was KERNELPATCHDIR="$LINUXFAMILY-$BRANCH"
fi
# If LINUFAMILY is unset... bomb
if [[ -z ${LINUXFAMILY} ]]; then
exit_with_error "LINUXFAMILY is unset after family config; KERNELSOURCE=${KERNELSOURCE}"
fi
# if LINUXCONFIG is unset... default to linux-${LINUXFAMILY}-${BRANCH} # Attention: no KERNEL_MAJOR_MINOR here, so manual file rollover is necessary
if [[ -z ${LINUXCONFIG} ]]; then
display_alert "LINUXCONFIG is unset; using 'linux-${LINUXFAMILY}-${BRANCH}'" "common_defaults_for_mainline" "debug"