diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-07-04 17:23:58 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-07-04 16:44:12 +0000 |
| commit | 79d1cd450f548684090d3b4e0fff76fd5de69526 (patch) | |
| tree | c627a7081e4c03f476bfa6970c2c9dcc7b00e04d /tools | |
| parent | 47f20f7129a01767bed684ccbbbf12bbbddec7c2 (diff) | |
tools/syz-kconf: split the `baseline` feature
Baseline configs were meant to be the minimum configs, however, since
they are based on defconfigs, they are still quite big.
To facilitate even smaller baseline configs, let's split the `baseline`
feature in two:
1) `baseline` only disables the addition of extra features on top of
baseline config. It's enabled for `-base.config` files automatically,
but can be also manually set, e.g. if we only want to add debug
configs on top of a defconfig.
2) `base-config` is automatically set for `-base.config` files and can
be used to disable configs in those files.
Regenerate configs.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-kconf/kconf.go | 21 | ||||
| -rw-r--r-- | tools/syz-kconf/parser.go | 6 |
2 files changed, 13 insertions, 14 deletions
diff --git a/tools/syz-kconf/kconf.go b/tools/syz-kconf/kconf.go index 833ae5d04..8a08f557a 100644 --- a/tools/syz-kconf/kconf.go +++ b/tools/syz-kconf/kconf.go @@ -25,16 +25,17 @@ import ( ) const ( - featOverride = "override" - featOptional = "optional" - featAppend = "append" - featWeak = "weak" - featBaseline = "baseline" - featModules = "modules" - featReduced = "reduced" - featClang = "clang" - featAndroid = "android" - featChromeos = "chromeos" + featOverride = "override" + featOptional = "optional" + featAppend = "append" + featWeak = "weak" + featBaseline = "baseline" // disables extra configs + featBaseConfig = "base-config" // only set for `-base.config` files + featModules = "modules" + featReduced = "reduced" + featClang = "clang" + featAndroid = "android" + featChromeos = "chromeos" ) func main() { diff --git a/tools/syz-kconf/parser.go b/tools/syz-kconf/parser.go index 05531a227..c81525cdf 100644 --- a/tools/syz-kconf/parser.go +++ b/tools/syz-kconf/parser.go @@ -112,10 +112,8 @@ func parseMainSpec(file string) ([]*Instance, []string, error) { return nil, nil, fmt.Errorf("%v: %v", name, err) } instances = append(instances, inst) - if constraintsInclude(features, featBaseline) { - continue - } - inst, err = parseInstance(name+"-base", filepath.Dir(file), append(features, featBaseline), raw.Includes) + inst, err = parseInstance(name+"-base", filepath.Dir(file), + append(features, featBaseline, featBaseConfig), raw.Includes) if err != nil { return nil, nil, err } |
