Skip to content

Commit

Permalink
neonvm-kernel: set of minor fixes
Browse files Browse the repository at this point in the history
Fix readme file for kernel builder
Update ubuntu to LTS
Rename kernel config file

Signed-off-by: Misha Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Nov 26, 2024
1 parent 15b68b9 commit 5528d42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions neonvm-kernel/Dockerfile.kernel-builder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Force initial check that KERNEL_VERSION is set appropriately
FROM ubuntu:23.10 AS check-arg
FROM ubuntu:24.04 AS check-arg
ARG KERNEL_VERSION
WORKDIR /build

Expand All @@ -8,7 +8,7 @@ RUN set -e \
&& test -n "${KERNEL_VERSION}" \
&& echo "force this as a requirement for build-deps" > /build/arg-check-succeeded

FROM ubuntu:23.10 AS build-deps
FROM ubuntu:24.04 AS build-deps
WORKDIR /build

RUN apt-get update && apt-get -y install \
Expand Down Expand Up @@ -67,7 +67,7 @@ COPY --from=build_amd64 /build/linux-${KERNEL_VERSION}/arch/x86/boot/bzImage /vm
# Build the kernel on amd64
FROM build-deps AS build_arm64
ARG KERNEL_VERSION
ADD linux-config-aarch64-${KERNEL_VERSION} linux-${KERNEL_VERSION}/.config
ADD linux-config-arm64-${KERNEL_VERSION} linux-${KERNEL_VERSION}/.config
RUN cd linux-${KERNEL_VERSION} && make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j `nproc`

# Copy the kernel image to a separate step
Expand Down
11 changes: 6 additions & 5 deletions neonvm-kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ with the following sequence of actions:
```
2. Then, inside the container, run:
```sh
export KERNEL_ARCH=arm64 # x86_64 or arm64
cd linux-$NEW_VERSION
cp /host/linux-config-6.1.92 .config # Copy current config in
make menuconfig
cp /host/linux-config-$KERNEL_ARCH-6.1.92 .config # Copy current config in
make ARCH=$KERNEL_ARCH menuconfig
# do nothing; just save and exit, overwriting .config
cp .config /host/linux-config-$NEW_VERSION # NOTE: Different from existing!
cp .config /host/linux-config-$KERNEL_ARCH-$NEW_VERSION # NOTE: Different from existing!
```
3. Back on the host, finish with:
```sh
# compare the two versions
diff linux-config-6.1.92 linux-config-$NEW_VERSION
diff linux-config-$KERNEL_ARCH-6.1.92 linux-config-$KERNEL_ARCH-$NEW_VERSION
# If all looks good, delete the old version. This is required so auto-selection works.
rm linux-config-6.1.92
rm linux-config-$KERNEL_ARCH-6.1.92
```

Afterwards, it's probably also good to do a search-and-replace repo-wide to update all places that
Expand Down
File renamed without changes.

0 comments on commit 5528d42

Please sign in to comment.