1#!/usr/bin/env python 2 3# SPDX-License-Identifier: ISC 4# Copyright (c) 2018, Ulf Magnusson 5 6# Works like 'make alldefconfig'. Verified by the test suite to generate 7# identical output to 'make alldefconfig' for all ARCHes. 8# 9# The default output filename is '.config'. A different filename can be passed 10# in the KCONFIG_CONFIG environment variable. 11# 12# Usage for the Linux kernel: 13# 14# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/alldefconfig.py 15 16import kconfiglib 17 18def main(): 19 kconf = kconfiglib.standard_kconfig() 20 kconfiglib.load_allconfig(kconf, "alldef.config") 21 kconf.write_config() 22 23if __name__ == "__main__": 24 main() 25