Skip to content

Commit 12290e4

Browse files
committed
ci: sort patch series into directories
Sorting patch series into directories, so it's easier to swap out individual series without renaming the patch numbers on everything that comes after. Leave gaps in the numbering of the series directories, so that it's easy to potentially insert new series in the middle, if needed. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 8a48bae commit 12290e4

File tree

28 files changed

+24
-8
lines changed

28 files changed

+24
-8
lines changed

resources/hiding_ci/build_and_install_kernel.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ confirm() {
6565
}
6666

6767
apply_patch_file() {
68+
echo "Applying patch:" $(basename $1)
69+
6870
git apply $1
6971
}
7072

@@ -75,6 +77,23 @@ apply_patch_or_series() {
7577
esac
7678
}
7779

80+
apply_all_patches() {
81+
if [ ! -d "$1" ]; then
82+
echo "Not a directory: $1"
83+
return
84+
fi
85+
86+
echo "Applying all patches in $1"
87+
88+
for f in $1/*; do
89+
if [ -d $f ]; then
90+
apply_all_patches $f
91+
else
92+
apply_patch_or_series $f
93+
fi
94+
done
95+
}
96+
7897
check_new_config() {
7998
if [[ -e "/boot/config-$KERNEL_VERSION" ]]; then
8099
return 0;
@@ -156,10 +175,7 @@ git fetch --depth 1 origin $KERNEL_COMMIT_HASH
156175
git checkout FETCH_HEAD
157176

158177
# Apply our patches on top
159-
for PATCH in $KERNEL_PATCHES_DIR/*.*; do
160-
echo "Applying patch:" $(basename $PATCH)
161-
apply_patch_or_series $PATCH
162-
done
178+
apply_all_patches $KERNEL_PATCHES_DIR
163179

164180
echo "Making kernel config ready for build"
165181
# We use olddefconfig to automatically pull in the
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Linux kernel patches for direct map removal
22

3-
The Linux kernel patches in this directory are distributed under the `GPL-2.0`
4-
licence (see the full licence text at [GPL-2.0](./GPL-2.0)). The patches are
5-
required by Firecracker's "Secret Freedom" feature that removes the VM memory
6-
from the host direct map (see
3+
The Linux kernel patches in this directory and its subdirectories are
4+
distributed under the `GPL-2.0` licence (see the full licence text at
5+
[GPL-2.0](./GPL-2.0)). The patches are required by Firecracker's "Secret
6+
Freedom" feature that removes the VM memory from the host direct map (see
77
[lore](https://lore.kernel.org/kvm/20250221160728.1584559-1-roypat@amazon.co.uk/)
88
for more details). The patches are not yet merged upstream.

0 commit comments

Comments
 (0)