@@ -28,6 +28,13 @@ Pass multiple times to use multiple fragment files.
28
28
Ignore all default kernel configurations and use this file instead.
29
29
Still uses options explicitly passed with `--config` and
30
30
`--config-fragment` on top of it.
31
+ '''
32
+ )
33
+ parser .add_argument (
34
+ '--custom-config-file-gem5' , default = False , action = 'store_true' ,
35
+ help = '''\
36
+ Use the gem5 Linux kernel fork config as the custom config file.
37
+ Ignore --custom-config-file.
31
38
'''
32
39
)
33
40
parser .add_argument (
@@ -77,10 +84,14 @@ Configure the kernel, but don't build it.
77
84
'CC={}' .format (cc ), common .Newline ,
78
85
'O={}' .format (build_dir ), common .Newline ,
79
86
] + verbose
80
- if args .custom_config_file is not None :
81
- if not os .path .exists (args .custom_config_file ):
87
+ if args .custom_config_file_gem5 :
88
+ custom_config_file = os .path .join (common .linux_source_dir , 'arch' , common .linux_arch , 'configs' , 'gem5_defconfig' )
89
+ else :
90
+ custom_config_file = args .custom_config_file
91
+ if custom_config_file is not None :
92
+ if not os .path .exists (custom_config_file ):
82
93
raise Exception ('config fragment file does not exist: {}' .format (args .custom_config_file ))
83
- base_config_file = args . custom_config_file
94
+ base_config_file = custom_config_file
84
95
config_fragments = []
85
96
else :
86
97
base_config_file = os .path .join (common .linux_config_dir , 'buildroot-{}' .format (args .arch ))
0 commit comments