mirror of https://github.com/tLDP/LDP
aldev updates
This commit is contained in:
parent
684ec40576
commit
abf2778556
|
@ -28,7 +28,7 @@
|
|||
</affiliation>
|
||||
</author>
|
||||
<pubdate>
|
||||
v6.1, 22 June 2003
|
||||
v6.3, 4 July 2003
|
||||
</pubdate>
|
||||
<abstract>
|
||||
<para>
|
||||
|
@ -104,7 +104,7 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Each and every University in the world compiles the OS kernel
|
||||
Each and every University, School and College in the world compiles the OS kernel
|
||||
before using any computer!
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -176,13 +176,10 @@
|
|||
<ulink url="http://www.milkywaygalaxy.freeservers.com">
|
||||
"http://www.milkywaygalaxy.freeservers.com"
|
||||
</ulink>
|
||||
. You may want to check there for changes). Mirror sites are at -
|
||||
<ulink url="http://www.angelfire.com/country/aldev0">
|
||||
angelfire
|
||||
</ulink>
|
||||
,
|
||||
<ulink url="http://www.geocities.com/alavoor/index.html">
|
||||
geocities
|
||||
. You may want to check there for changes).
|
||||
Mirror sites are at -
|
||||
<ulink url="http://milkyway.bounceme.net">
|
||||
http://milkyway.bounceme.net
|
||||
</ulink>
|
||||
. These sites have lot of linux goodies and tips.
|
||||
</para>
|
||||
|
@ -224,9 +221,12 @@
|
|||
</emphasis>
|
||||
This step may save you time, if you want to reuse the old settings.
|
||||
Whenever you install the kernel, generally you put the config file in
|
||||
/boot. So, you can use the existing version of config file:
|
||||
/boot. Do not save the .config as .config.save because
|
||||
'make mrproper' will wipe out all .config* files!!
|
||||
So, you can use the existing version of config file:
|
||||
<programlisting format="linespecific">
|
||||
bash# mv /usr/src/linux/.config /usr/src/linux/.config.save
|
||||
bash# mkdir /usr/src/kernelconfigs
|
||||
bash# mv /usr/src/linux/.config /usr/src/kernelconfigs/.config.save
|
||||
bash# cp /boot/config-2.4.18-19.8.0 /usr/src/linux/.config
|
||||
</programlisting>
|
||||
Or another method is - you can copy the .config file from your old
|
||||
|
@ -266,9 +266,11 @@
|
|||
|
||||
<listitem>
|
||||
<para>
|
||||
cd /usr/src/linux; cp .config .config.save;
|
||||
make clean; make mrproper
|
||||
cp .config.save .config # In case you want to reuse the config file ??
|
||||
cd /usr/src/linux;
|
||||
mkdir /usr/src/kernelconfigs ;
|
||||
cp /usr/src/linux/.config /usr/src/kernelconfigs/.config.save;
|
||||
make clean; make mrproper; make clean;
|
||||
cp /usr/src/kernelconfigs/.config.save .config # In case you want to reuse the config file ??
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -315,7 +317,7 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
make install # But NOT recommended - use cp
|
||||
make install # But "NOT recommended" - use cp
|
||||
/usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.myker
|
||||
</para>
|
||||
<para>
|
||||
|
@ -404,7 +406,7 @@
|
|||
Unpack the sources:
|
||||
</emphasis>
|
||||
Login in as 'root' throughout all these steps. Mount Redhat
|
||||
linux cdrom and install the linux kernel source rpm
|
||||
linux cdrom (Disc 2 of Redhat9) and install the linux kernel source rpm
|
||||
<programlisting format="linespecific">
|
||||
bash$ su - root
|
||||
bash# cd /mnt/cdrom/RedHat/RPMS
|
||||
|
@ -426,7 +428,17 @@
|
|||
<ulink url="http://rpmfind.net/linux/RPM/kondara/jirai/i586/bin86-0.4-8k.i586.html">
|
||||
bin86-kondara
|
||||
</ulink>
|
||||
). Also make sure that /usr/src/linux is soft link pointing to
|
||||
). In latest Redhat 9, the kernel-source.rpm contains the kernel-headers.
|
||||
Usually kernel source is on Redhat discs or in SRPMs disc. Otherwise,
|
||||
you can get from
|
||||
<ulink url="http://rpmfind.net/linux/rpm2html/search.php?query=kernel-source&submit=Search+...&system=&arch=">
|
||||
rpmfind.net kernel-source
|
||||
</ulink>
|
||||
(look for RawHide for latest Redhat) and
|
||||
<ulink url="http://rpmfind.net/linux/rpm2html/search.php?query=kernel-headers&submit=Search+...&system=&arch=">
|
||||
rpmfind.net kernel-headers
|
||||
</ulink>.
|
||||
Also make sure that /usr/src/linux is soft link pointing to
|
||||
proper unpacked source.
|
||||
<programlisting format="linespecific">
|
||||
bash# cd /usr/src
|
||||
|
@ -458,10 +470,12 @@
|
|||
file.
|
||||
<programlisting format="linespecific">
|
||||
bash# cd /usr/src/linux
|
||||
bash# cp .config .config.save
|
||||
bash# mkdir /usr/src/kernelconfigs ;
|
||||
bash# cp /usr/src/linux/.config /usr/src/kernelconfigs/.config.save;
|
||||
bash# make clean
|
||||
bash# make mrproper # Must do this if want to start clean slate or if you face lot of problems
|
||||
bash# cp .config.save .config # In case you want to reuse the config file ??
|
||||
bash# make mrproper # "MUST DO THIS mrproper", otherwise you will face hell lot of problems !!
|
||||
bash# make clean
|
||||
bash# cp /usr/src/kernelconfigs/.config.save .config # In case you want to reuse the config file ??
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -474,11 +488,18 @@
|
|||
</emphasis>
|
||||
This step may save you time, if you want to reuse the old
|
||||
settings. Whenever you install the kernel, generally you put the
|
||||
config file in /boot. So, you can use the existing version of
|
||||
config file:
|
||||
config file in /boot. There are some baseline config files
|
||||
which are located in /usr/src/linux/configs/kernel-*.config
|
||||
which you can use.
|
||||
So, you can use the existing version of config file:
|
||||
<programlisting format="linespecific">
|
||||
bash# mv /usr/src/linux/.config /usr/src/linux/.config.save
|
||||
bash# mkdir /usr/src/kernelconfigs ;
|
||||
bash# cp /usr/src/linux/.config /usr/src/kernelconfigs/.config.save;
|
||||
bash# cp /boot/config-2.4.18-19.8.0 /usr/src/linux/.config
|
||||
Or copy from the default vanilla config file from /usr/src/linux/configs
|
||||
bash# cp /usr/src/linux/configs/kernel-2.4.18-i686.config /usr/src/linux/.config
|
||||
Or for athlon processors
|
||||
bash# cp /usr/src/linux/configs/kernel-2.4.18-athlon.config /usr/src/linux/.config
|
||||
</programlisting>
|
||||
Or another method is - you can copy the .config file from your
|
||||
old linux kernel source tree to new kernel tree
|
||||
|
@ -827,6 +848,15 @@
|
|||
<title>
|
||||
Loadable Modules
|
||||
</title>
|
||||
<para>
|
||||
Everyone who used 'Loadable Modules' really "loves" them!! I like the
|
||||
Loadable Modules, they are really cute and they break up a large task
|
||||
into tiny manageable pieces. When you start using them, I can bet
|
||||
that you will fall in love them! Loadable Module is peculiar only
|
||||
to Linux. Linux is the first operating system in the world to introduce the
|
||||
concept of Loadable Module. No other operating system has this concept,
|
||||
but in near future other operating systems may implement this.
|
||||
</para>
|
||||
<para>
|
||||
Loadable kernel modules can save memory and ease configuration. The
|
||||
scope of modules has grown to include filesystems, ethernet card
|
||||
|
@ -1002,7 +1032,8 @@
|
|||
modules_install'. And later you did 'make clean' to free up disk
|
||||
space. And now, you want to change a "C" file in one of the modules
|
||||
and want to rebuild just that module and copy the module file to
|
||||
/lib/modules. How do you do it?
|
||||
/lib/modules. How do you do it? And, you do not want to give 'make modules'
|
||||
as that will rebuild everything and will take about 2 to 3 hours!
|
||||
</para>
|
||||
<para>
|
||||
You can compile just a single module file (say like foo.o) and install
|
||||
|
@ -1010,12 +1041,23 @@
|
|||
only those directories you are interested.
|
||||
</para>
|
||||
<para>
|
||||
For an example, if I am interested in installing only fs/autofs
|
||||
A good example is - I found that my default kernel did not include the
|
||||
NTFS filesystem support (I did make clean after make modules. Darn and Damn it!).
|
||||
So, I decided to compile
|
||||
the loadable module of NTFS. I did not want to compile the whole set
|
||||
(as it will take me about 2 hours), so I followed the procedure below and
|
||||
compiled just the fs/ntfs and did 'insmod ntfs'. It just took me about
|
||||
5 minutes!!
|
||||
</para>
|
||||
<para>
|
||||
Another example: If I am interested in installing only fs/autofs
|
||||
module, then I do the following :
|
||||
<programlisting format="linespecific">
|
||||
cd /usr/src/linux
|
||||
cp Makefile Makefile.my
|
||||
vi Makefile.my
|
||||
mv Makefile Makefile.original
|
||||
cp Makefile.original Makefile.my
|
||||
ln -s Makefile.my Makefile # Because some files underneath still need "Makefile"
|
||||
vi Makefile.my
|
||||
# And comment out the line having 'SUBDIRS' and add the
|
||||
# directory you are interested, for example like fs/autofs as below :
|
||||
#SUBDIRS =kernel drivers mm fs net ipc lib abi crypto
|
||||
|
@ -1024,8 +1066,22 @@
|
|||
make -f Makefile.my modules
|
||||
# This will create module autofs.o
|
||||
# Now, copy the module object file to destination /lib/modules
|
||||
make -f Makefile.my modules_install
|
||||
# And this will do 'cp autofs.o /lib/modules/2.4.18-19.8.0/kernel/fs/autofs'
|
||||
# DANGER: Do NOT DO THIS - "make -f Makefile.my modules_install" This may
|
||||
# clean up other good ones in /lib/modules !! But just copy as below:
|
||||
cp autofs.o /lib/modules/2.4.18-19.8.0/kernel/fs/autofs
|
||||
|
||||
# Now, reset everything back to normal
|
||||
rm Makefile # This is a link to Makefile.my
|
||||
ln -s Makefile.original Makefile
|
||||
|
||||
# Record your changes to the config file for future use
|
||||
# Edit the /usr/src/linux/.config file and set the item as module
|
||||
cd /usr/src/linux
|
||||
mkdir /usr/src/kernelconfigs ;
|
||||
cp /usr/src/linux/.config /usr/src/kernelconfigs/.config.save;
|
||||
vi /usr/src/linux/.config
|
||||
# And change the config parameter. For example in case of my
|
||||
# ntfs module I did CONFIG_NTFS_FS=m to indicate as module.
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -4294,10 +4350,12 @@ Save and rerun lilo.
|
|||
as shown below:
|
||||
<programlisting format="linespecific">
|
||||
bash# cd /usr/src/linux
|
||||
bash# cp .config .config.save
|
||||
bash# mkdir /usr/src/kernelconfigs ;
|
||||
bash# cp /usr/src/linux/.config /usr/src/kernelconfigs/.config.save;
|
||||
bash# make clean
|
||||
bash# make mrproper # Must do this if want to start clean slate or if you face lot of problems
|
||||
bash# cp .config.save .config # In case you want to reuse the config file ??
|
||||
bash# make mrproper # "MUST DO THIS mrproper", otherwise you will face hell lot of problems !!
|
||||
bash# make clean
|
||||
bash# cp /usr/src/kernelconfigs/.config.save .config # In case you want to reuse the config file ??
|
||||
</programlisting>
|
||||
</para>
|
||||
</sect2>
|
||||
|
@ -4405,7 +4463,7 @@ bash# cp .config.save .config # In case you want to reuse the config file ??
|
|||
gives compile problems. You should give 'make mrproper' before doing
|
||||
make.
|
||||
<programlisting format="linespecific">
|
||||
bash# make clean && make mrproper
|
||||
bash# make clean && make mrproper # "MUST DO THIS mrproper", otherwise you will face hell lot of problems !!
|
||||
</programlisting>
|
||||
If this problem persists, then try menuconfig instead of xconfig.
|
||||
Sometimes GUI version xconfig causes some problems:
|
||||
|
@ -4478,7 +4536,8 @@ bash# cp .config.save .config # In case you want to reuse the config file ??
|
|||
bash# cd /usr/src/linux
|
||||
bash# make dep
|
||||
bash# make clean
|
||||
bash# make mrproper
|
||||
bash# make mrproper # "MUST DO THIS mrproper", otherwise you will face hell lot of problems !!
|
||||
bash# make clean
|
||||
bash# nohup make bzImage &
|
||||
bash# tail -f nohup.out (.... to monitor the progress)
|
||||
bash# make modules
|
||||
|
|
Loading…
Reference in New Issue