162306a36Sopenharmony_ci#
262306a36Sopenharmony_ci# This file has some examples for creating a MIN_CONFIG.
362306a36Sopenharmony_ci# (A .config file that is the minimum for a machine to boot, or
462306a36Sopenharmony_ci#  to boot and make a network connection.)
562306a36Sopenharmony_ci#
662306a36Sopenharmony_ci# A MIN_CONFIG is very useful as it is the minimum configuration
762306a36Sopenharmony_ci# needed to boot a given machine. You can debug someone else's
862306a36Sopenharmony_ci# .config by only setting the configs in your MIN_CONFIG. The closer
962306a36Sopenharmony_ci# your MIN_CONFIG is to the true minimum set of configs needed to
1062306a36Sopenharmony_ci# boot your machine, the closer the config you test with will be
1162306a36Sopenharmony_ci# to the users config that had the failure.
1262306a36Sopenharmony_ci#
1362306a36Sopenharmony_ci# The make_min_config test allows you to create a MIN_CONFIG that
1462306a36Sopenharmony_ci# is truly the minimum set of configs needed to boot a box.
1562306a36Sopenharmony_ci#
1662306a36Sopenharmony_ci# In this example, the final config will reside in
1762306a36Sopenharmony_ci# ${CONFIG_DIR}/config-new-min and ${CONFIG_DIR}/config-new-min-net.
1862306a36Sopenharmony_ci# Just move one to the location you have set for MIN_CONFIG.
1962306a36Sopenharmony_ci#
2062306a36Sopenharmony_ci# The first test creates a MIN_CONFIG that will be the minimum
2162306a36Sopenharmony_ci# configuration to boot ${MACHINE} and be able to ssh to it.
2262306a36Sopenharmony_ci#
2362306a36Sopenharmony_ci# The second test creates a MIN_CONFIG that will only boot
2462306a36Sopenharmony_ci# the target and most likely will not let you ssh to it. (Notice
2562306a36Sopenharmony_ci# how the second test uses the first test's result to continue with.
2662306a36Sopenharmony_ci# This is because the second test config is a subset of the first).
2762306a36Sopenharmony_ci#
2862306a36Sopenharmony_ci# The ${CONFIG_DIR}/config-skip (and -net) will hold the configs
2962306a36Sopenharmony_ci# that ktest.pl found would not boot the target without them set.
3062306a36Sopenharmony_ci# The config-new-min holds configs that ktest.pl could not test
3162306a36Sopenharmony_ci# directly because another config that was needed to boot the box
3262306a36Sopenharmony_ci# selected them. Sometimes it is possible that this file will hold
3362306a36Sopenharmony_ci# the true minimum configuration. You can test to see if this is
3462306a36Sopenharmony_ci# the case by running the boot test with BOOT_TYPE = allnoconfig and
3562306a36Sopenharmony_ci# setting setting the MIN_CONFIG to ${CONFIG_DIR}/config-skip. If the
3662306a36Sopenharmony_ci# machine still boots, then you can use the config-skip as your MIN_CONFIG.
3762306a36Sopenharmony_ci#
3862306a36Sopenharmony_ci# These tests can run for several hours (and perhaps days).
3962306a36Sopenharmony_ci# It's OK to kill the test with a Ctrl^C. By restarting without
4062306a36Sopenharmony_ci# modifying this config, ktest.pl will notice that the config-new-min(-net)
4162306a36Sopenharmony_ci# exists, and will use that instead as the starting point.
4262306a36Sopenharmony_ci# The USE_OUTPUT_MIN_CONFIG is set to 1 to keep ktest.pl from asking
4362306a36Sopenharmony_ci# you if you want to use the OUTPUT_MIN_CONFIG as the starting point.
4462306a36Sopenharmony_ci# By using the OUTPUT_MIN_CONFIG as the starting point will allow ktest.pl to
4562306a36Sopenharmony_ci# start almost where it left off.
4662306a36Sopenharmony_ci#
4762306a36Sopenharmony_ciTEST_START IF ${TEST} == min-config
4862306a36Sopenharmony_ciTEST_TYPE = make_min_config
4962306a36Sopenharmony_ciOUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
5062306a36Sopenharmony_ciIGNORE_CONFIG = ${CONFIG_DIR}/config-skip-net
5162306a36Sopenharmony_ciMIN_CONFIG_TYPE = test
5262306a36Sopenharmony_ciTEST = ${SSH} echo hi
5362306a36Sopenharmony_ciUSE_OUTPUT_MIN_CONFIG = 1
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciTEST_START IF ${TEST} == min-config && ${MULTI}
5662306a36Sopenharmony_ciTEST_TYPE = make_min_config
5762306a36Sopenharmony_ciOUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min
5862306a36Sopenharmony_ciIGNORE_CONFIG = ${CONFIG_DIR}/config-skip
5962306a36Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
6062306a36Sopenharmony_ciUSE_OUTPUT_MIN_CONFIG = 1
61