18c2ecf20Sopenharmony_ci#
28c2ecf20Sopenharmony_ci# This file has some examples for creating a MIN_CONFIG.
38c2ecf20Sopenharmony_ci# (A .config file that is the minimum for a machine to boot, or
48c2ecf20Sopenharmony_ci#  to boot and make a network connection.)
58c2ecf20Sopenharmony_ci#
68c2ecf20Sopenharmony_ci# A MIN_CONFIG is very useful as it is the minimum configuration
78c2ecf20Sopenharmony_ci# needed to boot a given machine. You can debug someone else's
88c2ecf20Sopenharmony_ci# .config by only setting the configs in your MIN_CONFIG. The closer
98c2ecf20Sopenharmony_ci# your MIN_CONFIG is to the true minimum set of configs needed to
108c2ecf20Sopenharmony_ci# boot your machine, the closer the config you test with will be
118c2ecf20Sopenharmony_ci# to the users config that had the failure.
128c2ecf20Sopenharmony_ci#
138c2ecf20Sopenharmony_ci# The make_min_config test allows you to create a MIN_CONFIG that
148c2ecf20Sopenharmony_ci# is truly the minimum set of configs needed to boot a box.
158c2ecf20Sopenharmony_ci#
168c2ecf20Sopenharmony_ci# In this example, the final config will reside in
178c2ecf20Sopenharmony_ci# ${CONFIG_DIR}/config-new-min and ${CONFIG_DIR}/config-new-min-net.
188c2ecf20Sopenharmony_ci# Just move one to the location you have set for MIN_CONFIG.
198c2ecf20Sopenharmony_ci#
208c2ecf20Sopenharmony_ci# The first test creates a MIN_CONFIG that will be the minimum
218c2ecf20Sopenharmony_ci# configuration to boot ${MACHINE} and be able to ssh to it.
228c2ecf20Sopenharmony_ci#
238c2ecf20Sopenharmony_ci# The second test creates a MIN_CONFIG that will only boot
248c2ecf20Sopenharmony_ci# the target and most likely will not let you ssh to it. (Notice
258c2ecf20Sopenharmony_ci# how the second test uses the first test's result to continue with.
268c2ecf20Sopenharmony_ci# This is because the second test config is a subset of the first).
278c2ecf20Sopenharmony_ci#
288c2ecf20Sopenharmony_ci# The ${CONFIG_DIR}/config-skip (and -net) will hold the configs
298c2ecf20Sopenharmony_ci# that ktest.pl found would not boot the target without them set.
308c2ecf20Sopenharmony_ci# The config-new-min holds configs that ktest.pl could not test
318c2ecf20Sopenharmony_ci# directly because another config that was needed to boot the box
328c2ecf20Sopenharmony_ci# selected them. Sometimes it is possible that this file will hold
338c2ecf20Sopenharmony_ci# the true minimum configuration. You can test to see if this is
348c2ecf20Sopenharmony_ci# the case by running the boot test with BOOT_TYPE = allnoconfig and
358c2ecf20Sopenharmony_ci# setting setting the MIN_CONFIG to ${CONFIG_DIR}/config-skip. If the
368c2ecf20Sopenharmony_ci# machine still boots, then you can use the config-skip as your MIN_CONFIG.
378c2ecf20Sopenharmony_ci#
388c2ecf20Sopenharmony_ci# These tests can run for several hours (and perhaps days).
398c2ecf20Sopenharmony_ci# It's OK to kill the test with a Ctrl^C. By restarting without
408c2ecf20Sopenharmony_ci# modifying this config, ktest.pl will notice that the config-new-min(-net)
418c2ecf20Sopenharmony_ci# exists, and will use that instead as the starting point.
428c2ecf20Sopenharmony_ci# The USE_OUTPUT_MIN_CONFIG is set to 1 to keep ktest.pl from asking
438c2ecf20Sopenharmony_ci# you if you want to use the OUTPUT_MIN_CONFIG as the starting point.
448c2ecf20Sopenharmony_ci# By using the OUTPUT_MIN_CONFIG as the starting point will allow ktest.pl to
458c2ecf20Sopenharmony_ci# start almost where it left off.
468c2ecf20Sopenharmony_ci#
478c2ecf20Sopenharmony_ciTEST_START IF ${TEST} == min-config
488c2ecf20Sopenharmony_ciTEST_TYPE = make_min_config
498c2ecf20Sopenharmony_ciOUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
508c2ecf20Sopenharmony_ciIGNORE_CONFIG = ${CONFIG_DIR}/config-skip-net
518c2ecf20Sopenharmony_ciMIN_CONFIG_TYPE = test
528c2ecf20Sopenharmony_ciTEST = ${SSH} echo hi
538c2ecf20Sopenharmony_ciUSE_OUTPUT_MIN_CONFIG = 1
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciTEST_START IF ${TEST} == min-config && ${MULTI}
568c2ecf20Sopenharmony_ciTEST_TYPE = make_min_config
578c2ecf20Sopenharmony_ciOUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min
588c2ecf20Sopenharmony_ciIGNORE_CONFIG = ${CONFIG_DIR}/config-skip
598c2ecf20Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
608c2ecf20Sopenharmony_ciUSE_OUTPUT_MIN_CONFIG = 1
61