Skip to content

Commit 7aba4fc

Browse files
kalyazinclaude
andcommitted
docs: document the patches/<version>/ mechanism
Explain where out-of-tree patches live, when they are applied during the build, and the workflow for adding a new patch via `git format-patch`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
1 parent 89fc547 commit 7aba4fc

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,23 @@ and uploading the resulting binaries to a Google Cloud Storage (GCS) bucket.
3434
- On every push, GitHub Actions will automatically build the kernels and
3535
save it as an artifact.
3636

37+
## Patches
38+
39+
Out-of-tree patches are stored under `patches/<kernel-version>/` and
40+
applied during the build, after the source tree is reset to the kernel
41+
tag and the config is copied into place, but before `make olddefconfig`.
42+
Patches are applied in filename-sort order with `git apply`. Versions
43+
without a `patches/<version>/` directory are built unmodified.
44+
45+
To add a new patch:
46+
```sh
47+
cd /path/to/linux
48+
git format-patch -1 --stdout <commit-sha> \
49+
> /path/to/fc-kernels/patches/<kernel-version>/NNNN-<subject>.patch
50+
```
51+
Use the next free `NNNN` prefix in that version's directory and commit
52+
the patch file alongside any related changes.
53+
3754
## Architecture naming
3855

3956
Output directories use Go's `runtime.GOARCH` convention (`amd64`, `arm64`)

0 commit comments

Comments
 (0)