429 lines
7.8 KiB
HTML
429 lines
7.8 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|||
|
<HTML
|
|||
|
><HEAD
|
|||
|
><TITLE
|
|||
|
>How to produce openMosix's Kernel RPM files</TITLE
|
|||
|
><META
|
|||
|
NAME="GENERATOR"
|
|||
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|||
|
REL="HOME"
|
|||
|
TITLE="The openMosix HOWTO"
|
|||
|
HREF="index.html"><LINK
|
|||
|
REL="UP"
|
|||
|
TITLE="How to produce openMosix's Kernel RPM files"
|
|||
|
HREF="rpm.html"><LINK
|
|||
|
REL="PREVIOUS"
|
|||
|
TITLE="How to produce openMosix's Kernel RPM files"
|
|||
|
HREF="rpm.html"><LINK
|
|||
|
REL="NEXT"
|
|||
|
TITLE="More Info"
|
|||
|
HREF="last.html"></HEAD
|
|||
|
><BODY
|
|||
|
CLASS="SECT1"
|
|||
|
BGCOLOR="#FFFFFF"
|
|||
|
TEXT="#000000"
|
|||
|
LINK="#0000FF"
|
|||
|
VLINK="#840084"
|
|||
|
ALINK="#0000FF"
|
|||
|
><DIV
|
|||
|
CLASS="NAVHEADER"
|
|||
|
><TABLE
|
|||
|
SUMMARY="Header navigation table"
|
|||
|
WIDTH="100%"
|
|||
|
BORDER="0"
|
|||
|
CELLPADDING="0"
|
|||
|
CELLSPACING="0"
|
|||
|
><TR
|
|||
|
><TH
|
|||
|
COLSPAN="3"
|
|||
|
ALIGN="center"
|
|||
|
>The openMosix HOWTO: </TH
|
|||
|
></TR
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
WIDTH="10%"
|
|||
|
ALIGN="left"
|
|||
|
VALIGN="bottom"
|
|||
|
><A
|
|||
|
HREF="rpm.html"
|
|||
|
ACCESSKEY="P"
|
|||
|
>Prev</A
|
|||
|
></TD
|
|||
|
><TD
|
|||
|
WIDTH="80%"
|
|||
|
ALIGN="center"
|
|||
|
VALIGN="bottom"
|
|||
|
>Appendix A. How to produce openMosix's Kernel RPM files</TD
|
|||
|
><TD
|
|||
|
WIDTH="10%"
|
|||
|
ALIGN="right"
|
|||
|
VALIGN="bottom"
|
|||
|
><A
|
|||
|
HREF="last.html"
|
|||
|
ACCESSKEY="N"
|
|||
|
>Next</A
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
><HR
|
|||
|
ALIGN="LEFT"
|
|||
|
WIDTH="100%"></DIV
|
|||
|
><DIV
|
|||
|
CLASS="SECT1"
|
|||
|
><H1
|
|||
|
CLASS="SECT1"
|
|||
|
><A
|
|||
|
NAME="AEN1797"
|
|||
|
></A
|
|||
|
>A.1. How to produce openMosix's Kernel RPM files</H1
|
|||
|
><P
|
|||
|
> A step-by-step guide for the dumb release manager and the adventurous
|
|||
|
"do it yourself" RPM packager , by Mirko Caserta</P
|
|||
|
><P
|
|||
|
></P
|
|||
|
><OL
|
|||
|
TYPE="1"
|
|||
|
><LI
|
|||
|
><P
|
|||
|
>Install a RedHat 8 (psyche) on your machine. This is so far the
|
|||
|
platform used to produce the rpms and it's known to do its job
|
|||
|
well</P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
>Get an updated copy of the "linux-openmosix" module from oM's CVS
|
|||
|
repository - details can be found at
|
|||
|
http://sourceforge.net/cvs/?group_id=46729</P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
>Get the tarball for the Linux Kernel sources which we are going to
|
|||
|
patch and put it in /usr/src/redhat/SOURCES - supposing we're
|
|||
|
talking about a 2.4.20 Kernel, get the linux-2.4.20.tar.bz2 file
|
|||
|
from one of the many http://www.kernel.org/ mirrors worldwide</P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
>Unpack the kernel tarball under /usr/src, ie:
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # cd /usr/src
|
|||
|
# tar vxjf redhat/SOURCES/linux-2.4.20.tar.bz2</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
></P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
>Make a symbolic link to the directory where you've checked out the
|
|||
|
linux-openmosix module, for instance:
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # ln -s /home/mcaserta/src/linux-openmosix/linux-openmosix \
|
|||
|
/usr/src/linux-openmosix</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
></P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
>copy the .spec file and all the .config files which are found in
|
|||
|
this directory under /usr/src/redhat/SOURCES, ie:
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # cp /usr/src/linux-openmosix/configs/openmosix-kernel.spec \
|
|||
|
/usr/src/redhat/SOURCES
|
|||
|
|
|||
|
# cp /usr/src/linux-openmosix/configs/*.config \
|
|||
|
/usr/src/redhat/SOURCES</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
> </P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
> Now it's time to check the version numbers before we make the patch
|
|||
|
file: make sure the very first lines in
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> /usr/src/linux-openmosix/Makefile and
|
|||
|
/usr/src/redhat/SOURCES/openmosix-kernel.spec have the correct</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
>
|
|||
|
|
|||
|
kernel version and openMosix revision number</P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
> Good, time to make the patch (suppose we're releasing a patch for
|
|||
|
the 2.4.20 Linux Kernel and the 3rd release of openMosix):
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # cd /usr/src
|
|||
|
# diff -Naur --exclude=CVS --exclude=configs \
|
|||
|
linux-2.4.20 linux-openmosix > \
|
|||
|
/usr/src/redhat/SOURCES/openMosix-2.4.20-3
|
|||
|
# bzip2 /usr/src/redhat/SOURCES/openMosix-2.4.20-3</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
> </P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
> At this point your /usr/src/redhat/SOURCES directory should look like:
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # ls /usr/src/redhat/SOURCES
|
|||
|
kernel-2.4.20-athlon.config kernel-2.4.20-i686-smp.config
|
|||
|
kernel-2.4.20-athlon-smp.config linux-2.4.20.tar.bz2
|
|||
|
kernel-2.4.20-i386.config openMosix-2.4.20-3.bz2
|
|||
|
kernel-2.4.20-i686.config openmosix-kernel.spec</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
> </P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
> Now you only need to rpmbuild the whole thing - what I usually do is:
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # cd /usr/src/redhat/SOURCES
|
|||
|
# rpmbuild -ba --target i386 openmosix-kernel.spec
|
|||
|
# rpmbuild -bb --target i686 openmosix-kernel.spec
|
|||
|
# rpmbuild -bb --target athlon openmosix-kernel.spec</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
>
|
|||
|
|
|||
|
but you can easily build all rpms by calling:
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> # rpmbuild -ba --target all_x86 openmosix-kernel.spec</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
> </P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
> After rpmbuild has done its job, you should have the following
|
|||
|
files under the /usr/src/redhat directory:
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> a) RPMS/i386/openmosix-kernel-2.4.20-openmosix3.i386.rpm
|
|||
|
b) RPMS/i686/openmosix-kernel-2.4.20-openmosix3.i686.rpm
|
|||
|
c) RPMS/i686/openmosix-kernel-smp-2.4.20-openmosix3.i686.rpm
|
|||
|
d) RPMS/athlon/openmosix-kernel-2.4.20-openmosix3.athlon.rpm
|
|||
|
e) RPMS/athlon/openmosix-kernel-smp-2.4.20-openmosix3.athlon.rpm
|
|||
|
f) RPMS/i386/openmosix-kernel-source-2.4.20-openmosix3.i386.rpm
|
|||
|
g) SRPMS/openmosix-kernel-2.4.20-openmosix3.src.rpm
|
|||
|
h) SOURCES/openMosix-2.4.20-3.gz</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
>
|
|||
|
|
|||
|
where:
|
|||
|
|
|||
|
<TABLE
|
|||
|
BORDER="0"
|
|||
|
BGCOLOR="#E0E0E0"
|
|||
|
WIDTH="90%"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
><FONT
|
|||
|
COLOR="#000000"
|
|||
|
><PRE
|
|||
|
CLASS="PROGRAMLISTING"
|
|||
|
> a) binary kernel package for i386 UP* machines
|
|||
|
b) binary kernel package for i686 UP* machines
|
|||
|
c) binary kernel package for i686 SMP** machines
|
|||
|
d) binary kernel package for athlon UP* machines
|
|||
|
e) binary kernel package for athlon SMP** machines
|
|||
|
f) source kernel package for any x86 machine (basically this is
|
|||
|
useful if you need to have the openMosix kernel headers)
|
|||
|
g) source kernel package (see point 11)
|
|||
|
h) kernel patch file compressed with gzip</PRE
|
|||
|
></FONT
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
> </P
|
|||
|
></LI
|
|||
|
><LI
|
|||
|
><P
|
|||
|
> The magic spell to obtain all the files back from the .src.rpm file is:
|
|||
|
|
|||
|
# rpm2cpio openmosix-kernel-....src.rpm | cpio -di</P
|
|||
|
></LI
|
|||
|
></OL
|
|||
|
><P
|
|||
|
>Special thanks to Martin H<>y for the help while I was trying to get
|
|||
|
the whole thing together. </P
|
|||
|
><P
|
|||
|
>I hope you find this document useful. At least it is for me since I
|
|||
|
tend to forget things a few minutes after I've accomplished them :)</P
|
|||
|
><P
|
|||
|
>* UP = UniProcessor (i.e. one CPU)
|
|||
|
** SMP = Symmetric Multi Processing (i.e. more than one CPU)</P
|
|||
|
></DIV
|
|||
|
><DIV
|
|||
|
CLASS="NAVFOOTER"
|
|||
|
><HR
|
|||
|
ALIGN="LEFT"
|
|||
|
WIDTH="100%"><TABLE
|
|||
|
SUMMARY="Footer navigation table"
|
|||
|
WIDTH="100%"
|
|||
|
BORDER="0"
|
|||
|
CELLPADDING="0"
|
|||
|
CELLSPACING="0"
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
WIDTH="33%"
|
|||
|
ALIGN="left"
|
|||
|
VALIGN="top"
|
|||
|
><A
|
|||
|
HREF="rpm.html"
|
|||
|
ACCESSKEY="P"
|
|||
|
>Prev</A
|
|||
|
></TD
|
|||
|
><TD
|
|||
|
WIDTH="34%"
|
|||
|
ALIGN="center"
|
|||
|
VALIGN="top"
|
|||
|
><A
|
|||
|
HREF="index.html"
|
|||
|
ACCESSKEY="H"
|
|||
|
>Home</A
|
|||
|
></TD
|
|||
|
><TD
|
|||
|
WIDTH="33%"
|
|||
|
ALIGN="right"
|
|||
|
VALIGN="top"
|
|||
|
><A
|
|||
|
HREF="last.html"
|
|||
|
ACCESSKEY="N"
|
|||
|
>Next</A
|
|||
|
></TD
|
|||
|
></TR
|
|||
|
><TR
|
|||
|
><TD
|
|||
|
WIDTH="33%"
|
|||
|
ALIGN="left"
|
|||
|
VALIGN="top"
|
|||
|
>How to produce openMosix's Kernel RPM files</TD
|
|||
|
><TD
|
|||
|
WIDTH="34%"
|
|||
|
ALIGN="center"
|
|||
|
VALIGN="top"
|
|||
|
><A
|
|||
|
HREF="rpm.html"
|
|||
|
ACCESSKEY="U"
|
|||
|
>Up</A
|
|||
|
></TD
|
|||
|
><TD
|
|||
|
WIDTH="33%"
|
|||
|
ALIGN="right"
|
|||
|
VALIGN="top"
|
|||
|
>More Info</TD
|
|||
|
></TR
|
|||
|
></TABLE
|
|||
|
></DIV
|
|||
|
></BODY
|
|||
|
></HTML
|
|||
|
>
|