Change default build script options

Use PROGRESS_DISPLAY=plain by default
Remove (hide) internally used options
Add dialog for KERNEL_CONFIGURE option
This commit is contained in:
zador-blood-stained 2017-07-09 21:25:52 +03:00
parent 53f5147126
commit 585614d5b3
3 changed files with 20 additions and 13 deletions

View file

@ -14,7 +14,7 @@
# for detailed explanation of these options and for additional options not listed here
KERNEL_ONLY="" # leave empty to select each time, set to "yes" or "no" to skip dialog prompt
KERNEL_CONFIGURE="no" # change provided kernel configuration
KERNEL_CONFIGURE="" # leave empty to select each time, set to "yes" or "no" to skip dialog prompt
CLEAN_LEVEL="make,debs,oldcache" # comma-separated list of clean targets: "make" = make clean for selected kernel and u-boot,
# "debs" = delete packages in "./output/debs" for current branch and family,
# "alldebs" = delete all packages in "./output/debs", "images" = delete "./output/images",
@ -28,12 +28,9 @@ KERNEL_KEEP_CONFIG="no" # do not overwrite kernel config before compilation
EXTERNAL="yes" # build and install extra applications and drivers
EXTERNAL_NEW="prebuilt" # compile and install or install prebuilt additional packages
CREATE_PATCHES="no" # wait that you make changes to uboot and kernel source and creates patches
FORCE_CHECKOUT="yes" # ignore manual changes to source
BUILD_ALL="no" # cycle through available boards and make images or kernel/u-boot packages.
# set KERNEL_ONLY to "yes" or "no" to build all packages/all images
BETA="" # set yes to add subrevision with tomorrow's date. For internal use.
MULTITHREAD="" # build n images at once. For internal use.
BSPFREEZE="" # freeze armbian packages (u-boot, kernel, dtb)
# build script version to use
@ -85,9 +82,6 @@ fi
# source additional configuration file
[[ -n $1 && -f $SRC/config-$1.conf ]] && source $SRC/config-$1.conf
# daily beta build contains date in subrevision
if [[ $BETA == yes ]]; then SUBREVISION="."$(date --date="tomorrow" +"%y%m%d"); fi
if [[ $BUILD_ALL == yes || $BUILD_ALL == demo ]]; then
source $SRC/lib/build-all.sh
else
@ -100,4 +94,4 @@ fi
# If you are committing new version of this file, increment VERSION
# Only integers are supported
# VERSION=26
# VERSION=27

View file

@ -10,6 +10,8 @@
#
# common options
# daily beta build contains date in subrevision
[[ $BETA == yes ]] && SUBREVISION="."$(date --date="tomorrow" +"%y%m%d")
REVISION="5.32$SUBREVISION" # all boards have same revision
ROOTPWD="1234" # Must be changed @first login
MAINTAINER="Igor Pecovnik" # deb signature

21
main.sh
View file

@ -75,7 +75,7 @@ fi
if [[ $PROGRESS_DISPLAY == none ]]; then
OUTPUT_VERYSILENT=yes
elif [[ $PROGRESS_DISPLAY != plain ]]; then
elif [[ $PROGRESS_DISPLAY == dialog ]]; then
OUTPUT_DIALOG=yes
fi
if [[ $PROGRESS_LOG_TO_FILE != yes ]]; then unset PROGRESS_LOG_TO_FILE; fi
@ -103,22 +103,33 @@ fi
# Check and install dependencies, directory structure and settings
prepare_host
# if KERNEL_ONLY, BOARD, BRANCH or RELEASE are not set, display selection menu
# if KERNEL_ONLY, KERNEL_CONFIGURE, BOARD, BRANCH or RELEASE are not set, display selection menu
if [[ -z $KERNEL_ONLY ]]; then
options+=("yes" "Kernel and u-boot packages")
options+=("no" "OS image for installation to SD card")
options+=("yes" "U-boot and kernel packages")
options+=("no" "Full OS image for flashing")
KERNEL_ONLY=$(dialog --stdout --title "Choose an option" --backtitle "$backtitle" --no-tags --menu "Select what to build" \
$TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}")
unset options
[[ -z $KERNEL_ONLY ]] && exit_with_error "No option selected"
fi
if [[ -z $KERNEL_CONFIGURE ]]; then
options+=("no" "Do not change the kernel configuration")
options+=("yes" "Show a kernel configuration menu before compilation")
KERNEL_CONFIGURE=$(dialog --stdout --title "Choose an option" --backtitle "$backtitle" --no-tags --menu "Select the kernel configuration" \
$TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}")
unset options
[[ -z $KERNEL_CONFIGURE ]] && exit_with_error "No option selected"
fi
if [[ -z $BOARD ]]; then
WIP_STATE=supported
WIP_BUTTON='CSC/WIP/EOS'
STATE_DESCRIPTION=' - Officially supported boards'
[[ $EXPERT = "yes" ]] && DIALOG_EXTRA="--extra-button"
[[ $EXPERT = yes ]] && DIALOG_EXTRA="--extra-button"
temp_rc=$(mktemp)
while true; do
options=()