diff --git a/lib/functions/cli/commands.sh b/lib/functions/cli/commands.sh index 7345a156a9..1d20d47004 100644 --- a/lib/functions/cli/commands.sh +++ b/lib/functions/cli/commands.sh @@ -42,9 +42,11 @@ function armbian_register_commands() { ["config-dump"]="CONFIG_DEFS_ONLY='yes'" ["configdump"]="CONFIG_DEFS_ONLY='yes'" - ["kernel"]="KERNEL_ONLY='yes' JUST_KERNEL='yes'" - ["u-boot"]="KERNEL_ONLY='yes' JUST_UBOOT='yes'" - ["uboot"]="KERNEL_ONLY='yes' JUST_UBOOT='yes'" + ["kernel"]="KERNEL_ONLY='yes' JUST_KERNEL='yes' KERNEL_IGNORE_DEB='yes'" + ["u-boot"]="KERNEL_ONLY='yes' JUST_UBOOT='yes' UBOOT_IGNORE_DEB='yes'" + ["uboot"]="KERNEL_ONLY='yes' JUST_UBOOT='yes' UBOOT_IGNORE_DEB='yes'" + + ["undecided"]="UNDECIDED='yes'" ) # Override the LOG_CLI_ID to change the log file name. diff --git a/lib/functions/main/default-build.sh b/lib/functions/main/default-build.sh index c6a26d1483..e90f4cff4d 100644 --- a/lib/functions/main/default-build.sh +++ b/lib/functions/main/default-build.sh @@ -99,12 +99,12 @@ function main_default_build_single() { if [[ "${BOOTCONFIG}" != "none" ]]; then # @TODO: refactor this. we use it very often # Compile u-boot if packed .deb does not exist or use the one from repository - if [[ ! -f "${DEB_STORAGE}"/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then + if [[ ! -f "${DEB_STORAGE}"/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb || "${UBOOT_IGNORE_DEB}" == "yes" ]]; then if [[ -n "${ATFSOURCE}" && "${ATFSOURCE}" != "none" && "${REPOSITORY_INSTALL}" != *u-boot* ]]; then LOG_SECTION="compile_atf" do_with_logging compile_atf fi # @TODO: refactor this construct. we use it too many times. - if [[ "${REPOSITORY_INSTALL}" != *u-boot* ]]; then + if [[ "${REPOSITORY_INSTALL}" != *u-boot* || "${UBOOT_IGNORE_DEB}" == "yes" ]]; then 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 @@ -119,8 +119,7 @@ function main_default_build_single() { # Compile kernel if packed .deb does not exist or use the one from repository if [[ "${do_build_kernel}" == "yes" ]]; then - if [[ ! -f ${DEB_STORAGE}/${CHOSEN_KERNEL}_${REVISION}_${ARCH}.deb ]]; then - export KDEB_CHANGELOG_DIST=$RELEASE + if [[ ! -f ${DEB_STORAGE}/${CHOSEN_KERNEL}_${REVISION}_${ARCH}.deb || "${KERNEL_IGNORE_DEB}" == "yes" ]]; then if [[ -n $KERNELSOURCE ]] && [[ "${REPOSITORY_INSTALL}" != *kernel* ]]; then compile_kernel # This handles its own logging sections. fi