-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use: docker build -f dockerfiles/kernel-images-rhel8 . Requres: cilium/little-vm-helper#144 Signed-off-by: Lorenz Bauer <[email protected]> Signed-off-by: Kornilios Kourtis <[email protected]>
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# syntax=docker/dockerfile:1.3-labs | ||
# vim: set ft=dockerfile: | ||
|
||
FROM quay.io/lvh-images/lvh:latest AS lvh | ||
|
||
FROM rockylinux:8 AS builder | ||
|
||
COPY --from=lvh /usr/bin/lvh /usr/bin/lvh | ||
|
||
RUN dnf install -y 'dnf-command(builddep)' 'dnf-command(config-manager)' | ||
RUN dnf config-manager --set-enabled powertools | ||
RUN dnf builddep -y kernel | ||
|
||
FROM builder AS prepare | ||
|
||
WORKDIR /tmp | ||
RUN dnf download --source kernel && rpm -ivh kernel*.src.rpm | ||
|
||
WORKDIR /root/rpmbuild/SPECS | ||
RUN rpmbuild -bp kernel.spec --with baseonly | ||
|
||
RUN ln -s /root/rpmbuild/BUILD/kernel-*/linux-* /tmp/build | ||
WORKDIR /tmp/build | ||
|
||
RUN mkdir patches | ||
COPY patches/rhel8/*.patch patches/ | ||
RUN for p in patches/*.patch; do echo "Applying $p"; patch -p1 < "$p" || exit 1; done | ||
|
||
# Emulate InitBuildVars() from kernel.spec | ||
RUN make -s mrproper | ||
RUN cp configs/kernel-*-$(uname -m)-debug.config .config | ||
|
||
# Remove all RHEL modules | ||
RUN sed --in-place -E -e 's/^(CONFIG_[^=]+)=m/# \1 is not set/' .config | ||
|
||
COPY _data /data | ||
|
||
RUN lvh kernels --dir /data raw_configure . rhel8 2>&1 | ||
|
||
FROM prepare AS build | ||
|
||
RUN make -j $(nproc) | ||
RUN make tar-pkg | ||
|
||
COPY scripts/generate-btf.sh /tmp/ | ||
RUN /tmp/generate-btf.sh /tmp/build/tar-install | ||
|
||
FROM busybox as kernel | ||
COPY --from=build /tmp/build/tar-install /data/kernels/rhel8 |
38 changes: 38 additions & 0 deletions
38
patches/rhel8/0001-fs-9p-vfs_file.c-use-new-return-type-vm_fault_t.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From fe6340e2d1f5ef9ebb9a82665b053c362837cbd6 Mon Sep 17 00:00:00 2001 | ||
From: Souptick Joarder <[email protected]> | ||
Date: Tue, 17 Jul 2018 19:14:35 -0700 | ||
Subject: [PATCH] fs/9p/vfs_file.c: use new return type vm_fault_t | ||
|
||
Use new return type vm_fault_t for page_mkwrite handler. | ||
|
||
See 1c8f422059ae ("mm: change return type to vm_fault_t") for reference. | ||
|
||
Link: http://lkml.kernel.org/r/20180702154928.GA3964@jordon-HP-15-Notebook-PC | ||
Signed-off-by: Souptick Joarder <[email protected]> | ||
Reviewed-by: Matthew Wilcox <[email protected]> | ||
Acked-by: Jun Piao <[email protected]> | ||
Cc: Eric Van Hensbergen <[email protected]> | ||
Cc: Ron Minnich <[email protected]> | ||
Cc: Latchesar Ionkov <[email protected]> | ||
Signed-off-by: Andrew Morton <[email protected]> | ||
Signed-off-by: Dominique Martinet <[email protected]> | ||
--- | ||
fs/9p/vfs_file.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c | ||
index 03c9e325bfbc..5f2e48d41d72 100644 | ||
--- a/fs/9p/vfs_file.c | ||
+++ b/fs/9p/vfs_file.c | ||
@@ -533,7 +533,7 @@ v9fs_mmap_file_mmap(struct file *filp, struct vm_area_struct *vma) | ||
return retval; | ||
} | ||
|
||
-static int | ||
+static vm_fault_t | ||
v9fs_vm_page_mkwrite(struct vm_fault *vmf) | ||
{ | ||
struct v9fs_inode *v9inode; | ||
-- | ||
2.43.0 | ||
|