I wanted to create my own native kernel with another syscall table. (same system calls, but in different positions / numbers)
I worked on kernel 3.2.29.
Changing the kernel was pretty simple:
1) syscall position change in arch / x86 / kernel / syscall_table_32.S
2) change the syscall macro number in arch / x86 / include / asm / unistd_32.h
3) compilation and installation of a new kernel
I switched system calls around: sys_open took the place and sys_read number, and vice versa.
I decided that if I compiled glibc with modified kernel headers, I might have a working system, but, unfortunately, this was not enough and my system would not boot.
Am I missing something? What else do I need to do to have a running system?
I have taken the following steps:
1) creating and installing a kernel as described in my question
2) extracting new kernel headers using make headers_install INSTALL_HDR_PATH=[path]
3) building glibc with the parameter --with-headers=[path/include]
4) I used live cd to access the file system from the outside to install a new glibc using make install install_root=[the original file system] (so that the system does not interrupt during installation)
I hope the new glibc was created correctly, but I'm not sure.
After that, when the system boots up, loading stops on the shell screen (initrafms): I think I need to rebuild initrd , but how to compile it according to the new syscall table?