mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
linux: add --linux-source-dir to have custom linux source dir
This commit is contained in:
36
README.adoc
36
README.adoc
@@ -561,7 +561,7 @@ To modify the Linux kernel, build and use it as usual:
|
||||
For gem5, do:
|
||||
|
||||
....
|
||||
git submodule update --init --depth 1 "$(./getvar linux_src_dir)"
|
||||
git submodule update --init --depth 1 "$(./getvar linux_source_dir)"
|
||||
sudo apt-get install qemu-utils
|
||||
./build-gem5
|
||||
./run --gem5 --prebuilt
|
||||
@@ -3491,14 +3491,14 @@ Overview: https://stackoverflow.com/questions/50364863/how-to-get-graphical-gui-
|
||||
More concretely:
|
||||
|
||||
....
|
||||
git -C "$(./getvar linux_src_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
|
||||
git -C "$(./getvar linux_src_dir)" checkout gem5/v4.15
|
||||
git -C "$(./getvar linux_source_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
|
||||
git -C "$(./getvar linux_source_dir)" checkout gem5/v4.15
|
||||
./build-linux \
|
||||
--arch arm \
|
||||
--custom-config-file "$(./getvar linux_src_dir)/arch/arm/configs/gem5_defconfig" \
|
||||
--custom-config-file "$(./getvar linux_source_dir)/arch/arm/configs/gem5_defconfig" \
|
||||
--linux-build-id gem5-v4.15 \
|
||||
;
|
||||
git -C "$(./getvar linux_src_dir)" checkout -
|
||||
git -C "$(./getvar linux_source_dir)" checkout -
|
||||
./run --arch arm --gem5 --linux-build-id gem5-v4.15
|
||||
....
|
||||
|
||||
@@ -3566,15 +3566,15 @@ Tested on: link:http://github.com/cirosantilli/linux-kernel-module-cheat/commit/
|
||||
For `aarch64` we also need to configure the kernel with link:linux_config/display[]:
|
||||
|
||||
....
|
||||
git -C "$(./getvar linux_src_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
|
||||
git -C "$(./getvar linux_src_dir)" checkout gem5/v4.15
|
||||
git -C "$(./getvar linux_source_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
|
||||
git -C "$(./getvar linux_source_dir)" checkout gem5/v4.15
|
||||
./build-linux \
|
||||
--arch aarch64 \
|
||||
--config-fragment linux_config/display \
|
||||
--custom-config-file "$(./getvar linux_src_dir)/arch/arm64/configs/gem5_defconfig" \
|
||||
--custom-config-file "$(./getvar linux_source_dir)/arch/arm64/configs/gem5_defconfig" \
|
||||
--linux-build-id gem5-v4.15 \
|
||||
;
|
||||
git -C "$(./getvar linux_src_dir)" checkout -
|
||||
git -C "$(./getvar linux_source_dir)" checkout -
|
||||
./run --arch aarch64 --gem5 --linux-build-id gem5-v4.15
|
||||
....
|
||||
|
||||
@@ -3590,15 +3590,15 @@ The key option to enable support in Linux is `DRM_MALI_DISPLAY=y` which we enabl
|
||||
|
||||
....
|
||||
./build-linux
|
||||
git -C "$(./getvar linux_src_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
|
||||
git -C "$(./getvar linux_src_dir)" checkout gem5/v4.15
|
||||
git -C "$(./getvar linux_source_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
|
||||
git -C "$(./getvar linux_source_dir)" checkout gem5/v4.15
|
||||
./build-linux \
|
||||
--arch aarch64 \
|
||||
--config-fragment linux_config/display \
|
||||
--custom-config-file "$(./getvar linux_src_dir)/arch/arm64/configs/gem5_defconfig" \
|
||||
--custom-config-file "$(./getvar linux_source_dir)/arch/arm64/configs/gem5_defconfig" \
|
||||
--linux-build-id gem5-v4.15 \
|
||||
;
|
||||
git -C "$(./getvar linux_src_dir)" checkout -
|
||||
git -C "$(./getvar linux_source_dir)" checkout -
|
||||
./run --arch aarch64 --dp650 --gem5 --linux-build-id gem5-v4.15
|
||||
....
|
||||
|
||||
@@ -4139,7 +4139,7 @@ cat /proc/version
|
||||
or in the source:
|
||||
|
||||
....
|
||||
cd "$(./getvar linux_src_dir)"
|
||||
cd "$(./getvar linux_source_dir)"
|
||||
git log | grep -E ' Linux [0-9]+\.' | head
|
||||
....
|
||||
|
||||
@@ -11415,12 +11415,12 @@ If you want to keep two builds around, one for the latest Linux version, and the
|
||||
./build-linux
|
||||
|
||||
# Build another branch.
|
||||
git -C "$(./getvar linux_src_dir)" fetch --tags --unshallow
|
||||
git -C "$(./getvar linux_src_dir)" checkout v4.16
|
||||
git -C "$(./getvar linux_source_dir)" fetch --tags --unshallow
|
||||
git -C "$(./getvar linux_source_dir)" checkout v4.16
|
||||
./build-linux --linux-build-id v4.16
|
||||
|
||||
# Restore master.
|
||||
git -C "$(./getvar linux_src_dir)" checkout -
|
||||
git -C "$(./getvar linux_source_dir)" checkout -
|
||||
|
||||
# Run master.
|
||||
./run
|
||||
@@ -11921,7 +11921,7 @@ This example is based on the Linux kernel, for which we used to have patches, bu
|
||||
# Last point before out patches.
|
||||
last_mainline_revision=v4.15
|
||||
next_mainline_revision=v4.16
|
||||
cd "$(./getvar linux_src_dir)"
|
||||
cd "$(./getvar linux_source_dir)"
|
||||
|
||||
# Create a branch before the rebase in case things go wrong.
|
||||
git checkout -b "lkmc-${last_mainline_revision}"
|
||||
|
||||
Reference in New Issue
Block a user