diff --git a/lib/functions/artifacts/artifact-uboot.sh b/lib/functions/artifacts/artifact-uboot.sh index 780302f696..69e396dfde 100644 --- a/lib/functions/artifacts/artifact-uboot.sh +++ b/lib/functions/artifacts/artifact-uboot.sh @@ -129,7 +129,15 @@ function artifact_uboot_build_from_sources() { declare uboot_git_revision="not_determined_yet" LOG_SECTION="uboot_prepare_git" do_with_logging_unless_user_terminal uboot_prepare_git - LOG_SECTION="compile_uboot" do_with_logging compile_uboot + + # Hack, if UBOOT_CONFIGURE=yes, don't run under logging manager. Emit a warning about it. + if [[ "${UBOOT_CONFIGURE:-"no"}" == "yes" ]]; then + display_alert "Warning" "UBOOT_CONFIGURE=yes, so we're not logging the build process of u-boot so it can be interactive." "wrn" + compile_uboot + display_alert "Warning" "UBOOT_CONFIGURE=yes, so we've not logged the build process of u-boot so it could be interactive." "wrn" + else + LOG_SECTION="compile_uboot" do_with_logging compile_uboot + fi } function artifact_uboot_cli_adapter_pre_run() { diff --git a/lib/functions/compilation/uboot.sh b/lib/functions/compilation/uboot.sh index 4f1ca73b69..1cde767fee 100644 --- a/lib/functions/compilation/uboot.sh +++ b/lib/functions/compilation/uboot.sh @@ -144,6 +144,14 @@ function compile_uboot_target() { fi + if [[ "${UBOOT_CONFIGURE:-"no"}" == "yes" ]]; then + display_alert "Configuring u-boot" "UBOOT_CONFIGURE=yes; experimental" "warn" + run_host_command_dialog make menuconfig + display_alert "Exporting saved config" "UBOOT_CONFIGURE=yes; experimental" "warn" + run_host_command_logged make savedefconfig + run_host_command_logged cp -v defconfig "${DEST}/defconfig-uboot-${BOARD}-${BRANCH}" + fi + # workaround when two compilers are needed cross_compile="CROSS_COMPILE=\"$CCACHE $UBOOT_COMPILER\"" [[ -n $UBOOT_TOOLCHAIN2 ]] && cross_compile="ARMBIAN=foe" # empty parameter is not allowed