two kernel questions

Bruce Dubbs bdubbs at swbell.net
Mon Jul 16 16:42:42 PDT 2001


Gerard Beekmans wrote:

>On Sun, Jul 15, 2001 at 08:39:17PM -0300, Guillermo Pereyra Irujo wrote:
>
>>I think depmod uses /lib/modules/`uname -r`/ as the modules dir. Perhaps
>>you are using your base system's uname. If this is right, you can look for
>>an option to give depmod the right path, make a soft link from 2.2.19-1k
>>to 2.4.7-pre6 inside /lib/modules, or replace temporarily your uname with
>>a fake uname script like this:
>>
>>#!/bin/sh
>>uname $* | sed s/2.2.19-1k/2.4.7-pre6/g
>>
>
>uname doesn't hard-code that information. uname obtains it from /proc -
>at least it is supposed to do this
>
 From uname.c

#if defined (HAVE_SYSINFO) && defined (SI_ARCHITECTURE)
  if (sysinfo (SI_ARCHITECTURE, processor, sizeof (processor)) == -1)
    error (1, errno, _("cannot get processor type"));
#else
  strcpy (processor, "unknown");
#endif
 
  print_element (PRINT_SYSNAME, name.sysname);
  print_element (PRINT_NODENAME, name.nodename);
  print_element (PRINT_RELEASE, name.release);
  print_element (PRINT_VERSION, name.version);
  print_element (PRINT_MACHINE, name.machine);
  print_element (PRINT_PROCESSOR, processor);
 
  exit (0);
}

The only place SI_ARCHITECURE is defined itn the kernel is:

/home/root/linux/include/asm-ia64/sn/systeminfo.h

#define SI_ARCHITECTURE         6       /* return instruction set arch 
*/          


If you don't have an ia64, it looks hard coded to me.

  -- Bruce

-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list