Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Dec 2002 22:51:36 +0100 (CET)
From:      Markus Wild <mwild@vianetworks.ch>
To:        freebsd-sparc@FreeBSD.ORG
Subject:   Re: netbooting freebsd-sparc64 howto
Message-ID:  <200212022151.WAA86673@mail.kpnqwest.ch>

next in thread | raw e-mail | index | archive | help
> You still need tftp for boot net:dhcp.  bootp just provides a filename
> and machine to download from, it doesn't actually transfer files.  The
> firmware uses tftp to grab a particular file from the specified machine.

On the matter of bootp and the various BOOTP kernel options: what is
the rationale behind the sparc64 port _not_ using a cpu_rootconf()
function (such as for example in the i386 port) to avoid refetching
the network parameters that the firmware loader already retrieved and 
passed on to the kernel, at least as an option?

With the following small patch, you just need NFSCLIENT and NFS_ROOT as 
kernel option, and none of the BOOTP* to netboot (works fine at least for 
me here, perhaps I've missed something?).

Cheers,
Markus

RCS file: /home/ncvs/src/sys/sparc64/sparc64/autoconf.c,v
retrieving revision 1.10
diff -c -r1.10 autoconf.c
*** autoconf.c  18 Nov 2002 03:28:23 -0000      1.10
--- autoconf.c  2 Dec 2002 21:48:59 -0000
***************
*** 27,38 ****
--- 27,55 ----
   */
  
  #include "opt_isa.h"
+ #include "opt_bootp.h"
+ #include "opt_nfs.h"
+ #include "opt_nfsroot.h"
  
  #include <sys/param.h>
  #include <sys/systm.h>
  #include <sys/bus.h>
  #include <sys/cons.h>
  #include <sys/kernel.h>
+ #include <sys/malloc.h>
+ #include <sys/mount.h>
+ 
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <net/if_dl.h>
+ #include <net/if_types.h>
+ #include <net/if_var.h>
+ #include <net/ethernet.h>
+ #include <netinet/in.h>
+ #include <nfs/rpcv2.h>
+ #include <nfs/nfsproto.h>
+ #include <nfsclient/nfs.h>
+ #include <nfsclient/nfsdiskless.h>
  
  #ifdef DEV_ISA
  #include <isa/isavar.h>
***************
*** 57,59 ****
--- 74,95 ----
  #endif
        cold = 0;
  }
+ 
+ /*
+  * Do legacy root filesystem discovery.
+  */
+ void
+ cpu_rootconf()
+ {
+ #ifdef BOOTP
+         bootpc_init();
+ #endif
+ #if defined(NFSCLIENT) && defined(NFS_ROOT)
+ #if !defined(BOOTP_NFSROOT)
+         nfs_setup_diskless();
+         if (nfs_diskless_valid)
+ #endif
+                 rootdevnames[0] = "nfs:";
+ #endif
+ }
+ SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)


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




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