Compare commits

...

2 Commits

6 changed files with 11 additions and 30 deletions

View File

@@ -230,7 +230,7 @@ function obtain_complete_artifact() {
# @TODO: if deploying to remote cache, force high compression, DEB_COMPRESS="xz"
artifact_build_from_sources # definitely will end up having its own logging sections
# For cases like CREATE_PATCHES=yes or KERNEL_CONFIGURE=yes, we wanna stop here. No artifact file will be created.
# For interactive stuff like patching or configuring, we wanna stop here. No artifact file will be created.
if [[ "${ARTIFACT_WILL_NOT_BUILD}" == "yes" ]]; then
display_alert "artifact" "ARTIFACT_WILL_NOT_BUILD is set, stopping after non-build." "debug"
return 0

View File

@@ -32,7 +32,6 @@ function cli_patch_kernel_run() {
declare -g GIT_ARCHEOLOGY=yes # do archeology
declare -g FAST_ARCHEOLOGY=yes # do archeology, but only for the exact path we need.
#declare -g REWRITE_PATCHES=yes # rewrite the patches after git commiting. Very cheap compared to the rest.
declare -g KERNEL_CONFIGURE=no # no menuconfig
declare -g RELEASE=jammy # or whatever, not relevant, just fool the configuration
declare -g SHOW_LOG=yes # show the log
prep_conf_main_build_single

View File

@@ -41,21 +41,6 @@ function interactive_finish() {
unset SHOW_WARNING
}
function interactive_config_ask_kernel() {
interactive_config_ask_kernel_configure
}
function interactive_config_ask_kernel_configure() {
[[ -n ${KERNEL_CONFIGURE} ]] && return 0
options+=("no" "Do not change the kernel configuration")
options+=("yes" "Show a kernel configuration menu before compilation")
#options+=("prebuilt" "Use precompiled packages (maintained hardware only)") # @TODO armbian-next does not support this, I think.
dialog_if_terminal_set_vars --title "Choose an option" --backtitle "$backtitle" --no-tags --menu "Select the kernel configuration" $TTY_Y $TTY_X $((TTY_Y - 8)) "${options[@]}"
set_interactive_config_value KERNEL_CONFIGURE "${DIALOG_RESULT}"
[[ ${DIALOG_EXIT_CODE} != 0 ]] && exit_with_error "You cancelled interactive during kernel configuration" "Build cancelled"
unset options
}
# Required usage:
# declare -a arr_all_board_names=() arr_all_board_options=() # arrays
# declare -A dict_all_board_types=() dict_all_board_source_files=() dict_all_board_descriptions=() # dictionaries

View File

@@ -454,14 +454,14 @@ function docker_cli_prepare_launch() {
if [[ -n "${OCI_TARGET_BASE}" ]]; then
display_alert "Detected" "OCI_TARGET_BASE: '${OCI_TARGET_BASE}'" "debug"
DOCKER_ARGS+=("--env" "OCI_TARGET_BASE=${OCI_TARGET_BASE}")
fi
# Mount the Docker config file (if it exists)
local docker_config_file_host="${HOME}/.docker/config.json"
local docker_config_file_docker="/root/.docker/config.json" # inside Docker
if [[ -f "${docker_config_file_host}" ]]; then
display_alert "Passing down to Docker" "Docker config file: '${docker_config_file_host}' -> '${docker_config_file_docker}'" "debug"
DOCKER_ARGS+=("--mount" "type=bind,source=${docker_config_file_host},target=${docker_config_file_docker}")
fi
# Mount the Docker config file (if it exists) -- always, even if OCI_TARGET_BASE is not set; @TODO: why only in GitHub actions?
local docker_config_file_host="${HOME}/.docker/config.json"
local docker_config_file_docker="/root/.docker/config.json" # inside Docker
if [[ -f "${docker_config_file_host}" ]]; then
display_alert "Passing down to Docker" "Docker config file: '${docker_config_file_host}' -> '${docker_config_file_docker}'" "debug"
DOCKER_ARGS+=("--mount" "type=bind,source=${docker_config_file_host},target=${docker_config_file_docker}")
fi
fi

View File

@@ -7,11 +7,8 @@
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
function config_possibly_interactive_kernel_board() {
# if KERNEL_CONFIGURE, BOARD, BRANCH or RELEASE are not set, display selection menu
interactive_config_ask_kernel
[[ -z $KERNEL_CONFIGURE ]] && exit_with_error "No option selected: KERNEL_CONFIGURE"
function config_possibly_interactive_board() {
# if BOARD is not set, display selection menu
interactive_config_ask_board_list # this uses get_list_of_all_buildable_boards
[[ -z $BOARD ]] && exit_with_error "No board selected: BOARD"

View File

@@ -18,7 +18,7 @@ function prep_conf_main_build_single() {
# those are possibly interactive. interactive (dialog) and logging don't mix, for obvious reasons.
interactive_config_prepare_terminal # init vars used for interactive
config_possibly_interactive_kernel_board
config_possibly_interactive_board
LOG_SECTION="config_source_board_file" do_with_conditional_logging config_source_board_file