We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config subcommand to generate a kernel config from a set of fragments like the ones in here.
config
The generated config should include configuration to boot the vm with the configured debian features.
The command should check that all requested config items are set accordingly similar to this:
#!/usr/bin/env python3 import argparse import re import sys from itertools import combinations parser = argparse.ArgumentParser() parser.add_argument("--config", type=argparse.FileType('rt')) parser.add_argument("fragments", metavar='FRAGMENT', type=argparse.FileType('rt'), nargs="+") args = parser.parse_args() input_fragments = dict() output_configs = dict() matcher = re.compile(r"""^(CONFIG_\w+)=([nym])""") def get_configs(file): configs = dict() for line in file.readlines(): matches = matcher.match(line) if matches: configs[matches.group(1)] = matches.group(2) return configs for fragment in args.fragments: input_fragments[fragment.name] = get_configs(fragment) ok = True for (key_a, key_b) in combinations(input_fragments.keys(), 2): fragment_a = input_fragments[key_a] fragment_b = input_fragments[key_b] common_configs = set(fragment_a.keys()).intersection(set(fragment_b.keys())) for config in common_configs: value_a = fragment_a[config] value_b = fragment_b[config] if value_a != value_b: print(f"ERROR: {config} has conflicting values {key_a}:{value_a} and {key_b}:{value_b}") ok = False output_configs |= get_configs(args.config) input_configs = dict() for fragment_name,configs in input_fragments.items(): input_configs |= configs for key,value in input_configs.items(): check_failed = \ (value != 'n' \ and output_configs.get(key) != value) or \ (value == 'n' \ and key in output_configs and output_configs.get(key) != value) if check_failed: ok = False print(f"ERROR: {key}={value}") if not ok: sys.exit(-1)
The text was updated successfully, but these errors were encountered:
Maybe do something semantically like this:
#!/bin/bash set -e set -x rm -f {{path}}-build/.config version="$({{path}}/scripts/min-tool-version.sh bindgen)" export PATH="{{top}}/bindgen-$version/bin:$PATH" (cd {{path}} && make -j $(nproc) O={{top}}/{{path}}-build LLVM=1 \ allnoconfig) {{path}}/scripts/kconfig/merge_config.sh -m -O {{path}}-build {{path}}-build/.config \ config/default.fragment \ `echo "{{FRAGMENTS}}" | sed -E 's#([^[:space:]]+)#config/\1.fragment#g'` (cd {{path}} && make -j $(nproc) O={{top}}/{{path}}-build LLVM=1 \ olddefconfig) ./config-test.py --config {{path}}-build/.config config/default.fragment `echo "{{FRAGMENTS}}" | sed -E 's#([^[:space:]]+)#config/\1.fragment#g'`
Sorry, something went wrong.
Or use scripts/config
scripts/config
No branches or pull requests
Add
config
subcommand to generate a kernel config from a set of fragments like the ones in here.The generated config should include configuration to boot the vm with the configured debian features.
The command should check that all requested config items are set accordingly similar to this:
The text was updated successfully, but these errors were encountered: