mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 12:34:26 +01:00
build-linux: --no-modules-install
This commit is contained in:
@@ -539,8 +539,7 @@ You have to checkout to the latest tag to ensure that the scripts match the rele
|
|||||||
Be saner and use our custom built QEMU instead:
|
Be saner and use our custom built QEMU instead:
|
||||||
|
|
||||||
....
|
....
|
||||||
git submodule update --init --recursive "$(./getvar qemu_source_dir)"
|
./build --download-dependencies qemu
|
||||||
./build-qemu
|
|
||||||
./run
|
./run
|
||||||
....
|
....
|
||||||
|
|
||||||
@@ -549,7 +548,8 @@ This also allows you to <<your-first-qemu-hack,modify QEMU>> if you're into that
|
|||||||
To build the kernel modules as in <<your-first-kernel-module-hack>> do:
|
To build the kernel modules as in <<your-first-kernel-module-hack>> do:
|
||||||
|
|
||||||
....
|
....
|
||||||
./build-linux -- modules_prepare
|
git submodule update --depth 1 --init --recursive "$(./getvar linux_source_dir)"
|
||||||
|
./build-linux --no-modules-install -- modules_prepare
|
||||||
./build-modules
|
./build-modules
|
||||||
./run
|
./run
|
||||||
....
|
....
|
||||||
@@ -561,6 +561,7 @@ This command automatically falls back to the Ubuntu packaged GCC since you don't
|
|||||||
To modify the Linux kernel, build and use it as usual:
|
To modify the Linux kernel, build and use it as usual:
|
||||||
|
|
||||||
....
|
....
|
||||||
|
git submodule update --depth 1 --init --recursive "$(./getvar linux_source_dir)"
|
||||||
./build-linux
|
./build-linux
|
||||||
./run
|
./run
|
||||||
....
|
....
|
||||||
|
|||||||
2
build
2
build
@@ -246,7 +246,7 @@ so looping over all of them would waste time.
|
|||||||
**gem5_deps
|
**gem5_deps
|
||||||
),
|
),
|
||||||
'linux': _Component(
|
'linux': _Component(
|
||||||
self._build_file('build-linux', gem5_build_type='fast'),
|
self._build_file('build-linux'),
|
||||||
dependencies={'buildroot'},
|
dependencies={'buildroot'},
|
||||||
submodules_shallow={'linux'},
|
submodules_shallow={'linux'},
|
||||||
apt_get_pkgs={
|
apt_get_pkgs={
|
||||||
|
|||||||
37
build-linux
37
build-linux
@@ -26,6 +26,12 @@ configs. Takes precedence over any config files.
|
|||||||
help='''\
|
help='''\
|
||||||
Also use the given kernel configuration fragment file.
|
Also use the given kernel configuration fragment file.
|
||||||
Pass multiple times to use multiple fragment files.
|
Pass multiple times to use multiple fragment files.
|
||||||
|
'''
|
||||||
|
)
|
||||||
|
self.add_argument(
|
||||||
|
'--config-only', default=False,
|
||||||
|
help='''\
|
||||||
|
Configure the kernel, but don't build it.
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
@@ -44,9 +50,9 @@ Ignore --custom-config-file.
|
|||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
'--config-only', default=False,
|
'--modules-install', default=True,
|
||||||
help='''\
|
help='''\
|
||||||
Configure the kernel, but don't build it.
|
Run `make modules_install` after `make`.
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
@@ -138,19 +144,20 @@ Configure the kernel, but don't build it.
|
|||||||
},
|
},
|
||||||
**common_args
|
**common_args
|
||||||
)
|
)
|
||||||
self.sh.run_cmd(
|
if self.env['modules_install']:
|
||||||
(
|
self.sh.run_cmd(
|
||||||
common_make_args +
|
(
|
||||||
[
|
common_make_args +
|
||||||
'INSTALL_MOD_PATH={}'.format(self.env['out_rootfs_overlay_dir']), LF,
|
[
|
||||||
'modules_install', LF,
|
'INSTALL_MOD_PATH={}'.format(self.env['out_rootfs_overlay_dir']), LF,
|
||||||
]
|
'modules_install', LF,
|
||||||
),
|
]
|
||||||
**common_args
|
),
|
||||||
)
|
**common_args
|
||||||
# TODO: remove build and source https://stackoverflow.com/questions/13578618/what-does-build-and-source-link-do-in-lib-modules-kernel-version
|
)
|
||||||
# TODO Basically all kernel modules also basically leak full host paths. Just terrible. Buildroot deals with that stuff nicely for us.
|
# TODO: remove build and source https://stackoverflow.com/questions/13578618/what-does-build-and-source-link-do-in-lib-modules-kernel-version
|
||||||
# self.rmrf()
|
# TODO Basically all kernel modules also basically leak full host paths. Just terrible. Buildroot deals with that stuff nicely for us.
|
||||||
|
# self.rmrf()
|
||||||
|
|
||||||
def get_build_dir(self):
|
def get_build_dir(self):
|
||||||
return self.env['linux_build_dir']
|
return self.env['linux_build_dir']
|
||||||
|
|||||||
Reference in New Issue
Block a user