(Virtual Machine) on Ubuntu 18.04 kernel system call to add linux-5.0.4
1. https://www.kernel.org/ download the Linux kernel
and moves to the ** / usr / src folder and unzip
unzip command: sudo-5.0.4.tar.xz the xz -d Linux
sudo tar -xf Linux -5.0.4.tar.xz
**
After the extraction is completed:
the kernel
cd /usr/src/linux-5.0.4
enter the kernel file
1./arch/x86/entry/syscalls/syscall_64.tbl increase system call number
to call 335 for me to add
2.include /linux/syscalls.h increase the header file system calls
3. Note here the difference with the previous version of the kernel to write /kernel/sys.c to define different system call
system call first added time did not notice the difference between the return value of a program leading to the final random number
After the implementation of make menuconfig to enter the graphical interface may be errors which can not be carried out according to package prompts directly sudo apt-get install xxx missing
Then execute sudo make -j4 began to compile the kernel package to install what is missing after j greater number represents the number of digital core, the faster compile virtual machine about four hours a core 4-core fast 30 minutes
After the kernel has finished compiling: sudo make modules compile
sudo make modules_install install just generated modules
installed just Mark sudo make install
here compiled restart to call the new function!
After rebooting
write a test to test
Test Run
mission completed! Keep your own written after backup hhh