armbian-next: unify 2 methods for config: prep_conf_main_minimal_ni() (rootfs/firmware/kernel) and prep_conf_main_build_single() (full-build, possibly interactive)
This commit is contained in:
parent
9dc24840c3
commit
3b126c0730
@ -7,14 +7,10 @@ function cli_firmware_pre_run() {
|
||||
|
||||
function cli_firmware_run() {
|
||||
|
||||
# configuration etc - it initializes the extension manager; handles its own logging sections.
|
||||
prep_conf_main_only_firmware < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
# minimal, non-interactive configuration - it initializes the extension manager; handles its own logging sections.
|
||||
prep_conf_main_minimal_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
|
||||
# Minimal config needed
|
||||
declare -g -r BOARD_FIRMWARE_INSTALL="-full" # Build full firmware "too"
|
||||
|
||||
# Fool the preparation step; firmware is arch agnostic.
|
||||
declare -g -r ARCH=arm64
|
||||
declare -g -r BOARD_FIRMWARE_INSTALL="-full" # Build full firmware "too"; overrides the config
|
||||
|
||||
# default build, but only invoke specific rootfs functions needed. It has its own logging sections.
|
||||
do_with_default_build cli_firmware_only_in_default_build < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
@ -27,25 +23,5 @@ function cli_firmware_run() {
|
||||
# This is run inside do_with_default_build(), above.
|
||||
function cli_firmware_only_in_default_build() {
|
||||
github_actions_add_output firmware_version "fake"
|
||||
|
||||
compile_firmware_light_and_possibly_full
|
||||
}
|
||||
|
||||
# Lean version, for building rootfs, that doesn't need BOARD/BOARDFAMILY; never interactive.
|
||||
function prep_conf_main_only_firmware() {
|
||||
LOG_SECTION="config_early_init" do_with_conditional_logging config_early_init
|
||||
|
||||
check_basic_host
|
||||
|
||||
LOG_SECTION="config_pre_main" do_with_conditional_logging config_pre_main
|
||||
|
||||
allow_no_family="yes" \
|
||||
LOG_SECTION="do_main_configuration" do_with_conditional_logging do_main_configuration # This initializes the extension manager among a lot of other things, and call extension_prepare_config() hook
|
||||
|
||||
LOG_SECTION="do_extra_configuration" do_with_conditional_logging do_extra_configuration
|
||||
|
||||
skip_kernel="yes" \
|
||||
LOG_SECTION="config_post_main" do_with_conditional_logging config_post_main
|
||||
|
||||
display_alert "Configuration prepared for non-BOARD build" "prep_conf_main_only_rootfs" "info"
|
||||
}
|
||||
|
||||
@ -37,8 +37,8 @@ function cli_rootfs_run() {
|
||||
declare -g -r RELEASE="${RELEASE}" # make readonly for finding who tries to change it
|
||||
declare -g -r NEEDS_BINFMT="yes" # make sure binfmts are installed during prepare_host_interactive
|
||||
|
||||
# configuration etc - it initializes the extension manager; handles its own logging sections.
|
||||
prep_conf_main_only_rootfs < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
# prep_conf_main_only_rootfs_ni is prep_conf_main_only_rootfs_ni() + aggregate_packages_in_logging_section() .
|
||||
prep_conf_main_only_rootfs_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
|
||||
declare -g -r ARCH="${ARCH}" # make readonly for finding who tries to change it
|
||||
if [[ "${ARCH}" != "${__wanted_rootfs_arch}" ]]; then
|
||||
|
||||
@ -33,25 +33,36 @@ function prep_conf_main_build_single() {
|
||||
display_alert "Configuration prepared for BOARD build" "${BOARD}.${BOARD_TYPE}" "info"
|
||||
}
|
||||
|
||||
# Lean version, for building rootfs, that doesn't need BOARD/BOARDFAMILY; never interactive.
|
||||
function prep_conf_main_only_rootfs() {
|
||||
# Minimal, non-interactive version.
|
||||
function prep_conf_main_minimal_ni() {
|
||||
# needed
|
||||
LOG_SECTION="config_early_init" do_with_conditional_logging config_early_init
|
||||
|
||||
# needed
|
||||
check_basic_host
|
||||
|
||||
# not needed, doesnt hurt; might be moved to aggregation
|
||||
LOG_SECTION="config_pre_main" do_with_conditional_logging config_pre_main
|
||||
|
||||
allow_no_family="yes" \
|
||||
# Required, but does stuff it maybe shouldn't
|
||||
allow_no_family="${allow_no_family:-"yes"}" \
|
||||
LOG_SECTION="do_main_configuration" do_with_conditional_logging do_main_configuration # This initializes the extension manager among a lot of other things, and call extension_prepare_config() hook
|
||||
|
||||
# Required: does a lot of stuff and extension_prepare_config() hook
|
||||
LOG_SECTION="do_extra_configuration" do_with_conditional_logging do_extra_configuration
|
||||
|
||||
skip_kernel="yes" \
|
||||
# Calculates CHOSEN_xxx's and optional kernel stuff; runs extension_finish_config() hook
|
||||
skip_kernel="${skip_kernel:-"yes"}" \
|
||||
LOG_SECTION="config_post_main" do_with_conditional_logging config_post_main
|
||||
|
||||
aggregate_packages_in_logging_section
|
||||
|
||||
display_alert "Configuration prepared for non-BOARD build" "prep_conf_main_only_rootfs" "info"
|
||||
display_alert "Minimal configuration prepared for build" "prep_conf_main_only_firmware" "info"
|
||||
}
|
||||
|
||||
# Lean version, for building rootfs, that doesn't need BOARD/BOARDFAMILY; never interactive.
|
||||
function prep_conf_main_only_rootfs_ni() {
|
||||
prep_conf_main_minimal_ni
|
||||
aggregate_packages_in_logging_section
|
||||
display_alert "Configuration prepared for minimal+rootfs" "prep_conf_main_only_rootfs_ni" "info"
|
||||
}
|
||||
|
||||
function config_source_board_file() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user