2004/12/04

Note: Fedora Core 3 Release Notes中關於編譯核心方面的變動

kernel

  • In the past, the process of updating the kernel did not change the default kernel in the system's boot loader configuration.

    Fedora Core 3 changes this behavior to set newly-installed kernels as the default. This behavior applies to all installation methods (including rpm -i).

    This behavior is controlled by two lines in the /etc/sysconfig/kernel file:

    • UPGRADEDEFAULT �� Controls whether new kernels will be booted by default (default value: yes)

    • DEFAULTKERNEL �� kernel RPMs whose names match this value will be booted by default (default value: depends on hardware configuration)

  • In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel's .src.rpm file, Fedora Core 3 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel .src.rpm file. To create an exploded source tree from this file, perform the following steps (note that <version> refers to the version specification for your currently-running kernel):

    1. Obtain the kernel-<version>.src.rpm file from one of the following sources:

      • The SRPMS directory on the appropriate "SRPMS" CD iso image

      • The FTP site where you got the kernel package

      • By running the following command:

        up2date --get-source kernel

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

    3. 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/.

    4. In resulting tree, the configurations for the specific kernels shipped in Fedora Core 3 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

    5. Issue the following command:

      make oldconfig

    You can then proceed as usual.

    Note

    An exploded source tree is not required to build kernel modules against the currently in-use kernel.

    For example, to build the foo.ko module, create the following file (named Makefile) in the directory containing the foo.c file:

    
    
    obj-m    := foo.o
    
    KDIR    := /lib/modules/$(shell uname -r)/build
    PWD    := $(shell pwd)
    
    default:
       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
    
                 

    Issue the make command to build the foo.ko module.

  • I2O SCSI RAID adapters from manufacturers such as Adaptec now use the i2o_block driver, rather than the dpt_i2o driver used by Fedora Core 1 and earlier distributions.

    Be aware that block devices used by the i2o_block driver are /dev/i2o/hd* rather than the /dev/sd* SCSI devices. This may be problematic for those upgrading from older distributions that used the dpt_i2o driver. Therefore, after an upgrade to Fedora Core 3, you may need to boot using a rescue disk and edit your /etc/fstab file to use the new devices.

    For more information about the new I2O device layer and Fedora Core-specific notes, visit the I2O homepage:

    http://i2o.shadowconnect.com/

No comments: