Subject: pkg/17354: Added network support to sysutils/grub
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 06/21/2002 19:02:15
>Number:         17354
>Category:       pkg
>Synopsis:       Added network support to sysutils/grub
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 21 10:02:00 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted: