NetBSD Problem Report #17354

Received: (qmail 10335 invoked by uid 605); 21 Jun 2002 17:01:28 -0000
Message-Id: <20020621170215.E1E491E787@darkstar.local>
Date: Fri, 21 Jun 2002 19:02:15 +0200 (CEST)
From: jmmv@hispabsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jmmv@hispabsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: Added network support to sysutils/grub
X-Send-Pr-Version: 3.95

>Number:         17354
>Category:       pkg
>Synopsis:       Added network support to sysutils/grub
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tron
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 21 17:02:00 +0000 2002
>Closed-Date:    Sat Jul 20 12:44:10 +0000 2002
>Last-Modified:  Sat Jul 20 12:44:10 +0000 2002
>Originator:     Julio Merino
>Release:        NetBSD 1.6B
>Organization:
HispaBSD
>Environment:


System: NetBSD darkstar.local 1.6B NetBSD 1.6B (DARKSTAR) #1: Fri Jun 21 13:22:23 CEST 2002 root@darkstar.local:/var/build/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	The GRUB bootloader has support to boot kernels through a network,
	as explained in the NetBSD's Netboot HOWTO. There is a problem though;
	the package itself does not support passing options to GRUB to enable
	network cards at compilation time.

	I've added several GRUB_USE_name, where 'name' is the name of the
	network card, to sysutils/grub/Makefile.
>How-To-Repeat:

>Fix:
	First of all, here is PLIST.diskless, needed when any network card
	is enabled (two more binaries are installed):

---- start PLIST.diskless -----
@comment $NetBSD$
share/grub/${MACHINE_ARCH}-/nbgrub
share/grub/${MACHINE_ARCH}-/pxegrub
---- end PLIST.diskless -----

	And here is the Makefile patch:

---- start patch.diff -----
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/grub/Makefile,v
retrieving revision 1.7
diff -u -u -r1.7 Makefile
--- Makefile	2002/06/08 18:28:06	1.7
+++ Makefile	2002/06/21 16:56:52
@@ -15,6 +15,204 @@
 USE_GMAKE=		YES
 USE_BUILDLINK_ONLY=	YES

+# See note at the end
+PLIST_SRC=
+
+# Network driver: 3Com509
+.if defined(GRUB_USE_3C509)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-3c509
+.endif
+
+# Network driver: 3Com529
+.if defined(GRUB_USE_3C529)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-3c529
+.endif
+
+# Network driver: 3Com595
+.if defined(GRUB_USE_3C595)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-3c595
+.endif
+
+# Network driver: 3Com90x
+.if defined(GRUB_USE_3C90X)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-3c90x
+.endif
+
+# Network driver: 3Com507
+.if defined(GRUB_USE_3C507)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-3c507
+.endif
+
+# Network driver: 3Com503
+.if defined(GRUB_USE_3C503)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-3c503
+.endif
+
+# Network driver: CS89x0
+.if defined(GRUB_USE_CS89X0)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-cs89x0
+.endif
+
+# Network driver: Davicom
+.if defined(GRUB_USE_DAVICOM)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-davicom
+.endif
+
+# Network driver: DEPCA and EtherWORKS
+.if defined(GRUB_USE_DEPCA)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-depca
+.endif
+
+# Network driver: Etherexpress Pro/10
+.if defined(GRUB_USE_EEPRO)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-eepro
+.endif
+
+# Network driver: Etherexpress Pro/100
+.if defined(GRUB_USE_EEPRO100)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-eepro100
+.endif
+
+# Network driver: SMC 83c170 EPIC/100
+.if defined(GRUB_USE_EPIC100)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-epic100
+.endif
+
+# Network driver: EXOS205
+.if defined(GRUB_USE_EXOS205)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-exos205
+.endif
+
+# Network driver: Racal-Interlan NI5210
+.if defined(GRUB_USE_NI5210)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-ni5210
+.endif
+
+# Network driver: Racal-Interlan NI6510
+.if defined(GRUB_USE_NI6510)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-ni6510
+.endif
+
+# Network driver: Racal-Interlan NI5010
+.if defined(GRUB_USE_NI5010)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-ni5010
+.endif
+
+# Network driver: Lance PCI PCNet/32
+.if defined(GRUB_USE_LANCE)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-lance
+.endif
+
+# Network driver: Novell NE2100
+.if defined(GRUB_USE_NE2100)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-ne2100
+.endif
+
+# Network driver: NatSemi DP8381x
+.if defined(GRUB_USE_NATSEMI)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-natsemi
+.endif
+
+# Network driver: NE1000/2000 ISA
+.if defined(GRUB_USE_NE)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-ne
+.endif
+
+# Network driver: NE2000 PCI
+.if defined(GRUB_USE_NS8390)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-ns8390
+.endif
+
+# Network driver: WD8003/8013, SMC8216/8416
+.if defined(GRUB_USE_WD)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-wd
+.endif
+
+# Network driver: Old Tulip
+.if defined(GRUB_USE_OTULIP)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-otulip
+.endif
+
+# Network driver: Realtek 8139
+.if defined(GRUB_USE_RTL8139)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-rtl8139
+.endif
+
+# Network driver: SIS 900 and SIS 7016
+.if defined(GRUB_USE_SIS900)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-sis900
+.endif
+
+# Network driver: Schneider and Koch G16
+.if defined(GRUB_USE_SK_G16)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-sk-g16
+.endif
+
+# Network driver: SMC9000
+.if defined(GRUB_USE_SMC9000)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-smc9000
+.endif
+
+# Network driver: Tiara
+.if defined(GRUB_USE_TIARA)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-tiara
+.endif
+
+# Network driver: Tulip
+.if defined(GRUB_USE_TULIP)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-tulip
+.endif
+
+# Network driver: Rhine-I/II
+.if defined(GRUB_USE_VIA_RHINE)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-via-rhine
+.endif
+
+# Network driver: Winbond W89c840, Compex RL100-ATX
+.if defined(GRUB_USE_W89C840)
+GRUB_USE_DISKLESS=	yes
+CONFIGURE_ARGS+=	--enable-w89c840
+.endif
+
+.if defined(GRUB_USE_DISKLESS)
+CONFIGURE_ARGS+=	--enable-diskless
+PLIST_SRC+=		PLIST.diskless
+.endif
+
+# Note: we add PLIST after PLIST.diskless (if it has been included)
+# so directories can be removed properly.
+PLIST_SRC+=	PLIST
+
 .include "../../devel/binutils/buildlink.mk"
 .include "../../devel/ncurses/buildlink.mk"
 .include "../../mk/bsd.pkg.mk"
---- end patch.diff -----
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: tron 
State-Changed-When: Fri Jul 19 07:05:03 PDT 2002 
State-Changed-Why:  
We try to avoid to make packages overconfigurable to prevent different 
behaviour of two packages with the same name. Is there a reason why we 
should not enable diskless support for all network cards by default? 


Responsible-Changed-From-To: pkg-manager->tron 
Responsible-Changed-By: tron 
Responsible-Changed-When: Fri Jul 19 07:05:03 PDT 2002 
Responsible-Changed-Why:  
I'll handle this PR. 

From: Julio Merino <jmmv@hispabsd.org>
To: "tron@netbsd.org" <tron@netbsd.org>
Cc: NetBSD GNATS <gnats-bugs@gnats.netbsd.org>
Subject: Re: pkg/17354
Date: Fri, 19 Jul 2002 16:17:50 +0200

 On 19 Jul 2002 14:06:54 -0000
 "tron@netbsd.org" <tron@netbsd.org> wrote:

 > We try to avoid to make packages overconfigurable to prevent different
 > behaviour of two packages with the same name. 

 I thought so... The other solution is to make independant packages for
 each network card, grub-*, but this would mean lots of packages :p

 > Is there a reason why we
 > should not enable diskless support for all network cards by default?

 Well, I think it would cause much overhead and big big binaries. Haven't
 tried it, though...

 Regards

 -- 
 HispaBSD admin - http://www.hispabsd.org
 Julio Merino <jmmv@hispabsd.org>

From: Matthias Scheler <tron@zhadum.de>
To: Julio Merino <jmmv@hispabsd.org>
Cc: NetBSD GNATS <gnats-bugs@gnats.netbsd.org>
Subject: Re: pkg/17354
Date: Fri, 19 Jul 2002 16:22:12 +0200

 On Fri, Jul 19, 2002 at 04:17:50PM +0200, Julio Merino wrote:
 > > We try to avoid to make packages overconfigurable to prevent different
 > > behaviour of two packages with the same name. 
 > 
 > I thought so... The other solution is to make independant packages for
 > each network card, grub-*, but this would mean lots of packages :p
 > 

 That sounds like an overkill.

 > > should not enable diskless support for all network cards by default?
 > 
 > Well, I think it would cause much overhead and big big binaries.

 I don't think it will be more than a few 100KB extra. I only wonder
 if the binaries can get so big that they won't work because of
 some BIOS restriction.

 	Kind regards

 -- 
 Matthias Scheler                                  http://scheler.de/~matthias/
State-Changed-From-To: feedback->analyzed 
State-Changed-By: tron 
State-Changed-When: Sat Jul 20 04:39:27 PDT 2002 
State-Changed-Why:  
I've just found the relevant part in the "grub" documentation: 
Caution: You should enable them as you need. Don't enable any 
unnecessary driver, because GRUB might crash if you include too many 
drivers at the same time. 
It seems that we definitely need to make the package customizable. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: tron 
State-Changed-When: Sat Jul 20 05:43:00 PDT 2002 
State-Changed-Why:  
I've added optional netboot support to the "grub" package. The netboot 
support is controlled with the package variable "GRUB_NETWORK_CARDS" 
and "GRUB_SCAN_ARGS". Thanks for the suggestion. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.