EL4 ES kernel recompile

Dave Francis DFrancis at nzaa.co.nz
Mon May 9 21:26:17 UTC 2005


Hi Murthy

Thanks heaps for that. I tried the rpmbuild of the kernel like you said, but
that failed. (output below).
The question is do I have to be more specific in my rpmbuild command,
because of the other kernels that are installed?
The kernel I am running is the kernel-2.6.9-5.0.5.EL. I saw somewhere that
the rpmbuild command uses the last listing in the rpm -q command??
*************************************
[root at albns001 SPECS]# rpm -qa |grep kernel
kernel-smp-2.6.9-5.EL
kernel-utils-2.4-13.1.48
kernel-devel-2.6.9-5.0.5.EL
kernel-2.6.9-5.EL
kernel-2.6.9-5.0.5.EL
kernel-devel-2.6.9-5.EL
kernel-hugemem-devel-2.6.9-5.0.5.EL
kernel-smp-devel-2.6.9-5.0.5.EL
kernel-smp-2.6.9-5.0.5.EL
**************************************

Heres what happened when I tried to build...

Cheers
Dave


*********************************


[root at albns001 SPECS]# pwd
/usr/src/redhat/SPECS
[root at albns001 SPECS]# ls -l
total 88
-rw-rw-r--  1 root root 81993 Apr  9 06:14 kernel-2.6.spec

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2005.05.10 09:19:06
=~=~=~=~=~=~=~=~=~=~=~=
rpmbuild -bp --target=i686 kernel-2.6.spec 
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.99869
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf kernel-2.6.9
+ /bin/mkdir -p kernel-2.6.9
+ cd kernel-2.6.9
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/linux-2.6.9.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ cd linux-2.6.9
+ echo 'Patch #3 (patch-2.6.9-ac11.bz2):'
Patch #3 (patch-2.6.9-ac11.bz2):
+ /usr/bin/bzip2 -d
+ patch -p1 -s
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ echo 'Patch #4 (linux-2.6.9-selected-ac-bits.patch):'
Patch #4 (linux-2.6.9-selected-ac-bits.patch):
+ patch -p1 -s

****{Dave} Hundreds more patches go here ****

+ cp /usr/src/redhat/SOURCES/COPYING.modules Documentation/
+ mkdir configs
+ cp -fv /usr/src/redhat/SOURCES/kernel-2.6.9-i686-hugemem.config
/usr/src/redhat/SOURCES/kernel-2.6.9-i686-smp.config
/usr/src/redhat/SOURCES/kernel-2.6.9-i686.config .
`/usr/src/redhat/SOURCES/kernel-2.6.9-i686-hugemem.config' ->
`./kernel-2.6.9-i686-hugemem.config'
`/usr/src/redhat/SOURCES/kernel-2.6.9-i686-smp.config' ->
`./kernel-2.6.9-i686-smp.config'
`/usr/src/redhat/SOURCES/kernel-2.6.9-i686.config' ->
`./kernel-2.6.9-i686.config'
+ for i in '*.config'
+ mv kernel-2.6.9-i686-hugemem.config .config
++ echo kernel-2.6.9-i686-hugemem.config
++ cut -d- -f3
++ cut -d. -f1
++ sed -e s/i.86/i386/ -e s/s390x/s390/ -e s/ppc64.series/ppc64/
+ make ARCH=i386 nonint_oldconfig
scripts/basic/fixdep.c:105:23: sys/types.h: No such file or directory
scripts/basic/fixdep.c:106:22: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:107:22: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:108:20: unistd.h: No such file or directory
scripts/basic/fixdep.c:109:19: fcntl.h: No such file or directory
scripts/basic/fixdep.c:110:20: string.h: No such file or directory
scripts/basic/fixdep.c:111:20: stdlib.h: No such file or directory
scripts/basic/fixdep.c:112:19: stdio.h: No such file or directory
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/syslimits.h:7,
                 from
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/limits.h:11,
                 from scripts/basic/fixdep.c:113:
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/limits.h:122:61: limits.h: No
such file or directory
scripts/basic/fixdep.c:114:19: ctype.h: No such file or directory
scripts/basic/fixdep.c:115:23: arpa/inet.h: No such file or directory
scripts/basic/fixdep.c: In function `usage':
scripts/basic/fixdep.c:129: warning: implicit declaration of function
`fprintf'
scripts/basic/fixdep.c:129: error: `stderr' undeclared (first use in this
function)
scripts/basic/fixdep.c:129: error: (Each undeclared identifier is reported
only once
scripts/basic/fixdep.c:129: error: for each function it appears in.)
scripts/basic/fixdep.c:130: warning: implicit declaration of function `exit'
scripts/basic/fixdep.c: In function `print_cmdline':
scripts/basic/fixdep.c:135: warning: implicit declaration of function
`printf'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:138: error: `NULL' undeclared here (not in a
function)
scripts/basic/fixdep.c: In function `grow_config':
scripts/basic/fixdep.c:151: warning: implicit declaration of function
`realloc'
scripts/basic/fixdep.c:151: warning: assignment makes pointer from integer
without a cast
scripts/basic/fixdep.c:153: warning: implicit declaration of function
`perror'
scripts/basic/fixdep.c: In function `is_defined_config':
scripts/basic/fixdep.c:169: warning: implicit declaration of function
`memcmp'
scripts/basic/fixdep.c: In function `define_config':
scripts/basic/fixdep.c:182: warning: implicit declaration of function
`memcpy'
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:201: error: `PATH_MAX' undeclared (first use in this
function)
scripts/basic/fixdep.c:215: warning: implicit declaration of function
`tolower'
scripts/basic/fixdep.c:201: warning: unused variable `s'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:220: error: syntax error before "size_t"
scripts/basic/fixdep.c:221: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:222: error: `map' undeclared (first use in this
function)
scripts/basic/fixdep.c:222: error: `len' undeclared (first use in this
function)
scripts/basic/fixdep.c:228: warning: implicit declaration of function
`ntohl'
scripts/basic/fixdep.c:239: warning: implicit declaration of function
`isalnum'
scripts/basic/fixdep.c: In function `strrcmp':
scripts/basic/fixdep.c:252: warning: implicit declaration of function
`strlen'
scripts/basic/fixdep.c: In function `do_config_file':
scripts/basic/fixdep.c:263: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:267: warning: implicit declaration of function `open'
scripts/basic/fixdep.c:267: error: `O_RDONLY' undeclared (first use in this
function)
scripts/basic/fixdep.c:269: error: `stderr' undeclared (first use in this
function)
scripts/basic/fixdep.c:273: warning: implicit declaration of function
`fstat'
scripts/basic/fixdep.c:275: warning: implicit declaration of function
`close'
scripts/basic/fixdep.c:278: warning: implicit declaration of function `mmap'
scripts/basic/fixdep.c:278: error: `PROT_READ' undeclared (first use in this
function)
scripts/basic/fixdep.c:278: error: `MAP_PRIVATE' undeclared (first use in
this function)
scripts/basic/fixdep.c:278: warning: assignment makes pointer from integer
without a cast
scripts/basic/fixdep.c:287: warning: implicit declaration of function
`munmap'
scripts/basic/fixdep.c:263: warning: unused variable `st'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:292: error: syntax error before "size_t"
scripts/basic/fixdep.c:293: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:294: error: `map' undeclared (first use in this
function)
scripts/basic/fixdep.c:295: error: `len' undeclared (first use in this
function)
scripts/basic/fixdep.c:297: error: `PATH_MAX' undeclared (first use in this
function)
scripts/basic/fixdep.c:299: warning: implicit declaration of function
`strchr'
scripts/basic/fixdep.c:301: error: `stderr' undeclared (first use in this
function)
scripts/basic/fixdep.c:297: warning: unused variable `s'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:334: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:338: error: `O_RDONLY' undeclared (first use in this
function)
scripts/basic/fixdep.c:340: error: `stderr' undeclared (first use in this
function)
scripts/basic/fixdep.c:350: error: `PROT_READ' undeclared (first use in this
function)
scripts/basic/fixdep.c:350: error: `MAP_PRIVATE' undeclared (first use in
this function)
scripts/basic/fixdep.c:350: warning: assignment makes pointer from integer
without a cast
scripts/basic/fixdep.c:334: warning: unused variable `st'
scripts/basic/fixdep.c: In function `traps':
scripts/basic/fixdep.c:369: error: `stderr' undeclared (first use in this
function)
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.9635 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.9635 (%prep)
**************************************************************

-----Original Message-----
From: Saripalli, Venkata Ramanamurthy (STSD) [mailto:saripalli at hp.com] 
Sent: Monday, 9 May 2005 4:48 p.m.
To: General Red Hat Linux discussion list
Subject: RE: EL4 ES kernel recompile

The RHEL 4 Distribution does not install sources under /usr/src/linux-2.6.
We need to build the source rpm to get the sources.

Install kernel-<version>.src.rpm (given the default RPM configuration, the
files this package contains will be written to /usr/src/redhat/)

Change directory to /usr/src/redhat/SPECS/, and issue the following command:

rpmbuild -bp --target=<arch> kernel.spec (Where <arch> is the desired target
architecture.) On a default RPM configuration, the kernel tree will be
located 

in /usr/src/redhat/BUILD/. 

In resulting tree, the configurations for the specific kernels shipped in
Red Hat Enterprise Linux 3.95 are in the /configs/ directory. For example,
the i686 SMP configuration file is named
/configs/kernel-<version>-i686-smp.config. Issue the following command to
place the desired configuration file in the proper place for
building: 
cp <desired-file> ./.config 

Issue the following command:
make oldconfig

thanks,
murthy.

-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com] On Behalf Of Dave Francis
Sent: Monday, May 09, 2005 10:08 AM
To: redhat-list at redhat.com
Subject: EL4 ES kernel recompile

Hi Guys
 
Im trying to recompile the kernel in EL4 ES in order to get the clock
running correctly under VMware ESX. 
 
As Redhat dont provide much info on the process for this under EL4, ive
kinda worked blind up to here, and now Im stuck. 
Fresh build.
First, ive updated (up2date).  (inc Kernel).
Next I installed the kernel source through up2date. 
Then I tried a make mrproper, and thats where Im stuck.
 
************************************
 

[root at albns001 2.6.9-5.0.5.EL-i686]# make mrproper
grep: /usr/include/bits/stat.h: No such file or directory
scripts/Makefile.clean:10: Documentation/DocBook/Makefile: No such file or
directory
make[1]: *** No rule to make target `Documentation/DocBook/Makefile'.
Stop.
make: *** [_mrproper_Documentation/DocBook] Error 2

[root at albns001 2.6.9-5.0.5.EL-i686]# pwd
/usr/src/kernels/2.6.9-5.0.5.EL-i686

[root at albns001 2.6.9-5.0.5.EL-i686]# uname -a Linux albns001.nzaa.co.nz
2.6.9-5.0.5.EL #1 Fri Apr 8 14:21:35 EDT 2005
i686
i686 i386 GNU/Linux


********************************
 
Has anybody got any ideas about what Im doing wrong?
 
All help appreciated.
Cheers
Dave
 
 

ATTENTION:  The information contained in this message and/or attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is
prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies. Thank you.
DISCLAIMER: To the maximum extent permitted by law, the sender and/or any
related party is not liable (including in respect of negligence) for viruses
or other defects or for changes made to this email or to any attachments.
Before opening or using attachments, check them for viruses and other
effects.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




More information about the redhat-list mailing list