armbian-next: squash some warn loggings that were undue; remove $SUDO_USER handling in prepare-host.sh

- squash warning about `NO_APT_CACHER` when in Docker
This commit is contained in:
Ricardo Pardini
2022-12-13 18:36:24 +01:00
parent b386e4615e
commit fd043d707a
5 changed files with 9 additions and 22 deletions

View File

@@ -112,18 +112,18 @@ function compile_uboot_target() {
# $BOOTDELAY can be set in board family config, ensure autoboot can be stopped even if set to 0
if [[ $BOOTDELAY == 0 ]]; then
display_alert "Adding CONFIG_ZERO_BOOTDELAY_CHECK=y u-boot config" "BOOTDELAY==0 for ${target}" "warn"
display_alert "Adding CONFIG_ZERO_BOOTDELAY_CHECK=y u-boot config" "BOOTDELAY==0 for ${target}" "info"
run_host_command_logged scripts/config --enable CONFIG_ZERO_BOOTDELAY_CHECK
fi
# If BOOTDELAY is set, either change a preexisting CONFIG_BOOTDELAY or add it
if [[ -n $BOOTDELAY ]]; then
display_alert "Hacking autoboot delay in u-boot config" "BOOTDELAY=${BOOTDELAY} for ${target}" "warn"
display_alert "Hacking autoboot delay in u-boot config" "BOOTDELAY=${BOOTDELAY} for ${target}" "info"
run_host_command_logged scripts/config --set-val CONFIG_BOOTDELAY "${BOOTDELAY}"
fi
# Hack, up the log level to 6: "info" (default is 4: "warning")
display_alert "Hacking log level in u-boot config" "LOGLEVEL=6 for ${target}" "warn"
display_alert "Hacking log level in u-boot config" "LOGLEVEL=6 for ${target}" "info"
run_host_command_logged scripts/config --set-val CONFIG_LOGLEVEL 6
fi

View File

@@ -91,16 +91,14 @@ prepare_host() {
if armbian_is_running_in_container; then
display_alert "Running in container" "Adding provisions for container building" "info"
declare -g CONTAINER_COMPAT=yes # this controls mknod usage for loop devices.
# disable apt-cacher unless NO_APT_CACHER=no is not specified explicitly
if [[ $NO_APT_CACHER != no ]]; then
display_alert "apt-cacher is disabled in containers, set NO_APT_CACHER=no to override" "" "wrn"
NO_APT_CACHER=yes
fi
declare -g NO_APT_CACHER=yes # disable apt-cacher; we use local cache in Docker volumes.
# trying to use nested containers is not a good idea, so don't permit EXTERNAL_NEW=compile
if [[ $EXTERNAL_NEW == compile ]]; then
display_alert "EXTERNAL_NEW=compile is not available when running in container, setting to prebuilt" "" "wrn"
EXTERNAL_NEW=prebuilt
fi
SYNC_CLOCK=no
else
display_alert "NOT running in container" "No special provisions for container building" "debug"
@@ -122,17 +120,6 @@ prepare_host() {
# create directory structure # @TODO: this should be close to DEST, otherwise super-confusing
mkdir -p "${SRC}"/{cache,output} "${USERPATCHES_PATH}"
# @TODO: rpardini: wtf?
if [[ -n $SUDO_USER ]]; then
display_alert "ARMBIAN-NEXT UNHANDLED! SUDO_USER variable" "ARMBIAN-NEXT UNHANDLED! SUDO_USER: $SUDO_USER" "wrn"
chgrp --quiet sudo cache output "${USERPATCHES_PATH}"
# SGID bit on cache/sources breaks kernel dpkg packaging
chmod --quiet g+w,g+s output "${USERPATCHES_PATH}"
# fix existing permissions
find "${SRC}"/output "${USERPATCHES_PATH}" -type d ! -group sudo -exec chgrp --quiet sudo {} \;
find "${SRC}"/output "${USERPATCHES_PATH}" -type d ! -perm -g+w,g+s -exec chmod --quiet g+w,g+s {} \;
fi
# @TODO: original: mkdir -p "${DEST}"/debs-beta/extra "${DEST}"/debs/extra "${DEST}"/{config,debug,patch} "${USERPATCHES_PATH}"/overlay "${SRC}"/cache/{sources,hash,hash-beta,toolchain,utility,rootfs} "${SRC}"/.tmp
mkdir -p "${USERPATCHES_PATH}"/overlay "${SRC}"/cache/{sources,hash,hash-beta,toolchain,utility,rootfs} "${SRC}"/.tmp

View File

@@ -65,7 +65,7 @@ function prepare_and_config_main_build_single() {
interactive_config_ask_branch
[[ -z $BRANCH ]] && exit_with_error "No kernel branch selected: BRANCH"
[[ $KERNEL_TARGET != *$BRANCH* ]] && display_alert "Kernel branch not defined for this board" "$BRANCH for ${BOARD}" "warn"
[[ ${KERNEL_TARGET} != *${BRANCH}* && ${BRANCH} != "ddk" ]] && display_alert "Kernel branch not defined for this board" "${BRANCH} for ${BOARD}" "warn"
interactive_config_ask_release
[[ -z $RELEASE && ${KERNEL_ONLY} != yes ]] && exit_with_error "No release selected: RELEASE"

View File

@@ -179,7 +179,7 @@ function install_distribution_agnostic() {
else # ... not extlinux ...
if [[ -n "${BOOTSCRIPT}" ]]; then # @TODO: && "${BOOTCONFIG}" != "none"
display_alert "Deploying boot script" "$bootscript_src" "warn"
display_alert "Deploying boot script" "$bootscript_src" "info"
if [ -f "${USERPATCHES_PATH}/bootscripts/${bootscript_src}" ]; then
run_host_command_logged cp -pv "${USERPATCHES_PATH}/bootscripts/${bootscript_src}" "${SDCARD}/boot/${bootscript_dst}"
else

View File

@@ -173,7 +173,7 @@ create_sources_list() {
# disable repo if SKIP_ARMBIAN_REPO=yes
if [[ "${SKIP_ARMBIAN_REPO}" == "yes" ]]; then
display_alert "Disabling armbian repo" "${ARCH}-${RELEASE}" "wrn"
display_alert "Disabling Armbian repo due to SKIP_ARMBIAN_REPO=yes" "${ARCH}-${RELEASE}" "info"
mv "${SDCARD}"/etc/apt/sources.list.d/armbian.list "${SDCARD}"/etc/apt/sources.list.d/armbian.list.disabled
fi