alldefconfig.py 607 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env python3
  2. # Copyright (c) 2018-2019, Ulf Magnusson
  3. # SPDX-License-Identifier: ISC
  4. """
  5. Writes a configuration file where all symbols are set to their their default
  6. values.
  7. The default output filename is '.config'. A different filename can be passed in
  8. the KCONFIG_CONFIG environment variable.
  9. Usage for the Linux kernel:
  10. $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/alldefconfig.py
  11. """
  12. import kconfiglib
  13. def main():
  14. kconf = kconfiglib.standard_kconfig(__doc__)
  15. kconf.load_allconfig("alldef.config")
  16. print(kconf.write_config())
  17. if __name__ == "__main__":
  18. main()