From 79d1cd450f548684090d3b4e0fff76fd5de69526 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 4 Jul 2023 17:23:58 +0200 Subject: 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. --- tools/syz-kconf/kconf.go | 21 +++++++++++---------- tools/syz-kconf/parser.go | 6 ++---- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'tools') 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 } -- cgit mrf-deployment