mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
modules: rename packages/kernel_modules to packages/lkmc
Then inside, split packages/lkmc into kernel_modules and userland, to keep userland out of the kernel_modules parent path, which makes no sense. Copy built modules and userland to the output rootfs overlay. Document Linux distro tradeoffs.
This commit is contained in:
@@ -22,7 +22,6 @@ defaults = {
|
||||
'kernel_config_fragment': [],
|
||||
'kernel_custom_config_file': None,
|
||||
'kernel_modules': False,
|
||||
'no_kernel_modules': False,
|
||||
'linux_reconfigure': False,
|
||||
'no_all': False,
|
||||
'nproc': None,
|
||||
@@ -96,7 +95,9 @@ Still uses options explicitly passed with `-C` and `-c` on top of it.
|
||||
)
|
||||
kernel_module_group.add_argument(
|
||||
'-k', '--kernel-modules', default=defaults['kernel_modules'], action='store_true',
|
||||
help='Reconfigure and rebuild the kernel modules package'
|
||||
help='''Reconfigure and rebuild the kernel modules package.
|
||||
Force --build-linux to true, since building the modules requires building Linux.
|
||||
'''
|
||||
)
|
||||
parser.add_argument(
|
||||
'--no-all', default=defaults['no_all'], action='store_true',
|
||||
@@ -130,8 +131,8 @@ def main(args, extra_args=None):
|
||||
os.makedirs(common.out_dir, exist_ok=True)
|
||||
extra_make_args = args.extra_make_args.copy()
|
||||
if args.kernel_modules:
|
||||
assert(args.build_linux)
|
||||
extra_make_args.append('kernel_modules-reconfigure')
|
||||
args.build_linux = True
|
||||
extra_make_args.append('lkmc-reconfigure')
|
||||
if args.linux_reconfigure:
|
||||
extra_make_args.append('linux-reconfigure')
|
||||
if args.gem5:
|
||||
@@ -149,12 +150,6 @@ def main(args, extra_args=None):
|
||||
|
||||
# Configure.
|
||||
if not args.skip_configure:
|
||||
# Initial make configure.
|
||||
# TODO port and test.
|
||||
#cd "${common_buildroot_src_dir}"
|
||||
#for p in $(find "${common_root_dir}/patches/buildroot/" -maxdepth 1 -name '*.patch' -print); do
|
||||
# patch -N -r - -p 1 < "$p" || :
|
||||
#done
|
||||
br2_external_dirs = []
|
||||
packages_dir = os.path.join(common.root_dir, 'packages')
|
||||
for package_dir in os.listdir(packages_dir):
|
||||
@@ -197,7 +192,7 @@ def main(args, extra_args=None):
|
||||
path_relative_to_buildroot(os.path.join(common.root_dir, 'user_table'))),
|
||||
])
|
||||
if args.kernel_modules:
|
||||
buildroot_configs.append('BR2_PACKAGE_KERNEL_MODULES=y')
|
||||
buildroot_configs.append('BR2_PACKAGE_LKMC=y')
|
||||
if args.gem5:
|
||||
buildroot_configs.append('BR2_PACKAGE_GEM5=y')
|
||||
if args.initramfs:
|
||||
|
||||
Reference in New Issue
Block a user