mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-16 08:01:59 +01:00
Make the path and folder of config file available when parsing config.
The path and folder of config file is available as env variables and can
be used to reference images and updater scripts in config file.
BUG=chrome-os-partner:5850
TEST=1. Create a config file (mp_factory.conf) under src/mp_bundle with
the following content:
[x86-zgb]
--factory ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/chromiumos_factory_image.bin
--release ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/[Cc]hromiumos_image.bin
--hwid_updater ${MFP_CONFIG_DIR}/../platform/[Cc]hromeos-hwid/hwid_bundle_zgb.sh
--firmware_updater none
--detect_release_image # Comment.
# More comments.
[x86-zgb-he]
--subfolder x86-zgb-he
--factory ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/chromiumos_factory_image.bin
--release ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/chromiumos_image.bin
--hwid_updater ${MFP_CONFIG_DIR}/../platform/chromeos-hwid/hwid_bundle_zgb.sh
--firmware_updater none
--detect_release_image
2. Under src, execute
BOARD=x86-zgb scripts/make_factory_package.sh --config mp_bundle/mp_factory.conf
Change-Id: I3c9693febe1f7f1efc92ab845d63226911114031
Reviewed-on: http://gerrit.chromium.org/gerrit/7764
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
parent
503e8f6dca
commit
af9c1d9463
@ -682,6 +682,10 @@ main() {
|
||||
check_empty_param FLAGS_diskimg "when using config file"
|
||||
check_empty_param FLAGS_subfolder "when using config file"
|
||||
|
||||
# Make the path and folder of config file available when parsing config.
|
||||
MFP_CONFIG_PATH="$(readlink -f "$FLAGS_config")"
|
||||
MFP_CONFIG_DIR="$(dirname "$MFP_CONFIG_PATH")"
|
||||
|
||||
parse_and_run_config "$FLAGS_config"
|
||||
exit
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user