mirror of
https://github.com/armbian/build.git
synced 2025-08-11 21:56:58 +02:00
- _told ya it would all make sense eventually..._ - introduce new, real, non-alias `rootfs` command in `cli-rootfs` -- this _only_ builds rootfs, nothing else - no more `main_default_build_single()`; instead `full_build_packages_rootfs_and_image()` - introduce `do_with_default_build()` wrapper, for things that need host prepared + aggregation to run - CLI-specific parts of `main_default_build_single()` moved to cli-build - put prepare/cleanup pair of `prepare_rootfs_build_params_and_trap()` and `trap_handler_cleanup_rootfs_and_image()` into new `trap-rootfs.sh` (this needs further splitting for the image part) - refactor `get_or_create_rootfs_cache_chroot_sdcard()` into `build_rootfs_only()`, `calculate_rootfs_cache_id()` - update library with new files
26 lines
1.1 KiB
Bash
26 lines
1.1 KiB
Bash
function cli_rootfs_pre_run() {
|
|
declare -g ARMBIAN_COMMAND_REQUIRE_BASIC_DEPS="yes" # Require prepare_host_basic to run before the command.
|
|
|
|
# "gimme root on a Linux machine"
|
|
cli_standard_relaunch_docker_or_sudo
|
|
}
|
|
|
|
function cli_rootfs_run() {
|
|
# configuration etc - it initializes the extension manager; handles its own logging sections
|
|
prep_conf_main_build_single
|
|
|
|
# default build, but only invoke specific rootfs functions needed. It has its own logging sections.
|
|
do_with_default_build cli_rootfs_only_in_default_build
|
|
}
|
|
|
|
# This is run inside do_with_default_build(), above.
|
|
function cli_rootfs_only_in_default_build() {
|
|
declare -i tmpfs_estimated_size # in MiB; set by prepare_rootfs_build_params_and_trap()
|
|
LOG_SECTION="prepare_rootfs_build_params_and_trap" do_with_logging prepare_rootfs_build_params_and_trap
|
|
|
|
LOG_SECTION="calculate_rootfs_cache_id" do_with_logging calculate_rootfs_cache_id
|
|
|
|
# "rootfs" CLI skips over a lot goes straight to create the rootfs. It doesn't check cache etc.
|
|
LOG_SECTION="create_new_rootfs_cache" do_with_logging create_new_rootfs_cache
|
|
}
|