next up previous contents index
Next: 2.1.2.4 Configuring the kernel Up: 2.1.2 rtl2.0 and rtl2.2 Previous: 2.1.2.2 Download and tar   Contents   Index

2.1.2.3 The linux link

Some of the compiler operations that you are about to invoke with make, require that the linux kernel stuff be found in the /usr/src/linux directory. Your new Mandrake system may or may not have such a directory. You can find out using the explorer shown above or you can use the console. If you use the explorer, you may have some difficulty removing a link by deleting it. I found some kind of conflict that developed so I'll only show the console procedures below.

The konsole window allows you to repeat commands by pressing the up arrow until you get to the command that you wish to enter again. This feature makes it  so that you do not have to type all commands. You can just find the one you want and repeat it by pressing enter or return. (note that in the directory command ls -l that l is lowercase L)

[root@localhost /root]# cd /usr/src 
[root@localhost src]# ls -l 
total 12 
drwxr-xr-x   7 root     root         4096 May 16 06:47 RPM/  
lrwxrwxrwx   1 root     root         12 Jun 4 17:16 linux -> linux-2.2.14/  
drwxr-xr-x  20 root     root         4096 May 16 10:42 linux-2.2.14/  
drwxr-xr-x   4 root     root         4096 Nov 25 1999 rtlinux-2.2/

I see from the fifth line that - linux ->linux-2.2.14. So the linux file in this directory is a link. Since it is only a link I can delete it and then check to make sure it is gone.

[root@localhost src]# rm linux  
rm: remove `linux'? y  
[root@localhost src]# ls -l 
total 12 
drwxr-xr-x   7 root    root        4096 May 16 06:47 RPM/  
drwxr-xr-x  20 root    root        4096 May 16 10:42 linux-2.2.14/  
drwxr-xr-x   4 root    root        4096 Nov 25  1999 rtlinux-2.2/

Now if it is a real directory with a bunch of sub directories, I'd need to move it to some other location. I'd do that by first seeing that it was a directory rather than a link to a directory.

[root@localhost src]# ls -l  
total 16 
drwxr-xr-x   7 root    root        4096 May 16 06:47 RPM/ 
drwxr-xr-x   3 root    root        4096 Jun  4 17:36 linux/ 
drwxr-xr-x  20 root    root        4096 May 16 10:42 linux-2.2.14/ 
drwxr-xr-x   4 root    root        4096 Nov 25  1999 rtlinux-2.2/

I see from the light red line that linux is a common directory - its line begins with d rather than l and it just has a / after its name. I need to move this linux directory out of the way before I compile a new kernel. I'll called it linuxold. The mv command with the linux name and linuxold as the new name, does the deed for me.

[root@localhost src]# mv linux linuxold 
[root@localhost src]# ls -l  
total 16  
drwxr-xr-x    7 root     root        4096 May 16 06:47 RPM/  
drwxr-xr-x   20 root     root        4096 May 16 10:42 linux-2.2.14/  
drwxr-xr-x    3 root     root        4096 Jun  4 17:36 linuxold/  
drwxr-xr-x    4 root     root        4096 Nov 25  1999 rtlinux-2.2/

Now you need to make a new link in place of the old /usr/src/linux

[root@localhost src]# ln -s rtlinux-2.2/linux linux  
[root@localhost src]# ls -l  
total 16  
drwxr-xr-x   7 root     root        4096 May 16 06:47 RPM/  
lrwxrwxrwx   1 root     root          17 Jun  4 17:49 linux -> rtlinux-2.2/linux/ 
drwxr-xr-x  20 root     root        4096 May 16 10:42 linux-2.2.14/  
drwxr-xr-x   3 root     root        4096 Jun  4 17:36 linuxold/  
drwxr-xr-x   4 root     root        4096 Nov 25  1999 rtlinux-2.2/

Make certain that the link goes from /usr/src/linux to the realtime/linux. Not the other way round. With this done we are ready to get down to work.


next up previous contents index
Next: 2.1.2.4 Configuring the kernel Up: 2.1.2 rtl2.0 and rtl2.2 Previous: 2.1.2.2 Download and tar   Contents   Index
root 2003-05-26