Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Oct 2002 09:45:39 -0700
From:      Nathan Kinkade <nkinkade@dsl-only.net>
To:        Tim Kellers <timothyk@serv1.wallnet.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: compile kernel - copy it to another machine?
Message-ID:  <20021006094539.6b0f09ab.nkinkade@dsl-only.net>
In-Reply-To: <20021006095222.W84455-100000@serv1.wallnet.com>
References:  <20021005113504.267380da.nkinkade@dsl-only.net> <20021006095222.W84455-100000@serv1.wallnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 6 Oct 2002 10:04:43 -0400 (EDT)
Tim Kellers <timothyk@serv1.wallnet.com> wrote:

> > What sort of pitfalls could be expected?  The reason this issue has
> > come up for me is I've been working on getting a diskless
> > workstation going. The diskless workstation will boot off NICs
> > boot-ROM and will load the kernel compiled on my faster machine, but
> > as soon as the kernel finishes loading the machine just reboots.  I
> > can't find documentation anywhere that speaks of problems associated
> > with compiling on one machine and then distributing that kernel to
> > other, possibly heterogenous, machines. It appears that the `make'
> > process somehow factors in machine specific information, exclusive
> > of that in the kernel config file.  Is this accurate?
> >
> > Nathan

> I can only think of 2 options that I've had to be careful with; the
> first is the CPU type  -be sure to allow the proper CPU type [snip]
> The second is the multi-processor option [snip] If you send me your >
> source, I can try and compile it and run it on one or two of my >
> development boxes, or if you want, I can send you a kernel that I know
> works.
> 
> Tim Kellers
> CPE/NJIT

Tim, thanks for the reply.  I discovered last night that the slower
machine will not run virtually ANYTHING compiled on my faster SMP
machine, much less the kernel.  Both the CPU type and SMP options have
been set correctly.  Below is the kernel config file that I'm dealing
with.  The kernel config file is so small because this it is for a
diskless workstation.  Further, I tried to remove anything that I
thought might be giving me a problem (I also removed the comments, for
the sake of brevity).  Like I say, it appears that kernel compile
process factors in more than is stated in the kernel config file.  It
must be compiling the kernel specific to other environmental factors? 
One thing I haven't tried doing is booting my fast machine to the
GENERIC kernel and then trying to compile the kernel.  I'll try that in
a minute.  Thanks for your help, Nathan 

Here are the, I think, relevant specs of the two machines:

FAST MACHINE (where I want to compile the kernel):
Dual PIII 733 with 256MB RAM, 100MHz FSB
Interesting kernel config options:
  cpu             I686_CPU
  options         CPU_ENABLE_SSE
  options         SMP
  options         APIC_IO
CPU specs (per dmesg):
  Timecounter "i8254"  frequency 1193182 Hz
  CPU: Pentium III/Pentium III Xeon/Celeron (735.00-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x683  Stepping = 3
  Features=0x387fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,
  PGE,MCA,CMOV,PAT,PSE36,PN,MMX,FXSR,SSE>

SLOW MACHINE (diskless workstation, where I want to install kernel):
P166 with 80MB RAM (72 pin SIMMS) with 66MHz FSB
CPU specs (per dmesg):
  Timecounter "i8254" frequency 1193182 Hz
  Timecounter "TSC" frequency 166194137 Hz
  CPU: Pentium/P54C (166.19-MHz 586-class CPU)
  Origin = "GenuineIntel" Id = 0x52c Stepping = 12
  Features=0x1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>

Here is the kernel config file that compiles without problem on the fast
machine, but will not boot on the slow machine:

machine         i386
cpu             I586_CPU
ident           DISKLESS
maxusers        0

options         INET                    #InterNETworking
options         MFS                     #Memory Filesystem
options         MD_ROOT                 #MD is a potential root device
options         NFS                     #Network Filesystem
options         NFS_ROOT                #NFS usable as root device, NFS
options         PROCFS                  #Process filesystem
options         COMPAT_43               #Compatible with BSD 4.3 
options         UCONSOLE                #Allow users to grab the console
options         SYSVSHM                 #SYSV-style shared memory
options         SYSVMSG                 #SYSV-style message queues
options         SYSVSEM                 #SYSV-style semaphores
options         P1003_1B                #Posix P1003_1B real-time
options         _KPOSIX_PRIORITY_SCHEDULING
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev

# Added for diskless operation
options         BOOTP          # Use BOOTP to obtain IP address/hostname
options         BOOTP_NFSROOT  # NFS mount root filesystem using BOOTP
options         BOOTP_NFSV3    # Use NFS version 3

device          isa
device          eisa
device          pci

# Floppy drives
device          fdc0    at isa? port IO_FD1 irq 6 drq 2
device          fd0     at fdc0 drive 0

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc0 at isa? port IO_KBD
device          atkbd0  at atkbdc? irq 1 flags 0x1
device          psm0    at atkbdc? irq 12

device          vga0    at isa?

# splash screen/screen saver
pseudo-device   splash

# syscons is the default console driver, resembling an SCO console
device          sc0     at isa? flags 0x100

# Floating point support - do not disable.
device          npx0    at nexus? port IO_NPX irq 13

# ISA Ethernet NICs.
device          miibus
device          fxp

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device   loop            # Network loopback
pseudo-device   ether           # Ethernet support
pseudo-device   pty             # Pseudo-ttys (telnet etc)
pseudo-device   md              # Memory "disks"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021006094539.6b0f09ab.nkinkade>