Re: BLCR and kernel 2.6.32

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Fri Dec 18 2009 - 16:40:15 PST

  • Next message: Alan Woodland: "Re: BLCR and kernel 2.6.32"
    Paul H. Hargrove wrote:
    > Alan Woodland wrote:
    >> 2009/12/18 Yuri D'Elia <yuri.delia_at_eurac_dot_edu>:
    >>  
    >>> Just tried to see the dkms boot script in action...
    >>>
    >>> checking kernel symbol table for exported register_chrdev... not found
    >>> ======================================================================
    >>> Please review the following configuration information:
    >>>  Kernel source directory = /lib/modules/2.6.32-trunk-amd64/build
    >>>  Kernel build directory = /lib/modules/2.6.32-trunk-amd64/build
    >>>  Kernel symbol table = /boot/System.map-2.6.32-trunk-amd64
    >>>  Kernel version probed from kernel build = 2.6.32-trunk-amd64
    >>>  Kernel running currently = 2.6.32-trunk-amd64
    >>> ======================================================================
    >>> configure: error: Unable to use kernel 2.6.32-trunk-amd64 - kernel does
    >>> not export register_chrdev
    >>>
    >>> whoops :|
    >>>     
    >>
    >> Looks like things changed a bit in 2.6.32 again. I'm not going to have
    >> time to look at it properly until the new year, although possibly
    >> someone upstream has already encountered this one?
    >>
    >> Alan
    >>
    >>   
    >
    > Regretfully, I also don't expect to look at this much until January.
    > I'll try look today to see if it is something quick, but doubt that it 
    > will be.
    >
    > -Paul
    >
    
    Good news.  This DID turn out to be a small/easy change.  With the 
    attached patch (in addition to the patch for 2.6.31 support) I can 
    configure, build and pass "make check" with a 2.6.32 kernel (from 
    kernel.org) on a PPC64 machine.
    
    -Paul
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 Tel: +1-510-495-2352
    HPC Research Department                   Fax: +1-510-486-6900
    Lawrence Berkeley National Laboratory     
    
    
    # Apply this patch AFTER blcr-0.8.2+kernel-2.6.31.patch01
    #  -Paul
    Index: configure.ac
    ===================================================================
    RCS file: /var/local/cvs/lbnl_cr/configure.ac,v
    retrieving revision 1.410.2.9
    diff -u -r1.410.2.9 configure.ac
    --- configure.ac	15 Jun 2009 22:33:56 -0000	1.410.2.9
    +++ configure.ac	19 Dec 2009 00:37:32 -0000
    @@ -1536,7 +1536,10 @@
     # the System.map used to locate symbols and configure time.
     CR_FIND_EXPORTED_KSYM([register_chrdev],[CODE])
     if test "$cr_addr" = "0"; then
    -  CR_BAD_KERNEL([kernel does not export register_chrdev])
    +  CR_FIND_EXPORTED_KSYM([__register_chrdev],[CODE])
    +  if test "$cr_addr" = "0"; then
    +    CR_BAD_KERNEL([kernel does not export register_chrdev or __register_chrdev])
    +  fi
     fi
     CR_FIND_EXPORTED_KSYM([register_blkdev],[CODE])
     if test "$cr_addr" = "0"; then
    Index: blcr_imports/module.c
    ===================================================================
    RCS file: /var/local/cvs/lbnl_cr/blcr_imports/module.c,v
    retrieving revision 1.2
    diff -u -r1.2 module.c
    --- blcr_imports/module.c	13 May 2008 06:06:19 -0000	1.2
    +++ blcr_imports/module.c	19 Dec 2009 00:37:32 -0000
    @@ -81,7 +81,13 @@
     
     	/* Check current kernel against System.map used at configure time */
     	{
    +#if defined(CR_EXPORTED_KCODE_register_chrdev)
     	    unsigned long offset1 = CR_EXPORTED_KCODE_register_chrdev - (unsigned long)&register_chrdev;
    +#elif defined(CR_EXPORTED_KCODE___register_chrdev)
    +	    unsigned long offset1 = CR_EXPORTED_KCODE___register_chrdev - (unsigned long)&__register_chrdev;
    +#else
    +	    #error "No register_chrdev symbol for validation of System.map"
    +#endif
     	    unsigned long offset2 = CR_EXPORTED_KCODE_register_blkdev - (unsigned long)&register_blkdev;
     	    if (
     #if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PHYSICAL_ALIGN)
    

  • Next message: Alan Woodland: "Re: BLCR and kernel 2.6.32"