mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gem5: prefix woktree branch with wt/
This commit is contained in:
@@ -6537,13 +6537,15 @@ Since we control the gem5 build however, unlike Linux which uses Buildroot, we m
|
|||||||
It works like this:
|
It works like this:
|
||||||
|
|
||||||
* when you don't pass the `-M` option, which is the same as the `-M default` variant, we use the source code from under the `gem5/gem5` submodule for the build
|
* when you don't pass the `-M` option, which is the same as the `-M default` variant, we use the source code from under the `gem5/gem5` submodule for the build
|
||||||
* otherwise, if you pass `-M some-branch`, we generate a git worktree checkout under `data/gem5/some-branch`.
|
* otherwise, if you pass `-M some-branch`, we generate a git worktree checkout under `data/gem5/some-branch`, with branch name `wt/some-branch`.
|
||||||
+
|
+
|
||||||
The initial revision for that worktree is whatever `gem5/gem5` is currently points to.
|
The initial revision for that worktree is whatever `gem5/gem5` is currently points to.
|
||||||
+
|
+
|
||||||
However, if the worktree already exists, we leave it untouched.
|
However, if the worktree already exists, we leave it untouched.
|
||||||
+
|
+
|
||||||
Therefore, you can safely go to that directory and edit the source there without fear that it will get deleted.
|
Therefore, you can safely go to that directory and edit the source there without fear that it will get deleted.
|
||||||
|
+
|
||||||
|
The `wt/` branch name prefix stands for `WorkTree`, and is done to allow us to checkout to a test `some-branch` branch under `gem5/gem5` and still use `-M some-branch`, without a conflict for the worktree branch.
|
||||||
|
|
||||||
All build outputs end up at: `out/common/gem5/<variant>` regardless.
|
All build outputs end up at: `out/common/gem5/<variant>` regardless.
|
||||||
|
|
||||||
|
|||||||
2
build
2
build
@@ -196,7 +196,7 @@ ln -s "$common_linux_variant_dir" "$common_linux_custom_dir"
|
|||||||
# Manage gem5 variants.
|
# Manage gem5 variants.
|
||||||
if "$gem5"; then
|
if "$gem5"; then
|
||||||
if [ ! -e "${common_gem5_src_dir}/.git" ]; then
|
if [ ! -e "${common_gem5_src_dir}/.git" ]; then
|
||||||
git -C "$common_gem5_default_src_dir" worktree add -b "${common_gem5_variant}" "${common_gem5_src_dir}"
|
git -C "$common_gem5_default_src_dir" worktree add -b "wt/${common_gem5_variant}" "${common_gem5_src_dir}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user