mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
add --custom-config-file-gem5 option to build gem5 kernels more easily
This commit is contained in:
@@ -3495,7 +3495,7 @@ git -C "$(./getvar linux_source_dir)" fetch https://gem5.googlesource.com/arm/li
|
||||
git -C "$(./getvar linux_source_dir)" checkout gem5/v4.15
|
||||
./build-linux \
|
||||
--arch arm \
|
||||
--custom-config-file "$(./getvar linux_source_dir)/arch/arm/configs/gem5_defconfig" \
|
||||
--custom-config-file-gem5 \
|
||||
--linux-build-id gem5-v4.15 \
|
||||
;
|
||||
git -C "$(./getvar linux_source_dir)" checkout -
|
||||
@@ -3571,7 +3571,7 @@ git -C "$(./getvar linux_source_dir)" checkout gem5/v4.15
|
||||
./build-linux \
|
||||
--arch aarch64 \
|
||||
--config-fragment linux_config/display \
|
||||
--custom-config-file "$(./getvar linux_source_dir)/arch/arm64/configs/gem5_defconfig" \
|
||||
--custom-config-file-gem5 \
|
||||
--linux-build-id gem5-v4.15 \
|
||||
;
|
||||
git -C "$(./getvar linux_source_dir)" checkout -
|
||||
|
||||
17
build-linux
17
build-linux
@@ -28,6 +28,13 @@ Pass multiple times to use multiple fragment files.
|
||||
Ignore all default kernel configurations and use this file instead.
|
||||
Still uses options explicitly passed with `--config` and
|
||||
`--config-fragment` on top of it.
|
||||
'''
|
||||
)
|
||||
parser.add_argument(
|
||||
'--custom-config-file-gem5', default=False, action='store_true',
|
||||
help='''\
|
||||
Use the gem5 Linux kernel fork config as the custom config file.
|
||||
Ignore --custom-config-file.
|
||||
'''
|
||||
)
|
||||
parser.add_argument(
|
||||
@@ -77,10 +84,14 @@ Configure the kernel, but don't build it.
|
||||
'CC={}'.format(cc), common.Newline,
|
||||
'O={}'.format(build_dir), common.Newline,
|
||||
] + verbose
|
||||
if args.custom_config_file is not None:
|
||||
if not os.path.exists(args.custom_config_file):
|
||||
if args.custom_config_file_gem5:
|
||||
custom_config_file = os.path.join(common.linux_source_dir, 'arch', common.linux_arch, 'configs', 'gem5_defconfig')
|
||||
else:
|
||||
custom_config_file = args.custom_config_file
|
||||
if custom_config_file is not None:
|
||||
if not os.path.exists(custom_config_file):
|
||||
raise Exception('config fragment file does not exist: {}'.format(args.custom_config_file))
|
||||
base_config_file = args.custom_config_file
|
||||
base_config_file = custom_config_file
|
||||
config_fragments = []
|
||||
else:
|
||||
base_config_file = os.path.join(common.linux_config_dir, 'buildroot-{}'.format(args.arch))
|
||||
|
||||
Reference in New Issue
Block a user