Part 1.1
Adding simple system call to kernel from scratch
DOWNLOAD FULL TUTORIAL WITH IMAGES FROM HERE
First create a directory named linuxSRC to download linux source, and Change directory to the folder:
console:
mkdir /linuxSRC cd linuxSRC
after that you should first download the linux source, inorder to download every source on the package repository of ubuntu you should go to your package list ,You need to uncomment the deb-src lines in the main file /etc/apt/sources.list not the extra files in/etc/apt/sources.list.d:
open software & updates
go to ubuntu software tab
check source code
save and exit
after that you should get your current version linux kernel and build dependencies:
console:
mkdir newKernel
cd newKernel
now download the linux source and decompress it:
console:
sudo apt-get install linux source
tar xjvf /usr/src/linux-source-<yourversion>tar.bz2
now go to the specified folder bellow :
/home/nubuntu/linuxSRC/linux-source-4.4.0/arch/x86/entry/syscalls
now open syscall_64.tbl or syscall_32.tbl (based on your system)(i use 64)
at the end add your hello syscall after the last number (here 333), with the following format, save and exit.
from here the tutorial have images, so I've created a nice PDF document with screen shots to download.
DOWNLOAD FULL TUTORIAL WITH IMAGES FROM HERE