+ if args.generate:
+ assert(args.config is None and args.cmdline is None and args.sysctl is None), 'unexpected args'
+ if mode:
+ sys.exit(f'[!] ERROR: wrong mode "{mode}" for --generate')
+ arch = args.generate
+ add_kconfig_checks(config_checklist, arch)
+ print(f'CONFIG_{arch}=y') # the Kconfig fragment should describe the microarchitecture
+ for opt in config_checklist:
+ if opt.name == 'CONFIG_ARCH_MMAP_RND_BITS':
+ continue # don't add CONFIG_ARCH_MMAP_RND_BITS because its value needs refinement
+ if opt.expected == 'is not set':
+ print(f'# {opt.name} is not set')
+ else:
+ print(f'{opt.name}={opt.expected}')
+ sys.exit(0)
+