Skip to content

Commit 6f4870a

Browse files
committed
content: Add Replace Kernel with Mainline setion to kata
After successfully booting the VM, the kernel needs to be replaced. Add steps to replace the kernel running openEuler. Signed-off-by: Ruoqing He <[email protected]>
1 parent c90dfd9 commit 6f4870a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/cloud-native/kata-containers/kata-on-openEuler-riscv64.md

+33
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,36 @@ unxz openEuler-24.09-riscv64.qcow2.xz
5656
# Start VM, default account/password is root/openEuler12#$
5757
bash start_vm.sh
5858
```
59+
60+
### Replace Kernel with Latest Mainline Kernel
61+
62+
If you are trying to use VMM other than QEMU, you will need a kernel with AIA
63+
(Advance Interrupt Architecture) available (generally higher than or equal to
64+
v6.10).
65+
66+
```sh
67+
# In openEuler RISC-V 64-bit VM
68+
sudo dnf update
69+
70+
# Install dependencies required to build and install latest mainline kernel
71+
sudo dnf install automake golang gcc bc glibc-devel glibc-static busybox \
72+
glib2-devel glib2 ipvsadm conntrack-tools nfs-utils clang-devel patch \
73+
elfutils-libelf-devel openssl-devel bison flex rust cargo rust-packaging libgcc \
74+
dtc-devel protobuf-compiler dwarves
75+
76+
# Get kernel source code, v6.12 is the latest at the time of writing
77+
git clone --depth 1 --branch v6.12 https://github.com/torvalds/linux.git
78+
pushd linux
79+
make defconfig
80+
make -j$(nproc)
81+
make headers_install
82+
make modules_install
83+
make install
84+
popd
85+
86+
# Reboot with kernel just installed
87+
reboot
88+
```
89+
90+
If booting with newly installed kernel goes well, new we are set, the
91+
environment is capable of running VMMs.

0 commit comments

Comments
 (0)