command: add new flag '--live' to build live boot image

The live boot image is intended to boot and run on system memory.
Its root file system is built as SQUASFS file system and loaded
from a file system on booting.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I7df3cb7c43a53120afa300142032aa0e95a914fe
This commit is contained in:
Dongjin Kim
2021-04-14 17:54:22 +09:00
parent e25e8d2d74
commit 7b24cbbaec

View File

@@ -3,10 +3,11 @@
#set -x
usage() {
echo "Usage: $(basename $0) [--help] [--output=<path>]"
echo "Usage: $(basename $0) [--help] [--output=<path>] [--live]"
echo
echo " --help: this help message"
echo " --output=<path>: output directory for image files."
echo " --live: enforce to build live boot system image."
exit 1
}
@@ -31,6 +32,9 @@ for opt in "$@"; do
--output=*)
out_dir="${opt#*=}"
;;
--no-live) opt_livesystem=false;;
--live) opt_livesystem=true;;
esac
done
@@ -49,6 +53,8 @@ fi
. ${DEFAULT_CONFIG}
[ "x${opt_livesystem}" = "xtrue" ] && LIVESYSTEM=true
[ "${RUN_MENU}" = "true" ] && do_menu
[ "x${ISOIMAGE}" = "xtrue" ] && LIVESYSTEM=true