Release Date: 2025-01-27
Part 2: Compile and Run Linux v6.12
Submission deadline: 2025-02-03 11:59pm on Canvas. No extension.
In this part, you will compile and run the Linux kernel v6.12. Make sure you already have a working VM environment and be able to directly ssh into the VM from a terminal on your host OS using the port forwarding approach.
- Open a tmux session named “LKP”,
- Get Linux kernel source from github repo here
- Switch to tag “v6.12”
- Change kernel config file to ensure the kernel name (output of
uname -a
) includes your VT PID/username in it, i.e., kernel name should end with “${YourPID}-LKP25”. ${YourPID} refers to your VT PID/username. - Compile and install the Linux kernel using default (the
defconfig
make target) configuration options- Please use
time make -j XXX
for parallel compilation, where XXX is the number of cores of your VM, save the output of the time command above, and put it in a file named “linux-kernel-compilation-time.txt”. Below is an example output in my setup:
- Please use
make -j24 1698.78s user 647.14s system 1418% cpu 2:45.41 total
- Append “Number of CPU cores used for compilation: XXX”, replace XXX with the number of cores you used for compilation, to the file “linux-kernel-compilation-time.txt”
- Reboot the VM using your compiled kernel
Double check
uname -a
shows that you’re using your compiled Linux kernel.- Take a screenshot to showcases the results of the following commands:
uname -a
andcat /proc/cmdline
, save it as “linux-kernel-screenshot.png”
➜ ~ uname -a
Linux fvm 6.12.0-huaicheng-lkp-gadc218676eef-dirty #10 SMP PREEMPT_DYNAMIC Mon Jan 27 05:33:14 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
➜ ~ cat /proc/cmdline
...
What to submit on Canvas (Assignments/Ex0)
Organize your results in the following folder/file format:
${YourPID}-lkp25-ex0/
- linux-kernel-compilation-time.txt
- linux-kernel-screenshot.png}
Submit ${YourPID}-lkp25-ex0.tar.gz (tar czvf ${YourPID}-lkp25-ex0.tar.gz ${YourPID}-lkp25-ex0
).