Re: Kernel sources script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Do, den 06.01.2005 schrieb Chadley Wilson um 16:56:

> Guys could some one with more experience than me please check this script.
> this is the first part of it anyway; this part is supposed to install the new 
> kernel and kernel src rpm, build the kernel sources as per the realease 
> notes, don't worry about the arch here as this is for a batch of matching 
> machines. I would like to work out how to do it for specific kernels but will 
> get to that later. please just check that this is what needs doing for the 
> kernel source tree to be built
> 
> 
> #!/bin/sh"
> echo "Starting the update process"
> 
> #set the current directory variable
> updatedir=$(pwd)

Why do you set this? Doesn't make much sense in my eyes and even nails
the script call to be in the directory with the update files.

> #install new kernel
> rpm -Uvh $updatedir/kernel-2.6.9-1.681_FC3.i686.rpm

Paul already said to use "-i" instead "-U" here to be on the safe side.

> #Install kernel source
> rpm -Uvh $updatedir/kernel-2.6.9-1.681_FC3.src.rpm
> 
> #build the source tree
> cd /usr/src/redhat/SPECS/
> rpmbuild -v -v -bp --target=`uname -m` kernel-2.6.spec
> cp 
> -f /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/configs/kernel-2.6.9-i686.config /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/.config

Dave Jones recently pointed out here on the list that the
kernel-2.6.9-i686.config is a suggestion and does not necessarily must
match the config of the kernel you installed above. You want an example?

$ diff -uNr
/usr/src/linux-2.6.9-1.11_FC2/configs/kernel-2.6.9-i686-smp.config
/boot/config-2.6.9-1.11_FC2smp
--- /usr/src/linux-2.6.9-1.11_FC2/configs/kernel-2.6.9-i686-smp.config 
2005-01-02 21:46:48.000000000 +0100
+++ /boot/config-2.6.9-1.11_FC2smp      2005-01-02 22:30:17.000000000
+0100
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-ac11
-# Sun Jan  2 15:46:17 2005
+# Linux kernel version: 2.6.9-1.11_FC2smp
+# Sun Jan  2 16:17:40 2005
 #
 CONFIG_X86=y
 CONFIG_MMU=y
@@ -52,8 +52,8 @@
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_OBSOLETE_MODPARM=y
 CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SIG is not set
-# CONFIG_MODULE_SIG is not set
+CONFIG_MODULE_SIG=y
+# CONFIG_MODULE_SIG_FORCE is not set
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
                                                                                        
@@ -2500,10 +2500,10 @@
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+CONFIG_DEBUG_HIGHMEM=y
+CONFIG_DEBUG_INFO=y
 # CONFIG_FRAME_POINTER is not set
 CONFIG_EARLY_PRINTK=y
 CONFIG_DEBUG_STACKOVERFLOW=y


> cd $updatedir
> 
> echo "Your New Kernel and its Source are installed ;)"
> #Done

A specific reason why not letting do yum or up2date do the job to find
out whether there is a matching kernel for an update in the updatedir
(which is a repository then)? You then have no need to write your own
logic to determine the right kernel RPM matching your system.

> Chadley Wilson

Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp 
Serendipity 18:57:23 up 14 days, 20:41, load average: 0.07, 0.16, 0.20 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux